Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19844] Android: If either uses-permission is missing hasCalendarPermissions will always be false but requestCalendarPermissions returns success

GitHub Issuen/a
TypeBug
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 5.1.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterFokke Zandbergen
AssigneeUnknown
Created2015-11-02T15:31:23.000+0000
Updated2018-02-28T19:55:48.000+0000

Description

Until TIMOB-7949 is resolved you have to manually add this to your tiapp.xml:
        <uses-permission android:name="android.permission.READ_CALENDAR" />
        <uses-permission android:name="android.permission.WRITE_CALENDAR" />
But if either is missing (e.g. because you don't need WRITE) weird stuff happens: 1. Ti.Calendar.hasCalendarPermissions() will always be false 2. Ti.Calendar.requestCalendarPermissions will always show the dialog and if you grant permissions call back with success:true. I'd assume Ti.Calendar.requestCalendarPermissions to always call back with success:false - as it does when you don't have either user-permission in place. I think the best approach is to resolve TIMOB-7949 and with that this one as well.

Comments

  1. Fokke Zandbergen 2015-11-12

    Will be fixed with TIMOB-19933

JSON Source