Socket
Socket
Sign inDemoInstall

@remobile/react-native-call

Package Overview
Dependencies
1
Maintainers
2
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @remobile/react-native-call

A call phone number for react-native


Version published
Maintainers
2
Install size
20.0 kB
Created

Readme

Source

React Native Call (remobile)

A call phone number for react-native

Installation

npm install @remobile/react-native-call --save

Installation (iOS)

  • Drag RCTCall.xcodeproj to your project on Xcode.
  • Click on your main project file (the one that represents the .xcodeproj) select Build Phases and drag libRCTCall.a from the Products folder inside the RCTCall.xcodeproj.
  • Look for Header Search Paths and make sure it contains both $(SRCROOT)/../../../react-native/React as recursive.

Installation (Android)

...
include ':react-native-call'
project(':react-native-call').projectDir = new File(settingsDir, '../node_modules/@remobile/react-native-call/android')
  • In android/app/build.gradle
...
dependencies {
    ...
    compile project(':react-native-call')
}
  • register module (in MainApplication.java)
......
import com.remobile.call.RCTCallPackage;  // <--- import

......

@Override
protected List<ReactPackage> getPackages() {
   ......
   new RCTCallPackage(),            // <------ add here
   ......
}

Usage

Example

var React = require('react');
var ReactNative = require('react-native');
var {
    StyleSheet,
    View,
} = ReactNative;


var Button = require('@remobile/react-native-simple-button');
var Call = require('@remobile/react-native-call');

module.exports = React.createClass({
    callNumber() {
        Call.callNumber(()=>{
          }, ()=>{},
          "085186810083",
          true,
        );
    },
    render() {
        return (
            <View style={styles.container}>
                <Button onPress={this.callNumber}>
                    CallNumber
                </Button>
            </View>
        );
    },
});


var styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'space-around',
        alignItems: 'center',
        backgroundColor: 'transparent',
    }
});

Method

  • callNumber (success, failure, number, bypassAppChooser)
    • bypassAppChooser on support for android

Keywords

FAQs

Last updated on 20 Dec 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc