Browse Source

Merge branch 'master' of https://github.com/vspedr/react-native-permissions into vspedr-master

# Conflicts:
#	README.md
#	index.android.js
Yonah Forst 8 years ago
parent
commit
1fd97637d3
3 changed files with 8 additions and 2 deletions
  1. 2 1
      Example/android/app/src/main/AndroidManifest.xml
  2. 4 1
      README.md
  3. 2 0
      index.android.js

+ 2 - 1
Example/android/app/src/main/AndroidManifest.xml

@@ -12,7 +12,8 @@
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.permission.READ_CONTACTS"/>
     <uses-permission android:name="android.permission.READ_CALENDAR"/>
-
+    <uses-permission android:name="android.permission.READ_SMS"/>
+    <uses-permission android:name="android.permission.RECEIVE_SMS"/>
 
     <application
       android:name=".MainApplication"

+ 4 - 1
README.md

@@ -8,12 +8,13 @@ The current supported permissions are:
 - Photos
 - Contacts
 - Events
-- Call Phone *(Android Only)*
 - Reminders *(iOS only)*
 - Bluetooth *(iOS only)*
 - Push Notifications *(iOS only)*
 - Background Refresh *(iOS only)*
 - Speech Recognition *(iOS only)*
+- Call Phone *(Android Only)*
+- Read/Receive SMS *(Android only)*
 
 
 | Version | React Native Support |
@@ -122,6 +123,8 @@ Promises resolve into one of these statuses
 |`speechRecognition`| ✔️ | ❌ |
 |`storage`| ❌️ | ✔ |
 |`callPhone`| ❌️ | ✔ |
+|`readSms`| ❌️ | ✔ |
+|`receiveSms`| ❌️ | ✔ |
 
 ### Methods
 | Method Name | Arguments | Notes

+ 2 - 0
index.android.js

@@ -13,6 +13,8 @@ const RNPTypes = {
 	storage: RNPermissions.PERMISSIONS.READ_EXTERNAL_STORAGE,
 	photo: RNPermissions.PERMISSIONS.READ_EXTERNAL_STORAGE,
 	call_phone: RNPermissions.PERMISSIONS.CALL_PHONE,
+	readSms: RNPermissions.PERMISSIONS.READ_SMS,
+	receiveSms: RNPermissions.PERMISSIONS.RECEIVE_SMS,
 }
 
 const RESULTS = {