How would I make my app launch when a secret code, such as *#*#12345#*#* is entered into the dialer?
I couldn’t find a solution in the Android docs.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is how I did it:
I changed my main activity to have no intent-filters:
I then made a broadcast receiver with the intent filter action:
android.provider.Telephony.SECRET_CODEI then added data to it. The entire thing is below:
Once done, make a class (I made the Launch class in my main class, extending BroadCast Receiver), then in the onReceive class, fire an intent to launch the activity.
Then typing
*#*#(secret code)#*#*into the dialer will launch the app.