Browse Source

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

* 'master' of https://github.com/joshblour/react-native-permissions:
Yonah Forst 8 năm trước cách đây
mục cha
commit
e8f023fc98
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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']
 		}