I want to create an app which will have only a service, with totally no UI. No app icon will be shown in app list, just a service will be running in background. Is it possible?
Please see the following tutorial:
Basic4Android | Service Modules
Yes. Add this line to the manifest editor:I asked if I can create an app without any UI
AddReplacement(android.intent.action.MAIN, unused_action)
Yes. Add this line to the manifest editor:
The app will still appear in the settings apps list.B4X:AddReplacement(android.intent.action.MAIN, unused_action)
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
A short explanation about this line. The compiler automatically adds the following intent filter to the main activity:
This intent filter tells the OS that this activity is a "starting point". With the AddReplacement call we change the action name to a custom one and therefore prevent the app from appearing in the apps list.
AddReplacement(android.intent.action.MAIN, unused_action)