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
viral
Posts: 6
Registered: ‎07-22-2008
My Device: Not Specified

Incoming voicecall interrupt

[ Edited ]

hello

I am sorry if my question is nooby but I have problem with that

I develop game on BB and i have problems with voice call

my midlet is not being informed about incoming voicecall

when i press different buttons i got pauseApp() invoked (red, green button)

or isShown() returning false (menu button)

 

i did test on 8800 (even emulator) and 8310

 

how to inform midlet about that (call) and force it to go to background ?

 

i tried this :

 

 

class MyGame extends GameCanvas implements PhoneListener

MyGame()

{

Phone.addPhoneListener(this);

}

public void callIncoming (int callId)
{
informAboutCall(); // let know my game about call
Application.getApplication().requestBackground(); // put midlet to background
}

it does not work

 

 

thank you for help in advance

 

Message Edited by viral on 08-27-2008 08:10 AM
BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Incoming voicecall interrupt

The Application and UiApplication classes should not be used within a MIDlet.  Those classes along with UI classes should not be intermixed between MIDlets and UiApplications.

 

You can use the PhoneListener interface to be notified of the incoming call and pause your game.  The incoming call screen should automatically appear on top of your MIDlet, so you do not need to send it to the background.  Or are you seeing that the incoming call screen is not being shown?

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
New Developer
viral
Posts: 6
Registered: ‎07-22-2008
My Device: Not Specified

Re: Incoming voicecall interrupt

exactly

no calling screen

BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Incoming voicecall interrupt

Are you seeing this on an actual BlackBerry, or just the BlackBerry Simulator?  What is the BlackBerry handheld software version you are testing with?  You can see this under Options, About on the BlackBerry.
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
New Developer
viral
Posts: 6
Registered: ‎07-22-2008
My Device: Not Specified

Re: Incoming voicecall interrupt

[ Edited ]

both 8800 emu and real

firmware ver is 2.3.0.54

 

i use GameCanvas insted of Canvas

it is faster but has obvious problem with call

 

the biggest problem is that PhoneListener needs to be signed

there is no other way to detect call in midlet ?

 

Category: Signed: This element is only accessible by signed clients. If you intend to use this element, please contact RIM to establish the necessary agreements that will allow you to have your COD files signed. Signing is only required for use on the device, development under the JDE can occur without signing the CODs.

 

Message Edited by viral on 08-28-2008 04:41 AM
Message Edited by viral on 08-28-2008 04:41 AM
BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: Incoming voicecall interrupt

I think you may have posted the platform version.  What is the application version?  It should be 4.x.x.x.

 

The PhoneListener is the only interface available to listen for incoming phone calls.

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
New Developer
chimchim
Posts: 7
Registered: ‎11-04-2008
My Device: Not Specified

Re: Incoming voicecall interrupt

A ha, this is exactly the question I was going to ask.  Yay for Forum Search!

 

So to be clear, the only way for a MIDlet app to know that there is an incoming call is to use the PhoneListener?  (My game continues to run in the background and I want to pause it.) No hideNotify-type technique?

 

I too would prefer to avoid the signing involved since this is the only protected API call I would be using.

 

Thanks!