Skip to content

Commit c9eb06f

Browse files
authored
docs: inform about android target sdk 33 requirements (#1311)
Preview from docs <img width="883" alt="Screenshot" src="https://github.com/GetStream/stream-video-js/assets/3846977/c41a7dab-5ef5-4b91-8d6e-ab37bdaabb4d">
1 parent adf8773 commit c9eb06f

6 files changed

Lines changed: 84 additions & 4 deletions

File tree

packages/react-native-sdk/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ android {
3232
compileSdkVersion getExtOrIntegerDefault('compileSdkVersion')
3333
namespace "com.streamvideo.reactnative"
3434
defaultConfig {
35-
minSdkVersion 16
35+
minSdkVersion 24
3636
targetSdkVersion getExtOrIntegerDefault('targetSdkVersion')
3737
versionCode 1
3838
versionName "1.0"

packages/react-native-sdk/docusaurus/docs/reactnative/01-setup/02-installation/01-react-native.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,28 @@ So what did we install precisely?
3939

4040
### Android Specific installation
4141

42+
<!-- vale off -->
43+
#### Update the compileSdk, targetSdk and minSdk versions
44+
45+
In `android/build.gradle` add the following inside the `buildscript` section:
46+
47+
```java
48+
buildscript {
49+
ext {
50+
...
51+
minSdkVersion = 24
52+
compileSdkVersion = 33
53+
targetSdkVersion = 33
54+
}
55+
...
56+
}
57+
```
58+
59+
:::infoINFO
60+
We have to temporarily use targetSdkVersion 33 due to a lack of support for [dynamically setting foreground service types](https://github.com/invertase/notifee/issues/997#issuecomment-2036781216) in the notifee library. We are aware of the [August 31, 2024 deadline](https://apilevels.com/) for updating to targetSdkVersion 34 and we are actively working on adding support in the notifee library.
61+
:::
62+
<!-- vale on -->
63+
4264
#### Enable Java 8 Support
4365

4466
In `android/app/build.gradle` add the following inside the `android` section:

packages/react-native-sdk/docusaurus/docs/reactnative/01-setup/02-installation/02-expo.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,38 @@ So what did we install precisely?
3434
- `@react-native-community/netinfo` - is used to detect the device's connectivity state, type and quality.
3535
- `@notifee/react-native` - is used to keep calls alive in the background on Android.
3636

37+
## Android Specific installation
38+
39+
<!-- vale off -->
40+
### Update the compileSdk, targetSdk and minSdk versions
41+
42+
In your `app.json` file add the following to the `expo-build-properties` plugin:
43+
44+
```js title=app.json
45+
{
46+
"expo": {
47+
...
48+
"plugins": [
49+
// highlight-start
50+
"expo-build-properties",
51+
{
52+
"android": {
53+
"minSdkVersion": 24,
54+
"compileSdkVersion": 33,
55+
"targetSdkVersion": 33
56+
}
57+
}
58+
// highlight-end
59+
]
60+
}
61+
}
62+
```
63+
64+
:::infoINFO
65+
We have to temporarily use targetSdkVersion 33 due to a lack of support for [dynamically setting foreground service types](https://github.com/invertase/notifee/issues/997#issuecomment-2036781216) in the notifee library. We are aware of the [August 31, 2024 deadline](https://apilevels.com/) for updating to targetSdkVersion 34 and we are actively working on adding support in the notifee library.
66+
:::
67+
<!-- vale on -->
68+
3769
## Add config plugin
3870

3971
Add the config plugin for [`@stream-io/video-react-native-sdk`](https://github.com/GetStream/stream-video-js/tree/main/packages/react-native-sdk/expo-config-plugin/README.md) and [`react-native-webrtc`](https://www.npmjs.com/package/@config-plugins/react-native-webrtc) to your `app.json` file:

packages/react-native-sdk/docusaurus/docs/reactnative/03-core/07-keeping-call-alive.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@ In Android, we use a [foreground service](https://developer.android.com/guide/co
2222
android:foregroundServiceType="microphone" />
2323
```
2424

25+
<!-- vale off -->
26+
### Check the compileSdk, targetSdk and minSdk versions
27+
28+
In `android/build.gradle` make sure that the following is inside the `buildscript` section:
29+
30+
```java
31+
buildscript {
32+
ext {
33+
...
34+
minSdkVersion = 24
35+
compileSdkVersion = 33
36+
targetSdkVersion = 33
37+
}
38+
...
39+
}
40+
```
41+
42+
:::infoINFO
43+
We have to temporarily use targetSdkVersion 33 due to a lack of support for [dynamically setting foreground service types](https://github.com/invertase/notifee/issues/997#issuecomment-2036781216) in the notifee library. We are aware of the [August 31, 2024 deadline](https://apilevels.com/) for updating to targetSdkVersion 34 and we are actively working on adding support in the notifee library.
44+
:::
45+
<!-- vale on -->
46+
2547
### Optional: override the default configuration of the notifications
2648

2749
You can also optionally override the default configuration of the notification used by the SDK. Below we give an example of that:

sample-apps/react-native/dogfood/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
ext {
55
buildToolsVersion = "34.0.0"
66
minSdkVersion = 24
7-
compileSdkVersion = 34
7+
compileSdkVersion = 33
88
targetSdkVersion = 33
99
googlePlayServicesAuthVersion = "20.7.0"
1010
ndkVersion = "25.1.8937393"

sample-apps/react-native/expo-video-sample/app.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,15 @@
5454
"expo-build-properties",
5555
{
5656
"android": {
57-
"compileSdkVersion": 34,
58-
"targetSdkVersion": 34,
57+
"minSdkVersion": 24,
58+
"compileSdkVersion": 33,
59+
"targetSdkVersion": 33,
5960
"extraMavenRepos": [
6061
"../../node_modules/@notifee/react-native/android/libs"
6162
]
63+
},
64+
"ios": {
65+
"flipper": false
6266
}
6367
}
6468
]

0 commit comments

Comments
 (0)