What does the tag in app widget provider do?

<receiver android:name="ExampleAppWidgetProvider" >
        <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
    <meta-data android:name="android.appwidget.provider"
               android:resource="@xml/example_appwidget_info" />

The element requires the android:name attribute, which specifies the AppWidgetProvider used by the App Widget.

The element must include an element with the android:name attribute. This attribute specifies that the AppWidgetProvider accepts the ACTION_APPWIDGET_UPDATE broadcast. This is the only broadcast that you must explicitly declare. The AppWidgetManager automatically sends all other App Widget broadcasts to the AppWidgetProvider as necessary.

The element specifies the AppWidgetProviderInfo resource and requires the following attributes:

android:name – Specifies the metadata name. Use android.appwidget.provider to identify the data as the AppWidgetProviderInfo descriptor.
android:resource – Specifies the AppWidgetProviderInfo resource location



Published by