Just remove android.intent.category.LAUNCHER from your main Activity in AndroidManifest.xml
And you cannot open app by dialing *#*#12345#*#*
because in order to do that you have to write a receiver for following action
<action android:name="android.provider.Telephony.SECRET_CODE" />
Then you can open your app by firing an Intent from that broadcast receiver. But android does not permit this until your app is *System app.*
Following is the code that will help you
Change activity in Manifest to have no intent filters like
<activity
android:name=".MyApp"
android:label="@string/title_activity_parent_trap"
android:theme="@android:style/Theme.Holo" >
</activity>
<receiver android:name=".MyApp$Launch" >
<intent-filter>
<action android:name="android.provider.Telephony.SECRET_CODE" />
<data
android:host="(secret code)"
android:scheme="android_secret_code" />
</intent-filter>
</receiver>
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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…