rns-nativecall 1.2.9 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -9
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -12,12 +12,12 @@ A professional VoIP incoming call handler for React Native. Features a "Single C
|
|
|
12
12
|
## 📦 Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npx expo install rns-nativecall expo-build-properties
|
|
15
|
+
npx expo install rns-nativecall expo-build-properties react-native-uuid
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
or
|
|
19
19
|
```bash
|
|
20
|
-
npm install rns-nativecall expo-build-properties
|
|
20
|
+
npm install rns-nativecall expo-build-properties react-native-uuid
|
|
21
21
|
|
|
22
22
|
```
|
|
23
23
|
---
|
|
@@ -26,6 +26,7 @@ Add the plugin to your app.json or app.config.js:
|
|
|
26
26
|
{
|
|
27
27
|
"expo": {
|
|
28
28
|
"plugins": [
|
|
29
|
+
"rns-nativecall",
|
|
29
30
|
[
|
|
30
31
|
"expo-build-properties",
|
|
31
32
|
{
|
|
@@ -33,13 +34,25 @@ Add the plugin to your app.json or app.config.js:
|
|
|
33
34
|
"enableProguardInReleaseBuilds": true,
|
|
34
35
|
"extraProguardRules": "-keep class com.rnsnativecall.** { *; }\n-keep class com.facebook.react.HeadlessJsTaskService { *; }"
|
|
35
36
|
}
|
|
36
|
-
}
|
|
37
|
-
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
"expo-notifications",
|
|
41
|
+
{
|
|
42
|
+
"icon": "./assets/notification_icon.png",
|
|
43
|
+
"color": "#218aff",
|
|
44
|
+
"iosDisplayInForeground": true,
|
|
45
|
+
"androidPriority": "high",
|
|
46
|
+
"androidVibrate": true,
|
|
47
|
+
"androidSound": true,
|
|
48
|
+
"androidImportance": "high",
|
|
49
|
+
"androidLightColor": "#218aff",
|
|
50
|
+
"androidVisibility": "public"
|
|
51
|
+
}
|
|
38
52
|
]
|
|
39
53
|
]
|
|
40
54
|
}
|
|
41
55
|
}
|
|
42
|
-
|
|
43
56
|
```
|
|
44
57
|
---
|
|
45
58
|
### 🛠 Usage
|
|
@@ -93,12 +106,11 @@ CallHandler.subscribe(
|
|
|
93
106
|
(data) => { console.log("failded", data) }
|
|
94
107
|
);
|
|
95
108
|
|
|
96
|
-
|
|
97
|
-
````
|
|
98
|
-
|
|
109
|
+
```
|
|
99
110
|
## Handling Events (App.js)
|
|
100
111
|
|
|
101
112
|
```javascript
|
|
113
|
+
|
|
102
114
|
import React, { useEffect } from 'react';
|
|
103
115
|
import { CallHandler } from 'rns-nativecall';
|
|
104
116
|
|
|
@@ -174,6 +186,7 @@ The library automatically prevents multiple overlapping native UIs. If a call is
|
|
|
174
186
|
import React, { useEffect, useState } from 'react';
|
|
175
187
|
import { StyleSheet, Text, View, TouchableOpacity, Alert } from 'react-native';
|
|
176
188
|
import { CallHandler } from 'rns-nativecall';
|
|
189
|
+
import uuid from 'react-native-uuid';
|
|
177
190
|
|
|
178
191
|
export default function App() {
|
|
179
192
|
const [activeCall, setActiveCall] = useState(null);
|
|
@@ -220,7 +233,7 @@ export default function App() {
|
|
|
220
233
|
|
|
221
234
|
// Trigger the native UI
|
|
222
235
|
CallHandler.displayCall(
|
|
223
|
-
|
|
236
|
+
uuid.v4(),
|
|
224
237
|
"John Doe",
|
|
225
238
|
"video"
|
|
226
239
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rns-nativecall",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "High-performance React Native module for handling native VoIP call UI on Android and iOS.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
"react-native": ">=0.60.0"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@expo/config-plugins": "^9.0.0"
|
|
50
|
+
"@expo/config-plugins": "^9.0.0",
|
|
51
|
+
"react-native-uuid": "^2.0.3",
|
|
52
|
+
"expo-build-properties": "~0.14.8"
|
|
51
53
|
}
|
|
52
54
|
}
|