02-05-2013 03:59 AM
Hi guys,
I'm having this issue since playbook 2.0.1. I thought I had solved but it's still present both on playbook 2.1 and on bb10.
On same conditions, downloading from the same server, sometimes everything works fine and some others it does not fire download_started, progress or finished events, but FILES ARE DOWNLOADED, no events but REQUEST but file is correctly downloaded.
I have a webview where I let user download certain file types (epub, fb2...) so I added download events to webview:
wk=new QNXStageWebView('libraries');
wk.backgroundColor=0xffffff;
wk.overScrollColor=0xffffff;
wk.stage=this.stage;
wk.blockPopups=true;
wk.addEventListener(WebDownloadRequestEvent.DOWNLO AD_REQUEST, downloadRequest);
wk.addEventListener(WebDownloadStartedEvent.DOWNLO AD_STARTED, downloadStarted);
wk.addEventListener(WebDownloadProgressEvent.DOWNL OAD_PROGRESS, downloadProgress);
wk.addEventListener(WebDownloadFinishedEvent.DOWNL OAD_FINISHED, downloadFinished);
wk.addEventListener("locationChanging", cambiaURL);
wk.addEventListener(WebViewEvent.DOCUMENT_LOADED, finLoad);
wk.addEventListener(WebViewEvent.DOCUMENT_LOAD_FIN ISHED, finLoad);
Then on downloadRequest I have something like:
private function downloadRequest(e:WebDownloadRequestEvent):void{
+++++do some stuff
if(valid){
e.action=WebDownloadRequestEvent.ACTION_SAVE;
wk.downloadUpdate(e.downloadId, WebDownloadRequestEvent.ACTION_SAVE, fileName);
var toast:ToastBase=new ToastBase();
toast.message=bundle.getResource("download-started ", title);
toast.show();
}else{
e.action=WebDownloadRequestEvent.ACTION_DISCARD;
}
}After this, if all works, download started/progress/finish events are fired but sometimes (50%) downloading the same file from the same server they are not dispatched.
I have the same issue on playbook but I thought it will be solved on BB10. My app has not passed BFB due to this issue.
I posted the same issue one year ago and seemed to be solved, but it is not. That solution does not work either.
Any help?
02-06-2013 04:45 AM
Any help on this or something to try?
02-07-2013 02:16 PM
Could anybody from RIM help me with this?
02-09-2013 12:24 PM
04-05-2013 03:28 AM
Hey guys,
Too much time an no comment, but the problem still exists.
Any idea?
04-05-2013 09:56 AM
Hi,
Is this only with the PlayBook SDK? Have you tried the BlackBerry 10 SDK?
Regards,
Dustin
04-05-2013 10:22 AM
Hi Dustin,
It's happening on both platforms, but it's some kind of random, sometimes works find even with the same host/file.
My bb10 version was refused on bfb with this bug. On Playbook it's happening to users.
Anyway I have been able to reproduce on both platforms, on bb10 at a 50% of times.
Thanks!!
04-05-2013 10:28 AM
Ok sounds like a bug to me. Will you please file a bug and I'll escalate to the SDK team to have a look at.
Link to bug tracker is here. https://www.blackberry.com/jira/
Apologies for taking so long in getting back to you.
04-05-2013 10:49 AM
Thanks!
Just to let you know, I reported this issue on Playbook a long time ago and that solution seemed to work then, but no anymore...