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 8940699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:06:21+00:00 2026-06-15T11:06:21+00:00

colleagues! My problem is: I`ve got an App Widget with Configuration Activity(min SDK –

  • 0

colleagues! My problem is: I`ve got an App Widget with Configuration Activity(min SDK – 2.1),
it works properly but sometimes it begins working more slowly. I logged and found out that before
updating my App Widget method onUpdate received an array of App Widget Ids

  @Override
    public void onUpdate(Context context, AppWidgetManager appWidgetManager,
            int[] appWidgetIds) {
        Log.d("onUpdate", Arrays.toString(appWidgetIds));

But the truth was that I had only two instances of App Widget on Home Screen but the lenth of array
is more then 2 (two): 4, sometimes 5 or 6. How can it be so? The reason of slowness of my AppWidget Updates
is that I have to call onUpdate-method for all ids but some ids (as one said “phantom widgets”) are not
real and correct.

Maybe, someone have encountered with such problem and would help me to figure out how to handle only real
app widget ids.

P.S. Uninstalling and then reinstalling app widget (and after that all the ghost widgets were gone) – are not
the proper solving of my problem. I`d like to controll ghost and real widget programmatically.

Has someone any idea how to fix this bug?

  • 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-15T11:06:23+00:00Added an answer on June 15, 2026 at 11:06 am

    This code will delete the widgets (all, even the ones on screen), so is not the ideal solution

    ComponentName cn = new ComponentName(getApplicationContext(), YourWidget.class);
    AppWidgetManager appWidgetManager =  AppWidgetManager.getInstance(getApplicationContext());
    int[] appWidgetIds1 = appWidgetManager.getAppWidgetIds(cn);
    AppWidgetHost host = new AppWidgetHost(getApplicationContext(), 0);
    for (int appWidgetId : appWidgetIds1) {
        host.deleteAppWidgetId(appWidgetId);
    }
    

    Still having problems with deletion of Lock Screen widgets on 4.2 (onReceive never called)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some projects on bzr code repositories shared with colleagues. Problem is, I
Colleagues have been touting the wonders of maven and its magical dependency stuff but
We (my colleagues) have a messy 12 y.o. mature app that is GUI-based, and
One of my colleagues is having a problem with an AJAX call to a
I had one of my colleagues come to me today with a problem of
Dear Colleagues I have a problem with sorting in DataGridView module. When i click
I was helping out some colleagues of mine with an SQL problem. Mainly they
I've been showing off my fancy new graph formats to colleagues, but we have
I've got a problem with the presence indicators in sharepoint 2007 when I add
Scenario You've got several bug reports all showing the same problem. They're all cryptic

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.