flutter-permission-handler
flutter-permission-handler copied to clipboard
How to determine calendar permission status in Android?
💬 Questions and Help
For questions or help we recommend checking:
- There are two permissions about calendar in android platform, READ_CALENDAR and WRITE_CALENDAR. If used allow the READ_CALENDAR and deny WRITE_CALENDAR, wh's the result status of calendar?
I think if not requested by this plug-in it will return as not determined, if GENERIC_PREFERENCES is not set. If requested by this plug-in it will request both constants.
Hello @XuWanchaoS, I'm not sure what your question exactly is, can you provide a bit more information?
I added the permission options for the calendar permission in the AndroidManifest
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
When using PermissionStatus permission = await Permission.calendar.request();
it will ask a single question 'Allow android.permission.READ_CALENDAR
or android.permission.WRITE_CALENDAR
in the AndroidManifest.
When clicking allow the Permission.Status
will be PermissionStatus.granted
When clicking deny the Permission.Status
will be PermissionStatus.denied
I hope this will answer your question, if not please provide us with more information
Without additional information, we are unfortunately not able to resolve this issue. Therefore, we reluctantly closed this issue for now. If you run into this issue later, feel free to file a new issue with a reference to this issue. Add a description of detailed steps to reproduce, expected and current behaviour, logs and the output of 'flutter doctor -v'. Thanks for your contribution.