PendingIntent works correctly for the first notification but incorrectly for the rest

Worked when added these:

  1. intent.setAction(Long.toString(System.currentTimeMillis()));


PackageManager pm = context.getPackageManager();

    Intent intent = new Intent(context, MyOwnActivity.class);
    intent.putExtra("foo_bar_extra_key", "foo_bar_extra_value");
    PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,
            intent, PendingIntent.FLAG_UPDATE_CURRENT);
    RemoteViews views = new RemoteViews(context.getPackageName(),
    views.setOnClickPendingIntent(my_button_r_id_received_in_parameter, pendingIntent);

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s