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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:00:09+00:00 2026-05-26T08:00:09+00:00

I’m working on an android appwidget and it works fine in all android versions

  • 0

I’m working on an android appwidget and it works fine in all android versions I tried (emulator 1.5, 1.6, 2.3), but not 2.1 (physical device, LG GT540 upgraded to 2.1). I tested it on a Samsung GT I5801 fresh out of the box with the 2.1 OS and it worked, probably because tat particular revision the 2.1 version is older (or else Samsung themselves added the fix).

By the way, this I think is the fix to the exact bug I am referring to:
https://android.googlesource.com/platform/packages/apps/Settings/+/7be5137e12ba58cebae634f640379599acdb491a

And this is an older thread discussing the same problem:
Android:NPE while trying to activityForResult with ACTION_APPWIDGET_PICK intent

When I try to load the widget on the homescreen (actually it happens when I click the “Widgets” button) I get the following error:

The application Settings (process com.android.settings) has stopped
unexpectedly. Please try again.

With a “Force close” button.

See logcat output below. By the way this does not happen when my appwidget is not installed yet and it happens also on a 2.1 emulator.

I have searched everywhere and there are lots of people mentioning this. Developers, but mostly users, and the general conclusion is that it is a bug in the android 2.1 OS. For example even google’s own maps appwidget causes this crash.

Now I know that there are appwidgets that work fine on 2.1. So there must be a work around. I just don’t know what. I have read suggestions on here (sorry I can’t find the link right now) that the appwidget needs more than one widget to get it to work. Mine now actually has 2 textviews, but I also tried with one textview and an image button. Neither works.

I could of course avoid 2.1, but I rather would like this appwidget to work on as many android versions as possible (and I can’t upgrade my GT540 as of yet), besides I am not willing to accept defeat. 🙂

Logcat stacktrace:

I/ActivityManager(   58): Starting activity: Intent { act=android.appwidget.action.APPWIDGET_PICK cmp=com.android.settings/.AppWidgetPickActivity (has extras) }
W/InputManagerService(   58): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@44d5d458
D/AndroidRuntime(  229): Shutting down VM
W/dalvikvm(  229): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
E/AndroidRuntime(  229): Uncaught handler: thread main exiting due to uncaught exception
E/AndroidRuntime(  229): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.AppWidgetPickActivity}: java.lang.NullPointerException
E/AndroidRuntime(  229):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
E/AndroidRuntime(  229):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
E/AndroidRuntime(  229):    at android.app.ActivityThread.access$2200(ActivityThread.java:119)
E/AndroidRuntime(  229):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
E/AndroidRuntime(  229):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  229):    at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  229):    at android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime(  229):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  229):    at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(  229):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime(  229):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime(  229):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(  229): Caused by: java.lang.NullPointerException
E/AndroidRuntime(  229):    at com.android.settings.ActivityPicker$IconResizer.createIconThumbnail(ActivityPicker.java:364)
E/AndroidRuntime(  229):    at com.android.settings.ActivityPicker$PickAdapter$Item.<init>(ActivityPicker.java:226)
E/AndroidRuntime(  229):    at com.android.settings.AppWidgetPickActivity.putAppWidgetItems(AppWidgetPickActivity.java:185)
E/AndroidRuntime(  229):    at com.android.settings.AppWidgetPickActivity.putInstalledAppWidgets(AppWidgetPickActivity.java:226)
E/AndroidRuntime(  229):    at com.android.settings.AppWidgetPickActivity.getItems(AppWidgetPickActivity.java:207)
E/AndroidRuntime(  229):    at com.android.settings.ActivityPicker.onCreate(ActivityPicker.java:98)
E/AndroidRuntime(  229):    at com.android.settings.AppWidgetPickActivity.onCreate(AppWidgetPickActivity.java:63)
E/AndroidRuntime(  229):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime(  229):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
E/AndroidRuntime(  229):    ... 11 more
I/Process (   58): Sending signal. PID: 229 SIG: 3
I/dalvikvm(  229): threadid=7: reacting to signal 3
I/dalvikvm(  229): Wrote stack trace to '/data/anr/traces.txt'
E/ActivityThread(   58): Failed to find provider info for android.server.checkin
E/Checkin (   58): Error reporting crash: java.lang.IllegalArgumentException: Unknown URL content://android.server.checkin/crashes
W/ActivityManager(   58): Activity idle timeout for HistoryRecord{44c1fd30 com.android.settings/.AppWidgetPickActivity}

Manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest 
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.example.exampleapp"
    android:versionCode="1"
    android:versionName="1.0"
    android:debuggable="true">
    <uses-permission android:name="android.permission.INTERNET"></uses-permission>
    <application 
       android:label="exampleapp">
           <receiver 
               android:name="ExampleWidgetProvider" >
               <intent-filter>
                  <action 
                      android:name="android.appwidget.action.APPWIDGET_UPDATE" />
                </intent-filter>
                <meta-data 
                    android:name="android.appwidget.provider"
                    android:resource="@xml/example_appwidget_info" />
           </receiver>
     </application>
    <uses-sdk android:minSdkVersion="3" />
</manifest>
  • 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-26T08:00:09+00:00Added an answer on May 26, 2026 at 8:00 am

    This problem automagically disappeared some time ago. The work around suggested elsewhere was to have more than one widget in your appwidget. I actually did that yet the problem persisted. But then disappeared. I had been expanding my appwidget adding features and another widget (that makes 3).

    If I find the time I will carefully check back my revisions and see at which point the problem disappeared. Then I can hopefully answer my own question better than “just add more stuff till it fixes itself”. 😉

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I need to clean up various Word 'smart' characters in user input, including but
I have a text area in my form which accepts all possible characters from
I need a function that will clean a strings' special characters. I do NOT

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.