-
-
Notifications
You must be signed in to change notification settings - Fork 847
Description
Before submitting a new issue
- I tested using the latest version of the library, as the bug might be already fixed.
- I tested using a supported version of react native.
- I checked for possible duplicate issues, with possible answers.
Bug summary
import type {IOSPermissionMap} from './permissions.ios';
import type {WindowsPermissionMap} from './permissions.windows';
import {proxifyPermissions} from './utils';
const ANDROID = Object.freeze({
ACCEPT_HANDOVER: 'android.permission.ACCEPT_HANDOVER',
ACCESS_BACKGROUND_LOCATION: 'android.permission.ACCESS_BACKGROUND_LOCATION',
ACCESS_COARSE_LOCATION: 'android.permission.ACCESS_COARSE_LOCATION',
ACCESS_FINE_LOCATION: 'android.permission.ACCESS_FINE_LOCATION',
ACCESS_MEDIA_LOCATION: 'android.permission.ACCESS_MEDIA_LOCATION',
ACTIVITY_RECOGNITION: 'android.permission.ACTIVITY_RECOGNITION',
ADD_VOICEMAIL: 'com.android.voicemail.permission.ADD_VOICEMAIL',
ANSWER_PHONE_CALLS: 'android.permission.ANSWER_PHONE_CALLS',
BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',
BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
BODY_SENSORS: 'android.permission.BODY_SENSORS',
BODY_SENSORS_BACKGROUND: 'android.permission.BODY_SENSORS_BACKGROUND',
CALL_PHONE: 'android.permission.CALL_PHONE',
CAMERA: 'android.permission.CAMERA',
GET_ACCOUNTS: 'android.permission.GET_ACCOUNTS',
NEARBY_WIFI_DEVICES: 'android.permission.NEARBY_WIFI_DEVICES',
PROCESS_OUTGOING_CALLS: 'android.permission.PROCESS_OUTGOING_CALLS',
READ_CALENDAR: 'android.permission.READ_CALENDAR',
READ_CALL_LOG: 'android.permission.READ_CALL_LOG',
READ_CONTACTS: 'android.permission.READ_CONTACTS',
READ_EXTERNAL_STORAGE: 'android.permission.READ_EXTERNAL_STORAGE',
READ_MEDIA_AUDIO: 'android.permission.READ_MEDIA_AUDIO',
READ_MEDIA_IMAGES: 'android.permission.READ_MEDIA_IMAGES',
READ_MEDIA_VIDEO: 'android.permission.READ_MEDIA_VIDEO',
READ_MEDIA_VISUAL_USER_SELECTED: 'android.permission.READ_MEDIA_VISUAL_USER_SELECTED',
READ_PHONE_NUMBERS: 'android.permission.READ_PHONE_NUMBERS',
READ_PHONE_STATE: 'android.permission.READ_PHONE_STATE',
READ_SMS: 'android.permission.READ_SMS',
RECEIVE_MMS: 'android.permission.RECEIVE_MMS',
RECEIVE_SMS: 'android.permission.RECEIVE_SMS',
RECEIVE_WAP_PUSH: 'android.permission.RECEIVE_WAP_PUSH',
RECORD_AUDIO: 'android.permission.RECORD_AUDIO',
SEND_SMS: 'android.permission.SEND_SMS',
USE_SIP: 'android.permission.USE_SIP',
UWB_RANGING: 'android.permission.UWB_RANGING',
WRITE_CALENDAR: 'android.permission.WRITE_CALENDAR',
WRITE_CALL_LOG: 'android.permission.WRITE_CALL_LOG',
WRITE_CONTACTS: 'android.permission.WRITE_CONTACTS',
WRITE_EXTERNAL_STORAGE: 'android.permission.WRITE_EXTERNAL_STORAGE',
} as const);
export type AndroidPermissionMap = typeof ANDROID;
export const PERMISSIONS = Object.freeze({
ANDROID,
IOS: proxifyPermissions('ios'),
WINDOWS: proxifyPermissions('windows'),
} as const);
POST_NOTIFICATION permission is missing . this is my permission.android.js file inside node_modules\react-native-permissions\src\permissions.android.ts
"react": "19.0.0",
"react-native": "^0.79.3",
"react-native-permissions": "^5.4.1",
Library version
5.4.1
Environment info
System:
OS: Windows 10 10.0.20348
CPU: (6) x64 12th Gen Intel(R) Core(TM) i7-12700
Memory: 4.70 GB / 20.00 GB
Binaries:
Node:
version: 23.8.0
path: C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm:
version: 10.9.2
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels:
- "33"
- "34"
- "35"
Build Tools:
- 30.0.3
- 33.0.0
- 34.0.0
- 35.0.0
Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio:
- 17.13.35828.75 (Visual Studio Community 2022)
Languages:
Java:
version: 17.0.12
path: /c/Program Files/Common Files/Oracle/Java/javapath/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: ^18.0.0
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.3
wanted: ^0.79.3
react-native-windows: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: Not foundSteps to reproduce
- Check permissions.android file inside library
Reproducible sample code
const result = await request(PERMISSIONS.ANDROID.POST_NOTIFICATIONS);
shows POST_NOTIFICATIONS property does not exist