Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Trusted Contributor
osus
Posts: 199
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

(bb10) WebDownloadProgressEvent not always being dispatched

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.DOWNLOAD_REQUEST, downloadRequest);
wk.addEventListener(WebDownloadStartedEvent.DOWNLOAD_STARTED, downloadStarted);
wk.addEventListener(WebDownloadProgressEvent.DOWNLOAD_PROGRESS, downloadProgress);
wk.addEventListener(WebDownloadFinishedEvent.DOWNLOAD_FINISHED, downloadFinished);
wk.addEventListener("locationChanging", cambiaURL);
wk.addEventListener(WebViewEvent.DOCUMENT_LOADED, finLoad);
wk.addEventListener(WebViewEvent.DOCUMENT_LOAD_FINISHED, 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?

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Please use plain text.
Trusted Contributor
osus
Posts: 199
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) WebDownloadProgressEvent not always being dispatched

Any help on this or something to try?

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Please use plain text.
Trusted Contributor
osus
Posts: 199
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) WebDownloadProgressEvent not always being dispatched

Could anybody from RIM help me with this?

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Please use plain text.
Trusted Contributor
osus
Posts: 199
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) WebDownloadProgressEvent not always being dispatched

I'm absolutely blocked and lost at this.
Please, someone at RIM can help me?
My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Please use plain text.
Trusted Contributor
osus
Posts: 199
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) WebDownloadProgressEvent not always being dispatched

Hey guys,

 

Too much time an no comment, but the problem still exists.

 

Any idea?

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: (bb10) WebDownloadProgressEvent not always being dispatched

Hi,

 

Is this only with the PlayBook SDK? Have you tried the BlackBerry 10 SDK?

 

Regards,

Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Trusted Contributor
osus
Posts: 199
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) WebDownloadProgressEvent not always being dispatched

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!!

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: (bb10) WebDownloadProgressEvent not always being dispatched

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. 

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Trusted Contributor
osus
Posts: 199
Registered: ‎04-26-2012
My Device: Z10
My Carrier: Vodafone

Re: (bb10) WebDownloadProgressEvent not always being dispatched

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...

 

http://supportforums.blackberry.com/t5/Adobe-AIR-Development/WebDownloadProgressEvent-not-beeing-dis...

My apps for Playbook: PlayEpub Book Reader with epub and FB2 support, Google Reader, ReaditLater - Net Files Share Explorer Get access to your network shared files- FFSync Sync your Firefox bookmarks and passwords
Please use plain text.