Is it possible to add this with B4A ?
How to send programmaticly *#*#xxxxxx#*#* codes ?
http://android.amberfog.com/?p=422
How to send programmaticly *#*#xxxxxx#*#* codes ?
http://android.amberfog.com/?p=422
B4X:
I’ve looked deep into platform code. Here’s are the code from Phone.git
static boolean handleSecretCode(Context context, String input) {
// Secret codes are in the form *#*#<code>#*#*
int len = input.length();
if (len > 8 && input.startsWith("*#*#") && input.endsWith("#*#*")) {
Intent intent = new Intent(Intents.SECRET_CODE_ACTION,
Uri.parse("android_secret_code://" + input.substring(4, len - 4)));
context.sendBroadcast(intent);
return true;
}
return false;
}
So, let’s search for Intent filters:
Settings.git
<receiver android:name="TestingSettingsBroadcastReceiver">
<intent-filter>
<action android:name="android.provider.Telephony.SECRET_CODE" />
<data android:scheme="android_secret_code" android:host="4636" />
</intent-filter>
</receiver>