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

Android 6.0 : Asking for contacts permissions fails with "one or more permissions denied" with SDK 5.1.0.v20151104190037

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 5.1.0
    • Fix Version/s: Release 5.1.0, Release 5.2.0
    • Component/s: Android
    • Environment:
    • Sprint:
      2015 Sprint 23 SDK

      Description

      This is a regression. This issue is not seen with SDK 5.1.0.v20151104153625

      Description:

      1. Use the code below in your tiapp.xml & build for android 6.0 device:

      var win = Ti.UI.createWindow();
      win.addEventListener("open", function(e) {
          if (Ti.Contacts.hasContactsPermissions()) {
             Ti.API.info("People: " + JSON.stringify(Ti.Contacts.getAllPeople()));
          } else {
             Ti.Contacts.requestContactsPermissions(function(e) {
                 if (e.success === true) {
                    alert("Access granted");
                    Ti.API.info("People: " + JSON.stringify(Ti.Contacts.getAllPeople()));
                 } else {
                    alert("Access denied, error: " + e.error);
                 }
             });
          }
      });
      win.open();
      

      2. After the app launches grant permissions to access contacts.
      3. Observe the alert you get after.

      Actual Results:

      1. We see alert "Access denied, error: ContactsOne or more permissions were denied"
      Attached screenshot for the alert & the permissions in settings for the app.

      Expected Results:

      1. We should see success.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                lchoudhary Lokesh Choudhary
                Reviewer:
                Ashraf Abu (Inactive)
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code