diff --git a/app/build.gradle b/app/build.gradle
index e1f6f4887..e527ee736 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -78,13 +78,13 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
- compileSdkVersion 31
- buildToolsVersion "31.0.0"
+ compileSdkVersion 33
+ buildToolsVersion "33.0.0"
defaultConfig {
applicationId "nodomain.freeyourgadget.gadgetbridge"
minSdkVersion 21
- targetSdkVersion 31
+ targetSdkVersion 33
// Note: always bump BOTH versionCode and versionName!
versionName "0.76.1"
@@ -133,8 +133,8 @@ android {
resValue "string", "about_activity_title", "@string/about_activity_title_banglejs_main"
resValue "string", "about_description", "@string/about_description_banglejs_main"
resValue "string", "gadgetbridge_running", "@string/gadgetbridge_running_banglejs_main"
- targetSdkVersion 31 // Bangle.js flavor only - We need SDK 31 for updates pushed to Play Store from 2022-11-01
- // Note: app/src/banglejs/AndroidManifest.xml contains some extra permissions we need to make SDK 30 and up work
+ targetSdkVersion 33
+ // Note: app/src/banglejs/AndroidManifest.xml contains some extra permissions
}
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 173c1206b..c4b71b280 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -40,7 +40,8 @@
-
+
+
+
+
diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java
index 32165a0b6..98641499e 100644
--- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java
+++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/activities/ControlCenterv2.java
@@ -561,6 +561,15 @@ public class ControlCenterv2 extends AppCompatActivity
}
}
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && Build.VERSION.SDK_INT <= Build.VERSION_CODES.S) {
+ if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_BACKGROUND_LOCATION) == PackageManager.PERMISSION_DENIED) {
+ wantedPermissions.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
+ }
+ if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_DENIED) {
+ wantedPermissions.add(Manifest.permission.ACCESS_FINE_LOCATION);
+ }
+ }
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.QUERY_ALL_PACKAGES) == PackageManager.PERMISSION_DENIED) {
wantedPermissions.add(Manifest.permission.QUERY_ALL_PACKAGES);
@@ -576,6 +585,12 @@ public class ControlCenterv2 extends AppCompatActivity
}
}
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_DENIED) {
+ wantedPermissions.add(Manifest.permission.POST_NOTIFICATIONS);
+ }
+ }
+
if (BuildConfig.INTERNET_ACCESS) {
if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.INTERNET) == PackageManager.PERMISSION_DENIED) {
wantedPermissions.add(Manifest.permission.INTERNET);