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
Posts: 13
Registered: ‎02-12-2009
My Device: Not Specified

Does BlackBerry 9700 support PhoneScreen API ?

Hello All,

 


JDE 5.0 API reference claims that PhoneScreen API is supported on OS5.0... However in the code samples, there is a comment mentioning that only specific models support PhoneScreen API (8530, 9500, 9530 and 9550).

 

I need to know if the PhoneScreen API is related to the OS version or to certain BB models.

In particular i need to know if it is supported on BlackBerry 9700 ?

 

Any help is appreciated...

Regards

 

 

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

Re: Does BlackBerry 9700 support PhoneScreen API ?

yes. OS 5 means OS 5, there are no sub-versions for the series.

----------------------------------------------------------
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 Developer
Posts: 13
Registered: ‎02-12-2009
My Device: Not Specified

Re: Does BlackBerry 9700 support PhoneScreen API ?

Hello Simon,

 

Thanks for the reply, but i think that phoneScreen API is related to both model and OS version, please check the following comment from the phoneScreenDemo code example (JDE 5.0)

 

 

/*
 * Please note that the PhoneScreen API is only supported on 8530, 9500, 9530
 * and 9550 BlackBerry Smartphone models.
 */

 

I tested with the simulator(JDE 5.0), on 9000 it complains that the PhoneScreen API is not found, however it works fine on 9950 simulator...

 

I hope that i am missing something...

Regards

 

 

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Does BlackBerry 9700 support PhoneScreen API ?

To know definetly you can simply call PhoneScreen.isSupported().

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
New Developer
Posts: 13
Registered: ‎02-12-2009
My Device: Not Specified

Re: Does BlackBerry 9700 support PhoneScreen API ?

Thanks for the info, I am really using  PhoneScreen.isSupported() to check if PhoneScreen is supported by the device...

 

However when i send data to Screen, it is not getting updated when tested on 9700 simulator... I noticed that the

device adds a "More" option in addition to the "Answer" and "Reject" options when i try to update screen, but nothing occurs when clicking the "More" option... This behaviour is somehow weird, i don't know if this is a bug in the simulator ???

 

The same code is working fine on 9550...

 

Regards

BlackBerry Development Advisor
Posts: 15,727
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Does BlackBerry 9700 support PhoneScreen API ?

The model list in the phonescreendemo is out of date.  The PhoneScreen is available on the BlackBerry 9700.  What type of content are you trying to display?  Can you provide some sample code?

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
Posts: 13
Registered: ‎02-12-2009
My Device: Not Specified

Re: Does BlackBerry 9700 support PhoneScreen API ?

Hello,

Thanks for your reply M Sohm,

 

what i am trying to add is simply a label field. Here is a sample code:

 

 

            public final class PhoneScreenAction extends AbstractPhoneListener
			{ 
			
				private Application _app;
				
				public PhoneScreenAction(Application app)
				{
					_app = app;                     
				}
				
				private void sendPhoneScreenData(String msg, int _callid)
				{ 
					PhoneCall phoneCall = Phone.getCall(_callid);        
			
					if(phoneCall != null)
					{                       
						String phoneNumber = phoneCall.getPhoneNumber(); 
											
						// Initialize PhoneScreen 
						PhoneScreen phoneScreen = new PhoneScreen(_callid, _app);
						phoneScreen.setScreenForeground(Color.POWDERBLUE);                                

						// Create a PhoneScreenHorizontalManager and add fields
						PhoneScreenHorizontalManager hfm = new PhoneScreenHorizontalManager();                        
						hfm.add(new LabelField(msg));           
						
						// Add fields to PhoneScreen and display
						phoneScreen.add(hfm);    
						phoneScreen.sendDataToScreen();             
					}
				} 
				
				
				public void callIncoming(int callid)
				{
					sendPhoneScreenData("Hello", callid);		
				}
			}

 As i mentioned in my previous post,  a "More" option is added to the PhoneScreen but I can't find my added text any where... I am testing this on 9700 simulator (working fine on 9550 simulator)....

 

Regards

 

Highlighted
New Developer
Posts: 28
Registered: ‎07-17-2008
My Device: Not Specified

Re: Does BlackBerry 9700 support PhoneScreen API ?

I am seeing the same behaviour that INVIGO is seeing. I have tested PhoneScreen on:

9530,9550 and it works well.

 

It does not work on the 9700.

 

The code is similar to the code in the post. The sw version that I used was 5.0.0.334 on the simulator.

Developer
Posts: 50
Registered: ‎07-17-2008
My Device: 8310

Re: Does BlackBerry 9700 support PhoneScreen API ?

Hi all,

 

Based on my test, Bold 9700 doesn't support PhoneScreen very well.

 

I installed PhoneScreenDemo on 9700 shipped with JDE 5.0 beta5. I found NullPointerException is thrown because below line returns null:

 

 

XYRect incomingLandscape = PhoneScreen.getDimensions(PhoneScreen.LANDSCAPE, PhoneScreen.INCOMING);

 To make test simple, I changed sendPhoneScreenData(int callid) to

 

    private void sendPhoneScreenData(int callid)
    { 
        PhoneCall phoneCall = Phone.getCall(callid);        

        if(phoneCall != null)
        {            
                
            System.out.println("Spt phone scn content:" + PhoneScreen.isSupported());
                
            PhoneScreen ps = new PhoneScreen(callid, _app);
            ps.add(new LabelField("Dest: ----------"));
            ps.sendDataToScreen();
            
         }
     }

 It works well on 9550 simulator. But NOT on 9700 simulator or device. I got Bold 9700 from Rogers yesterday.

Iit shows "More" button on the incoming call screen. When call is answered, screen is changed to a weird one. it shows 4 button-like controls on bottom screen, they are Speaker, Mute, Hold, Add Participant.

 

 

William

EasyDialer -- Calling card dialer, Google Voice Dialer, Conference Call dialer! Relieve the pain of dialing lengthy numbers...
----------------------------------------
If you love it, please let friends know.
If you hate it, please let me know.