From 9c1f2eb437215d1ee67b543fabf4b41abffe0448 Mon Sep 17 00:00:00 2001 From: Santhosh Vaiyapuri Date: Wed, 11 Sep 2024 16:24:01 +0200 Subject: [PATCH] fix: replace data_sync with short_service --- .../03-ringing-setup/01-react-native.mdx | 3 +-- packages/react-native-sdk/expo-config-plugin/README.md | 4 ++-- .../__tests__/withAndroidPermissions.test.ts | 1 - .../expo-config-plugin/src/withAndroidManifest.ts | 4 ++-- .../expo-config-plugin/src/withAndroidPermissions.ts | 3 --- .../dogfood/android/app/src/main/AndroidManifest.xml | 3 +-- sample-apps/react-native/dogfood/ios/Podfile.lock | 8 ++++---- .../android/app/src/main/AndroidManifest.xml | 3 +-- 8 files changed, 11 insertions(+), 18 deletions(-) diff --git a/packages/react-native-sdk/docusaurus/docs/reactnative/06-advanced/04-push-notifications/03-ringing-setup/01-react-native.mdx b/packages/react-native-sdk/docusaurus/docs/reactnative/06-advanced/04-push-notifications/03-ringing-setup/01-react-native.mdx index 2b50e6c44e..2bf3a1f175 100644 --- a/packages/react-native-sdk/docusaurus/docs/reactnative/06-advanced/04-push-notifications/03-ringing-setup/01-react-native.mdx +++ b/packages/react-native-sdk/docusaurus/docs/reactnative/06-advanced/04-push-notifications/03-ringing-setup/01-react-native.mdx @@ -77,13 +77,12 @@ Add the following in `AndroidManifest.xml`: - + android:foregroundServiceType="shortService" /> ``` ### Request for notification permissions diff --git a/packages/react-native-sdk/expo-config-plugin/README.md b/packages/react-native-sdk/expo-config-plugin/README.md index d0c609fef0..8cf1e3f9d4 100644 --- a/packages/react-native-sdk/expo-config-plugin/README.md +++ b/packages/react-native-sdk/expo-config-plugin/README.md @@ -45,10 +45,10 @@ public class MainApplication extends Application implements ReactApplication { Add service named `app.notifee.core.ForegroundService`. ```xml - + ``` -The `@stream-io/video-react-native-sdk` also adds the appropriate android permissions such as `POST_NOTIFICATIONS`, `FOREGROUND_SERVICE`, `FOREGROUND_SERVICE_MICROPHONE`, `BLUETOOTH`, `BLUETOOTH_ADMIN` and `BLUETOOTH_CONNECT` to the `AndroidManifest.xml`. +The `@stream-io/video-react-native-sdk` also adds the appropriate android permissions such as `POST_NOTIFICATIONS`, `FOREGROUND_SERVICE`, `BLUETOOTH`, `BLUETOOTH_ADMIN` and `BLUETOOTH_CONNECT` to the `AndroidManifest.xml`. ### iOS diff --git a/packages/react-native-sdk/expo-config-plugin/__tests__/withAndroidPermissions.test.ts b/packages/react-native-sdk/expo-config-plugin/__tests__/withAndroidPermissions.test.ts index 9be3c33dca..3814ad46c6 100644 --- a/packages/react-native-sdk/expo-config-plugin/__tests__/withAndroidPermissions.test.ts +++ b/packages/react-native-sdk/expo-config-plugin/__tests__/withAndroidPermissions.test.ts @@ -27,7 +27,6 @@ describe('withStreamVideoReactNativeSDKAndroidPermissions', () => { expect.arrayContaining([ 'android.permission.POST_NOTIFICATIONS', 'android.permission.FOREGROUND_SERVICE', - 'android.permission.FOREGROUND_SERVICE_DATA_SYNC', 'android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION', 'android.permission.BLUETOOTH', 'android.permission.BLUETOOTH_CONNECT', diff --git a/packages/react-native-sdk/expo-config-plugin/src/withAndroidManifest.ts b/packages/react-native-sdk/expo-config-plugin/src/withAndroidManifest.ts index 0ef7f9a60d..0d5087763d 100644 --- a/packages/react-native-sdk/expo-config-plugin/src/withAndroidManifest.ts +++ b/packages/react-native-sdk/expo-config-plugin/src/withAndroidManifest.ts @@ -20,9 +20,9 @@ function getNotifeeService() { + android:foregroundServiceType="shortService" /> */ - const foregroundServiceType = 'dataSync'; + const foregroundServiceType = 'shortService'; let head = prefixAndroidKeys({ name: 'app.notifee.core.ForegroundService', stopWithTask: 'true', diff --git a/packages/react-native-sdk/expo-config-plugin/src/withAndroidPermissions.ts b/packages/react-native-sdk/expo-config-plugin/src/withAndroidPermissions.ts index 1f0b1fc7aa..ed2fddbcae 100644 --- a/packages/react-native-sdk/expo-config-plugin/src/withAndroidPermissions.ts +++ b/packages/react-native-sdk/expo-config-plugin/src/withAndroidPermissions.ts @@ -14,9 +14,6 @@ const withStreamVideoReactNativeSDKAndroidPermissions: ConfigPlugin< 'android.permission.POST_NOTIFICATIONS', 'android.permission.FOREGROUND_SERVICE' ); - if (props?.ringingPushNotifications) { - permissions.push('android.permission.FOREGROUND_SERVICE_DATA_SYNC'); - } if (props?.enableScreenshare) { permissions.push( 'android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION' diff --git a/sample-apps/react-native/dogfood/android/app/src/main/AndroidManifest.xml b/sample-apps/react-native/dogfood/android/app/src/main/AndroidManifest.xml index 61009f2df3..bde6797c80 100644 --- a/sample-apps/react-native/dogfood/android/app/src/main/AndroidManifest.xml +++ b/sample-apps/react-native/dogfood/android/app/src/main/AndroidManifest.xml @@ -30,7 +30,6 @@ android:maxSdkVersion="32" /> - @@ -73,7 +72,7 @@ diff --git a/sample-apps/react-native/dogfood/ios/Podfile.lock b/sample-apps/react-native/dogfood/ios/Podfile.lock index 3a5cc8cd6f..79deffa72b 100644 --- a/sample-apps/react-native/dogfood/ios/Podfile.lock +++ b/sample-apps/react-native/dogfood/ios/Podfile.lock @@ -1140,7 +1140,7 @@ PODS: - RNVoipPushNotification (3.3.2): - React-Core - SocketRocket (0.6.1) - - stream-io-video-filters-react-native (0.2.1): + - stream-io-video-filters-react-native (0.2.4): - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1148,7 +1148,7 @@ PODS: - stream-react-native-webrtc (118.1.0): - JitsiWebRTC (~> 118.0.0) - React-Core - - stream-video-react-native (0.10.5): + - stream-video-react-native (1.0.5): - glog - RCT-Folly (= 2022.05.16.00) - React-Core @@ -1477,9 +1477,9 @@ SPEC CHECKSUMS: RNSVG: 53c661b76829783cdaf9b7a57258f3d3b4c28315 RNVoipPushNotification: 543e18f83089134a35e7f1d2eba4c8b1f7776b08 SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 - stream-io-video-filters-react-native: 90f5878de1c3655d2e1617062e12c96824248d4b + stream-io-video-filters-react-native: 8c345e6adf5164646696d45f9962c4199b2fe3b9 stream-react-native-webrtc: 4ccf61161f77c57b9aa45f78cb7f69b7d91f3e9f - stream-video-react-native: b7cae2ff25354c68e70215a978943a8ebfa4663a + stream-video-react-native: a8220f05e0a89902a62f5f42017d64adfe4d7550 TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654 Yoga: 1b901a6d6eeba4e8a2e8f308f708691cdb5db312 diff --git a/sample-apps/react-native/expo-video-sample/android/app/src/main/AndroidManifest.xml b/sample-apps/react-native/expo-video-sample/android/app/src/main/AndroidManifest.xml index 31ff38d891..08ca658d41 100644 --- a/sample-apps/react-native/expo-video-sample/android/app/src/main/AndroidManifest.xml +++ b/sample-apps/react-native/expo-video-sample/android/app/src/main/AndroidManifest.xml @@ -7,7 +7,6 @@ - @@ -37,7 +36,7 @@ - +