diff --git a/client/config.xml b/client/config.xml
index 2162e2eac7..4befc0fc18 100644
--- a/client/config.xml
+++ b/client/config.xml
@@ -23,7 +23,7 @@
-
+
diff --git a/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelService.java b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelService.java
index 8a2f6e1016..732db1efdf 100644
--- a/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelService.java
+++ b/client/src/cordova/android/OutlineAndroidLib/outline/src/main/java/org/outline/vpn/VpnTunnelService.java
@@ -22,6 +22,7 @@
import android.content.Intent;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.content.pm.ServiceInfo;
import android.net.ConnectivityManager;
import android.net.Network;
import android.net.NetworkCapabilities;
@@ -379,6 +380,8 @@ private void broadcastVpnConnectivityChange(TunnelStatus status) {
}
Intent statusChange = new Intent(STATUS_BROADCAST_KEY);
statusChange.addCategory(getPackageName());
+ // We must explicitly set the package for security reasons: https://developer.android.com/about/versions/14/behavior-changes-14#security
+ statusChange.setPackage(this.getPackageName());
statusChange.putExtra(MessageData.PAYLOAD.value, status.value);
statusChange.putExtra(MessageData.TUNNEL_ID.value, tunnelConfig.id);
sendBroadcast(statusChange);
@@ -448,7 +451,9 @@ private void startForegroundWithNotification(final String serverName) {
notificationBuilder = getNotificationBuilder(serverName);
}
notificationBuilder.setContentText(getStringResource("connected_server_state"));
- startForeground(NOTIFICATION_SERVICE_ID, notificationBuilder.build());
+
+ // We must specify the service type for security reasons: https://developer.android.com/about/versions/14/changes/fgs-types-required
+ startForeground(NOTIFICATION_SERVICE_ID, notificationBuilder.build(), ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE);
} catch (Exception e) {
LOG.warning("Unable to display persistent notification");
}
diff --git a/client/src/cordova/apple/xcode/macos/Outline/config.xml b/client/src/cordova/apple/xcode/macos/Outline/config.xml
index d8819571b9..d24f8d1aa4 100755
--- a/client/src/cordova/apple/xcode/macos/Outline/config.xml
+++ b/client/src/cordova/apple/xcode/macos/Outline/config.xml
@@ -51,8 +51,8 @@
-
-
+
+
diff --git a/client/src/cordova/plugin/plugin.xml b/client/src/cordova/plugin/plugin.xml
index 9e0e871804..2dac7b6fc9 100644
--- a/client/src/cordova/plugin/plugin.xml
+++ b/client/src/cordova/plugin/plugin.xml
@@ -38,11 +38,13 @@
+