ソースを参照

Merge pull request #96 from jasongaare/master

Add notification support for Android (getPermissionStatus only)
Yonah Forst 8 年 前
コミット
2ab7e5fa14
共有1 個のファイルを変更した3 個の追加0 個の削除を含む
  1. 3
    0
      ReactNativePermissions.js

+ 3
- 0
ReactNativePermissions.js ファイルの表示

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