Show message on display while calling MultipartRequest

12 views
Skip to first unread message

tobias...@googlemail.com

unread,
Oct 18, 2018, 11:00:51 AM10/18/18
to CodenameOne Discussions
Hi, how can i send a message on the display while the app is receiving data from server.

Does someone knwos an example ? 
Thanks
Tobias

IDE: Eclipse
Windows
Simulator IOs / Andorid 
Device IOs / Andorid

Shai Almog

unread,
Oct 19, 2018, 12:54:05 AM10/19/18
to CodenameOne Discussions
Hi,
you can show any UI e.g. a dialog and dispose it when download is done e.g.

Dialog progress = new Dialog("Downloading", BoxLayout.y());
progress
.add(new SpanLabel("Downloading from the server please wait...", "DialogBody");
progress
.showModless();
boolean success = Util.downloadUrlToStorage(url, fileNameToStore, false);
progress
.dispose();
if(success) {
   
ToastBar.showInfoMessage("Download completed Successfully!");

} else {
   
ToastBar.showErrorMessage("Download failed!");
}


Reply all
Reply to author
Forward
0 new messages