06-28-2011 05:06 AM
Hello,
Blackberry devices (OS 5.0 and above) allows us to override the phone screen by using PhoneScreen. I tried to do this but it does not work. I can add some fields to the Outgoing call screen, Active call screen but Incoming call screen.
I follow the guide at this link. I also signed my app with the developer signing code. Something's wrong?
Thanks.
Solved! Go to Solution.
06-28-2011 06:53 AM
06-28-2011 08:04 AM
Thanks for quick reply.
Following is the callIncoming method
ScreenModel screenModel = new ScreenModel(callId);
PhoneScreen phoneScreenPortrait = screenModel.getPhoneScreen(PhoneScreen.PORTRAIT, PhoneScreen.INCOMING);
LabelField labelField1 = new LabelField("Hello")
{
public void paint(Graphics g)
{
g.setColor(Color.GREEN);
super.paint(g);
}
};
LabelField labelField2 = new LabelField(" to the World.")
{
public void paint(Graphics g)
{
g.setColor(Color.RED);
super.paint(g);
}
};
labelField1.setFont(phoneScreenPortrait.getCallerI nfoFont());
labelField2.setFont(phoneScreenPortrait.getCallerI nfoFont());
phoneScreenPortrait.add(labelField1);
phoneScreenPortrait.add(labelField2);
screenModel.sendAllDataToScreen();I found that I can override the incoming screen, but the text is very small.
06-28-2011 08:16 AM - edited 06-28-2011 08:24 AM
I'd imagine the text is small because labelField1.setFont(phoneScreenPortrait.getCallerI
Previously I've pushed my own screen. So in the callIncoming method I've done something like..
InboundScreen activeScreen = new InboundScreen();
UiApplication.getUiApplication().invokeLater(new Runnable()
{
public void run()
{
UiApplication.getUiApplication().pushGlobalScreen( activeScreen, 0,UiEngine.GLOBAL_SHOW_LOWER) ;
}
});
Then the screen class is something like
public class InboundScreen extends PopupScreen
{
public InboundScreen()
{
super(new VerticalFieldManager(USE_ALL_HEIGHT|USE_ALL_WIDTH| FIELD_HCENTER));
}
}
Which you can use just like any other screen.
Hope that is some help, but to be honest it sounds like you're well on your way already ![]()
06-28-2011 10:00 AM
I removed line labelField1.setFont(phoneScreenPortrait.getCallerI

I also tried to use another workaround to push a screen on top of the call screen by using override the onObscured() and onExposed of MainScreen. It seems something wrong, I can push my screen on the top but I can remove it.
06-28-2011 11:50 AM
My Apologies, after an hour or so of trying to get this to work properly myself. I've realised I've given you incorrect information and it's not actually possible to override the incoming screen. See the thread below.
http://supportforums.blackberry.com/t5/Java-Develo
My apologies again.
Alan
06-28-2011 12:19 PM
Dear Alan_Hollis,
Thanks for your help, I tried another solution and it look fine. Anyway, I think it is an issue of BlackBerry or maybe for security purpose and they do not allow us to customize the incoming call screen.
I think this topic should be closed here.