0

So i developed a widget for android. It all worked fine when i had default samsung ROM for my sgs3 (android 4.1), But when i updated my android version to 4.2.2(CM10) i don't see my widget under 'Widgets' category in the android menu. here is my manifest:

<receiver android:name="ToDoListWidget"
              android:label="ToDoList"
              android:icon="@drawable/icon" >
        <intent-filter>
            <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
        </intent-filter>
        <meta-data
            android:name="android.appwidget.provider"
            android:resource="@xml/items_widget" />
    </receiver>

and here is my appwidget-provider:

<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
    android:initialLayout="@layout/widget"
    android:minHeight="100dp"
    android:minWidth="320dp"
    android:resizeMode="vertical"
    android:updatePeriodMillis="100000" >
</appwidget-provider>

Any ideas what should i cahnge?

EDIT: Hey, please help me with this one, it happend again right now when i create a widget in another app. Is the problem in my code? in my device? in my SDK?

user1394569
  • 105
  • 1
  • 7
  • I've had widgets disappear from the menu when installing/updating an app, and re-installing the app fixed it. Might be worth a try. – paul Jun 21 '13 at 21:38
  • already tried it. still not fixing it. thanks anyway, althought i install it from eclipse. did you install it from apk or from IDE? – user1394569 Jun 21 '13 at 21:47
  • i was also using eclipse – paul Jun 21 '13 at 22:39
  • forgot to mention but i also noticed that the problem occured after i updated the SDK, can it be a couse? – user1394569 Jun 27 '13 at 22:00

1 Answers1

0

I do believe CyanogenMod does this clever thing of moving your app to the SD card automatically if possible

And any app that is on the SD card cannot add a widget to the home screen (as when the SD card is mounted to a PC the widget would disappear and this would be "strange").

So check your app isn't on the SD card. You might want internalOnly or preferInternal in your AndroidManifest.xml

Blundell
  • 75,855
  • 30
  • 208
  • 233