Yonah Forst 7 gadus atpakaļ
vecāks
revīzija
e8f023fc98
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3
    0
      ReactNativePermissions.js

+ 3
- 0
ReactNativePermissions.js Parādīt failu

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