In my widget I started Timer. It's work fine, everything is ok. But if I remove widget from home screen, onDisable or onDeleted is not called.
I try with onReceive but my Log.i() give my only onUpdate.
#Override
public void onReceive(Context context, Intent intent)
{
super.onReceive(context, intent);
Log.i("onReceive", intent.getAction());
}
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds)
{
timer = new Timer();
timer.scheduleAtFixedRate(new TasksView(context, appWidgetManager), 100, 5000);
[...]
}
Additional, I have:
#Override
public void onDeleted(Context context, int[] appWidgetIds)
{
super.onDeleted(context, appWidgetIds);
Log.i("MyTag", "onDeleted");
}
#Override
public void onDisabled(Context context)
{
super.onDisabled(context);
Log.i("MyTag", "onDisabled");
}
and:
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="android.appwidget.action.APPWIDGET_DELETED" />
<action android:name="android.appwidget.action.APPWIDGET_DISABLED" />
<action android:name="com.opennet.supportportal.UPDATE_LIST_WARN" />
So, how I can stop my timer? Why onDisable or onDeleted is not called?
There is a bug in android 1.5 that the onDeleted method is not called. The code below placed in the onRecive fixes the problem.
#Override
public void onReceive(Context context, Intent intent)
{
final String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
final int appWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
this.onDeleted(context, new int[] { appWidgetId });
}
} else {
super.onReceive(context, intent);
}
}
More info here
You need to add android:exported="true" in your Provider Manifest declaration.
onDelete() method not being called
Related
I'm trying to follow this example:
What is the correct way for sharing data among AppWidgetProvider and RemoteViewsService.RemoteViewsFactory
As such, I have a RemoteViewsFactory that has this:
#Override
public void onDataSetChanged() {
// Subsequent calls to get the data.
newsGetter.updateListFeed(null, new NewsGetter.OnUpdateListFeedFinishedListener() {
#Override
public void onUpdateListFeedFinished(VolleyError error) {
//async return here from volley
Intent widgetUpdateIntent = new Intent(NewsWidgetBase.FEED_UPDATED);
widgetUpdateIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
LocalBroadcastManager.getInstance(context).sendBroadcast(widgetUpdateIntent);
}
});
Log.e(TAG, "******************************** onDataSetChanged PROVIDER");
}
Then I have an AppWidgetProvider that has this:
#Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_UPDATE.equals(action)) {
Log.e("WidgetBase", "******************************** onReceive ACTION_APPWIDGET_UPDATE");
} else if (FEED_UPDATED.equals(action)) {
Log.e("WidgetBase", "******************************** onReceive FEED_UPDATED");
AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
updateAppWidget(context, appWidgetManager, appWidgetId);
}
super.onReceive(context, intent);
}
And in the manifest:
<receiver android:name=".widgets.a">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="com.myapp.FEED_UPDATED" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="#xml/abc" />
</receiver>
I get the debugger log for ACTION_APPWIDGET_UPDATE, but for my own Intent broadcast, it never fires onReceive (breakpoint is never even hit). Does anyone see what I'm doing wrong?
For your own Intent broadcast to work, you have to register your BroadcastReceiver programmatically. So register your receiver as
LocalBroadcastManager.getInstance(this).registerReceiver(YourWidgetReceiver, new IntentFilter("your_intent_action"));
And then send your broadcast as
Intent intent = new Intent("your_intent_action");
LocalBroadcastManager.getInstance(getApplicationContext()).sendBroadcast(intent)
;
Hope this helps.
I saw similar questions here on SO, but nothing seems to work in my case...
I created an appwidget with an AdapterViewFlipper (Simple ViewAnimator that will animate between two or more views that have been added to it). The appwidget has a Next button that enables the user to navigate to the next view on the widget.
It all works fine when I first add the appwidget. But if the smartphone reboots, the Next button of the widget no longer works on my Samsung S4 (the method onReceive is called, but nothings happens, it doesn't navigate to the next view and is stuck at the first view). I have to delete the widget and add it again in order for it to work...
I suspect that it is a problem of Touchwiz since I tested it on another phone (Moto G) and it worked fine.
Here are some portions of my code :
AppWidgetProvider
public class AppWidgetProvider extends AppWidgetProvider {
public static final String NEXT_ACTION = VersionUtil.getPackageName() + ".action.NEXT";
private static final String TAG = DailyAppWidget.class.getSimpleName();
#Override
public void onEnabled(Context context) {
// Enter relevant functionality for when the first widget is created
}
#Override
public void onDisabled(Context context) {
// Enter relevant functionality for when the last widget is disabled
}
#Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
// There may be multiple widgets active, so update all of them
for (int appWidgetId : appWidgetIds) {
updateAppWidget(context, appWidgetManager, appWidgetId, colorValue);
}
super.onUpdate(context, appWidgetManager, appWidgetIds);
}
#TargetApi(Build.VERSION_CODES.HONEYCOMB)
void updateAppWidget(Context context, AppWidgetManager appWidgetManager,
int appWidgetId, int primaryColor) {
Intent intent = new Intent(context, ViewFlipperWidgetService.class);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
// When intents are compared, the extras are ignored, so we need to embed the extras
// into the data so that the extras will not be ignored.
intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));
// Instantiate the RemoteViews object for the app widget layout.
RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.app_widget);
// open the activity from the widget
Intent intentApp = new Intent(context, MainActivity.class);
intentApp.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intentApp, 0);
rv.setOnClickPendingIntent(R.id.widget_title, pendingIntent);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
rv.setRemoteAdapter(R.id.adapter_flipper, intent);
} else {
rv.setRemoteAdapter(appWidgetId, R.id.adapter_flipper, intent);
}
// Bind the click intent for the next button on the widget
final Intent nextIntent = new Intent(context,
AppWidgetProvider.class);
nextIntent.setAction(AppWidgetProvider.NEXT_ACTION);
nextIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);
final PendingIntent nextPendingIntent = PendingIntent
.getBroadcast(context, 0, nextIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
rv.setOnClickPendingIntent(R.id.widget_btn_next, nextPendingIntent);
appWidgetManager.updateAppWidget(appWidgetId, mRemoteViews);
}
#TargetApi(Build.VERSION_CODES.HONEYCOMB)
#Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (action.equals(NEXT_ACTION)) {
RemoteViews rv = new RemoteViews(context.getPackageName(),
R.layout.daily_app_widget);
rv.showNext(R.id.adapter_flipper);
int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
Log.e(TAG, "onReceive APPWIDGET ID " + appWidgetId);
AppWidgetManager.getInstance(context).partiallyUpdateAppWidget(
appWidgetId, rv);
}
super.onReceive(context, intent);
}
Service
public class FlipperRemoteViewsFactory implements RemoteViewsService.RemoteViewsFactory {
private Context mContext;
private int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;
private static final String TAG = "FILPPERWIDGET";
public FlipperRemoteViewsFactory(Context context, Intent intent) {
mContext = context;
mAppWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
//... get the data
}
#Override
public void onCreate() {
Log.e(TAG, "onCreate()");
}
#Override
public void onDataSetChanged() {
Log.i(TAG, "onDataSetChanged()");
}
#Override
public void onDestroy() {
}
#Override
public int getCount() {
//... return size of dataset
}
#Override
public RemoteViews getViewAt(int position) {
Log.i(TAG, "getViewAt()" + position);
RemoteViews page = new RemoteViews(mContext.getPackageName(), R.layout.app_widget_item);
//... set the data on the layout
return page;
}
#Override
public RemoteViews getLoadingView() {
Log.i(TAG, "getLoadingView()");
return new RemoteViews(mContext.getPackageName(), R.layout.appwidget_loading);
}
#Override
public int getViewTypeCount() {
Log.i(TAG, "getViewTypeCount()");
return 1;
}
#Override
public long getItemId(int position) {
Log.i(TAG, "getItemId()");
return position;
}
#Override
public boolean hasStableIds() {
Log.i(TAG, "hasStableIds()");
return true;
}
}
Manifest
<receiver android:name=".AppWidgetProvider"
android:label="#string/app_name"
android:enabled="#bool/is_at_least_12_api">
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/app_widget_info" />
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
</receiver>
<!-- Service serving the RemoteViews to the collection widget -->
<service android:name=".ViewFlipperWidgetService"
android:permission="android.permission.BIND_REMOTEVIEWS"
android:exported="false" />
app wigdet info
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:initialKeyguardLayout="#layout/app_widget"
android:initialLayout="#layout/app_widget"
android:minHeight="110dp"
android:minWidth="250dp"
android:previewImage="#drawable/widget_preview"
android:resizeMode="horizontal|vertical"
android:updatePeriodMillis="14400000"
android:widgetCategory="home_screen" />
Any help would be appreciated !
Depends on the launcher, there is no guarantee that your AppWidget will be updated immediately after the device started. It may be refreshed immeidately, or wait till the updatePeriodMillis passed after system started.
To solve your problem, define a BroadcastReceiver that will trigger the update of AppWidget after the reboot.
In AndroidManifest.xml, define the BootReceiver to get the boot_complete message.
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<receiver android:name=".BootReceiver" android:enabled="true" android:exported="false" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
</receiver>
And define the BootReceiver.java to start your AppWidgetUpdateService
public class BootReceiver extends BroadcastReceiver{
#Override
public void onReceive(Context context, Intent intent){
//start appwidget update service
}
}
i need make activity for choose widget
Widget1.java
public class Widget1 extends AppWidgetProvider{
Context context;
#Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
super.onUpdate(context, appWidgetManager, appWidgetIds);
if (appWidgetIds != null) {
int N = appWidgetIds.length;
for (int mAppWidgetId : appWidgetIds) {
Intent intent = new Intent(context, UpdateWidgetService.class);
intent.putExtra(EXTRA_APPWIDGET_ID, mAppWidgetId);
intent.setAction("FROM WIDGET PROVIDER");
context.startService(intent);
}
}
}
public static class UpdateWidgetService extends IntentService {
public UpdateWidgetService() {
// only for debug purpose
super("UpdateWidgetService");
}
#Override
protected void onHandleIntent(Intent intent) {
AppWidgetManager appWidgetManager = AppWidgetManager
.getInstance(UpdateWidgetService.this);
int incomingAppWidgetId = intent.getIntExtra(EXTRA_APPWIDGET_ID,
INVALID_APPWIDGET_ID);
if (incomingAppWidgetId != INVALID_APPWIDGET_ID) {
try {
updateNewsAppWidget(appWidgetManager, incomingAppWidgetId,
intent);
} catch (NullPointerException e) {
}
}
}
public void updateNewsAppWidget(AppWidgetManager appWidgetManager,
int appWidgetId, Intent intent) {
Log.v("String package name", this.getPackageName());
RemoteViews views = new RemoteViews(this.getPackageName(),
R.layout.widget1);
appWidgetManager.updateAppWidget(appWidgetId, views);
}
}
}
Widget2.java
public class widget2 extends AppWidgetProvider{
Context context;
#Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
int[] appWidgetIds) {
super.onUpdate(context, appWidgetManager, appWidgetIds);
if (appWidgetIds != null) {
int N = appWidgetIds.length;
for (int mAppWidgetId : appWidgetIds) {
Intent intent = new Intent(context, UpdateWidgetService.class);
intent.putExtra(EXTRA_APPWIDGET_ID, mAppWidgetId);
intent.setAction("FROM WIDGET PROVIDER");
context.startService(intent);
}
}
}
public static class UpdateWidgetService extends IntentService {
public UpdateWidgetService() {
// only for debug purpose
super("UpdateWidgetService");
}
#Override
protected void onHandleIntent(Intent intent) {
AppWidgetManager appWidgetManager = AppWidgetManager
.getInstance(UpdateWidgetService.this);
int incomingAppWidgetId = intent.getIntExtra(EXTRA_APPWIDGET_ID,
INVALID_APPWIDGET_ID);
if (incomingAppWidgetId != INVALID_APPWIDGET_ID) {
try {
updateNewsAppWidget(appWidgetManager, incomingAppWidgetId,
intent);
} catch (NullPointerException e) {
}
}
}
public void updateNewsAppWidget(AppWidgetManager appWidgetManager,
int appWidgetId, Intent intent) {
Log.v("String package name", this.getPackageName());
RemoteViews views = new RemoteViews(this.getPackageName(),
R.layout.widget2);
appWidgetManager.updateAppWidget(appWidgetId, views);
}
}
}
widget1.xml
<AnalogClock
android:id="#+id/analogClock1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:dial="#drawable/hand_dial"
android:hand_minute="#drawable/hand_minute"
android:hand_hour="#drawable/hand_hour"/>
widget2.xml
<AnalogClock
android:id="#+id/analogClock2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:dial="#drawable/hand_dial2"
android:hand_minute="#drawable/hand_minute2"
android:hand_hour="#drawable/hand_hour2"/>
widget1_config.xml
<appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="140dip"
android:minHeight="140dip"
android:previewImage="#drawable/preview"
android:initialLayout="#layout/widget1"
android:updatePeriodMillis="1800000"
android:resizeMode="horizontal|vertical"/>
AndroidManifest.xml
<receiver android:name=".Widget1" android:label="Analog Clock">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="#xml/widget_config" />
</receiver>
<receiver android:name=".widget2" android:label="Analog Clock2">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/widget2_config" />
i can make ten widget in one app every widget Single , But this is not good
so i need Launching activity when a widget is dropped for choose widget
How can I do this ?
Finally, I apologize for my English is not good
Thank you.
You need to add the android:configure attribute to you widget provider XML. See https://github.com/slightfoot/android-note-widget/blob/master/res/xml/appwidget_note.xml
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:configure="com.demondevelopers.notewidget.ConfigActivity"
android:initialKeyguardLayout="#layout/appwidget_note"
android:initialLayout="#layout/appwidget_note"
android:minHeight="110dp"
android:minWidth="180dp"
android:minResizeWidth="40dp"
android:minResizeHeight="40dp"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen"
android:updatePeriodMillis="0"
/>
For full example check out my project:
https://github.com/slightfoot/android-note-widget
When I click a button in a widget, a Toast appears. But when I use a configuration activit to set the button's caption and then I click the button, the Toast doesn't appear. Why?
public class MyWidget extends AppWidgetProvider {
public static String ACTION_WIDGET_CONFIGURE = "ConfigureWidget";
public static String ACTION_WIDGET_RECEIVER = "ActionReceiverWidget";
#Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_layout);
Intent intent = new Intent(context, MyWidget.class);
intent.setAction(ACTION_WIDGET_RECEIVER);
PendingIntent actionPendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0);
remoteViews.setOnClickPendingIntent(R.id.btn_widget, actionPendingIntent);
appWidgetManager.updateAppWidget(appWidgetIds, remoteViews); //update our widget
}
#Override
public void onDeleted(Context context, int[] appWidgetIds) {
super.onDeleted(context, appWidgetIds);
}
#Override
public void onDisabled(Context context) {
super.onDisabled(context);
}
#Override
public void onEnabled(Context context) {
super.onEnabled(context);
}
#Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(ACTION_WIDGET_RECEIVER))
{
Toast.makeText(context, "You have just clicked the button!", Toast.LENGTH_LONG).show();
}
super.onReceive(context, intent);
}
Appwidget-provider xml:
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="#layout/widget_layout"
android:minHeight="72dp"
android:minWidth="72dp"
android:configure="com.bfarago.tutorials.widget.ConfigActivity"
>
</appwidget-provider>
Manifest:
<activity
android:name=".ConfigActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
</intent-filter>
</activity>
<receiver android:name="MyWidget" >
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
<action android:name="com.bfarago.tutorials.widget.MyWidget.ACTION_WIDGET_RECEIVER"/>
</intent-filter>
<meta-data android:name="android.appwidget.provider" android:resource="#xml/widget_info"/>
</receiver>
Configuration Activity:
public class ConfigActivity extends Activity {
Button btn;
EditText et;
Context c;
AppWidgetManager awm;
int awID;
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.config);
btn = (Button)findViewById(R.id.btn);
et = (EditText)findViewById(R.id.et);
c = ConfigActivity.this;
//Getting info about the widget that launched this Activity
Intent i = getIntent();
Bundle extras = i.getExtras();
if (extras != null)
{
awID = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
}
else
{
finish();
}
awm = AppWidgetManager.getInstance(c);
btn.setOnClickListener(new View.OnClickListener() {
#Override
public void onClick(View v) {
String newcaption = et.getText().toString();
RemoteViews views = new RemoteViews(c.getPackageName(), R.layout.widget_layout);
views.setTextViewText(R.id.btn_widget, newcaption);
views.setTextColor(R.id.btn_widget, Color.RED);
awm.updateAppWidget(awID, views);
Intent result = new Intent();
result.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, awID);
setResult(RESULT_OK, result);
finish();
}
});
}
}
If I remove the line android:configure="com.bfarago.tutorials.widget.ConfigActivity" from the appwidgetprovider xml, I see the Toast.
Your configure Activity's onClick calls updateAppWidget without having called setOnClickPendingIntent on the RemoteViews it passes in, so once it has run, there will be no click event from your widget. Fix it to be the same as your onUpdate method, or better yet, refactor the code so there's only one function that creates the RemoteViews and calls updateAppWidget.
I'm trying to make an Android widget, to show some info from my app.
I have succeed to show some info, but know i what to have a feature to "switch page" in my app. It means pressing a button, and new info is showing. But how do i do it? I have tried different thing, and I'm ending up with the following code:
public class HelloWidget extends AppWidgetProvider {
RemoteViews remoteViews;
#Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
Toast.makeText(context, "onUpdate", Toast.LENGTH_SHORT).show();
RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_layout);
Intent intent = new Intent();
intent.setAction(TestReceiver.TEST_INTENT);
intent.setClassName(TestReceiver.class.getPackage().getName(), TestReceiver.class.getName());
PendingIntent pendingIntent = PendingIntent.getBroadcast(context.getApplicationContext(), 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);
remoteViews.setOnClickPendingIntent(R.id.bbutton1, pendingIntent);
remoteViews.setTextViewText(R.id.widgetTxt, "The textview");
appWidgetManager.updateAppWidget(appWidgetIds[0], remoteViews);
super.onUpdate(context, appWidgetManager, appWidgetIds);
}
public class TestReceiver extends BroadcastReceiver {
public static final String TEST_INTENT = "MyTestIntent";
#Override
public void onReceive(Context context, Intent intent) {
Toast.makeText(context, "You reached the TestReceiver", Toast.LENGTH_SHORT).show();
if (intent.getAction() == TEST_INTENT) {
remoteViews.setTextViewText(R.id.widgetTxt, "Is changed");
}
}
}
#Override
public void onReceive(Context context, Intent intent) {
final String action = intent.getAction();
if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {
final int appWidgetId = intent.getExtras().getInt(
AppWidgetManager.EXTRA_APPWIDGET_ID,
AppWidgetManager.INVALID_APPWIDGET_ID);
if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {
this.onDeleted(context, new int[] { appWidgetId });
}
} else {
super.onReceive(context, intent);
}
}
#Override
public void onDeleted(Context context, int[] appWidgetIds) {
Toast.makeText(context, "onDelete", Toast.LENGTH_SHORT).show();
super.onDeleted(context, appWidgetIds);
}
}
Toast are showing "onUpdate" and then i remove it at "onDeleted". The textview also change in the onUpdate, but nothing happens when i press the button.
My Manifest look like this:
<receiver android:name=".HelloWidget" android:label="#string/app_name">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="#xml/hello_widget_provider" />
</receiver>
<receiver android:name=".TestReceiver" android:label="#string/app_name">
<intent-filter>
<action android:name="MyTestIntent">
</action>
</intent-filter>
</receiver>
What am i doing wrong?
Thanks
Is your TestReceiver an inner class of HelloWidget?
Then you didn't specify the correct name in the manifest.