POST
A quick way to hide app icon on andorid desktop
Here introduces a quick way to hide the android app icon on the desktop. Although it isn’t a common case on the development or usage of android app, it deserves pay a little bit time reading for anyone who want to realize it.
The code implementation
The method is to add a <data></data>
property on your app’s AndroidManifest.xml
.
Below is a example.
Comments
The key points are:
- App’s entry activity is declared to be started by receiving implicit intent, so the icon will not be displayed naturally.
- For the
data
property declaring, theandroid: scheme
must have been defined explicitly. - Property value needs to start with a lowercase letter.
- To call the app, need to use URI, the formate is
scheme://host: port/path
.
Therefore, for above example, the URI iscom.example.hideapplication02://mainactivity
. - The caller needs to add below code: