mirror of
https://github.com/k0shk0sh/FastHub.git
synced 2026-02-01 15:56:14 +00:00
Fix for #876
The notifications really can't work under Oreo, because you make the channel with some strange id, while providing the id as the name in the next argument. Maybe not the best fix, but I find this string to be as cool of an id as it is of a name. Definitely better than having no notifications at all.
This commit is contained in:
parent
88980d51d0
commit
de67ceb446
@ -271,7 +271,7 @@ public class NotificationSchedulerJobTask extends JobService {
|
||||
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
if (notificationManager != null) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
NotificationChannel notificationChannel = new NotificationChannel(String.valueOf(id),
|
||||
NotificationChannel notificationChannel = new NotificationChannel(notification.getChannelId(),
|
||||
notification.getChannelId(), NotificationManager.IMPORTANCE_DEFAULT);
|
||||
notificationChannel.setShowBadge(true);
|
||||
notificationManager.createNotificationChannel(notificationChannel);
|
||||
@ -297,4 +297,4 @@ public class NotificationSchedulerJobTask extends JobService {
|
||||
public Notification notification;
|
||||
public Comment comment;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user