mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add POST_NOTIFICATION runtime permission to Catalyst and RNTester for Android
Summary: Android 13 adds a new `POST_NOTIFICATION` runtime permission, which can only be requested if the `targetSdkVersion` of the app is set to 33. Since we upgrading Catalyst to SDK 33, let's add it as one of the permission examples. Changelog: [Android][Changed] - Add POST_NOTIFICATION runtime permission to RNTester Reviewed By: fkgozali Differential Revision: D38850138 fbshipit-source-id: 4cf7a5f60dd0891d7ada40aca37f0489d9d0d190
This commit is contained in:
committed by
Riccardo Cipolleschi
parent
fdd8002f19
commit
9a469c433d
@@ -82,6 +82,17 @@ function PermissionsExample() {
|
||||
}
|
||||
style={styles.option}
|
||||
/>
|
||||
<RNTOption
|
||||
label={PermissionsAndroid.PERMISSIONS.POST_NOTIFICATION}
|
||||
key={PermissionsAndroid.PERMISSIONS.POST_NOTIFICATION}
|
||||
onPress={() =>
|
||||
setPermission(PermissionsAndroid.PERMISSIONS.POST_NOTIFICATION)
|
||||
}
|
||||
selected={
|
||||
permission === PermissionsAndroid.PERMISSIONS.POST_NOTIFICATION
|
||||
}
|
||||
style={styles.option}
|
||||
/>
|
||||
</View>
|
||||
</View>
|
||||
<RNTesterButton onPress={checkPermission}>
|
||||
|
||||
Reference in New Issue
Block a user