How to use the react-native-voximplant.SDK function in react-native-voximplant

To help you get started, we’ve selected a few react-native-voximplant examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github voximplant / react-native-demo / UserAgent.js View on Github external
cancelCall() {
    console.log("Cancel call");
    VoxImplant.SDK.disconnectCall(currentCallId);
  }
github aryaminus / RN-voice-video-call / app / components / Register.js View on Github external
"&api_key=" +
        api_key +
        "&user_id=" +
        user_id +
        "&application_id=all"
    );
    const jsonB = await responseB.json();
    const result = JSON.stringify(jsonB.result);
    console.log(result);
    
    const accnameValue = "testing";
    const appnameValue = "testing";
    const passwordValue = password;

    //login the user to get deviceeventemitter
    VoxImplant.SDK.login(
      usernameValue +
        "@" +
        appnameValue +
        "." +
        accnameValue +
        ".voximplant.com",
      passwordValue
    );

    this.setState({ loading: false });
    this.props.navigation.navigate("Boiler");
  }
github voximplant / react-native-demo / UserAgent.js View on Github external
TouchableOpacity,
  Platform,
  DeviceEventEmitter,
  Image
} from 'react-native';
import { Keypad } from './Keypad';
import { CallButton } from './CallButton';
import { IncomingCallForm } from './IncomingCallForm';
import VoxImplant from "react-native-voximplant";
import loginManager from './LoginManager';

var	currentCallId,
    uaInstance,
    number = '',
    settings_video = false,
    camera = VoxImplant.SDK.CameraType.CameraTypeFront;

DeviceEventEmitter.addListener(
  VoxImplant.SDK.Events.CallRinging,
  (callRinging) => {
    console.log('Call ringing. Call id = ' + callRinging.callId);
    if (uaInstance !== undefined) {
      uaInstance.setState({callState: "Ringing"});
    }
  }
);

DeviceEventEmitter.addListener(
  VoxImplant.SDK.Events.CallConnected,
  (callConnected) => {
    console.log('Call connected. Call id = ' + callConnected.callId);
    if (uaInstance !== undefined) {
github aryaminus / RN-voice-video-call / App.js View on Github external
async VoxImplant() {
    const accnameValue = "testing";
    const appnameValue = "testing";
    const email = await AsyncStorage.getItem("email");
    const usernameValue = email.replace(/@[^@]+$/, "");
    const passwordValue = await AsyncStorage.getItem("password");
    console.log(email);
    //console.log(passwordValue);
    VoxImplant.SDK.login(
      usernameValue +
        "@" +
        appnameValue +
        "." +
        accnameValue +
        ".voximplant.com",
      passwordValue
    );
    console.log("SDK Login done");
  }
github aryaminus / RN-voice-video-call / app / components / Boiler.js View on Github external
makeCall(event) {
    console.log("calling " + number);
    VoxImplant.SDK.createCall(
      number,
      settings_video,
      null,
      function(callId) {
        currentCallId = callId;
        if (settings_p2p)
          VoxImplant.SDK.startCall(callId, { "X-DirectCall": "true" });
        else VoxImplant.SDK.startCall(callId);
        this.setState(
          update(this.state, {
            $merge: {
              status: "calling"
            }
          })
        );
      }.bind(this)
github aryaminus / RN-voice-video-call / app / components / Boiler.js View on Github external
function(callId) {
        currentCallId = callId;
        if (settings_p2p)
          VoxImplant.SDK.startCall(callId, { "X-DirectCall": "true" });
        else VoxImplant.SDK.startCall(callId);
        this.setState(
          update(this.state, {
            $merge: {
              status: "calling"
            }
          })
        );
      }.bind(this)
    );
github aryaminus / RN-voice-video-call / app / components / Boiler.js View on Github external
rejectCall() {
    VoxImplant.SDK.declineCall(currentCallId);
    this.closeModal(true);
  }
github aryaminus / RN-voice-video-call / App.js View on Github external
constructor() {
    super();
    VoxImplant.SDK.closeConnection();
    this.state = {
      page: "connection",
      emailA: false,
      email: "",
      usernameValue: "",
      passwordValue: ""
    };
  }
github aryaminus / RN-voice-video-call / app / components / Boiler.js View on Github external
function(callId) {
        currentCallId = callId;
        if (settings_p2p)
          VoxImplant.SDK.startCall(callId, { "X-DirectCall": "true" });
        else VoxImplant.SDK.startCall(callId);
        this.setState(
          update(this.state, {
            $merge: {
              status: "calling"
            }
          })
        );
      }.bind(this)
    );