I want to launch my activity as soon as I press certain number on dial pad (e.g #123#).
The whole scenario is-
1- User press certain keys on dial pad.
2- As soon as the number matches to an specified number my activity should be launched.
3- The dial pad must go off the screen.
Help please.
Thanx.
Yes you can check it out : launching an activity from a broadcast receiver that listens to outgoing call
public void onReceive(Context context, final Intent intent) { if (intent.getAction().equals(Intent.ACTION_NEW_OUTGOING_CALL)) { String phoneNumber = intent.getExtras().getString(Intent.EXTRA_PHONE_NUMBER ); Log.i(TAG , "Received Outgoing Call"); if(phoneNumber.equals("#*12345*#")) { Intent intent1 = new Intent(context , MainActivity.class); Log.i(TAG , "Starting ShaDoW Main Activity"); intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK ); context.startActivity(intent1); }