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 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-openanything

v0.0.6

Published

Open anything in React Native, like phone, email, sms, web address, iMessage (iOS only), etc.

Readme

react-native-openanything

Open anything in your react-native app.

Supports call, email, text (sms), iMessage (iOS only), Map, PDF, etc.

Installation

React Native >= 0.49

npm install react-native-openanything

General Guide

This library is promise based and each method returns a promise.

    import {Call} from 'react-native-openanything';

    Call('+155555555555').catch(err => console.error(err));

Available Methods

Call a number from your app!

Call(phone, prompt = false)

| Prop | Description | Default | |---|---|---| |phone|A string that represents the phone number to call.|Required| |prompt|If set to true, it will ask the user for permission to call. Only iOS|false|


Send an email from your app!

Email(to = false, subject = false, body = false, cc = false, bcc = false)

| Parameter | Description | Default | |---|---|---| |to|A value that indicates the recipient e-mail. Can either be string for single recipient or an array for multiple recipients.| false optional| |subject|A string for the subject for the e-mail.|false optional| |body|A string for the body message for the e-mail.|false optional| |cc|Same as to however the recipient(s) will be designated for the cc field.|false optional| |bcc|Same as to however the recipient(s) will be designated for the bcc field.|false optional|

Note: The default email application will be open even if no parameter is set.


Send an text (sms) from your app!

Text(phone, message = false, autoEncode = true)

| Parameter | Description | Default | |---|---|---| |phone|A string that represents the phone number to call.| Required| |message|A string for the message.|false optional| |autoEncode|If set to true, the method will auto encode the message.|true optional|

By default this method tries to properly encode the message however in same cases that might not work. If you have trouble just set the autoEncode parameter to false.

Note: If message is not a string, this method will open the default text client regardless.


Open any URL from your app!

Web(url)

| Parameter | Description | Default | |---|---|---| |url|A string that represents the url.| Required |


Displays a map from your app!

Map(address)

| Parameter | Description | Default | |---|---|---| |address|A string that represents the address.| Required|

Note: You can either provide an string or an array with latitude and longitude to this method.


Opens a YouTube Video

Youtube(video)

| Parameter | Description | Default | |---|---|---| |video|A string that contains the Youtube video id.| Required|


Opens Twitter

Twitter(user)

| Parameter | Description | Default | |---|---|---| |user|A string that contains the Twitter User Id that should be open.| Required|


Opens Facebook

Facebook(user)

| Parameter | Description | Default | |---|---|---| |user|A string that contains the Facebook User Id that should be open.| Required|


Opens Instagram User, Media, Camera, App, Location and Tag

Instagram(user)

| Parameter | Description | Default | |---|---|---| |user|A string that contains the Instagram User Id that should be open.| Required|

InstagramMedia(media)

| Parameter | Description | Default | |---|---|---| |user|A string that contains the Instagram Media Id that should be open.| Required|

InstagramLocation(location)

| Parameter | Description | Default | |---|---|---| |user|A string that contains the Instagram Location Id that should be open.| Required|

InstagramTag(tag)

| Parameter | Description | Default | |---|---|---| |user|A string that contains the Instagram Tag Id that should be open.| Required|

InstagramApp()

Opens the Instagram App.

InstagramCamera()

Opens the Instagram Camera.


Only iOS Launch Facetime

Facetime(target, audioOnly = false)

| Parameter | Description | Default | |---|---|---| |target|A string that representing a phone number or a username.| Required| |audioOnly|A boolean value indicating if facetime is an audio call|false optional|

Low level methods

Note: You should only use these methods if you know what you doing.


Supported - checks if a deep linking URL is supported on the current device.

Supported(url)

| Parameter | Description | Default | |---|---|---| |url|The url to check.| Required|


Open - opens an deep linking URL.

Open(url)

| Parameter | Description | Default | |---|---|---| |url|The url to open.| Required|


Launch - Combines Supported and Open

Launch(url)

| Parameter | Description | Default | |---|---|---| |url|The url to verify and open.| Required|


Issues and how to resolve them

App is not allowed to query scheme

On iOS you might run into this issue. The reaon is that you have to explicit add the requesting query schemes into the pinfo.list variable LSApplicationQueriesSchemes.

e.g. for Facebook you would add fb. Please refer to the example list below for the correct query scheme string:

| Target | Query Scheme | |---|---| |Facebook|fb| |Instagram|instagram| |Twitter|twitter| |LinkedIn|linkedin| |WhatsApp|whatsapp|

Examples

You can either import specific modules:

import { Call, Text, Web, Map, EMail } from 'react-native-openanything';

...

render() {

	<View>
    	<Button onPress={() => Call('+12105551234')}>
        	<Text>Call</Text>
        </Button>
        <Button onPress={() => Text('+12105551234', 'Can you please call me!')}>
        	<Text>Text</Text>
        </Button>
    </View>
}

or import all modules as wildcard:

import * as OpenAnything from 'react-native-openanything';

...

render() {

	<View>
    	<Button onPress={() => OpenAnything.Call('+12105551234')}>
        	<Text>Call</Text>
        </Button>
        <Button onPress={() => OpenAnything.Call('+12105551234', 'Can you please call me!')}>
        	<Text>Text</Text>
        </Button>
        <Button onPress={() => OpenAnything.Email('[email protected]')}>
        	<Text>E-Mail</Text>
        </Button>
        <Button onPress={() => OpenAnything.Web('http://www.google.com')}>
        	<Text>Google Homepage</Text>
        </Button>
        <Button onPress={() => OpenAnything.Map('Google')}>
        	<Text>Google HQ</Text>
        </Button>
    </View>
}