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

  • Home
  • SEARCH
  • 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 7023663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:44:22+00:00 2026-05-27T23:44:22+00:00

I did a sample from App Widget Article , Where I used Service for

  • 0

I did a sample from App Widget Article, Where I used Service for update the App widget.

Now I want to programatically update the App Widget from custom interval (run time interval).

How can I do this?

  • 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-27T23:44:23+00:00Added an answer on May 27, 2026 at 11:44 pm

    Here is an example how to set create an update event for AppWidget. You can customize it for your purposes:

    Intent intent = new Intent();
    intent.setAction(ExampleAppWidgetProvider.MY_INTENT_ACTION);
    Uri data = Uri.withAppendedPath (Uri.parse("wordwidget://wordwidget/widgetId/#"),
                    String.valueOf(mAppWidgetId));
    intent.setData(data);
    intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
    
    PendingIntent pendingIntent = PendingIntent.getBroadcast(
    ExampleAppWidgetConfigure.this, 0, intent,
    PendingIntent.FLAG_UPDATE_CURRENT);
    AlarmManager alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
    alarmManager.setRepeating(AlarmManager.RTC, System.currentTimeMillis() + 10000, 10*1000, pendingIntent);
    

    You should also make an additional intent-filter for your BR that will receive the intent with action name: ExampleAppWidgetProvider.MY_INTENT_ACTION

    UPDATE
    To your Broadcast Receiver you should add new intent-filter like this:

    <intent-filter>
        <action android:name="org.android.testwidget.MY_APPWIDGET_UPDATE" />
        <data android:scheme="wordwidget" />
    </intent-filter>
    

    Then you create an Intent that will be received by the defined intent-filter. In my case, public static final String MY_INTENT_ACTION = "org.android.testwidget.MY_APPWIDGET_UPDATE";
    Data part of the Intent is needed to create a separate intent for each AppWidget instance (because I want to update each instance in different time). After that you create Pending intent for BR and create alarmManager with this PI. In the method setRepeating you define the start time and the interval for your AppWidget instance.

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

Sidebar

Related Questions

I am new to android widget.I did sample application , that want to show
I want to upload a foto from my android app to a facebook fan
I am trying to view a sample app on a real device (a ViewSonic
Before you react from the gut, as I did initially, read the whole question
I'm working on a web app that passes data to a custom client app.
I have enabled versions and autosave in my document based app so now I
I have this sample of code: import sys import time from PyQt4.QtGui import *
I've started work on an Android App that will work with Google Docs. UPDATE
I have a simple app that downloads some data from a webservice and displays
I got the sample code from Facebook to post a message. At first it

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.