3

Dialer secret codes are fun and useful and all the rage, but how can I use them in my tablet, or my TV dongle, or any onther non-phone android device?

  • For those unfamiliar with the subject, there's a list over here. Many are independent of cellular connection/service/etc. Also, it's not clear how many of these work with which phones or Android versions to begin with. A fair number of them don't work on my N5. – dotVezz Dec 18 '13 at 18:29
  • Too late to edit my comment, I realized that there's a better list on our own site: Do you know any other Android keypad commands (dialer codes)? – dotVezz Dec 18 '13 at 18:40
4

From adb shell:

am broadcast -a android.provider.Telephony.SECRET_CODE -d android_secret_code://<secretcode>

Where <secretcode> is the code without the asterisks, e.g., 4636.

This is more effective than the DIAL action because it's direct and does not rely on the dialer to parse the code and fire the secret code intent itself. (Some dialers will not do this automatically and you'd have to hit "Call".) The DIAL intent is also handled by multiple apps (Phone, Skype, and Hangouts Dialer on my device) so this can skip that annoyance.

3

There are at least three ways of doing it.

Programmatically by starting an Activity with Intent.ACTION_DIAL:

String secretCode = "123456789";
Intent intent = new Intent(Intent.ACTION_DIAL);
intent.setData(Uri.parse("tel:*#*#" + secretCode + "#*#*"));
startActivity(intent);

Programmatically by broadcasting an Intent:

String secretCode = "123456789";
String action = "android.provider.Telephony.SECRET_CODE";
Uri uri = Uri.parse("android_secret_code://" + secretCode);
Intent intent = new Intent(action, uri);
sendBroadcast(intent);

With a third party app:

I developed an open source app that crawls AndroidManifest.xml files on your device to find secret codes, and allows you to execute the secret codes available on your device.
You can get it on the Play Store or on the GitHub repository Android-Secret Codes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.