hey i have been trying to use the Util.downloadUrlToFileSystemInBackground method but its not working.when i run the codename One simulator it gets stuck in a loop.what i would like is the download to work in the background ,plus i would also like to display a download progress.below is the code responsible for the download
Map<String, String> data = myList.get(i);
String link = data.get("fileurl");
Util.downloadUrlToFileSystemInBackground(link,title, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
try{
InputStream is = Storage.getInstance().createInputStream(link);
Media mm = MediaManager.createMedia(is, "audio/mp3");
mm.play();
}
catch (IOException ex) {
ex.printStackTrace();
}
}
});