npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rn-direct-phone-call

v0.1.2

Published

React native dailer module targeted at direct call for iOS and Android with the capability to work with daul sim card on Android platform.

Downloads

30

Readme

React Native Direct Phone Call

React Native Direct Phone Call module is targeted at making a direct call from your iOS and Android application. This module is shipped with the following features:

  • Handle direct call for both single and multiple sim.
  • Get sim card information

Installation

npm install rn-direct-phone-call --save

Or

yarn add rn-direct-phone-call

Usage

Import the package as below

import { iosCall, andCall, getSimInfo } from "rn-direct-phone-call";
  • To make a call on iOS device use iosCall method with the number in question as below;
iosCall('123456789');
  • To make a call on andriod device with a single sim card use andCall method as follows;
andCall('123456789');
  • To make a call on andriod device with a multiple sim cards use andCall method as follows;
Note

You are required to pass the sim index. You can use the getSimInfo to get sim card indexes and use then as per need.

andCall('123456789', getSimInfo().simSlotIndex0);
  • To Sim card/cards Information on an android device, use the getSimInfo method. The following information are captured - carrierName, simSlotIndex, deviceId and simSerialNumber.
console.log(getSimInfo());
/**
  the object has the following info (change 0 to access more than 1 SIM):

  carrierName0: string;
  simSlotIndex0: string;
  displayName0: string;
*/

// Access the getSimInfo() variables as follows

getSimInfo().carrierName0

Caveats

Might crash if tries to use in a phone without any SIM cards.

Permissions

WARNING: Minimum API Level is 23

This plugin uses two different Android APIs to receive SIM data:

  • TelephonyManager (since API level 1)
  • SubscriptionManager (since API level 22)

Since Android 6 (API level 23) a few methods of TelephonyManager require permission READ_PHONE_STATE.

All methods of SubscriptionManager require permission READ_PHONE_STATE.

SubscriptionManager is able to access multiple SIM data.

TODO

  • Get sim information on iOS

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT