I\'m trying to make an new incoming call screen in android,
when i get an incoming call my app starts - but crashes immediately, and the default incoming call scree
Ok, in order to make my new page in the front i need to make it sleep for a while... so the new code will be:
public class MyPhoneBroadcastReceiver extends BroadcastReceiver{
public void onReceive(final Context context, Intent intent) {
Thread pageTimer = new Thread(){
public void run(){
try{
sleep(1000);
} catch (InterruptedException e){
e.printStackTrace();
} finally {
Intent i = new Intent();
i.setClass(context, Call.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
};
pageTimer.start();
}
}
But - the original incoming call program is still running in the background...
Is there any way to replace it instead opening new app ontop of it?
Thanks!