[GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...

2015-10-30 Thread infil00p
Github user infil00p commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/78#issuecomment-152604483
  
Rebased into master, closing.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...

2015-10-30 Thread infil00p
Github user infil00p closed the pull request at:

https://github.com/apache/cordova-plugin-contacts/pull/78


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...

2015-10-09 Thread maheshravva
Github user maheshravva commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/78#issuecomment-147021456
  
I am trying to pull the native contacts and copy the selected contact 
information to a MySQL database using jQuery Ajax call. Contact information is 
sent in JSON format. But when the Ajax call is triggered, I get an error as 
below

D/ContactsAccessor: Could not find contact with ID
E/Web Console: Uncaught RangeError: Maximum call stack size exceeded 
at file:///android_asset/www/cordova.js:1861

I am running the application on Genymotion Emulator and using AndroidStudio 
IDE. Below is my jQuery snippet

//sample JSON data
//native_contact_full_details = 
'{"displayName":"V","name":{"formatted":"V 
","givenName":"V"},"nickname":null,"phoneNumbers":null,"emails":null,"addresses":null,"ims":null,"organizations":null,"birthday":null,"note":null,"photos":null,"categories":null,"urls":null,"username":"john.doe","password":"johndoe","idProfile":1,"idSubscriber":"1"}';

//console.log(JSON.stringify(native_contact_full_details));
 $.ajax({

url: "http://domain/test;,

type: "POST",

data: native_contact_full_details,

success: function( json ) {
alert('Success');
},

error: function( xhr, status, errorThrown ) {
alert( "Sorry, there was a problem in your xhr" );  
  
console.log( "Error: " + errorThrown );
console.log( "Status: " + status );
},

complete: function( xhr, status ) {
console.log( "The request is complete!" );
}
});

Can anyone help me or suggest in resolving the issue?


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...

2015-10-09 Thread infil00p
Github user infil00p commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/78#issuecomment-147040788
  
@maheshravva Your question has nothing to do with this pull request.  
Please ask your question on Stack Overflow, or on a different forum.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...

2015-10-05 Thread nikhilkh
Github user nikhilkh commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/78#discussion_r41170319
  
--- Diff: src/android/ContactManager.java ---
@@ -48,13 +54,38 @@ 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;
--- End diff --

Unused variable.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...

2015-09-25 Thread nikhilkh
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...

2015-09-25 Thread infil00p
Github user infil00p commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/78#discussion_r40477508
  
--- 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 --

I don't think this is needed, to be honest.  Contacts was the first actual 
plugin where I implement the permissions. 

But this is very similar to Geolocation, and if there is a call to 
requestPermissions(), it is recommended that a plugin actually return the 
permissions.  We could very easily drop this and only do it for the Geolocation 
plugin in hindsight.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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



[GitHub] cordova-plugin-contacts pull request: Changes for Cordova Android ...

2015-09-24 Thread infil00p
GitHub user infil00p opened a pull request:

https://github.com/apache/cordova-plugin-contacts/pull/78

Changes for Cordova Android 5.0/Marshmallow Functionality

This includes a refactor since many of the methods had to be pulled out of 
the if/else statement.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/infil00p/cordova-plugin-contacts smores

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cordova-plugin-contacts/pull/78.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #78


commit 6d3e8fc83b1b1ddfd0d19eaaf4f4db90715b99aa
Author: Joe Bowser 
Date:   2015-08-31T22:31:17Z

Commit of Contacts Plugin with new API

commit 18ffafd9d61b4a8a752cc4a7565ad6827b6543a3
Author: Joe Bowser 
Date:   2015-09-03T15:43:24Z

Fixed error with permission checking. We should exit the method after the 
permission is denied.

commit ab22d9f06906e5a5db9dca1d4df324d0a54f473b
Author: Joe Bowser 
Date:   2015-09-24T22:13:35Z

Adding engine tag




---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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