使用 ExoPlayer 和 PlayerNotificationManager 在通知中显示媒体播放进度,现在如何通过单击通知来打开应用程序?
当您尝试通过 PlayerNotificationManager createNotificationChannel 时,您可以直接在 MediaDescriptor 下重写此方法
@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;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1284 次 |
| 最近记录: |