How to remove widget when the app is uninstalled in Android?

This is a discussion on How to remove widget when the app is uninstalled in Android? within the Beginning Developers forums, part of the Android Development category; In Android, I have created a widget for my application. When I uninstall the app, the widget shows "problem loading widget" error in home screen. ...

Results 1 to 6 of 6
Like Tree1Likes
  • 1 Post By furbearingmammal

Thread: How to remove widget when the app is uninstalled in Android?

  1. #1
    Android Lurker angel999's Avatar
    Join Date
    Aug 2011
    Posts
    2

    How to remove widget when the app is uninstalled in Android?

    In Android, I have created a widget for my application. When I uninstall the app, the widget shows "problem loading widget" error in home screen. I need a scenario where widget should be removed by the developer through code (and not by the drag and drop to the trash) when I uninstall the app. Is it possible? If so, what changes we need to do? Is there anything that can be set in the manifest so that it removes all references of the app once it is uninstalled?

  2. Android.net is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    Android Lurker angel999's Avatar
    Join Date
    Aug 2011
    Posts
    2

    How to remove widget when the app is uninstalled in Android?

    I have already debugged on Phone and emulator, I realize that when we uninstall our app, only activity manager of phone is run. I don't know how to catch event uninstall app. Some people who Pro Android, please help me!!!.Thank so much.
    Last edited by angel999; 08-12-2011 at 04:00 AM.

  4. #3
    Super Moderator/RS furbearingmammal's Avatar
    Join Date
    Jan 2011
    Location
    Two hours north of Syracuse, NY. Yes, there IS civilization that far north.
    Posts
    3,983
    Thanked
    197 times
    Twitter
    FurryVarmint
    Threads merged and moved to Beginning Developers forum as this appears to be a development question.

    Please do not dupe-post or cross-post.
    angel999 likes this.
    DO NOT WRITE IN THIS SPACE
    THIS SPACE INTENTIONALLY LEFT BLANK

  5. #4
    App Developer alostpacket's Avatar
    Join Date
    Jan 2011
    Location
    NY
    Posts
    240
    Thanked
    32 times
    Twitter
    alostpacket
    There is no way for an app to catch it's own uninstall event. There likely will not ever be a way, as that's a big security risk.

    Also I am not sure if it is possible to removed a widget programatically when uninstalled. But I dont think so

    Sorry for the bad news

  6. #5
    Android Enthusiast titanoman's Avatar
    Join Date
    Jul 2011
    Location
    Columbia, Misery (Missouri)
    Posts
    431
    Thanked
    8 times
    Quote Originally Posted by furbearingmammal View Post
    Threads merged and moved to Beginning Developers forum as this appears to be a development question.

    Please do not dupe-post or cross-post.
    Does that mean that I shouldn't ask any questions about this here? If it's okay, I would ask if the remaining widget is an example of part of an app being left on the sd card? Sorry to ask a basic question in a developers status (what I would certainly consider advanced) topic?

  7. #6
    App Developer alostpacket's Avatar
    Join Date
    Jan 2011
    Location
    NY
    Posts
    240
    Thanked
    32 times
    Twitter
    alostpacket
    What gets left behind is some setting that makes the OS think there should be a widget there. But nothing of the actual app/widget gets left behind. Just a "slot" reserved to hold it. If the user drags that to the trash it just frees space on the home screen. But by that point all the files from the app are long gone (unless the app saved some other files to the SD for some reason).

    hth

Remove Ads

http://www.scramblerducati.org/

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Similar Threads

  1. can not remove icons on DHD
    By mikaelknudsen in forum HTC Desire HD
    Replies: 0
    Last Post: 08-08-2011, 05:25 AM
  2. Logs about uninstalled applications
    By alda81 in forum Android Forum
    Replies: 0
    Last Post: 06-14-2011, 04:01 AM

Search tags for this page

android delete widget

,
android remove widget uninstall
,
how do i remove the widget after i uninstall the app
,
how do i uninstall widgets android
,
how to delete widget on android
,

how to delete widgets android

,
how to remove apps from widget
,
how to remove problem loading widget
,
how to remove widgets from apps
,
how to uninstall android widgets
,
how to uninstall widgets
,

how to uninstall widgets android

,
how to uninstall widgets on android
,
problem loading widget after uninstall
,

uninstall widgets android

Click on a term to search our sites for related topics.
Android Forum