• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Programmatically remove widget

yenpei

Lurker
Jun 24, 2010
7
0
Hi,

I have a widget but when I have un-installed my app, the widget still exist in the home screen with "Problem loading widget".

How do I programmatically remove the widget? It seems that many widget on Android Market also have similar problem, but really hope to get this eye sore fixed.

YEN PEI.
 
Some folks don't use widgets, but rather shortcuts to the apps themselves for theming and to save battery and not all apps have widgets. Add to that that people use different launchers and you are asking devs to write a lot of extra code for little benefit as well as potentially introducing errors into their programs to account for all that variability. Unrealistic.
 
Upvote 0
I completely disagree. Not an embarassment, but simple ROI. Would you pay for the feature? If yes, then contact the programmers and tell them you'd be willing to pay them to do this little thing for you.

You have to be practical. Unless you've done programming yourself, you probably won't understand.
 
Upvote 0
You still aren't getting it. Different people code differently. A widget might uninstall fine on one home app while it'll leave something like what you've seen on another. Now that may be an issue on the widget app side, or it might be an issue with the way the home app works.

The point is, you can't expect every widget and every home app dev to write it code to make it compatible with every other android app dev's coding. Especially when the fix takes so little time to deal with and is simple as hell to figure out.
 
  • Like
Reactions: BookLover
Upvote 0
The idea is simple: "Uninstalling the app should also uninstall its associated widget".
Everything seems simple when you aren't aware of the details involved... :rolleyes:

The idea may be simple but ideas don't implement themselves. Ideas don't debug themselves or QA themselves.

I'd think if this issue cannot be solved, it's an embarrassment to Android as this is such a visible bug, at least from developer's perspective.
It's not any more embarrassing than Windows apps not deleting shortcuts that I create. Granted, a widget isn't a shortcut but the solution to the "embarrassment" is the same: drag it to the trash and be done with it.

As stated above, if it really bothers you then contact the developers of your apps rather than post here.
 
Upvote 0
i'm a .net & android developer myself. i agree with your developer's point of view, but i also think yenpei has raised a valid request. valid, but maybe be worth to solve. however simply denying users requests by saying not practical or unrealistic makes developers look bad. who drives the requirements after all? yes if possible i'd like windows to prompt me to remove my shortcuts after uninstalling an application. if it's too difficult then it could be a framework problem, not mine as a user. if developers decide everything then monitors would still be 16-color i guess.
 
Upvote 0
This is something at the OS level, and I'm sure it will get done at some point. But as features go, I would guess this isn't high on the Android team's priority list.

I believe if there are enough developers asking for it, Google will consider add new API to their SDK in their next release.

Just tell Google end users want it and we developers want to implement provided they expose API for us :p
 
Upvote 0
The idea is simple: "Uninstalling the app should also uninstall its associated widget".
I think this is common sense.

I agree with this, but..........

You can't expect a dev to add in lines and lines of new code for every new home screen app that comes out to fix this when the solution is to drag and drop an inch or so.

I'll take a smaller file size in exchange for something that literally takes a second to remedy on my own.

I also agree with this. It's really not that big a deal.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones