AgoraIO-Community / VideoUIKit-ReactNative

A React Native package to simply integrate Agora Video Calling or Live Video Streaming to your app with just a few lines of code.
MIT License
93 stars 43 forks source link

How to make a voice call using Agora.io in react native? #137

Closed xts-bit closed 11 months ago

xts-bit commented 1 year ago

How to make a voice call using Agora.io in react native? i am currently using the Agora Video kit to make a video call but how can i make a voice call using that? i looked at this repo but it has legacy code :( can you give me a new code example to do that?


import React, {useState} from 'react';
import AgoraUIKit from 'agora-rn-uikit';

const App = () => {
  const [videoCall, setVideoCall] = useState(true);
  const connectionData = {
    appId: '<Agora App ID>',
    channel: 'test',
  };
  const rtcCallbacks = {
    EndCall: () => setVideoCall(false),
  };
  return videoCall ? (
    <AgoraUIKit connectionData={connectionData} rtcCallbacks={rtcCallbacks} />
  ) : (
    <Text onPress={()=>setVideoCall(true)}>Start Call</Text>
  );
};

export default App;
SanghaPreet commented 1 year ago

Any update on this?

ToanHBL commented 7 months ago

Any update on this?