{"_id":"@alirostami9690/react-native-send-intent","_rev":"2-5b1c432067f4f7dcd37882f59215cf7a","name":"@alirostami9690/react-native-send-intent","dist-tags":{"latest":"1.2.4"},"versions":{"1.2.3":{"name":"@alirostami9690/react-native-send-intent","version":"1.2.3","description":"React Native Android module to use Android's Intent actions for send sms, text to shareable apps, open custom apps, make phone calls and etc","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react","react-native","react-component","intent","email","send","sent","share","text","phone","sms","call","calls","dial","number","maps","android"],"author":{"name":"Lucas Ferreira","email":"contato@lucasferreira.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/lucasferreira/react-native-send-intent.git"},"bugs":{"url":"https://github.com/lucasferreira/react-native-send-intent/issues"},"peerDependencies":{"react-native":"*"},"homepage":"https://github.com/lucasferreira/react-native-send-intent#readme","gitHead":"3838290414c4710d6712dcecef38333fc255f880","_id":"@alirostami9690/react-native-send-intent@1.2.3","_nodeVersion":"10.16.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-mvWVGqEVPygRgj6TF7/ybRPKDITuQrqXdWPGyVT9qF0Sx6rh5PHbwivc/i1OGX25x/Ihcmk5mv/AIAzBNMhasw==","shasum":"32793540f45093082187efa12721568db4bb9993","tarball":"https://registry.npmjs.org/@alirostami9690/react-native-send-intent/-/react-native-send-intent-1.2.3.tgz","fileCount":10,"unpackedSize":61772,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgo52UCRA9TVsSAnZWagAATGIQAIarIuqqH62lQ2Xt52b1\nrYlKtyYLzJYGq4mbClYFcvMC8QsTjJiJf/BtUBt7QFiBwDH1TgNjJKGHXgdU\n69N4wYJvcaNt0RDKBQhiYsZXdZjmR0cdIX+PfBtucvpAZVMYFvsNE15isXf3\nTN0JjUU5WcsCn1V0+/TPz3kyp8odoms5dXVTv6ddKEP2Xbfe9CKOCx6YZ0EP\nmSqbemr6aD8H6+j6vNpDwLwW3YhB4YiMDYOJO2kFD+ZUMG3SiP0vgC3qR6/O\nO1pSnfe7QiYnSwjakKiNNm0l5MRiPjJ0yTFSuLtWjSCa+jhpPfJ3Wxu21Tta\nOYi1Iuk7W9sTkC6dF5xgGPD17XqufBqsnq9v/bFitVAMVXkIrqqGD+zrQCRh\nWlc1r6ji2RCFs3iw0NS94w2ist5DHxZbFN2X1Yi6HjHa8eTqlFjjBIwaDmvD\nG/JbE1bpcrGExNAes7eKG09eP7fqTCc8zcROHtab7WEY9sbKGcNM01/BDtT6\nJg48lRFAadMq3OBK+ih8EbtAvsfIcyYyK8WVWkkekD5dwRQ0umHtu3WX0hqK\nSYrQfMc5VeAjcFpsm1wd6ulBvr460+kmJSzfS0IV9MgVf9xfHo5JcDoTxQVa\nvjJTO56W/yGaOqLwpEPJvPlfaRsTIACyukjPCf/9LMNFFlXVSpSMtHL67RQH\ntBbD\r\n=oQrK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvg1qtqMa1eyHh4v4W4HqhStC89DVnswAU3V3Q9fcfvAIhALNMSPMNDr5f9kU5cAe+rCumZ90P/MdGiDwQGR7YXGFI"}]},"_npmUser":{"name":"alirostami9690","email":"alirostami9690@gmail.com"},"directories":{},"maintainers":[{"name":"alirostami9690","email":"alirostami9690@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-send-intent_1.2.3_1621335444426_0.5513432562491194"},"_hasShrinkwrap":false},"1.2.4":{"name":"@alirostami9690/react-native-send-intent","version":"1.2.4","description":"React Native Android module to use Android's Intent actions for send sms, text to shareable apps, open custom apps, make phone calls and etc","main":"index.js","types":"index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"keywords":["react","react-native","react-component","intent","email","send","sent","share","text","phone","sms","call","calls","dial","number","maps","android"],"author":{"name":"Lucas Ferreira","email":"contato@lucasferreira.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/lucasferreira/react-native-send-intent.git"},"bugs":{"url":"https://github.com/lucasferreira/react-native-send-intent/issues"},"peerDependencies":{"react-native":"*"},"homepage":"https://github.com/lucasferreira/react-native-send-intent#readme","gitHead":"3838290414c4710d6712dcecef38333fc255f880","_id":"@alirostami9690/react-native-send-intent@1.2.4","_nodeVersion":"10.16.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-xsPs+92Ix4jLoS9mK4YYhzYEESD3Aw9wlVTCdU80Hj0BgGI1x/kcYUATiWrISdwffgVvAH872G4UVRW6O0OMow==","shasum":"9fe191e10f9f76c8a4fd21e0f084f1eb81b2437b","tarball":"https://registry.npmjs.org/@alirostami9690/react-native-send-intent/-/react-native-send-intent-1.2.4.tgz","fileCount":10,"unpackedSize":61855,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgo6O9CRA9TVsSAnZWagAALQAQAIbjhOvTLcMmGlRBXJEd\nkQCgwehbKGRmRFe0sfYrLlIbBw81VJB4Y232id4LhJ9DUNqsmdxL+O46fnH9\nbELDuIge0I1uehtTiPwBOyZ4KJJFJfFAdidZZVkX5h/tMQhwFkZuHTchazot\nKVUbjgnpY1mccxmvq81YNrAZ1B9EoQ2+DR828cxUNQwbGXhbshPN7dAcxW4a\nEPuxXFVj4cXQj1s9X/e/kE+yuanWS36havR4zOCtQKINaRXU+HyCT9jIdJlk\n32DBJr3HnppuXO56BuqwRQBu3k+9p5QQe9vvwmBPhm2QXYXu9uAtmpK4heUA\nN6kU3VrhFkrpugJztVg4RnEmfjO+Nc3hgp/7lg8NtCx+02EWXWhniaNRkBwQ\naqS/7XH8O/X6VWgOuVDOUsCJA8J6HCrkOVL5t3s1N2ymeQnP2h8ul0Lfffjs\n0F/qrTKc9Rdwhw6jZxgIS9djNnrr1MEufjGI0cPvuf8gU3HHBqn2hsF6FyqO\nzWEpPMZgjewgYtZkdlA+O5zLq/o0zR5ANQExa3KEEBzu9ycKcXvh6oib1aw+\nEq/gPNC8jEKvntt8z8xEmtj5m0WwCjVoR6FTy4iM7pZZF0ILbxbyPq0GK5Mm\nNZxQr4qyIPQnjCdUW5ayBSouWN6YCSfI8idMU4IABFu+SLaviYcmRTVz4aC9\nwGWn\r\n=e2m/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHb2jMLQyZwL4xH0ZkIVGxXWSMdyFzNgH68/Rw8Ap+K5AiAWJILrjCGltKFHHC7OpAdtnng8ZftfuF54DK5hPpPSxg=="}]},"_npmUser":{"name":"alirostami9690","email":"alirostami9690@gmail.com"},"directories":{},"maintainers":[{"name":"alirostami9690","email":"alirostami9690@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-send-intent_1.2.4_1621337021209_0.2848056397846612"},"_hasShrinkwrap":false}},"time":{"created":"2021-05-18T10:57:24.363Z","1.2.3":"2021-05-18T10:57:24.588Z","modified":"2022-04-04T13:27:40.598Z","1.2.4":"2021-05-18T11:23:41.341Z"},"maintainers":[{"name":"alirostami9690","email":"alirostami9690@gmail.com"}],"description":"React Native Android module to use Android's Intent actions for send sms, text to shareable apps, open custom apps, make phone calls and etc","homepage":"https://github.com/lucasferreira/react-native-send-intent#readme","keywords":["react","react-native","react-component","intent","email","send","sent","share","text","phone","sms","call","calls","dial","number","maps","android"],"repository":{"type":"git","url":"git+https://github.com/lucasferreira/react-native-send-intent.git"},"author":{"name":"Lucas Ferreira","email":"contato@lucasferreira.com"},"bugs":{"url":"https://github.com/lucasferreira/react-native-send-intent/issues"},"license":"MIT","readme":"# react-native-send-intent\r\n\r\nReact Native Android module to use Android's Intent actions for send text to shareable apps or make phone calls or opening third party apps.\r\n\r\n[![npm version](http://img.shields.io/npm/v/react-native-send-intent.svg?style=flat-square)](https://npmjs.org/package/react-native-send-intent \"View this project on npm\")\r\n[![npm downloads](http://img.shields.io/npm/dm/react-native-send-intent.svg?style=flat-square)](https://npmjs.org/package/react-native-send-intent \"View this project on npm\")\r\n[![npm licence](http://img.shields.io/npm/l/react-native-send-intent.svg?style=flat-square)](https://npmjs.org/package/react-native-send-intent \"View this project on npm\")\r\n[![donate](https://img.shields.io/badge/Donate-PayPal-green.svg?style=flat-square)](https://www.paypal.com/donate?business=ZMAJTXD5HYWCQ&item_name=open-source+dev+react+native&currency_code=USD \"If this project help you reduce time to develop, you can give me a cup of coffee ;)\")\r\n\r\nThis module is useful when you need to share some text between apps in Android device and if you have a valid phone number make some call directly (if you ask for permission in AndroidManifest.xml).\r\n\r\nE.g.: You have and short text and want to share in a SMS or Whatsapp.\r\n\r\n### Installation\r\n\r\n```bash\r\nnpm install react-native-send-intent --save\r\n```\r\n\r\n### Add it to your android project\r\n\r\n- Automatically with:\r\n\r\n```bash\r\nreact-native link react-native-send-intent\r\n```\r\n\r\n#### Manually\r\n\r\n- In `android/setting.gradle`\r\n\r\n```gradle\r\n...\r\ninclude ':RNSendIntentModule', ':app'\r\nproject(':RNSendIntentModule').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-send-intent/android')\r\n```\r\n\r\n- In `android/app/build.gradle`\r\n\r\n```gradle\r\n...\r\ndependencies {\r\n    ...\r\n    compile project(':RNSendIntentModule')\r\n}\r\n```\r\n\r\n- Register Module (in MainApplication.java)\r\n\r\n```java\r\nimport com.burnweb.rnsendintent.RNSendIntentPackage;  // <--- import\r\n\r\npublic class MainApplication extends Application implements ReactApplication {\r\n  ......\r\n\r\n  @Override\r\n  protected List<ReactPackage> getPackages() {\r\n    return Arrays.<ReactPackage>asList(\r\n            new MainReactPackage(),\r\n            new RNSendIntentPackage()); // <------ add this line to your MainApplication class\r\n  }\r\n\r\n  ......\r\n\r\n}\r\n```\r\n\r\n## Example / Usage of Text (Share)\r\n\r\n```javascript\r\nvar SendIntentAndroid = require(\"react-native-send-intent\");\r\n\r\nSendIntentAndroid.sendText({\r\n  title: \"Please share this text\",\r\n  text: \"Lorem ipsum dolor sit amet, per error erant eu, antiopam intellegebat ne sed\",\r\n  type: SendIntentAndroid.TEXT_PLAIN,\r\n});\r\n```\r\n\r\n## Example / Usage of Send Mail (text/plain only)\r\n\r\n```javascript\r\nvar SendIntentAndroid = require(\"react-native-send-intent\");\r\n\r\nSendIntentAndroid.sendMail(\"your@address.com\", \"Subject test\", \"Test body\");\r\n```\r\n\r\n## Example / Usage of SMS\r\n\r\nThanks to @pedro ;)\r\n\r\n```javascript\r\nvar SendIntentAndroid = require(\"react-native-send-intent\");\r\n\r\nSendIntentAndroid.sendSms(\"+55 48 9999-9999\", \"SMS body text here\");\r\n```\r\n\r\n## Example / Usage of Phone Calls\r\n\r\nIt's very important ask for permission in your AndroidManifest.xml file if you need to use Phone Calls directly.\r\nYou can add an optional second parameter, to fix the default phone app.\r\n\r\nPlease add this line to your AndroidManifest.xml before using this example:\r\n\r\n```xml\r\n<uses-permission android:name=\"android.permission.CALL_PHONE\" />\r\n```\r\n\r\nAnd them you can call in your JavaScript files:\r\n\r\n```javascript\r\nvar SendIntentAndroid = require(\"react-native-send-intent\");\r\n\r\nSendIntentAndroid.sendPhoneCall(\"+55 48 9999-9999\", true);\r\n```\r\n\r\n## Example / Usage of Phone Dial Screen\r\n\r\nFor this use you doesn't need to ask any permission.\r\nYou can add an optional second parameter, to fix the default phone app.\r\n\r\n```javascript\r\nvar SendIntentAndroid = require(\"react-native-send-intent\");\r\n\r\nSendIntentAndroid.sendPhoneDial(\"+55 48 9999-9999\", false);\r\n```\r\n\r\n## Example / Create Calendar Event\r\n\r\nAccording to [Google](http://developer.android.com/guide/topics/providers/calendar-provider.html#intents) using Intents for\r\ninserting, updating, and viewing calendar events is the preferred method. At this time only simple **recurrence** is\r\nsupported ['daily'|'weekly'|'monthly'|'yearly'].\r\n\r\nCreate a Calendar Event:\r\n\r\n```javascript\r\n// Create the Calendar Intent.\r\nSendIntentAndroid.addCalendarEvent({\r\n  title: \"Go To The Park\",\r\n  description: \"It's fun to play at the park.\",\r\n  startDate: \"2016-01-25 10:00\",\r\n  endDate: \"2016-01-25 11:00\",\r\n  recurrence: \"weekly\",\r\n  location: \"The Park\",\r\n});\r\n```\r\n\r\n## Example / Check if an application is installed\r\n\r\nCheck if Gmail app is intalled. Returns a promise with a boolean telling if the app is installed or not.\r\n\r\n```javascript\r\nSendIntentAndroid.isAppInstalled(\"com.google.android.gm\").then(isInstalled => {});\r\n```\r\n\r\n## Example / Install a remote APK\r\n\r\nThis can be used to upgrade your APK from a custom source or install other apps.\r\nNo additional permissions are required.\r\n\r\n```javascript\r\nSendIntentAndroid.installRemoteApp(\"https://example.com/my-app.apk\", \"my-saved-app.apk\").then(installWasStarted => {});\r\n```\r\n\r\n## Example / Open App\r\n\r\nOpen Gmail app. Returns a promise with a boolean telling if the app was opened or not:\r\n\r\n```javascript\r\nSendIntentAndroid.openApp(\"com.google.android.gm\").then(wasOpened => {});\r\n\r\n// You can also specify arbitrary intent extras to be passed to the app\r\nSendIntentAndroid.openApp(\"com.mycorp.myapp\", {\r\n  \"com.mycorp.myapp.reason\": \"just because\",\r\n  \"com.mycorp.myapp.data\": \"must be a string\",\r\n}).then(wasOpened => {});\r\n```\r\n\r\n## Example / Open App with Data\r\n\r\nOpens MX Player (Free) app and starts a video at the 1 minute mark.\r\nReturns a promise with a boolean telling if the app was opened or not:\r\n\r\n```javascript\r\nSendIntentAndroid.openAppWithData(\r\n  \"com.mxtech.videoplayer.ad\",\r\n  \"http://download.blender.org/peach/bigbuckbunny_movies/big_buck_bunny_480p_surround-fix.avi\",\r\n  \"video/*\",\r\n  {\r\n    position: { type: \"int\", value: 60 },\r\n  }\r\n).then(wasOpened => {});\r\n```\r\n\r\n## Example / Open Chrome Intent\r\n\r\nOpens Chrome intent as defined in https://developer.chrome.com/multidevice/android/intents\r\n\r\nReturns a promise with a boolean.\r\n\r\nTrue if: the intent was handled by an activity or the browser opened the `browser_fallback_url`\r\n\r\nFalse if both conditions are not fulfilled\r\n\r\n```javascript\r\nSendIntentAndroid.openChromeIntent(\"intent://www.spm.com/qrlogin#Intent;scheme=https;package=example.package;S.browser_fallback_url=https://www.spm.com/download;end\",\r\n  }\r\n).then((wasOpened) => {});\r\n```\r\n\r\n## Example / Open Calendar\r\n\r\n```javascript\r\nSendIntentAndroid.openCalendar();\r\n```\r\n\r\n## Example / Open Camera Intent\r\n\r\n```javascript\r\nSendIntentAndroid.openCamera();\r\n```\r\n\r\n## Example / Open Email Application\r\n\r\nWill open default Email application\r\n\r\n```javascript\r\nSendIntentAndroid.openEmailApp();\r\n```\r\n\r\nWill open all the Email app's that available in device\r\n\r\n```javascript\r\nSendIntentAndroid.openAllEmailApp();\r\n```\r\n\r\n## Example / Open Download Manager\r\n\r\n```javascript\r\nSendIntentAndroid.openDownloadManager();\r\n```\r\n\r\n## Example / Open Share With dialog\r\n\r\nOpens Androids default share tray:\r\n\r\n```javascript\r\n// Create Share With dialog.\r\nSendIntentAndroid.openChooserWithOptions(\r\n  {\r\n    subject: \"Story Title\",\r\n    text: \"Message Body\",\r\n  },\r\n  \"Share Story\"\r\n);\r\n\r\nSendIntentAndroid.openChooserWithOptions(\r\n  {\r\n    subject: \"Video Title\",\r\n    videoUrl: \"/path_or_url/to/video.mp4\",\r\n  },\r\n  \"Share video to\"\r\n);\r\n```\r\n\r\n## Example / Open Multiple Files Share With dialog\r\n\r\nOpens Androids default share tray:\r\n\r\n```javascript\r\n// Create Multiple Files Share With dialog.\r\nSendIntentAndroid.openChooserWithMultipleOptions(\r\n  [\r\n    {\r\n      subject: \"Video One Title\",\r\n      videoUrl: \"/path_or_url/to/video.mp4\",\r\n    },\r\n    {\r\n      subject: \"Video Two Title\",\r\n      videoUrl: \"/path_or_url/to/video2.mp4\",\r\n    },\r\n  ],\r\n  \"Share videos to\"\r\n);\r\n\r\nSendIntentAndroid.openChooserWithMultipleOptions(\r\n  [\r\n    {\r\n      subject: \"Video Title\",\r\n      text: \"Test shared with video\",\r\n    },\r\n    {\r\n      subject: \"Video Title\",\r\n      videoUrl: \"/path_or_url/to/video.mp4\",\r\n    },\r\n  ],\r\n  \"Share video to\"\r\n);\r\n```\r\n\r\n## Example / Open Maps\r\n\r\nOpens Androids default maps app with location:\r\n\r\n```javascript\r\n// Open Maps App\r\nSendIntentAndroid.openMaps(\"Piccadilly Circus Station, London, United Kingdom\");\r\n```\r\n\r\n## Example / Open Maps With Route\r\n\r\nOpens Androids default maps app, and route path between your location and **address**:\r\n\r\nmode: d,w,b\r\n\r\n- d: drive car\r\n- w: walking\r\n- b: bicycle\r\n\r\n```javascript\r\nSendIntentAndroid.openMapsWithRoute(\"Piccadilly Circus Station, London, United Kingdom\", \"w\");\r\n```\r\n\r\n## Example / Share text to line\r\n\r\n```javascript\r\nSendIntentAndroid.isAppInstalled(\"jp.naver.line.android\").then(function (isInstalled) {\r\n  if (!isInstalled) {\r\n    //LINE has not install, you need to install it!\r\n    return;\r\n  }\r\n\r\n  SendIntentAndroid.shareTextToLine({ text: \"txt message that you want to share\" });\r\n});\r\n```\r\n\r\nWhen you call SendIntentAndroid.shareTextToLine this method, app will bring txt message to LINE, and you can select one or multiple friends to share.\r\n\r\n## Example / Share Image to Instagram\r\n\r\n```javascript\r\nimport { CameraRoll } from \"react-native\";\r\n\r\n//get frist image from CameraRoll\r\nCameraRoll.getPhotos({ first: 1 }).then(\r\n  function (data) {\r\n    const assets = data.edges;\r\n\r\n    SendIntentAndroid.isAppInstalled(\"com.instagram.android\").then(function (isInstalled) {\r\n      if (!isInstalled) {\r\n        //Instagram has not install\r\n        return;\r\n      }\r\n\r\n      SendIntentAndroid.shareImageToInstagram(\"image/*\", encodeURI(assets[0].node.image.uri));\r\n    });\r\n  },\r\n  function (err) {\r\n    console.error(\"An error occurred\", err);\r\n  }\r\n);\r\n```\r\n\r\nShare your first image from CameraRoll to Instagram.\r\n\r\n## Example / Open Settings\r\n\r\nOpens a specified settings screen when passed one of the constant values available in `android.provider.settings` (use the constant value found [here](https://developer.android.com/reference/android/provider/Settings.html#ACTION_SECURITY_SETTINGS) to open the Security Settings screen).\r\n\r\n```javascript\r\nSendIntentAndroid.openSettings(\"android.settings.SECURITY_SETTINGS\");\r\n```\r\n\r\n## Example / Get voiceMail number\r\n\r\nPlease add this line to your AndroidManifest.xml file before using next example:\r\n\r\n```xml\r\n  <uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />\r\n```\r\n\r\n```javascript\r\nSendIntentAndroid.getVoiceMailNumber().then(voiceMailNumber => {\r\n  if (!voiceMailNumber) {\r\n    return console.error(\"Can`t get voiceMailNumber\");\r\n  }\r\n\r\n  //if u want to use next line, u need to add CALL_PHONE permission\r\n  SendIntentAndroid.sendPhoneCall(voiceMailNumber);\r\n});\r\n```\r\n\r\n## Example / Open File Chooser\r\n\r\nOpens Android chooser so the user can select which app will handle the file.\r\n\r\n```javascript\r\nSendIntentAndroid.openFileChooser(\r\n  {\r\n    subject: \"File subject\", //optional,\r\n    fileUrl: \"/path_or_url/to/file\",\r\n    type: \"file_mimetype\",\r\n  },\r\n  \"Open file with:\"\r\n);\r\n```\r\n\r\n## Example / Open File Picker\r\n\r\nOpens Android own file selector to get the selected file and callback path from Uri\r\n\r\n```javascript\r\nSendIntentAndroid.openFilePicker(\r\n  {\r\n    type: \"file_mimetype\", //default is \"*/*\"\r\n    title: \"selector title\", //default is \"Choose File\"\r\n  },\r\n  filePath => {}\r\n);\r\n```\r\n\r\n## Example / Get phone number\r\n\r\nPlease add these lines to your AndroidManifest.xml file before using next example:\r\n\r\n```xml\r\n  <uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />\r\n  <uses-permission android:name=\"android.permission.READ_PHONE_NUMBERS\" />\r\n```\r\n\r\n```javascript\r\nSendIntentAndroid.getPhoneNumber().then(phoneNumber => {\r\n  if (!phoneNumber) {\r\n    return console.error(\"Can`t get phoneNumber\");\r\n  }\r\n\r\n  //do something with number\r\n});\r\n```\r\n\r\n## Example / Request 'ignore battery optimizations'\r\n\r\nPlease add this line to your AndroidManifest.xml file before using next example:\r\n\r\n```xml\r\n  <uses-permission android:name=\"android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS\"/>\r\n```\r\n\r\nPrompts the user to add your app to the Doze and App Standby optimizations exception white-list. Returns true if running on Android version M and greater, if the app is not on the white-list, and the intent was successfully shown. Will only show on Android version M and greater. For more details [look here](https://developer.android.com/training/monitoring-device-state/doze-standby#support_for_other_use_cases).\r\n\r\n```javascript\r\nSendIntentAndroid.requestIgnoreBatteryOptimizations().then(intentShown => {});\r\n```\r\n\r\n## Example / Show battery optimizations settings\r\n\r\nWill only show on Android version M and greater. For more details [look here](https://developer.android.com/training/monitoring-device-state/doze-standby#support_for_other_use_cases).\r\n\r\n```javascript\r\nSendIntentAndroid.showIgnoreBatteryOptimizationsSettings();\r\n```\r\n\r\n## Donation\r\n\r\nIf this project help you reduce time to develop, you can give me a cup of coffee :)\r\n\r\n[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/donate?business=ZMAJTXD5HYWCQ&item_name=open-source+dev+react+native&currency_code=USD)\r\n\r\n## License\r\n\r\nMIT\r\n","readmeFilename":"README.md"}