react-native-voice-x
v1.0.5
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
- react-native-uuid
- 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: '', // SĐT của app
token: '', // fcmToken
navigation,
});
Để thực hiện cuộc gọi
import CallSdk from 'react-native-voice-x';
const user = ''
const navigation = useNavigation()
CallSdk.call(user, '', navigation);
