I'm writing a (legal) spy program. I want to make this program hidden on the launcher (so that no icon is shown). I tried to remove <category android:name="android.intent.category.LAUNCHER" />
line from AndroidManifest.xml
, but then the user can't launch the application in first start mode (configuration). Who have any ideas ?
How can I do it?
You need to make your app into a service. Here is Androids take on creating services components:
http://developer.android.com/guide/components/services.html
Found this as well on MobiWare:
When you want to track the usage of the mobile or gather some data without user knowledge,this might help you.
Step1: Create an application with No icon. Normally,an activity is declared as follows in manifest.
Remove the Category TAG ,you wont get app icon anymore. Now,you don't need activity anymore. so remove this segment. BUt you might think,how the app will run without any trigger or what is the starting point of the application. This is the solution.
This triggers your code that written in Receiver there by you can run service to implement your thoughts.
You need to add this permission,
Your code runs when the phone reboots only.
Step 2. Write your code
On Reboot,the recevier will fire ,there you can start your service.
You can remove the
<category android:name="android.intent.category.LAUNCHER"/>
from the AndroidManifest.xml file.But remember to add
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
so that Android studio will be able to compile your app (yet hidden from launcher) :) :Dremove
from the manifest file