Skip to content

Commit 0af012f

Browse files
authored
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
1 parent ce4bac2 commit 0af012f

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.github/workflows/build-debug.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Install Go
2727
uses: actions/setup-go@v4
2828
with:
29-
go-version: "1.21.x"
29+
go-version: "1.23.3"
3030
- name: Setup Android SDK
3131
uses: android-actions/setup-android@v3
3232
with:
@@ -62,7 +62,7 @@ jobs:
6262
- name: build debug apk
6363
run: cd android && ./gradlew assembleDebug
6464
- name: upload non tags for debug purposes
65-
uses: actions/upload-artifact@v2
65+
uses: actions/upload-artifact@v4
6666
with:
6767
name: debug-apk
6868
path: android/app/build/outputs/apk/debug/app-debug.apk

android/app/src/main/java/io/netbird/client/MainApplication.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public ReactNativeHost getReactNativeHost() {
5858
private void registerNotificationReceiver() {
5959
IntentFilter filter = new IntentFilter();
6060
filter.addAction(NetworkChangeNotifier.action);
61-
registerReceiver(notificationReceiver, filter);
61+
registerReceiver(notificationReceiver, filter, RECEIVER_NOT_EXPORTED);
6262
}
6363

6464
@Override

android/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ buildscript {
44
ext {
55
buildToolsVersion = "33.0.0"
66
minSdkVersion = 26
7-
compileSdkVersion = 33
8-
targetSdkVersion = 33
7+
compileSdkVersion = 34
8+
targetSdkVersion = 34
99

1010
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
1111
ndkVersion = "23.1.7779620"

android/tool/src/main/AndroidManifest.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
66
<uses-permission android:name="android.permission.INTERNET" />
77
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
8+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
9+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SYSTEM_EXEMPTED" />
810

911
<application
1012
android:allowBackup="false"
@@ -13,7 +15,8 @@
1315
<service
1416
android:name=".VPNService"
1517
android:permission="android.permission.BIND_VPN_SERVICE"
16-
android:exported="false">
18+
android:exported="false"
19+
android:foregroundServiceType="systemExempted">
1720
<intent-filter>
1821
<action android:name="android.net.VpnService"/>
1922
<action android:name="io.netbird.client.intent.action.START_SERVICE" />

0 commit comments

Comments
 (0)