AVEbrahimi
AVEbrahimi

Reputation: 19164

Click ExoPlayer notification to open app

Using ExoPlayer and PlayerNotificationManager to show media playback progress in notification, now how can I open app by clicking on notification?

Upvotes: 0

Views: 1355

Answers (1)

Iram Bukhari
Iram Bukhari

Reputation: 487

You directly override this method under MediaDescriptor when you try to createNotificationChannel through PlayerNotificationManager

@Override

 public PendingIntent createCurrentContentIntent(Player player){
     Intent intent = new Intent(YourService.this,YourMediaActivity.class);
                       PendingIntent contentPendingIntent = PendingIntent.getActivity
                                (YourService.this, 0, intent, 0);
                        return contentPendingIntent;
                    }

Upvotes: 6

Related Questions