Linked Questions

147 votes
7 answers
29k views

Notification passes old Intent Extras

i am creating a notification inside a BroadcastReceiver via this code: String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) context....
  • 1,503
58 votes
7 answers
42k views

Intent from notification does not have extras

This seem to be a common problem and I went through all the related questions I could find already: Activity isn't picking up new intent, Why extra data (integer) is not sent in android ...
  • 16k
143 votes
4 answers
49k views

PendingIntent does not send Intent extras

My MainActicity starts RefreshService with a Intent which has a boolean extra called isNextWeek. My RefreshService makes a Notification which starts my MainActivity when the user clicks on it. this ...
  • 5,397
32 votes
3 answers
98k views

How to set click listener for notification?

I am using the following code to launch a notification when a Service is started Via AlarmManager: nm = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE); CharSequence from = "...
  • 3,137
28 votes
1 answer
14k views

Notification created by IntentService uses always a wrong Intent

Problem When the user presses Send "Button 1"(scroll down to see the construction of the app) a new Notification is created from the RefreshService. If the user presses this notification a ...
  • 5,397
17 votes
3 answers
16k views

Android OnNewIntent not called

I saw several approaches and I tried everything but couldnt make it work.I dont know why it is so complicated, in the docs it looks so easy! I want to trigger the OnNewIntent with a notification (the ...
  • 1,535
13 votes
1 answer
26k views

Sending data from service to activity

I am having issue when sending data from Service to Activity through Notification , I click a Notification an Activity get invoked but when i try to add some parameters through bundle i am not able to ...
1 vote
1 answer
6k views

BadTokenException while showing a Dialog

I have an activity on an Android Application that starts a Sync Process with my server. This process consumes a lot of memory and processing and takes some time do be completed. After the process ...
  • 946
2 votes
4 answers
3k views

Passing widget id to activity

In my widget provider, I have the following code: for (int widget_id : appWidgetIds) { Log.d(TAG, "Widget Id: " + widget_id); RemoteViews remoteViews; Widget widget; while (true) { try {...
  • 6,441
0 votes
1 answer
4k views

How to set the initial page url in android phonegap-based application?

I'm developing an phonegap-based android app, and I'm writing code to handle notifications. Here is a snippet of the piece of code which is supposed to raise the notification: Intent ...
  • 3,948
3 votes
1 answer
3k views

Can't put extras for an intent in notification

I'm creating a notification from a Service that has an intent with an extra integer. For some reason, this isn't as easy as it seems. This is what I'm doing: Notification notification = new ...
  • 7,947
3 votes
1 answer
5k views

how to know if the app was launched by clicking on the push notification

I want to know if there is a flag and parameter that can tell me if the user launched the activity/app by clicking on the push notification in the notification tray. My code in C2DMReceiver.java ...
  • 4,182
1 vote
2 answers
2k views

How to get value from service to activity in android?

Anyone please help me how to do that. I have a simple android application in that application i am receiving a notification throw service at the time of clicking the notification i am opening the new ...
  • 4,872
0 votes
2 answers
857 views

Android Notification setContentView

http://developer.android.com/guide/topics/ui/notifiers/notifications.html Page says that, I have to use Intent I can't use Intent because my code have only one Activity. I want to use notification to ...
  • 630
3 votes
1 answer
2k views

Send message from activity that launches activity to the one that gets launched on notification being clicked

I want to send a message from the activity which is launching the notification to the activity which gets launched when a user clicks on the notification. I just want an EditText value to be sent ...
  • 246

15 30 50 per page