I want custom calling screen I have achieved that but problem is that my screen is not going back when call cuts.i(..)
want to terminate screen when call cuts. My code is:
public class receiver_Call 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 {
//Toast.makeText(context," text", 5).show();
Intent i = new Intent();
i.setClass(context, My_call_receiver.class);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
}
};
pageTimer.start();
}
}