I want to show my screen during the incoming call. Is there is any way to override the InCall Screen in Blackberry?
You can make use of PhoneListener interface and then override the methods to do the same.
public class CatchCall extends Application implements PhoneListener {
boolean yes = false;
int st;
public CatchCall() {
Phone.addPhoneListener(this);
}
public static void main(String[] args) {
new CatchCall().enterEventDispatcher();
}
public void callAdded(int callId) {
}
public void callAnswered(int callId) {
}
public void callConferenceCallEstablished(int callId) {
}
public void callConnected(int callId) {
// TODO Auto-generated method s
PhoneCall phoneCall = Phone.getCall(callId);
if (phoneCall != null) {
//TODO: push your screen here
Dialog.ask(Dialog.D_YES_NO, "Push my screen here");
}
}
public void callDirectConnectConnected(int callId) {
}
public void callDirectConnectDisconnected(int callId) {
}
public void callDisconnected(int callId) {
}
public void callEndedByUser(int callId) {
}
public void callFailed(int callId, int reason) {
}
public void callHeld(int callId) {
}
public void callIncoming(int callId) {
//TODO: push your screen here
Dialog.ask(Dialog.D_YES_NO, "Push my screen here");
}
public void callInitiated(int callid) {
PhoneCall phoneCall = Phone.getCall(callid);
if (phoneCall != null) {
//TODO: push your screen here
Dialog.ask(Dialog.D_YES_NO, "Push my screen here");
}
}
public void callRemoved(int callId) {
}
public void callResumed(int callId) {
}
public void callWaiting(int callid) {
}
public void conferenceCallDisconnected(int callId) {
}
}