Dialing Service Menu Codes

Roger Garstang

Well-Known Member
Licensed User
Longtime User
I can dial codes like USSD codes for things like getting imei numbers and such using Dial or Call intents, but what about other codes like hidden menus and such? On one of my phones I dial a number that looks very similar to USSD, but I don't have to press send at the end, the dialer just detects it. I can get the number to appear in the dialer with an intent, but it doesn't execute the needed process. I can even delete one character or the whole thing and retype it and nothing happens. It is like the dialer that opens with the intent isn't even checking for a code??? Anyone know how to make an intent to dial those kinds of codes?
 

Roger Garstang

Well-Known Member
Licensed User
Longtime User
I figured out how to do it in raw Android by watching the log to see what intent ran when it was typed:

B4X:
Intent hiddenMenu = new Intent(Intent.ACTION_MAIN);
hiddenMenu.setClassName("com.lge.hiddenmenu", "com.lge.hiddenmenu.HiddenMenu");
startActivity(hiddenMenu);

I see the ACTION_MAIN in a B4A intent, but don't specifically see a way to set the Class for it to use.

Found some other cool info too on making your own Dialer codes:

8351 below is the number dialed between the markers like- *#*#8351#*#*

<intent-filter>
<action android:name="android.provider.Telephony.SECRET_CODE" />
<data android:scheme="android_secret_code" android:host="8351" />
</intent-filter>

You can add this to your XML file and pick your own code number (Replace 8351 above) and your app will run when you type the sequence in the dialer. Could be pretty cool to remove the android.intent.category.LAUNCHER category tag to hide your app and use the dialer to launch it.
 
Last edited:
Upvote 0

afagcaoili

Member
Licensed User
Longtime User
Can you have a sample code using Basic4Android on that?

Hi,

Kindly post an example of the Basic4Android syntax for the example mentioned above? Will that be hard enough? This would be dialing those secret codes like *#*#4636#*#*

Thanks.

Arnold

FOUND ANSWER: Sorry, I guess this was already answered in other post... Sorry...:)
 
Last edited:
Upvote 0
Top