Android Question Hiding from application list

toolkit

New Member
Licensed User
Longtime User
Hello
I have a problem with one of my application.
This application (with two services) must remain hidden from the launcher list /app list (no icon, no title), it's like having services w/o UI.
I use the command " AddReplacement(android.intent.action.MAIN, unused_action) " in the Manifest Editor to obtain that hidden state.
When i compile and run my application with B4A, all is OK, the application is installed and opened, the services are started and the application is not listed in the launcher / list

But when i try to install manually the .apk file of this application (copying the .apk in some folder on the phone and asking Android to install it), the file is installed but not opened, services are not started.
In the settings of the phone "Unkown Source" is checked.

Is there a solution for the application to opens (and the services starts) when i install manually the .apk ?
 

warwound

Expert
Licensed User
Longtime User
I'm not sure if this will help...
Take a look here: http://developer.android.com/guide/topics/manifest/activity-element.html#nohist

Whether or not the activity should be removed from the activity stack and finished (its finish() method called) when the user navigates away from it and it's no longer visible on screen — "true" if it should be finished, and "false" if not. The default value is "false".

A value of "true" means that the activity will not leave a historical trace. It will not remain in the activity stack for the task, so the user will not be able to return to it.

This attribute was introduced in API Level 3.

Martin.
 
Upvote 0

Informatix

Expert
Licensed User
Longtime User

This is a very different story. It's about the activity stack. This setting is used in case you don't want to return to an activity with the back button and you don't want to leave a trail of this activity in the history. For example, you can use it with a splash screen or an ad inserted between two activities. I use it for an activity manager in one of my projects (it decides what activity has to be opened when you launch the app).

To hide the app, the AddReplacement in the first post seems the way to go. Unfortunately, it's not possible to launch automatically a file installed manually on the device. B4A can do the two operations because it uses ADB commands. It's not a "manual" installation.
 
Last edited:
Upvote 0

toolkit

New Member
Licensed User
Longtime User
Thank you for your response.
I had already seen this post on StackOverflow but I thought there was a solution, things are clear now.
 
Upvote 0
Top