cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nikhilkh <...@git.apache.org>
Subject [GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...
Date Fri, 25 Sep 2015 21:15:06 GMT
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-contacts/pull/78#discussion_r40476235
  
    --- Diff: src/android/ContactManager.java ---
    @@ -48,13 +54,66 @@ Licensed to the Apache Software Foundation (ASF) under one
         public static final int NOT_SUPPORTED_ERROR = 5;
         public static final int PERMISSION_DENIED_ERROR = 20;
         private static final int CONTACT_PICKER_RESULT = 1000;
    +    public static String [] permissions;
    +
    +
    +    //Request code for the permissions picker (Pick is async and uses intents)
    +    public static final int SEARCH_REQ_CODE = 0;
    +    public static final int SAVE_REQ_CODE = 1;
    +    public static final int REMOVE_REQ_CODE = 2;
    +
     
         /**
          * Constructor.
          */
         public ContactManager() {
    +        permissions = new String[2];
    +        permissions[0] = Manifest.permission.READ_CONTACTS;
    +        permissions[1] = Manifest.permission.WRITE_CONTACTS;
    +    }
    +
    +    public String [] requestPermissions()
    +    {
    +        return permissions;
    --- End diff --
    
    Is every pluign that requires permissions expected to implement this? I understand rest
of the code here - but not sure when this will be invoked and used.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Mime
View raw message