I have a URL, for example http://somedomain.com/sync_login/go123/go and it gives an XML, if you're gonna view it in web browser (i use firefox), the output is something like this:
<SyncLoginResponse>
<Videos>
<Video>
<name>27/flv</name>
<title>scooter</title>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/videos/</url>
<thumbnail>http://somedomain.com/tabletcms/tablets/tablet_content/000002/thumbnails/106/jpg</thumbnail>
</Video>
</Videos>
<Slideshows>
<Slideshow>
<name>44</name>
<title>ProcessFlow</title>
<pages>4</pages>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/slideshows/</url>
</Slideshow>
<Slideshow>
<name>71</name>
<title>Processflows</title>
<pages>3</pages>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/slideshows/</url>
</Slideshow>
</Slideshows>
<Forms>
<Form>
<name>Best Form Ever/html</name>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/form/</url>
</Form>
</Forms>
<Websites>
<Website>
<name>facebook</name>
<url>http://www.facebook.com</url>
</Website>
</Websites>
<Surveys>
<Survey>
<name>CokeSurvey/html</name>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/survey/</url>
</Survey>
</Surveys>
<Interactives>
<Interactive>
<name>34/swf</name>
<title>PirateGem</title>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/interactives/</url>
<thumbnail>http://somedomain.com/tabletcms/tablets/tablet_content/000002/thumbnails/110/png</thumbnail>
</Interactive>
<Interactive>
<name>36/swf</name>
<title>tictactoe</title>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/interactives/</url>
<thumbnail>http://somedomain.com/tabletcms/tablets/tablet_content/000002/thumbnails/106/jpg</thumbnail>
</Interactive>
</Interactives>
<Skins>
<Skin>
<title>CokeZero</title>
<fontcolor>F50A0A</fontcolor>
<backgroundcolor>787777</backgroundcolor>
<reset>18-reset/png</reset>
<slideshows>18-slideshows/png</slideshows>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/skins/</url>
</Skin>
</Skins>
<AdminSites>
<AdminSite>
<name>yahoo</name>
<url>http://www.yahoo.com</url>
</AdminSite>
</AdminSites>
<AdminSlideshows>
<AdminSlideshow>
<name>71</name>
<title>Processflows</title>
<pages>3</pages>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/slideshows/</url>
</AdminSlideshow>
</AdminSlideshows>
<AdminVideos>
<AdminVideo>
<name>27/flv</name>
<title>scooter</title>
<url>http://somedomain.com/tabletcms/tablets/tablet_content/000002/videos/</url>
<thumbnail>http://somedomain.com/tabletcms/tablets/tablet_content/000002/thumbnails/106/jpg</thumbnail>
</AdminVideo>
</AdminVideos>
<UserDetails>
<userid>137</userid>
<userfirstname>Jayem</userfirstname>
<userlastname>Dalisay</userlastname>
<messages></messages>
<companyname>John Stewart Company</companyname>
</UserDetails>
</SyncLoginResponse>
I want to download to my tablet the information and files given on that XML.
I'm new to android dev, many thanks in advance!
I wrote this method in my AsyncTask class, so I use publishProgress to update progress, you can remove that line. But I suggest you wrote your AsyncTask as well.
Hope it helps :)
And dont forget to add android.permission.INTERNET permission in your android-manifest.xml. I made this stupid mistake serval times :)