Startup Crash on Android 8.1
E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.briarproject.briar.beta.debug, PID: 13836
android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid service notification: Notification(channel=test pri=-2 contentView=null vibrate=null sound=null defaults=0x0 flags=0x42 color=0xff2d3e50 category=service vis=SECRET)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1768)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Looks like we need to use NotificationChannel
s now:
https://stackoverflow.com/questions/47531742/startforeground-fail-after-upgrade-to-android-8-1