android/Main: handle API26 NotificationChannel

This seems to be required on recent Android versions (tested with Android 10).
This is also required for android TV services (cf. next commit).

This is done using Java reflection so that the project doesn't depend on
android compat libs.
This commit is contained in:
Thomas Guillem
2020-03-25 22:08:17 +01:00
committed by Max Kellermann
parent e1c43ec65f
commit 9c15760c4d
2 changed files with 46 additions and 4 deletions

View File

@@ -11,6 +11,7 @@
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application android:allowBackup="true"
android:icon="@drawable/icon"