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

Java Development

Reply
New Developer
mrmwax
Posts: 5
Registered: ‎08-14-2008
My Device: Not Specified

platformRequest(url) Hang applicaiton and OS

[ Edited ]

I have a MIDlet based application that has 2 threads, a network thread that is essentially always running and the main canvas thread. For the moment, I have no access to any native blackberry APIs.

 

All I am trying to do is open a url with platformRequest(). The issus I am having is that this causes my application to lockup and eventualy the OS kills it. The platformRequest is launched from the canvas thread and I do my best to stop my network thread just before I try the URL.

 

If I do not try and kill my network thread, the whole device locks up and I have to pull the battery.

 

If I do stop my network thread the state I get into is this:

- It seems the Application is paused in the background.

- The Confirmation dialog pops up,  asking me to goto a url.

- Using the wheel to move the cursos up/down results in the cursor moving many more times then it should. 

- Pressing the Y/N keys on the dialog seems to have no effect.

- Clicking No on the dialog has no effect.

- Clicking Yes very rarely  will open the web page.

 

 

Is there something I am doing wrong or some known bug?

 

Thanks,

Mikel

 

PS - I have tried launching the platformRequest in a new thread, but that seems to be known to not work. 

Message Edited by mrmwax on 12-10-2008 06:38 PM
Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: platformRequest(url) Hang applicaiton and OS

Hi,

Have you tried to trace what platFormRequest is returning... true or false?.

I hope you have a "notifyDestroyed" statement just next to platFormRequest.

 

Tnx.


Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
New Developer
mrmwax
Posts: 5
Registered: ‎08-14-2008
My Device: Not Specified

Re: platformRequest(url) Hang applicaiton and OS

Yes, this code runs on multiple device, so it does handle true correctly. The issue  here is that you get false back, meaning the midlet does not need to be exited and will launch the browser immediatly. The launch requires permission and that permission dialog is what is causing the issue.
Please use plain text.
Administrator
MSohm
Posts: 14,309
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: platformRequest(url) Hang applicaiton and OS

Can you provide some sample code that triggers this behaviour?  What BlackBerry model and handheld software version are you testing on?  You can find this under Options, About on the BlackBerry handheld.
Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.