Is it possible to hide a particular application from user?

和自甴很熟 提交于 2019-12-22 11:11:48

问题


I want to create the application that lists all install applications in my device. And After that I want to set it as Hide and Show With which another User can not able to see that particular application. So is it possible ? If yes, then How?


回答1:


Yes, if you don't add the following in your main activity's declaration in android manifest:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

by doing so, your app will not be listed in launcher but will be installed. However, in order to run it, perhaps you may register a broadcast receiver in its manifest and use another application to send a broadcast which is received by its (hidden app's) broadcast receiver which starts the activity.




回答2:


I implemented something like this but it was added customization in the original android launcher code for a phone. Which allows for modifying the applications that show up in the application's list that is available on the phone. This is only possible if you're working on the baseband software of a phone.

However for your case, you can just remove these declarations:

<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />



回答3:


If its for all the applications, you can create a custom Launcher (ADW Launcher is open source, and provides the source code at https://github.com/AnderWeb/android_packages_apps_Launcher)

Just download it, and you can set whatever apps you want to show in the Launcher.

Another alternative may be, download Go Launcher EX from the Market, and you will be provided with settings to show or hide apps.




回答4:


Yes there is. It is called a Service.



来源:https://stackoverflow.com/questions/8802340/is-it-possible-to-hide-a-particular-application-from-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!