开发者

App Widget does not appear in the widget list on Honeycomb devices until Launcher is restarted [duplicate]

This question already has answers here: Closed 11 years ago.

Possib开发者_如何学Pythonle Duplicate:

Android AppWidget does not show up in the menu in honeycomb until reboot

It seems like the default launcher in Android 3 (Honeycomb) has a bug. It doesn't seem to refresh the widget list when you install a new application. When you restart the launcher (or restart the whole tablet) the widget will be there, as it should be. Seems like the widget list there is cached, while on earlier versions of Android, and in other launchers this is not the case.

I've followed the instructions in the SDK, and it seems to be working find on other devices, but on Android 3 it never worked right from the first time :(

I've marked my application with android:installLocation="internalOnly"

Here's the widget registration in the manifest:

    <receiver android:name=".BatteryWidget" android:label="@string/widget_name">
        <intent-filter>
            <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
        </intent-filter>
        <intent-filter>
            <action android:name="org.flexlabs.action.BATTERY_UPDATED" />
            <action android:name="org.flexlabs.action.dualbattery.SETTINGS_UPDATED" />
        </intent-filter>
        <meta-data android:name="android.appwidget.provider" android:resource="@xml/widget_info" />
    </receiver>

Please help?


Honeycomb+ launcher behaves a bit differently than pre-Honeycomb one. It does not display widget in list of widgets until you launch any activity of the application.

See http://groups.google.com/group/android-developers/browse_thread/thread/6ef964dc4395e979/161a79b9a4d0a753?show_docid=161a79b9a4d0a753&pli=1 for more details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜