I have installed an app via Android Studio but it got hidden due to adding Browsable in manifest.
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="myapp"
android:scheme="returns"
android:pathPattern="/backToApp" />
These are the lines i used to navigate back to app from browser. If i comment out these lines then app icon shows in app drawer.
Can somebody explains what and why it does that?
I agree, android.intent.category.BROWSABLE is causing headaches to Android developers for a long time. Unfortunately, no one really knows the exact reason why "App Icons" dissapear. However, you could certainly solve the problem by having multiple manifest declarations: Please check out these links.
App Launcher Icon Disappears from screen
How to fix not show application icon into app drawer?
App icon doesn't appear after implementing deep links to my app
Let me know if you have any questions.
PS: I am not kidding, really, the reason behind this issue is still a mystery.
Related
Having seen the questions about activities with no GUI here, here and here. In addition, these answer are rather old, I don't know if they're still relevant.
I want to create an app for which the only user interaction is a quick tile.
I understood there can't be no activity at all, so I have a blank activity with no display using #android:style/Theme.NoDisplay
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoDisplay">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<service
android:name=".AdaptativeSleepTile"
android:icon="#drawable/ic_launcher_background">
</service>
But the app appears in my app list (with nothing happening when I click it, logically), which is not what is written in the comments of this answer.
I can't remove the line <category android:name="android.intent.category.LAUNCHER"/> otherwise I get the error message
Could not identify launch activity: Default Activity not found
Error while Launching activity
So what should I do to have a service for which the only user interaction is the quick tile? (Same question would also apply for no interaction at all, or only widget I guess)
Using Android Studio 4 and Sdk 29
I want to create an app for which the only user interaction is a quick tile.
That may or may not be practical. Since Android 3.1, apps are installed in a "stopped state", and it takes an explicit Intent to move them out of the stopped state and allow them to run. Normally, that comes from the user tapping on an icon in a launcher to run your MAIN/LAUNCHER activity.
It is possible that simply having a TileService available in the manifest is enough to get you listed in the notification shade, and the act of adding the tile will be enough to move your app out of the stopped state. However, I certainly cannot guarantee that, and it would not surprise me if this does not work.
Also, please bear in mind that you may need an activity for other reasons:
To display your terms of service
To display your privacy policy
To provide access to tech support
To allow for configuration of the app
And so on
But the app appears in my app list (with nothing happening when I click it, logically), which is not what is written in the comments of this answer.
If you mean the first comment, that is simply wrong, as is pointed out by other comments on that answer.
I can't remove the line otherwise I get the error message
I assume that you are getting that from Android Studio. You will need to change your run configuration to not try starting an activity.
Same question would also apply for no interaction at all
Fortunately, there is no solution for that. Malware authors think that totally invisible apps are wonderful, and Android takes steps to prevent such apps from being able to work. And, this is why I would not be surprised if you need an activity for your TileService.
I have developed an android app. All the things are working fine but the main problem is, using the Hack App Data anyone can see the ad codes which is a very dangerous threat.
Now how can i prevent hack app to open my application or edit my application data or how can i prevent hack app data to access this sensitive information?
note: I have turned off android:exported="false" and also add <permission android:protectionLevel="signature"
android:name="apricot.com.newshunt"/> to my menifest file
you can set the Copy Protection to On in the Android Market upload page. It's near the bottom. I doubt it is fool-proof but it can help keep some of the people likely to do this from being able to.
You should add the view in Java instead of XML and obfuscate your code.
Can I do this using Java?
I'm refering to
<application android:icon="#drawable/icon" android:label="#string/app_name">
in the Android Manifest
If not can I at least provide alternatives that the user can choose from?
Look at this and the asker references.
With th references of the asker, you can see that they put a solution, but if you see the comments, it doesn't work in all devices.
So, it's like the guy answered later, you cannot change the icon of an application in running time.
If you take a look at Facebook Messenger app, it shows you in its icon how many messenges you didn't read yet. I don't know if it works with all devices, but probably not.
Whenever I Run an Android app on my phone (even when the application has not been installed before), the application is shown duplicated in the app drawer. This started happening right after I setup a Splash Screen activity, and I find it kind of annoying. One of the apps in the launcher install with the SplashScreen Activity, the other one does not. The app works without issues, but is there a way to remove this duplicate app icon in the drawer?
It's not urgent, but maybe you guys know ;)
I run my Android app projects with Eclipse, if it's of any help.
Any ideas? Oh, and if you guys need me to show you some of my code, please tell me.
I followed this tutorial for the creation of my splash screen.
Be sure to only have this:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
at one Activity, in your manifest.xml
I had a discussion with a friend and he told me that some applications can be installed on android without any activity or icon showed in menu. Because i'm studying android too i was surprised because i never heard of that.
App's name is showed in "Manage Applications" section and its easy to uninstall it.
So now i'm asking as programmer. How is possible(if it is) to install that kind of application? (with no activity or launcher ).
Just remove all of the following intent filters from your manifest:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Keep in mind though that from Android 3.1 onwards, your app will not receive any broadcasts, or be listed in any other places where an intent filter would make it available (like in the share menu) if the user hasn't manually opened your app UI (main Activity) at least once from the launcher.
There is another way that works even on Android3.1+ .You can not disable the icon itself, but you can disable one component of an application. So disabling the applications launcher activity will result its icon to be removed from launcher.
The code to do this is simple:
ComponentName componentToDisable =
new ComponentName("com.helloandroid.apptodisable",
"com.helloandroid.apptodisable.LauncherActivity");
getPackageManager().setComponentEnabledSetting(
componentToDisable,
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
There is a few things to know about this solution:
1-the disabled component will not be launchable in any way
2-other non disabled activities will be launchable from other applications
3-an application can only disable its own component. There is a permission "android.permission.CHANGE_COMPONENT_ENABLED_STATE", but it wont work, 3rd party plications can not have this permission
4-the icon will only disapper when the launcher is restarted, so likely on next phone reboot, forcing the launcher to restart is not recommended
In this way,App must be run atleast on time.
Reference:
Removing an app icon from launcher
Yeah this kind of application is possible. You have to create an Application that has no Launcher Activity in the Manifest file.
For eg:- You can register a Broadcast for on boot received. So, that when the device boots your application will be called though it doesn't have any UI. You can checkout this one.
NOTE - This type of Application will only work below 3.1.