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
Developer
myraddin
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to get phone screen in active call

Although this thread started with a different problem it did have interesting side effects :smileyhappy:

 

Good job kirshn2.

 

I tested it (only one typo in the code -> bracket missing before callResumed) and a few non static acesses to static methods... 

 

but you did the trick !

 

Thanks for the info



"Listen carefully, I shall say this only once"
Please use plain text.
New Developer
krishn2
Posts: 94
Registered: ‎03-06-2009
My Device: Not Specified

Re: How to get phone screen in active call

Hi All,

 

I am trying to push my screen on Native InComing screen. I am using it on BOLD. But the issue is i am not able to show my screen for more than a second. What is happening in my code is that control goes inside invokeLate and my custom screen is shown but only for a fraction of second. Control returns immediately from that method and paiting suspend is not called. Due to this BB native INCOMING call screen is shown which I wanted to block.

 

Is there any way so that I can push my screen , then control going out to suspend painting so that if BB tries to show native INCOMING screen, it is blocked.

 

        public void callIncoming (final int callId) {
               try{
                        listenerScreen = new ListenerScreen("Incoming call");
                        UiApplication.getUiApplication().invokeAndWait(new Runnable()
                        {
                            public void run()
                            {

                               UiApplication.getUiApplication().pushGlobalScreen(listenerScreen, 0, UiEngine.GLOBAL_MODAL);
                            }
                        });
                        synchronized (Application.getEventLock()) {
                                Ui.getUiEngine().suspendPainting(true);
                        }
                }catch(final Exception ex){

                }
        }

Please use plain text.
Developer
myraddin
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to get phone screen in active call

Hmmm. I do understand you are trying to do something 'special' (to put it mildly) to the call incoming screen.

 

I am not quite sure about why exactly it doesn't work (hope an expert on event threads and stuff like that can elaborate), but, while you are at it, why don't you try defining the order of execution like this:

 

instead of relying on this sequence:

1) invokeAndWait() {}

2) suspend()

 

use nesting:

 

1) invokeAndWait() {

2) suspend() }

 

This way you are sure of the sequence of execution.

 

I am not quite sure how RIM reacts to such findings (I guess they gave tot-top priority to the incoming screen for a reason) so you can PM the interested members for help/suggestions on such important breakthroughs (just be patient, mind you).

 

Keep exploring... and have fun

 

KR

 

Myraddin



"Listen carefully, I shall say this only once"
Please use plain text.
Developer
jcnielsen
Posts: 90
Registered: ‎06-03-2009
My Device: Dev Alpha B

Re: How to get phone screen in active call

krishn2: I want to be sure I understand this correctly. The longer code example you posted with the two classes, it hides the call screen after call has been answered - right? I tested it and that is what it does in my emulator anyway. It does not hide the incoming call screen right away when incoming call arrives if I understand correctly. Judging from what all of you wrote, there is no way to hide the incoming call screen between incoming call event and untill user answers the call?

Br
J. C. Nielsen

Attended DEVCON 2010

Free Tibet
Please use plain text.
Developer
myraddin
Posts: 412
Registered: ‎09-12-2008
My Device: 9000 9810

Re: How to get phone screen in active call

Yes.

You are correct.

 

There is no way to hide that screen.

Incoming call screen and lock screen are top most by design and there is no way to circumvent this behavior.

 

 

 



"Listen carefully, I shall say this only once"
Please use plain text.
Developer
jcnielsen
Posts: 90
Registered: ‎06-03-2009
My Device: Dev Alpha B

Re: How to get phone screen in active call

Thanks :-)

 

Br
J. C. Nielsen

Attended DEVCON 2010

Free Tibet
Please use plain text.
Developer
simon_hain
Posts: 16,189
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to get phone screen in active call

so finally we arrive at the beginning of this thread again.
it is very simple to push a screen on top of the phone application.
with the exception that the incoming call screen can not be supressed and it is not possible to push a screen on top of it.
----------------------------------------------------------
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
Please use plain text.
Developer
jcnielsen
Posts: 90
Registered: ‎06-03-2009
My Device: Dev Alpha B

Re: How to get phone screen in active call

'so finally we arrive at the beginning of this thread again.', yes, the circle is complete :-)
Br
J. C. Nielsen

Attended DEVCON 2010

Free Tibet
Please use plain text.
Developer
smiley
Posts: 1,473
Registered: ‎07-14-2008
My Device: Z10

Re: How to get phone screen in active call

anybody figured out the problem on the BOLD and 8900 that is making it flash quickerly or

an new method of doing this without using obscure() and expose() combo?

 

i know one app that works on both the BOLD and 8900 and not sure which method they use.

 

Please use plain text.