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 Contributor
Posts: 8
Registered: ‎02-23-2013
My Device: 9700
My Carrier: vodaphone

Showing Popup screen from call answered event by using thread

Hi all,

I have implemented the thread in a app with the help of HttpDemo, but my requirement is that:

 

I want to use the thread in CallAnswered event, where i get some data using web service, process the data and displays with a PushGlobalScreen().

 

basically in CallAnswered event, I want to start a thread for calling webservice, when i get the result back, than i want to show a pop up screen while the call is in progress.

 

 

Can anyone please help me to resolve this issue. I dont have a good knowledge of using threads, but i tried it hard, still not able to resolve the issue.

 

Please help.

 

Thanks in advance.

Developer
Posts: 16,998
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Showing Popup screen from call answered event by using thread

i would suggest to send a global event to your application http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/system/ApplicationManager.html...

and start a new thread there.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
New Contributor
Posts: 8
Registered: ‎02-23-2013
My Device: 9700
My Carrier: vodaphone

Re: Showing Popup screen from call answered event by using thread

Hi SimonHain

Thanks a lot for your response.

 

I tried something like this;

result =CallAndGetWebServiceResult(serviceNamespace,serviceUrl,webmethodname,soapAction,PhoneNumber);
                        synchronized(Application.getEventLock())
                        {
                            MyPopUpScreen po1=new MyPopUpScreenresult);
                            UiApplication.getUiApplication().requestForeground();
                            UiApplication.getUiApplication().pushGlobalScreen(po1,1, UiEngine.GLOBAL_SHOW_LOWER );
                        }

 

 

and it worked out.

 

but this popup screen can be pushed after i receive the call.

as discussed in many threads, we are not able to push this screen while the phone is ringing (on incoming call)

 

Thanks a lot.

Developer
Posts: 16,998
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Showing Popup screen from call answered event by using thread

correct. and your question now is?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 729
Registered: ‎05-04-2011
My Device: 9700

Re: Showing Popup screen from call answered event by using thread

New Contributor
Posts: 8
Registered: ‎02-23-2013
My Device: 9700
My Carrier: vodaphone

Re: Showing Popup screen from call answered event by using thread

Just one big question remains,

when can we get the control (at least for pushing a screen) on incoming call event, which is very essential.

we can do it on android very easily.

 

will blackberry provide that in the near feature?

 

just hoping to get it done!!!

 

 

New Contributor
Posts: 8
Registered: ‎02-23-2013
My Device: 9700
My Carrier: vodaphone

Re: Showing Popup screen from call answered event by using thread

Thanks Maadani,

 

I have tried it already, we can display the data on incoming screen, but we can not push our customized screen over incoming call screen, moreover this can be done on simulator but not on actual device. there it throughs security exception.

 

I tried for it  very hard, But no way found, I spent almost 5-6 days to get it resolved with no success.

 

please write me whenever you get the solution for this problem.

 

Thanks again.

Developer
Posts: 16,998
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Showing Popup screen from call answered event by using thread

this won't be available on BB java.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter