From 0af012f40f43aca3ae50981d3ff0bf4fd46aa80b Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Tue, 26 Nov 2024 14:29:31 +0100 Subject: [PATCH] Increase the target sdk version to 34 (#36) If apps that target Android 14 use a foreground service, they must declare a specific permission, based on the foreground service type, that Android 14 introduces. These permissions appear in the sections labeled "permission that you must declare in your manifest file" in the intended use cases and enforcement for each foreground service type section on this page. update compile SDK version to 34 update Go version in CI --- .github/workflows/build-debug.yml | 4 ++-- .../app/src/main/java/io/netbird/client/MainApplication.java | 2 +- android/build.gradle | 4 ++-- android/tool/src/main/AndroidManifest.xml | 5 ++++- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-debug.yml b/.github/workflows/build-debug.yml index cb035e4..0b91992 100644 --- a/.github/workflows/build-debug.yml +++ b/.github/workflows/build-debug.yml @@ -26,7 +26,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4 with: - go-version: "1.21.x" + go-version: "1.23.3" - name: Setup Android SDK uses: android-actions/setup-android@v3 with: @@ -62,7 +62,7 @@ jobs: - name: build debug apk run: cd android && ./gradlew assembleDebug - name: upload non tags for debug purposes - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: debug-apk path: android/app/build/outputs/apk/debug/app-debug.apk diff --git a/android/app/src/main/java/io/netbird/client/MainApplication.java b/android/app/src/main/java/io/netbird/client/MainApplication.java index 39c90b4..f5c9a07 100644 --- a/android/app/src/main/java/io/netbird/client/MainApplication.java +++ b/android/app/src/main/java/io/netbird/client/MainApplication.java @@ -58,7 +58,7 @@ public ReactNativeHost getReactNativeHost() { private void registerNotificationReceiver() { IntentFilter filter = new IntentFilter(); filter.addAction(NetworkChangeNotifier.action); - registerReceiver(notificationReceiver, filter); + registerReceiver(notificationReceiver, filter, RECEIVER_NOT_EXPORTED); } @Override diff --git a/android/build.gradle b/android/build.gradle index 0ce6c00..79a1b7f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,8 +4,8 @@ buildscript { ext { buildToolsVersion = "33.0.0" minSdkVersion = 26 - compileSdkVersion = 33 - targetSdkVersion = 33 + compileSdkVersion = 34 + targetSdkVersion = 34 // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP. ndkVersion = "23.1.7779620" diff --git a/android/tool/src/main/AndroidManifest.xml b/android/tool/src/main/AndroidManifest.xml index c04bc42..1e5d7d7 100644 --- a/android/tool/src/main/AndroidManifest.xml +++ b/android/tool/src/main/AndroidManifest.xml @@ -5,6 +5,8 @@ + + + android:exported="false" + android:foregroundServiceType="systemExempted">