I want to hide my app from the list of applications so a third person will not know that this app is installed.
I saw that this can be achieved by : If you want to hide your application from Application Launcher, then just do not include android.intent.category.LAUNCHER
in any of your activities.
I tried this and it is working . Now i need to define a shortcut to launch my app.
I am trying to achieve this by a broadcast receiver for outgoing call . SO i will check in my onreceive
if the number dialed = my pattern then launch my activity
I have some questions here
Is this the right way of doing it
Please see my code below for receiver, here my receiver get called, but along with that system app to handle "number dial" is also called. So even if I dial my pattern, after showing my activity, it makes the call. I want to stop making call if the number dialed matches my pattern. How can I achieve this
I am launching my activity as a new task. When I run my app for the first time, my activity screen is coming. But when i dial again, its not brought to front. How can I achieve this. I think if I solve my previous question, this will be taken care.
public class OutgoingCallInterceptor extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { final String originalNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER); this.setResultData("0123456789"); final String newNumber = this.getResultData(); String msg = "Intercepted outgoing call. Old number " + originalNumber + ", new number " + newNumber; Toast.makeText(context, msg, Toast.LENGTH_LONG).show(); Intent intent1 = new Intent(context,ShowMessageActivity.class); intent1.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent1); } }
Menifest File
<application android:icon="@drawable/icon" android:label="Outgoing Call Interceptor">
<receiver android:name="OutgoingCallInterceptor">
<intent-filter android:priority="1">
<action android:name="android.intent.action.NEW_OUTGOING_CALL"></action>
</intent-filter>
</receiver>
<activity android:name="ShowMessageActivity" ></activity>
</application>
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS"></uses-permission>
}
But if by list of apps you mean to say all installed apps then I guess that is not possible you can use
to create shortcut
And for rest of your requirements cant be acheived as I havent found a way to hide my app this way and besides cellphones are personal devices.And you can use a broadcast reciever to know when dialer intent is launched.But again I guess you cannot get the key typed as its all together a different app.