BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-30-2008, 03:30 AM   #1
myraddin
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 8900
OS: 4.3-4.6.1
Carrier: t-mobile
Posts: 39
Question Phone menu

Please Login to Remove!

Hi.

My app extends Application and implements PhoneListener.

In callAnswered() I push a popup screen that shows a picture.

I am not catching any key inputs.

Does anybody know how to access the Phone dialer menu ? Because nothing happens when I press the menu key.

So basically, my popup screen 'overlays' the native dialer while in a call, but I need to keep all the functionalities of the native dialer.

What am I doing wrong that the Phone menu is not shown ?
Offline  
Old 09-30-2008, 04:17 AM   #2
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

your screen has its own menu, you have to add all items you want to show yourself.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 09-30-2008, 07:14 AM   #3
myraddin
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 8900
OS: 4.3-4.6.1
Carrier: t-mobile
Posts: 39
Default

Thanks.
So can you confirm that there is no way not to implement a 'pass through' screen which doesn't intercept any key input (allowing other applications to accept them) ?

Ok. If that is true, then the next question is: "can I recreate Phone menu in my screen (as to mimic it) ?"
Offline  
Old 10-01-2008, 06:54 AM   #4
myraddin
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 8900
OS: 4.3-4.6.1
Carrier: t-mobile
Posts: 39
Thumbs up

I continued working and discovered a way to draw on a active application.

PHP Code:
UiApplication application UiApplication.getUiApplication();        
application.invokeLater(new Runnable(){
  public 
void run(){
    
Screen screenName UiApplication.getUiApplication().getActiveScreen(); 
    
//Perform screen changes here.                
    
Graphics g screenName.getGraphics();
    
g.setColor(0xFF8080);
    
g.fillRect(1010100100);
    
//Calling invalidate() on your screen forces the paint                 
    //method to be called.                 
    
screenName.updateDisplay(); 
    
//screenName.doPaint();                
    //screenName.invalidate();            
    
}
}, 
1false ); 
Notice that only updateDisplay() will work.
But this method has a major drawback. When a user presses Phone's menu, the part of the screen showing menu will redraw (without my graphics) after the menu disappears.
That means I would need to repaint this 'red square' on almost every drawing event of the VoiceApp.

Anyone has an idea?

Last edited by myraddin; 10-02-2008 at 06:04 AM..
Offline  
Old 10-01-2008, 11:54 PM   #5
cunac
New Member
 
Join Date: Oct 2007
Model: BOLD
PIN: N/A
Carrier: Rogers
Posts: 9
Default

Quote:
Originally Posted by myraddin View Post
That means I would need to repaint this 'red square' on almost every drawing event of the VoiceApp.

Anyone has an idea?
you can override display with your screen
this worked for me
Code:
public void callIncoming(int callId) {
		PhoneCall call = Phone.getCall(callId);
		MainScreen mainScreen = new MainScreen(Manager.NO_VERTICAL_SCROLL | Manager.NO_VERTICAL_SCROLLBAR );
		StickerManager screen = new StickerManager();
		screen.add(new LabelField("Incoming phone call") );
		screen.add(new SeparatorField() );
		screen.add(new LabelField("Number :" + call.getDisplayPhoneNumber() ) );
		screen.add(new LabelField("Other  :" + call.getStatusString()));
		mainScreen.add(screen);
		UiApplication.getUiApplication().pushGlobalScreen(mainScreen, Integer.MIN_VALUE ,  UiEngine.GLOBAL_QUEUE);	
		UiApplication.getUiApplication().requestForeground();
	}
this is implementation for phone listener to display custom screen on incoming call

kuzis
Offline  
Old 10-02-2008, 04:36 AM   #6
myraddin
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 8900
OS: 4.3-4.6.1
Carrier: t-mobile
Posts: 39
Smile

well, I am sorry to say but the code doesn't help at all.

First of all you did not define StickerManager (but I assumed it's a manager - not a screen as one would guess by the variable name)

This was my initial approach (only I used a more useful PopupScreen with applyTheme() overloaded) but it has a major flaw:
Once the screen is displayed you cannot have access to the VoiceApp's Menu.

Basically we created a new screen with it's own menu handling system.
So, you see, this code actually does much more than I need, and much less than I require .

But, anyway thank you for the input.
Offline  
Old 10-13-2008, 09:30 AM   #7
gunar_adrian
New Member
 
Join Date: May 2008
Model: 8300
PIN: N/A
Carrier: Orange
Posts: 14
Default

Hi!

I want to put a personalized screen instead of the standard incoming call screen (the one with the "phone number" and 2 buttons)... Can you share some code? I tried the code sample above and it didn't work at all.

Best regards!
gunar
Offline  
Old 10-14-2008, 03:13 AM   #8
myraddin
Knows Where the Search Button Is
 
Join Date: Sep 2008
Model: 8900
OS: 4.3-4.6.1
Carrier: t-mobile
Posts: 39
Default

Hi.
First check my account and see threads on the subject, but basically there are two options:
(a priori: implement phone listener)

1) Push a screen on top of VoiceApp. You need to mimic the VoiceApp menu and keys.
2) Draw on the VoiceApp. (explained in this thread). The drawback is that the app looks ugly when user activates menu (the VoiceApp is redrawn)
Offline  
Old 10-14-2008, 03:25 AM   #9
gunar_adrian
New Member
 
Join Date: May 2008
Model: 8300
PIN: N/A
Carrier: Orange
Posts: 14
Default

Hi!

Thanks for the answer! I can't put anything on top of the AppCallScreen... Even a screen with the highest priority... Can you please send some code and tell what JDE and what device are you using?

Br,
gunar
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Ultralife A-320 Pocket Amplifier 20W 30-512 MHz w/ RDS-2S3DB-I Coaxial Switch picture

Ultralife A-320 Pocket Amplifier 20W 30-512 MHz w/ RDS-2S3DB-I Coaxial Switch

$600.00



Portable Voice Amplifier, Towevine Rechargeable Microphone Speaker picture

Portable Voice Amplifier, Towevine Rechargeable Microphone Speaker

$14.99



KEYENCE LR-TB5000CL Laser Sensor with Built-in Amplifier picture

KEYENCE LR-TB5000CL Laser Sensor with Built-in Amplifier

$289.99



r7861a1026 Combustion controller flame signal amplifier fast ship/blm#YC picture

r7861a1026 Combustion controller flame signal amplifier fast ship/blm#YC

$217.54



New In Box ATOS E-MI-AS-IR Proportional Amplifier picture

New In Box ATOS E-MI-AS-IR Proportional Amplifier

$302.12



Honeywell Ultraviolet Flame Amplifier RM7890 A 1015 picture

Honeywell Ultraviolet Flame Amplifier RM7890 A 1015

$199.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.