rn-voice-xy
v1.0.6
Published
```bash yarn add rn-voice-xy cd ios && pod install ```
Readme
Install
yarn add rn-voice-xy
cd ios && pod installCần phải cài thêm các thư viện
- react-native-callkeep
- react-native-device-info
- react-native-incall-manager
- react-native-notifications
- react-native-permissions
- react-native-webrtc
- mobx
- mobx-reactUsage
Trong file MainStack, thêm 2 màn hình
import { CallScreen, IncomingCallInappScreen } from 'react-native-voice-x';
<Stack.Navigator>
...
<Stack.Screen name="CallScreen" component={CallScreen} />
<Stack.Screen name="IncomingCallInappScreen" component={IncomingCallInappScreen} />
</Stack.Navigator>
Tiếp theo, kết nối tới SIP
import CallSdk from 'react-native-voice-x';
CallSdk.connect({
user: 'user',
token: 'fcmToken',
navigation,
});
Để thực hiện cuộc gọi
import CallSdk from 'react-native-voice-x';
const userSIP = ''
const token = ''
const navigation = useNavigation()
CallSdk.call(user, token, navigation);
