Yonah Forst 7 years ago
parent
commit
e8f023fc98
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      ReactNativePermissions.js

+ 3
- 0
ReactNativePermissions.js View File

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