[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15041284#comment-15041284
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user asfgit closed the pull request at:

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


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15037478#comment-15037478
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user vladimir-kotikov commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/94#issuecomment-161549915
  
@dblotsky, this replaces #77 


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15037658#comment-15037658
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user vladimir-kotikov commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/94#issuecomment-161597318
  
@riknoll, other platforms (iOS, Windows) don't try to resolve relative 
paths. Instead they expect image path/URI to be absolute. Probably we should 
follow the same rule here. However, we still need to threat 
`file:///android_asset` URIs differently, so the condition `if 
(path.startsWith(ASSET_URL_PREFIX)) ... ` is still actual. Thoughts?


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15038168#comment-15038168
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user riknoll commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/94#issuecomment-161725537
  
@vladimir-kotikov That sounds good to me! I agree we should be handling 
`file://android_asset` URIs


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-03 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15038750#comment-15038750
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user jasongin commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/94#issuecomment-161811902
  
I agree the file path handling code probably should be centralized in the 
platform lib for each platform. But it should be done as part of a broader 
effort to make all plugin APIs more consistent in handling files. (My audit 
supporting that is still in progress.)

I'm OK with adding this bit of duplicated code for now to fix this bug, 
knowing it may be refactored later. Also note ideally the contact photo APIs 
should also support cdvfile:// paths, assuming we don't deprecate cdvfile://. 
But again I wouldn't block this fix because of that.


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15036309#comment-15036309
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user dblotsky commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/94#issuecomment-161388988
  
Thanks! The change looks much cleaner now. How are this PR and #77 related? 
Will they both be merged in?


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15036862#comment-15036862
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user riknoll commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/94#issuecomment-161466199
  
We really need to get all this file reading code in one place for Android. 
The camera plugin does things a bit differently (see 
[here](https://github.com/apache/cordova-plugin-camera/blob/master/src/android/FileHelper.java)).
 Is this the correct way to interpret relative paths? This assumes that they 
should be based on the assets root directory, but should it act like a web page 
and respect the file structure of the www folder? What do other platforms do? 
@jasongin thoughts?


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-02 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15035586#comment-15035586
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user vladimir-kotikov commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/94#issuecomment-161247540
  
@dblotsky, updated.


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-02 Thread vincipop (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15035534#comment-15035534
 ] 

vincipop commented on CB-10039:
---

@vladimir-kotikov, I tried out #94 and it works for me. 
Perfect, thanks !

> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-12-01 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15034970#comment-15034970
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user dblotsky commented on a diff in the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/94#discussion_r46362158
  
--- Diff: src/android/ContactAccessorSdk5.java ---
@@ -1631,24 +1631,41 @@ private void 
insertPhoto(ArrayList ops,
 }
 
 /**
-   * Get an input stream based on file path or uri content://, 
http://, file://
-   *
-   * @param path
-   * @return an input stream
+ * Get an input stream based on file path or uri content://, http://, 
file://
+ *
+ * @param path path to file
+ * @return an input stream
  * @throws IOException
-   */
+ */
 private InputStream getPathFromUri(String path) throws IOException {
+String ASSET_PREFIX = "file:///android_asset/";
--- End diff --

Please set this as a constant at the top, similarly to `EMAIL_REGEXP ` and 
`MAX_PHOTO_SIZE `.


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Assignee: Vladimir Kotikov
>Priority: Minor
>  Labels: Android
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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



[jira] [Commented] (CB-10039) Problem add Contact photos from relative and absolute path for Android

2015-11-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CB-10039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15013321#comment-15013321
 ] 

ASF GitHub Bot commented on CB-10039:
-

Github user vincipop commented on the pull request:


https://github.com/apache/cordova-plugin-contacts/pull/77#issuecomment-158021220
  
Hi @vladimir-kotikov , 
Apache CLA signed
Issue filed on JRA : https://issues.apache.org/jira/browse/CB-10039
Thanks


> Problem add Contact photos from relative and absolute path for Android
> --
>
> Key: CB-10039
> URL: https://issues.apache.org/jira/browse/CB-10039
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Contacts
> Environment: Android
>Reporter: vincipop
>Priority: Minor
>  Labels: github-import
> Fix For: Master
>
>
> problem add Contact photos from relative and absolute path for Android: Get 
> input stream from relative and full path in ContactAccessorSdk.java
> Solved, attempt to merge on Github.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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