Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8789219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:20:38+00:00 2026-06-13T22:20:38+00:00

I created an App (https://play.google.com/store/apps/details?id=com.widget.analytics) that displays one’s Google Analytics statistics on the Android

  • 0

I created an App (https://play.google.com/store/apps/details?id=com.widget.analytics) that displays one’s Google Analytics statistics on the Android home screen using an AppWidget.

Unfortunately, after upgrading the app to a new release the users need to remove all widgets they created before and have to install them again. This is very annoying. Yet, I am convinced that there is a way around.

After upgrading the app the widgets are not destroyed, they are just in their “default” state which they inherit from the layout.

Is there any of the four widget callbacks that I can use to update the widgets? Is there an after-ùpgrade-callback that I can act upon and update the widgets?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:20:40+00:00Added an answer on June 13, 2026 at 10:20 pm

    I did not realize that onUpdate is called once the app is reinstalled. So the code just goes into the update method and will be called after each upgrade:

    public class WidgetProvider extends AppWidgetProvider {
    
      @Override
      public void onUpdate (Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds){
        // Here we update the widget :)
      }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have created a test application with in app product in google play. http://developer.android.com/guide/market/billing/billing_admin.html
I've create an facebook app and it run smoothly at https://apps.facebook.com/icoloringstar/ But the problem
Hi cloned a simple app ( https://github.com/cfx/twix ) on github that allows me to
I've create a Custom Object/Action/Aggregations for my app. https://graph.facebook.com/10151038251679973 All is working fine but
So I was trying to follow http://developer.android.com/guide/topics/media/camera.html to create a simple app that captures
I created an app that acts as a launcher, which works as expected, but
I am trying to create a simple app for the iPad that with play
i use this code to authorize me with my app https://graph.facebook.com/oauth/authorize?client_id=myappid&scope=publish_stream,offline_access,manage_pages&method=post&redirect_uri=http://www.site.com/indexold.html i get the
I created a facebook app and the login loads but once it does that
I follow the instructions on http://devcenter.heroku.com/articles/play to get my Play! (Java) app running on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.