flutter-permission-handler icon indicating copy to clipboard operation
flutter-permission-handler copied to clipboard

How to determine calendar permission status in Android?

Open wanchao-xu opened this issue 3 years ago • 2 comments

💬 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?

wanchao-xu avatar Nov 13 '20 03:11 wanchao-xu

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.

Sempakonka avatar Jan 05 '21 11:01 Sempakonka

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 to access your calendar?'. This pop-up permission question will also come up even if you only have one of the two 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

JDDV avatar Mar 30 '21 10:03 JDDV

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.

github-actions[bot] avatar Sep 06 '23 21:09 github-actions[bot]