Here is how I did it:
I changed the main action to not have any intent filters:
<activity
android:name=".ParentTrap"
android:label="@string/title_activity_parent_trap"
android:theme="@android:style/Theme.Holo" >
</activity>
Then I made a broadcast receiver with an intent filter action: android.provider.Telephony.SECRET_CODE
Then I added data to it. All of this is below:
<receiver android:name=".ParentTrap$Launch" >
<intent-filter>
<action android:name="android.provider.Telephony.SECRET_CODE" />
<data
android:host="(secret code)"
android:scheme="android_secret_code" />
</intent-filter>
</receiver>
After the class was completed (I made the Launch class in my main class, extending the BroadCast Receiver), and then in the onReceive class launched the intention to start this activity.
Then typing *#*#(secret code)#*#*in the dialer, it will launch the application.
source
share