Friday, October 31, 2008

Getting the incoming call's phone number

Getting the incoming call's phone number in Blackberry

If your application runs in background and if u want to display phone number during incoming call just implement this code in abstract method.

PhoneCall callInfo = Phone.getActiveCall();
if ( callInfo != null) {
Telephone = callInfo.getDisplayPhoneNumber();
UiApplication.getUiApplication().invokeLater(
new Runnable() {
public void run() {
Status.show("incoming from: "+Telephone);
}
}
);
}

No comments: