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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:08:32+00:00 2026-06-04T16:08:32+00:00

I created a simple appwidget which shows digital clock, and I set a PendingIntent

  • 0

I created a simple appwidget which shows digital clock, and I set a PendingIntent for that clock.(i.e) when the user tap on the textview a dialpad is opened. It works perfectly. But when i opens some application like Car Home and then exit from the Car Home will makes just a flash my Homescreen. And my widget is now gone to not responding state. I don’t know i m going wrong. Past 2 days i m googling for this. Anyone please help.

java code:

 @Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
    super.onUpdate(context, appWidgetManager, appWidgetIds);
    context.startService(new Intent(UpdateService.ACTION_UPDATE));
    RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
    Intent dial = new Intent();
    dial.setAction("android.intent.action.DIAL");
    PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, dial, 0);
    remoteViews.setOnClickPendingIntent(R.id.Time, pendingIntent);
    for (int i = 0; i < appWidgetIds.length; i++) {
        appWidgetManager.updateAppWidget(appWidgetIds[i], remoteViews); 
    }
}

AppwidgetProvider:

<?xml version="1.0" encoding="utf-8"?>

<appwidget-provider
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:minWidth="150dip" 
    android:minHeight="72dip"
    android:initialLayout="@layout/main" />

main.xml

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:background="#00000000"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" >

    <RelativeLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerVertical="true" >
            <TextView
                android:id="@+id/Time"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:ellipsize="none"
                android:textSize="56sp"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:shadowColor="#C0000000"
                android:shadowDx="0"
                android:shadowDy="0"
                android:shadowRadius="3.0" />
    </RelativeLayout>

</FrameLayout>
  • 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-04T16:08:33+00:00Added an answer on June 4, 2026 at 4:08 pm

    Please try AppwidgetManager.updatewidget() in onupdateof your AppWidgetManager method.

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

Sidebar

Related Questions

I created simple modal view photo gallery that gets picture where user clicked and
Ok I created simple user control that look like this <%@ Control Language=C# AutoEventWireup=true
I created a simple .Net web service which runs a very simple query (which
Have created simple Ajax enabled contact forms before that have around 12 fields -
I created simple HttpListener that listens to port 9090 and depending on a request's
I`ve created simple hello world-like plugin which draws red box. Аfter embedding into xulrunner
I have created simple .aspx page which queries a database for some live data
I created simple web service with Jersey that reads in an XML file and
I have created simple DataGrid with 4 columns, which go outside the bounds of
I have created simple web service for my website that generates some json based

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.