Load the fragment when notification is click android -
I have a problem with my application. I have a notification that is pushing in the action bar when you click on notification , You will be redirected to the specific activity you set. In my scenario, once the notification is being clicked or touched, I should be redirected to a specific piece of my current activity. (The current activity is to handle the pieces)
Now, this was the stock I had, I tried something like this, but no luck. When the notification is clicked, it will launch another activity (notification control activity), which, when loaded, will call the correct activity and display the piece (a public method to load the pieces). My error is, I can not cut the notification controller activity in the current. 'Mi for solution).
I appreciate your feedback.
Thank you
// Set intent pending notification for intent Intent = new intent (this, activity required). Intent.putExtra ("key1", value); Intent.putExtra ("key2", value); Pending print pIntent = PendingIntent.getActivity (this, 0, intent, Intent.FLAG_ACTIVITY_NEW_TASK); // and the required activity override method, new identity (), and open your required piece.
Comments
Post a Comment