In my previous question, i asked "how to download Facebook profile picture" and i got answer that "Use an AsyncTask to download it and save it to your app's disk space".
i am using sencha touch (its all about java script and html) for creating views with phonegap. i need to download image from web (from this url https://graph.facebook.com/username/picture
).
so, when i was learning AsyncTask, i had a doubt that "can i use AsyncTask in sencha android application?", because i didn't create views (i mean button, panel, etc..) using activity xml.
is there any other solution to download picture from web in sencha touch application (Android) ?
Update for the solution
i used below facebook api to get the profile picture url and Phonegap file Api for downloading picture as @Lukas K said.
FB.api('/'+fbusername+'/picture?redirect=false', function(response) {
localStorage.fbpicurl = response.data.url;
});