Android 5 Lollipop compatibility

This commit is contained in:
M66B
2018-12-09 18:49:52 +01:00
parent be415c6a5f
commit ea895040f5
16 changed files with 85 additions and 48 deletions

View File

@@ -23,6 +23,7 @@ import android.app.Application;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Build;
import android.os.DeadSystemException;
import android.os.RemoteException;
@@ -62,7 +63,7 @@ public class ApplicationEx extends Application {
private void createNotificationChannels() {
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
NotificationManager nm = getSystemService(NotificationManager.class);
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
NotificationChannel service = new NotificationChannel(
"service",