AppWidget in Accounts & Sync not getting updated
I've successfully gotten an AppWidget working on the home screen, which properly updates in response to pushes from a running background service. I'm thinking this proves my overall logic and creation of AppWidgets. I also have my sync adapter working correctly and have a sync settings profile built which properly functions with application preferences.
I would like to embed the running AppWidget within my specific account settings page in the "Accounts & Sync" tab from the OS. Here's the XML for the account preference screen:
<PreferenceScreen
android:key="general_description"
android:summary="@string/preferences_general_description"
>
</PreferenceScreen>
<PreferenceCategory android:title="General Settings" />
<PreferenceScreen
android:key="account_information"
android:title="@string/preferences_account_information_title">
<开发者_如何学C;intent android:targetPackage="@string/package_name"
android:targetClass="com.dashwire.android.app.AccountInformationSettingsActivity"/>
</PreferenceScreen>
<PreferenceScreen
android:key="sync_settings"
android:title="@string/preferences_syncsettings_title"
android:summary="@string/preferences_syncsettings_summary">
<intent android:targetPackage="@string/package_name"
android:targetClass="com.dashwire.android.app.SyncSettingsActivity"/>
</PreferenceScreen>
<PreferenceScreen
android:key="sync_notifications"
android:title="@string/preferences_syncsettings_notifications">
<intent android:targetPackage="@string/package_name"
android:targetClass="com.dashwire.android.app.ApplicationsActivity"/>
</PreferenceScreen>
<Preference
android:key="squarepants"
android:widgetLayout="@layout/appwidget_layout"/>
The AppWidget shows up, it's just not being updated like the working "Home Screen" is... How can I do this?
You can only embed app widgets in App Widget hosts. As far as I can tell the basic Preferences screen is not a working app widget hosts.
精彩评论