The process is simple: tap and hold on to the app you want to delete until you see a prompt with three options: edit home screen, share app, and remove app. New AirPods and MacBooks?: Apple hosting an event on Oct. Note2: I haven't tried removing icons belonging to other apps using this method, but it might just be crazy enough to work.Apple Watch Series 7: Is it worth the upgrade? Note1: In retrospective, it might have been easier to create the old shortcut manually using the URI obtained from the database instead of going through all backing-up and force-stopping ordeal. Viola! The old shortcut was now restored.Clicked the hardware "home" button to re-launch the launcher.ALT-TAB into Total Commander and restored the DB.Went to the Device Settings > Apps > ALL, found my launcher (for me it was "Trebuchet" since I'm on CM11) and Force stopped it.Opened Total Commander and minimized it (so that a shortcut is available in the "ALT-TAB" menu).apk for that) - the "old shortcut" was now gone. Installed the new version through my IDE (you can also use an.Backed-up my launcher.db using Total Commander.Installed the old version of the app from the store - an icon with the "old shortcut" was automatically placed on my screen.In order to simulate and debug a Google Play update (which keeps the old shortcut) I did the following: Wait about 2-3 seconds for the "icon removed" toast to appear.Ģ) Google's implementation of UninstallShortcutReceiver.java.Make sure that your "Icon Uninstaller" intent uses the exact same URI used to create the icon you're trying to delete, by either storing the URI used to create it, or by obtaining it from launcher.db.GetApplicationContext().sendBroadcast(intent) Intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Blue Card") Intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, altShortcutIntent) Intent altShortcutIntent = Intent.parseUri(oldShortcutUri,0) String oldShortcutUri = "#Intent action= category= launchFlags=0x10200000 package= component=/.LoadingScreen end" Trying to copy-paste the intent exactly as it appears in the launcher.db: Intent intent = new Intent() GetApplicationContext().sendBroadcast(addIntent) tAction(Intent.ACTION_MAIN) ĪddIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent) ĪddIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Blue Card") ĪtAction(".UNINSTALL_SHORTCUT") Attempt 2: Using as-is code from viralpatel Intent shortcutIntent = new Intent(getApplicationContext(),LoadingScreen.class) The 0x10200000 is actually a sum of two arguments as explained here. GetApplicationContext().sendBroadcast(uninstaller) Uninstaller.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Blue Card") Uninstaller.putExtra(Intent.EXTRA_SHORTCUT_INTENT, oldShortcutIntent) Intent oldShortcutIntent = new Intent(getApplicationContext(),LoadingScreen.class) ![]() OldShortcutIntent.addCategory(Intent.CATEGORY_LAUNCHER) Attempt 1: Reconstructing the intent Intent oldShortcutIntent = new Intent() This is a case of trial an error with a happy ending. Meaning that the "uninstallation intent" has to have both Intent.EXTRA_SHORTCUT_INTENT and Intent.EXTRA_SHORTCUT_NAME or else it will not even consider executing. Public class ShortcutTest extends Activity ![]() ![]() Here is the Java code (ShortcutTest.java): import 圎xception However, nothing I do seems to delete the shortcut. When you click a button, the Activity is supposed to remove the same shortcut it just created. I created a test Activity that installs a shortcut of itself on the Android Home screen.
0 Comments
Leave a Reply. |