Android
Android copied to clipboard
Deleting card doesn't remove shortcut widget
Hello! I've been digging around shortcuts related topics and found this https://developer.android.com/develop/ui/views/launch/shortcuts/managing-shortcuts
Because pinned shortcuts appear in the launcher itself, they're always visible. A pinned shortcut is removed from the launcher only in the following situations:
- The user removes it.
- The app associated with the shortcut is uninstalled.
- The user clears an app's data by going to Settings > Apps & notifications, selecting an app, then pressing Storage > Clear storage.
So it looks like it is not possible for app to uninstall shortcuts from launcher. It used to be possible, however, https://developer.android.com/reference/android/Manifest.permission#UNINSTALL_SHORTCUT, but Android devs decided to remove this permission because it allowed any app to delete any shortcut. I think the only option would be to disable shortcuts, so when users sees a greyed out shortcut on their launcher, they remove them manually
Hello! I've been digging around shortcuts related topics and found this https://developer.android.com/develop/ui/views/launch/shortcuts/managing-shortcuts
Because pinned shortcuts appear in the launcher itself, they're always visible. A pinned shortcut is removed from the launcher only in the following situations:
- The user removes it.
- The app associated with the shortcut is uninstalled.
- The user clears an app's data by going to Settings > Apps & notifications, selecting an app, then pressing Storage > Clear storage.
So it looks like it is not possible for app to uninstall shortcuts from launcher. It used to be possible, however, https://developer.android.com/reference/android/Manifest.permission#UNINSTALL_SHORTCUT, but Android devs decided to remove this permission because it allowed any app to delete any shortcut. I think the only option would be to disable shortcuts, so when users sees a greyed out shortcut on their launcher, they remove them manually
Thanks a lot for this detailed explanation! Greying out a shortcut sounds like a good idea :)
@Altonss, no problem :)
@TheLastProject, if you find that it's an appropriate solution I can easily implement this since I've already explored shortcuts related code and working on another shortcuts issue
I'm so sorry, I confused shortcuts and widgets when making this issue. Catima doesn't make any extra shortcuts I believe, it's about widgets not being removed and tapping them just causing Catima to start with "Could not find that card".