Thursday 5 September 2019

How to update android app with hidden icon

I use this code for hiding icon:

PackageManager p = getPackageManager();
ComponentName componentName = new ComponentName(this, MainActivity.class); 
p.setComponentEnabledSetting(componentName, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP);

It works fine, but when I try to update my application, I get this error:

Error while executing: am start -n "../..main.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=../.main.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mFlags=0 } }
Error type 3
Error: Activity class {../..main.MainActivity} does not exist.

Error while Launching activity

How can I hide icon and still available application update (without uninstall/install in a manual way)?



from How to update android app with hidden icon

No comments:

Post a Comment