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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:25:15+00:00 2026-05-26T01:25:15+00:00

I’ve created a WidgetProvider and a Service which triggers on the system TIME_TICK –

  • 0

I’ve created a WidgetProvider and a Service which triggers on the system TIME_TICK – that part is working fine, Log messages show the Service is working AOK and it looks great on an actual phone.

To update my Widgets I use code like this (editted for clarity so it might have a typo)

    Log.d("xxx","Updating");
    RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.main);
    views.setTextViewText(R.id.appwidget_text, "Some Text" + System.currentTimeMillis());
    ComponentName thisWidget = new ComponentName(context, SWClockWidgetProvider.class);
    AppWidgetManager manager = AppWidgetManager.getInstance(context);
    manager.updateAppWidget(thisWidget, views);

On my phone (an HTC Desire running 2.2) it’s perfect, the Widgets update bang-on the minute, every minute.

On the emulator (running 2.2) Log messages appear (e.g. the service is working) but widgets aren’t updated.

Now I call that code in 2 places – from the onUpdate method of the Provider (so that it puts something into the Widgets when they’re first displayed) and from the Service’s listener (to update them)

Now here’s the weird bit – in my manifest I originally declared my service like this

service android:name=”.SWClockWidgetService”

When I changed that to explicitly mention the package (which is identical to the Provider’s package of course)

service android:name=”com.somewhatdog.swclockwidget.SWClockWidgetService”

the initial update (called from the Provider onUpdate) works BUT subsequent calls from the Service’s listener still don’t!?

Note: Originally I made the Service an inner-class of the provider but that didn’t work on a phone OR emulator – no idea if that’s related…

Anyway – I’m mystified – same Android on phone and emulator – one works, one doesn’t (which means the odds of this working on other devices are moody to say the least??)

I’m more than a bit lost here – any advice apprec.

p.s. I’ve tested this on an emulator running 1.6 no joy – it works on an emulator running 2.1r1 and 2.3.3 tho, so who knows…

  • 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-05-26T01:25:16+00:00Added an answer on May 26, 2026 at 1:25 am

    Much further experimentation suggests that Widget updating within the Emulator is just broken.

    Even if you deploy new code, existing Widgets remain unchanged!

    Testing using Androidx86 suggests the problem is confined to the emulator tho – so I guess I’ll use that for Widget testing instead…

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

Sidebar

Related Questions

I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I used javascript for loading a picture on my website depending on which small
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I have a text area in my form which accepts all possible characters from
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

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.