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

Native Development

Reply
Contributor
developerUK
Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

Progress Toast dialog bar not updating

I have created a progress toast dialog using dialog_create_progress_toast() and have followed all other steps from http://origin-developer.blackberry.com/native/reference/bb10/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps... but when i pass in an int value between 0 and 100 the bar on the toast is not filling - is there something else i need to be doing to update the display?

 

when setting value of toast using dialog_set_progress_toast_level() 0 is returned so no error.

 

Any ideas anybody please?

Please use plain text.
BlackBerry Development Advisor
jhoffmann
Posts: 38
Registered: ‎10-26-2011
My Device: BlackBerry Bold 9900
My Carrier: Rogers

Re: Progress Toast dialog bar not updating

The Dialog Sample might be helpful: https://github.com/blackberry/NDK-Samples/tree/master/Dialog

 

Please use plain text.
Contributor
developerUK
Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

Re: Progress Toast dialog bar not updating

Unfortunatly, there is nothing in that sample to do with progress toast dialog., i need more specific advice because I can actually show and hide the dialog but the control which is specific to progress toast (loading bar) isn't updating when i set it's value.

 

So currently for me Progress dialog isn't doing what it's meant to.

 

 

 

 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Progress Toast dialog bar not updating

do you use dialog_set_progress_toast_state() ?

Please use plain text.
Contributor
developerUK
Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

Re: Progress Toast dialog bar not updating

I have

 

dialog_progress_state_t di = DIALOG_PROGRESS_PLAY;
dialog_set_progress_toast_state(dialog, di);

 

but im not fully confident its correct as there is no other reference to this anywhere.

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Progress Toast dialog bar not updating

Looks correct.

Please file a bug.

Please use plain text.
Contributor
developerUK
Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

Re: Progress Toast dialog bar not updating

ok will do - would it matter if im not calling bps_get_event by any chance?

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: Progress Toast dialog bar not updating

no.

Please use plain text.
BlackBerry Development Advisor
jhoffmann
Posts: 38
Registered: ‎10-26-2011
My Device: BlackBerry Bold 9900
My Carrier: Rogers

Re: Progress Toast dialog bar not updating

[ Edited ]

Here's a sample showing a progress toast updating correctly:

 

https://github.com/jhoffmannrim/NDK-Samples/tree/progress-toast/ProgressToast

 

Each time you swipe down the level will increase.  If the toast is still showing, it will be updated live.

 

(edit: changed URL)

Please use plain text.
Contributor
developerUK
Posts: 35
Registered: ‎11-21-2012
My Device: 9810
My Carrier: o2

Re: Progress Toast dialog bar not updating

I had just found the reason why and then received the link to a working sample!

 

The problem was dialog_update(dialog); wasn't getting called after updating the value.

 

Thanks guys.

Please use plain text.