diff --git a/Android/app/src/main/AndroidManifest.xml b/Android/app/src/main/AndroidManifest.xml
index 82d25892..3dcd5518 100644
--- a/Android/app/src/main/AndroidManifest.xml
+++ b/Android/app/src/main/AndroidManifest.xml
@@ -3,8 +3,10 @@
+
+
@@ -30,7 +32,8 @@
android:name="app.intra.sys.IntraVpnService"
android:exported="false"
android:label="@string/app_name"
- android:permission="android.permission.BIND_VPN_SERVICE" >
+ android:permission="android.permission.BIND_VPN_SERVICE"
+ android:foregroundServiceType="connectedDevice">
diff --git a/Android/app/src/main/java/app/intra/sys/IntraVpnService.java b/Android/app/src/main/java/app/intra/sys/IntraVpnService.java
index 976165f6..255e068a 100644
--- a/Android/app/src/main/java/app/intra/sys/IntraVpnService.java
+++ b/Android/app/src/main/java/app/intra/sys/IntraVpnService.java
@@ -24,6 +24,7 @@
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
+import android.content.pm.ServiceInfo;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkInfo;
@@ -190,7 +191,13 @@ public int onStartCommand(Intent intent, int flags, int startId) {
builder = builder.setVisibility(Notification.VISIBILITY_SECRET);
}
- startForeground(SERVICE_ID, builder.getNotification());
+ if (Build.VERSION.SDK_INT >= VERSION_CODES.TIRAMISU) {
+ // https://developer.android.com/about/versions/14/changes/fgs-types-required
+ startForeground(SERVICE_ID, builder.build(),
+ ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE);
+ } else {
+ startForeground(SERVICE_ID, builder.build());
+ }
updateQuickSettingsTile();
diff --git a/Android/gradle.properties b/Android/gradle.properties
index 65b52bc7..f6c1ede0 100644
--- a/Android/gradle.properties
+++ b/Android/gradle.properties
@@ -27,8 +27,8 @@ android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
-ANDROID_COMPILE_SDK_VERSION=33
-ANDROID_BUILD_TOOLS_VERSION=33.0.0
+ANDROID_COMPILE_SDK_VERSION=34
+ANDROID_BUILD_TOOLS_VERSION=34.0.0
ANDROID_MIN_SDK_VERSION=16
-ANDROID_TARGET_SDK_VERSION=33
+ANDROID_TARGET_SDK_VERSION=34
diff --git a/Android/gradle/verification-metadata.xml b/Android/gradle/verification-metadata.xml
index 39000817..3cd57ea5 100644
--- a/Android/gradle/verification-metadata.xml
+++ b/Android/gradle/verification-metadata.xml
@@ -64,6 +64,9 @@
+
+
+
@@ -239,6 +242,9 @@
+
+
+
@@ -281,6 +287,9 @@
+
+
+
@@ -1764,16 +1773,25 @@
+
+
+
+
+
+
+
+
+
@@ -2120,6 +2138,9 @@
+
+
+
@@ -2133,11 +2154,17 @@
+
+
+
+
+
+