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

Web and WebWorks Development

Reply
Contributor
Lawrence_Liu
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile
Accepted Solution

Is toast API work on the simulator?

Dear All, I am testing my app on the simulator, but seems toast is not working in the simulator, is it simply not implemented in the simulator or there might be some issue with my code?

 

I found that 

 

1. There's no toast shows up in the UI

2. dismiss callback and buttonCallback are both not invoked.

 

I confirmed that I have the follow settings in config.xml

 

<feature id="blackberry.identity" />
<feature id="blackberry.app" />
<feature id="blackberry.ui.dialog" />
<feature id="blackberry.ui.toast" />
<feature id="blackberry.push" />

 

Could you please help on confirm whether it works for simulator? the software version is 1673.

 

Appreciate for your help on this.

Please use plain text.
Contributor
Lawrence_Liu
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile

Re: Is toast API work on the simulator?

I have deployed the sample Toast from webworks sample repository to my simulator and confirmed it's not working.
Please use plain text.
BlackBerry Development Advisor (Retired)
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Is toast API work on the simulator?

I just downloaded the public simulator form here: https://developer.blackberry.com/html5/download/

 

Toast messages work fine for me. Did you make the correct call such as this:

blackberry.ui.toast.show("This is a very simple toast message, click to dismiss");

or

blackberry.ui.toast.show("Your message", { buttonText : buttonText, buttonCallback : buttonCallback, dismissCallback : dismissCallback, timeout : 10000});

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.
Contributor
Lawrence_Liu
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile

Re: Is toast API work on the simulator?

[ Edited ]

Dear

Could you pls offer some information as below for me to trouble shooting my environment and code? Appreciate for your great help.

1. What's your pc os and version? Is it 64 bit or 32 bit?


2. What virtual machine did you use? VMware player or VMware fusion or VMware workstation etc and what's there version? Currently I am using mountain lion with fusion v5.2.


3. Which version of the simulator did you downloaded, is it a fresh installation or updated your existing environment? I am usin the one with os version 10.0.9.1673.


4 how did you pack the app, which version of the webworks SDK did you use? Is there any additional pack parameter? Currently I am packing with no debug token and debug option enable. I am also using the so called golden version of webworks SDK.


5. Could you pls help to do me a favor and send me the bar file and your test case source code(contains all the files including config.xml, HTML and JavaScript files)?

 

6. If possible, pls also attach a screenshot of the toast shown UI in the simulator for me since I have never seen that before :Helpsmilie:


6. Is there any additional configurations did you do after installing the simulator?

I would like to appreciate you very much for kindly helping me on this, since this issue blocks me from continuing.

Thanks again :smileyhappy:

Please use plain text.
Contributor
Lawrence_Liu
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile

Re: Is toast API work on the simulator?

Sorry it's fusion 5.0.2, not 5.2
Please use plain text.
Contributor
Lawrence_Liu
Posts: 29
Registered: ‎09-05-2012
My Device: BlackBerry Q10 Z10
My Carrier: China Mobile

Re: Is toast API work on the simulator?

Dear erikjohnzon

It works after I upgrade webworks SDK to webworks-1.0.4.7 and upgrade simulator to version BlackBerry10Simulator-Installer-BB10_0_09-2318-Mac-201301091046

Then I pack the app again and launch it.

Thanks for your confirmation.
Please use plain text.
BlackBerry Development Advisor (Retired)
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10
My Carrier: Virgin

Re: Is toast API work on the simulator?

Awesome glad it is working now!

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.