I have a widget that is part of my main application. Typically, when an application is updated, a PendingIntent is created, which causes the user to become active in the main application when the widget is clicked. However, when the main application is the forced termination or destruction of the OS due to an error, the widget stops responding when pressed. I believe that it also stops receiving translations because the onReceive method is not called.
Here is what I have in the manifest:
<receiver android:name=".widgets.AppWidget" android:label="@string/widget_name"> <intent-filter> <action android:name="android.appwidget.action.APPWIDGET_UPDATE"/> <action android:name="com.myApp.android.widgets.CLICK.start"></action> </intent-filter> <meta-data android:name="android.appwidget.provider" android:resource="@xml/appWidget_provider"/> </receiver>
The widget code is in a separate package from the main application.
source share