exoplayer2.x - 我无法解析符号“createWithNotificationChannel”
问题描述
我尝试了所有可用的依赖项,但一无所获......谁能告诉我在这种情况下我能做什么?现在我使用实现 'com.google.android.exoplayer:exoplayer:2.15.0'
这是我的代码...
PlayerNotificationManager playerNotificationManager = new PlayerNotificationManager.createWithNotificationChannel(
context, 1, "marakesh",
8,
new PlayerNotificationManager.MediaDescriptionAdapter() {
@Override
public CharSequence getCurrentContentTitle(Player player) {
return null;
}
@Nullable
@Override
public PendingIntent createCurrentContentIntent(Player player) {
Intent intent = new Intent(context, MainActivity.class);
return PendingIntent.getActivity(
context,
0,
intent,
PendingIntent.FLAG_UPDATE_CURRENT);
}
@Nullable
@Override
public CharSequence getCurrentContentText(Player player) {
return null;
}
@Nullable
@Override
public Bitmap getCurrentLargeIcon(Player player, PlayerNotificationManager.BitmapCallback callback) {
//return SampleStream.getBitmap(context, bitmapResource);
return null;
}
},
new PlayerNotificationManager.NotificationListener(){
@Override
public void onNotificationPosted(int notificationId, Notification notification, boolean ongoing) {
startForeground(notificationId, notification);
}
@Override
public void onNotificationCancelled(int notificationId, boolean dissmissedByuser){
stopSelf();
}
});
playerNotificationManager.setPlayer(player);
}
解决方案
推荐阅读
- ios - 使用执行功能和 UI 更新重复动画
- validation - Yii2中form-group后如何设置errorPlacement
- php - 如何加载 PHP 页面,然后在保存之前检查它是否有错误?
- c++ - 为什么在对同一个字符数组使用 sizeof 时会得到不同的结果?
- android - 在 android studio 中读取文本文件
- android - Android 通知图像有时不显示
- android - 在android中使用multipart上传图像服务器
- sql - SQL Server Express 存储过程:选择、删除、插入
- java - Okhttp 异常
- javascript - CSS 不适用于自定义工具提示的箭头