agustinaliagac
agustinaliagac

Reputation: 849

How to redirect to Android app/play store from an Android notification of a Facebook Request?

I have an android app, from where a user can invite facebook friends to join. I have that part working fine. I used Requests API and did everything as facebook says it should be done.

However, the problem is that when the other user receives the Facebook notification, it triggers an Android Notification (at the top bar), but when this android notification is clicked NOTHING happens. If the user goes to the facebook app, and taps the notification, it sends him to the play store or app. I need the android notification to do the same. What am I missing?

Upvotes: 0

Views: 1201

Answers (1)

ii7scw
ii7scw

Reputation: 361

To get redirected form clicking on notification you should use

    Intent intent = new Intent(this,*YourClass.class);
    PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent ,PendingIntent.FLAG_UPDATE_CURRENT);
    notification.setContentIntent(pendingIntent)

Explained here: TheNewBoston

Upvotes: 0

Related Questions