I\'m having crashes on a specific huawei device (HUAWEI TIT-L01) running Android 5.1
I\'m not finding alot of information by using Google
stacktrace:
<
Faced with same issue. It seems like some devices from Huawei doesn't support standard MediaStyle in notification. Just don't add MediaStyle
if you run in Huawei.
final Notification.Builder builder = new Notification.Builder(MyApplication.getAppContext())
.setSmallIcon(R.drawable.logo_statusbar)
.setLargeIcon(coverImage)
.setContentTitle(bookTitle)
.setContentText(author)
.setDeleteIntent(pendingIntent);
if (!Build.MANUFACTURER.toLowerCase(Locale.getDefault()).contains("huawei")) {
builder.setStyle(style);
}
final Notification build = builder.build();
notificationManager.notify(1, build);