Adds support for android 12
This commit is contained in:
parent
153e6bd020
commit
a5af8d81fa
2 changed files with 5 additions and 3 deletions
app/src/main
|
@ -30,7 +30,8 @@
|
||||||
<!-- Main activity -->
|
<!-- Main activity -->
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.MainActivity"
|
android:name=".ui.MainActivity"
|
||||||
android:label="@string/app_name">
|
android:label="@string/app_name"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN"/>
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
|
||||||
|
@ -62,7 +63,8 @@
|
||||||
<!-- Subscriber service restart on reboot -->
|
<!-- Subscriber service restart on reboot -->
|
||||||
<receiver
|
<receiver
|
||||||
android:name=".service.SubscriberService$BootStartReceiver"
|
android:name=".service.SubscriberService$BootStartReceiver"
|
||||||
android:enabled="true">
|
android:enabled="true"
|
||||||
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
|
|
|
@ -268,7 +268,7 @@ class SubscriberService : Service() {
|
||||||
|
|
||||||
private fun createNotification(title: String, text: String): Notification {
|
private fun createNotification(title: String, text: String): Notification {
|
||||||
val pendingIntent: PendingIntent = Intent(this, MainActivity::class.java).let { notificationIntent ->
|
val pendingIntent: PendingIntent = Intent(this, MainActivity::class.java).let { notificationIntent ->
|
||||||
PendingIntent.getActivity(this, 0, notificationIntent, 0)
|
PendingIntent.getActivity(this, 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE)
|
||||||
}
|
}
|
||||||
return NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)
|
return NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)
|
||||||
.setSmallIcon(R.drawable.ic_notification_instant)
|
.setSmallIcon(R.drawable.ic_notification_instant)
|
||||||
|
|
Loading…
Add table
Reference in a new issue