How to hide application from showing in menu

后端 未结 3 1395
再見小時候
再見小時候 2021-01-25 09:37

I\'m making an Android app and I would like to know how to hide its icon and title from showing in the menu. Everything I\'ve found so far on the internet is hiding

         


        
相关标签:
3条回答
  • 2021-01-25 09:49

    Then you would need some way to start a service. Or figure out a meaningful way you can actually start up your application without user interaction, there are tons of options.

    0 讨论(0)
  • 2021-01-25 09:58

    There are lots of Intent defines for receiving broadcasts through which you can start you activity for example

    • ACTION_BOOT_COMPLETED
    • ACTION_POWER_CONNECTED

    for further detail check this link

    0 讨论(0)
  • 2021-01-25 09:59

    but if i do that i can't start my app after installation!

    Correct. Effectively, as of Android 3.1, you must have a launcher icon, at least at the outset.

    i need my application to be ALWAYS turned on, even after restarting the phone (turning it off and on).

    I have no idea what "ALWAYS turned on" means in terms of an application. I am going to assume you mean "ALWAYS running".

    In that case, this is not possible. Users can and will stop your app by any number of means, such as task killers and the force-stop option in Settings. The Android OS will automatically stop your app if it is hiding in the background for too long. It is considered poor form to have some piece of your application (a service) running constantly -- very few applications need this.

    Moreover, please bear in mind that the combination of "I need it always running" and "I do not want it to appear in the launcher" sounds very suspicious, almost as if you are trying to write something that the user might not want to have running.

    0 讨论(0)
提交回复
热议问题