Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-19844

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

    Details

    • Type: Bug
    • Status: Open
    • Priority: None
    • Resolution: Unresolved
    • Affects Version/s: Release 5.1.0
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
      None
    • Environment:

      SDK 5.1.0.v20151028190028

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                fokkezb Fokke Zandbergen
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-20585
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code