react-native-share-manager
v3.0.0
Published
Module to share text and media
Downloads
16
Readme
react-native-share-manager
Getting started
$ npm install react-native-share-manager --save
$ cd ios && pod install && cd ../
Usage
import {ShareManager, ShareTarget, ShareError} from 'react-native-share-manager';
/**
* @public
* @async
* @method sendWhatsapp
* @param {String} message
*/
const sendWhatsapp = async (message)=>
{
try{await ShareManager.shareMessage(ShareTargets.WHATSAPP, message);}
catch(error)
{
if(error === ShareError.APPLICATION_NOT_AVAILABLE)
console.log("Whatsapp not available");
return;
}
};
sendWhatsapp("Hello");