Ver Fonte

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

* 'master' of https://github.com/joshblour/react-native-permissions:
Yonah Forst há 8 anos atrás
pai
commit
e8f023fc98
1 ficheiros alterados com 3 adições e 0 exclusões
  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']
 		}