ソースを参照

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

* 'master' of https://github.com/joshblour/react-native-permissions:
Yonah Forst 8 年 前
コミット
e8f023fc98
1 ファイル変更3 行追加0 行削除
  1. 3 0
      ReactNativePermissions.js

+ 3 - 0
ReactNativePermissions.js

@@ -78,6 +78,9 @@ class ReactNativePermissions {
 		} else if (permission == 'location') {
 			options = type || 'whenInUse'
 		} else if (permission == 'notification') {
+			if (Platform.OS === 'android') {
+				return Promise.reject(`ReactNativePermissions: notification cannot be requested on Android`)
+			}
 			options = type || ['alert', 'badge', 'sound']
 		}