Fix Android 14+ compatibility

This commit is contained in:
Trevor Slocum 2024-10-15 11:01:05 -07:00
parent 6712de1303
commit 28db23f050
3 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,6 @@
1.6.9:
- Fix Android 14+ compatibility
1.6.8:
- Add Chinese, Czech and Odia translations

View file

@ -10,8 +10,8 @@ android {
minSdkVersion 21
targetSdkVersion 34
versionCode 168
versionName "1.6.8"
versionCode 169
versionName "1.6.9"
applicationId "sh.ftp.rocketninelabs.meditationassistant"
manifestPlaceholders = [

View file

@ -1181,6 +1181,7 @@ public class MeditationAssistant extends Application {
});
}
@SuppressLint("UnspecifiedRegisterReceiverFlag")
@Override
public void onCreate() {
super.onCreate();
@ -1209,7 +1210,11 @@ public class MeditationAssistant extends Application {
IntentFilter reminderFilter = new IntentFilter();
reminderFilter.addAction(ACTION_REMINDER);
reminderFilter.addAction(ACTION_UPDATED);
registerReceiver(dailyReminderReceiver, reminderFilter);
if (Build.VERSION.SDK_INT >= 33) {
registerReceiver(dailyReminderReceiver, reminderFilter, RECEIVER_NOT_EXPORTED);
} else {
registerReceiver(dailyReminderReceiver, reminderFilter);
}
}
if (Build.VERSION.SDK_INT >= 23) {