0.0.12 • Published 4 years ago

react-native-replace-dialer v0.0.12

Weekly downloads
9
License
ISC
Repository
github
Last release
4 years ago

react-native-tele

UPDATE: Now is compatible with RN 0.60+ (AndroidX)

Support

  • Currently support for Android.

To do

  • Add ToDo

Examples

Installation

AndroidManifest.xml

            <!--SCHEME TEL-->
            <data android:scheme="tel"/>
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.DIAL"/>
<category android:name="android.intent.category.DEFAULT"/>
    <service
        android:name=".TeleService"
        android:permission="android.permission.BIND_INCALL_SERVICE"
        >
        <meta-data
            android:name="android.telecom.IN_CALL_SERVICE_UI"
            android:value="true"
            />
        <intent-filter>
            <action android:name="android.telecom.InCallService" />
        </intent-filter>
    </service>

...

Usage

    import {ReplaceDialer} from 'react-native-replace-dialer';

    let tReplaceDialer = new ReplaceDialer();

    if (!tReplaceDialer.isDefault()) {
      console.log('Is NOT default dialer, try to set.');
      if (tReplaceDialer.setDefault()) {
        console.log('Default dialer sucessfully set.');
      } else {
        console.log('Default dialer NOT set');
      }
    }
    

react-native-replace-dialer.example