Skip to content

Commit

Permalink
Add POST_NOTIFICATION runtime permission to Catalyst and RNTester for…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
makovkastar authored and Riccardo Cipolleschi committed Jan 30, 2023
1 parent fdd8002 commit 9a469c4
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}>
Expand Down

0 comments on commit 9a469c4

Please sign in to comment.