[jira] [Commented] (CB-11034) Camera.getPicture -Handle of OutOfMemoryError gracefully

2016-04-08 Thread Dagfinn Parnas (JIRA)

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

Dagfinn Parnas commented on CB-11034:
-

[~riknoll] For us the DATA_URL feature is necessary feature. 

We're working with mobile app for travel expenses on top SAP ERP systems. The 
front-end is implemented with OpenUI5 https://github.com/SAP/openui5 which is 
an MVC based javascript framework. The data communication between the front-end 
and the back-end is done with ajax and the SAP mobile framework we use provides 
automatic serialization between the formats used in the front-end and the 
back-end (front-end is a JSON based model, whilst the backend is an object 
oriented ABAP class). With this approach there is a limit for how large files 
you can handle as they need to be kept in memory, but for our use cases this is 
in general not an issue.

Because of the above, we do not have a traditional form being posted over HTTP 
POST. 

Here's a step by step overview on what happens when the user wants to attach a 
photo to a travel:
1. Call cordova plugin through camera.getPicture with DATA_URL
2. Receive base64 data in app and store in OpenUI5 javascript model
3. Draw base64 data into a canvas in order to perform operations on image (such 
as scaling, convert to black/white etc.) and provide preview
4. Fetch data from canvas to provide a preview in a HTML img element
5. Initiate ajax request to SAP with photo as base64 encoded data
6. Mobile framework in SAP automatically deserializes model into object 
oriented class (in ABAP)
7. Store photo in SAP

If cordova-camera-plugin didn't support DATA_URL we would need to first call 
camera.getPicture to get a FILE_URI and then call the cordova-file-plugin to 
read the contents of the file into a data url . I'm guessing there will be a 
few more edge cases where this approach would not work and it would be 
significantly harder to fix as it involves to different plugins

> Camera.getPicture -Handle of OutOfMemoryError gracefully
> 
>
> Key: CB-11034
> URL: https://issues.apache.org/jira/browse/CB-11034
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera
>Affects Versions: 2.1.1
> Environment: Android
>Reporter: Dagfinn Parnas
>
> We have an app for which we are dependent on using DATA_URL.
> On some older phones (Samsung SII Android 4.1), we have experienced sporadic 
> OutOfMemoryError exceptions when taking a picture. 
> When this occurs the app crashes since the camera plugin doesn't explicitly 
> handle the java.lang.OutOfMemoryError which is thrown. 
> It's ok that the OutOfMemoryError appear, but the apps should be able to 
> handle it gracefully and not just have the app crash. 
> Example stack trace from an uncaught OutOfMemoryError 
> {code}
> 04-06 09:51:55.155: E/dalvikvm-heap(22744): Out of memory on a 31961104-byte 
> allocation.
> 04-06 09:51:55.155: I/dalvikvm(22744):   at 
> android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
> 04-06 09:51:55.160: I/dalvikvm(22744):   at 
> android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:652)
> 04-06 09:51:55.160: I/dalvikvm(22744):   at 
> android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:724)
> 04-06 09:51:55.160: I/dalvikvm(22744):   at 
> org.apache.cordova.camera.CameraLauncher.getScaledBitmap(CameraLauncher.java:916)
> 04-06 09:51:55.160: I/dalvikvm(22744):   at 
> org.apache.cordova.camera.CameraLauncher.processResultFromCamera(CameraLauncher.java:454)
> 04-06 09:51:55.160: I/dalvikvm(22744):   at 
> org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:753)
> 04-06 09:51:55.160: I/dalvikvm(22744):   at 
> org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120)
> {code}
> In the example above, CameraLauncher.getScaledBitmap doesn't catch the 
> java.lang.OutOfMemoryError and the app crashes. The same situation can occur 
> in CameraLauncher.processPicture (which has a try catch with only exception)



--
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] [Created] (CB-11034) Camera.getPicture -Handle of OutOfMemoryError gracefully

2016-04-07 Thread Dagfinn Parnas (JIRA)
Dagfinn Parnas created CB-11034:
---

 Summary: Camera.getPicture -Handle of OutOfMemoryError gracefully
 Key: CB-11034
 URL: https://issues.apache.org/jira/browse/CB-11034
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin Camera
Affects Versions: 2.1.1
 Environment: Android
Reporter: Dagfinn Parnas


We have an app for which we are dependent on using DATA_URL.

On some older phones (Samsung SII Android 4.1), we have experienced sporadic 
OutOfMemoryError exceptions when taking a picture. 

When this occurs the app crashes since the camera plugin doesn't explicitly 
handle the java.lang.OutOfMemoryError which is thrown. 

It's ok that the OutOfMemoryError appear, but the apps should be able to handle 
it gracefully and not just have the app crash. 

Example stack trace from an uncaught OutOfMemoryError 
{code}
04-06 09:51:55.155: E/dalvikvm-heap(22744): Out of memory on a 31961104-byte 
allocation.
04-06 09:51:55.155: I/dalvikvm(22744):   at 
android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
04-06 09:51:55.160: I/dalvikvm(22744):   at 
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:652)
04-06 09:51:55.160: I/dalvikvm(22744):   at 
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:724)
04-06 09:51:55.160: I/dalvikvm(22744):   at 
org.apache.cordova.camera.CameraLauncher.getScaledBitmap(CameraLauncher.java:916)
04-06 09:51:55.160: I/dalvikvm(22744):   at 
org.apache.cordova.camera.CameraLauncher.processResultFromCamera(CameraLauncher.java:454)
04-06 09:51:55.160: I/dalvikvm(22744):   at 
org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:753)
04-06 09:51:55.160: I/dalvikvm(22744):   at 
org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:120)
{code}

In the example above, CameraLauncher.getScaledBitmap doesn't catch the 
java.lang.OutOfMemoryError and the app crashes. The same situation can occur in 
CameraLauncher.processPicture (which has a try catch with only exception)



--
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-10857) Camera.getPicture return null for Google Drive (camera 2.1.1)

2016-03-29 Thread Dagfinn Parnas (JIRA)

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

Dagfinn Parnas commented on CB-10857:
-

[~riknoll]  [~jcesarmobile] ICLA confirmed and pull request created. Should I 
take any additional action in order to start the review process?

> Camera.getPicture return null for Google Drive (camera 2.1.1)
> -
>
> Key: CB-10857
> URL: https://issues.apache.org/jira/browse/CB-10857
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera
>Affects Versions: 2.1.1
> Environment: Android - Tested on 6.0.1
>Reporter: Dagfinn Parnas
>  Labels: android, mustfix, reproduced, triaged
> Attachments: Filepicker_google_drive.png
>
>
> Camera.getPicture returns null for pictures and other files when using Google 
> Drive in version 2.1.1. Other sources in the generic file picker such as 
> Images, Photos and Astro File Manager works. 
> The camera plugin gets a null value in processResultFromGallery
> 03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null
> The return value from the file picker is
> content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000 
> (see android log below)
> Code sample:
> {code}
> navigator.camera.getPicture(onPhotoURISuccess, onFail, {
> quality: 50,
> correctOrientation: true,
> destinationType: destinationType.FILE_URI,
> sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
> mediaType: Camera.MediaType.ALLMEDIA,
> });
> {code}
> Android log: 
> {code}
> 03-14 10:48:31.969: I/ActivityManager(914): Displayed 
> com.android.documentsui/.DocumentsActivity: +146ms (total +172ms)
> 03-14 10:48:31.974: D/Documents(19828): userMode=0, userSortOrder=0 --> 
> mode=2, sortOrder=2
> 03-14 10:48:40.310: D/Documents(19828): userMode=0, userSortOrder=0 --> 
> mode=1, sortOrder=1
> 03-14 10:48:44.279: D/NetlinkSocketObserver(914): 
> NeighborEvent{elapsedMs=447463541, 10.4.67.1, [FEA087606419], RTM_NEWNEIGH, 
> NUD_STALE}
> 03-14 10:48:45.778: D/Documents(19828): userMode=0, userSortOrder=0 --> 
> mode=1, sortOrder=1
> 03-14 10:48:46.192: D/ConnectivityService(914): updateNetworkScore for 
> NetworkAgentInfo [WIFI () - 148] to 55
> 03-14 10:48:48.832: I/Atfwd_Sendcmd(1677): AtCmdFwd service not ready - 
> Exhausted retry attempts - :6
> 03-14 10:48:48.833: I/Atfwd_Daemon(1677): result : -1  ,Init step :2  
>  ,qmiErrorCode: 0
> 03-14 10:48:49.211: D/ConnectivityService(914): updateNetworkScore for 
> NetworkAgentInfo [WIFI () - 148] to 56
> 03-14 10:48:49.243: D/Documents(19828): userMode=0, userSortOrder=0 --> 
> mode=1, sortOrder=1
> 03-14 10:48:52.028: D/Documents(19828): onFinished() 
> [content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000]
> 03-14 10:48:52.049: D/CordovaInterfaceImpl(2469): Sending activity result to 
> plugin
> 03-14 10:48:52.051: D/CameraLauncher(2469): File locaton is: null
> 03-14 10:48:52.056: I/chromium(2469): [INFO:CONSOLE(39)] "onPhotoURISuccess: 
> null", source: 
> file:///android_asset/www/neptune/public/application/z_cats_login_bouvet/js/loglevel-persistlogstrings.js
>  (39)
> {code}
> Related to https://issues.apache.org/jira/browse/CB-10270
> PS Updated android log



--
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] [Comment Edited] (CB-10857) Camera.getPicture return null for Google Drive (camera 2.1.1)

2016-03-15 Thread Dagfinn Parnas (JIRA)

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

Dagfinn Parnas edited comment on CB-10857 at 3/15/16 7:54 AM:
--

Have debugged the issue. 
FileHelper.getRealPathFromURI_API19 is the method which handles the logic. 
In this method DocumentsContract.isDocumentUri(context, uri) returns true, but 
none of the sub if-statements match and therefore it returns null. 

I believe it in this case should return the raw uri via uri.toString(). Example 
uri.toString() 
content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000

If you pass the example uri string above to the File plugin, the file plugin is 
able to read both images and files with no issues. 

Suggest change the following code of FileHelper
{code}
/**
 * @param uri The Uri to check.
 * @return Whether the Uri authority is a GoogleDrive document
 */
public static boolean isGoogleDriveDocument(Uri uri) {
return 
"com.google.android.apps.docs.storage".equals(uri.getAuthority());
}

@SuppressLint("NewApi")
public static String getRealPathFromURI_API19(final Context context, final 
Uri uri) {

// DocumentProvider
if ( DocumentsContract.isDocumentUri(context, uri)) {

// ExternalStorageProvider
if (isExternalStorageDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];

if ("primary".equalsIgnoreCase(type)) {
return Environment.getExternalStorageDirectory() + "/" + 
split[1];
}

// TODO handle non-primary volumes
}
// DownloadsProvider
else if (isDownloadsDocument(uri)) {

final String id = DocumentsContract.getDocumentId(uri);
final Uri contentUri = ContentUris.withAppendedId(
Uri.parse("content://downloads/public_downloads"), 
Long.valueOf(id));

return getDataColumn(context, contentUri, null, null);
}
// MediaProvider
else if (isMediaDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];

Uri contentUri = null;
if ("image".equals(type)) {
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else if ("video".equals(type)) {
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
} else if ("audio".equals(type)) {
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
}

final String selection = "_id=?";
final String[] selectionArgs = new String[] {
split[1]
};

return getDataColumn(context, contentUri, selection, 
selectionArgs);
}else if (isGoogleDriveDocument(uri)){
return uri.toString();
}
}
// MediaStore (and general)
else if ("content".equalsIgnoreCase(uri.getScheme())) {

// Return the remote address
if (isGooglePhotosUri(uri))
return uri.getLastPathSegment();

return getDataColumn(context, uri, null, null);
}
// File
else if ("file".equalsIgnoreCase(uri.getScheme())) {
return uri.getPath();
}

return null;
}
{code}



was (Author: dparnas):
Have debugged the issue. 
FileHelper.getRealPathFromURI_API19 is the method which handles the logic. 
In this method DocumentsContract.isDocumentUri(context, uri) returns true, but 
none of the sub if-statements match and therefore it returns null. 

I believe it in this case should return the raw uri via uri.toString(). Example 
uri.toString() 
content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000

If you pass the example uri string above to the File plugin, the file plugin is 
able to read both images and files with no issues. 

Suggest change the following code of FileHelper
{code}
/**
 * @param uri The Uri to check.
 * @return Whether the Uri authority is a GoogleDrive document
 */
public static boolean isGoogleDriveDocument(Uri uri) {
return 
"com.google.android.apps.docs.storage".equals(uri.getAuthority());
}

@SuppressLint("NewApi")
public static String getRealPathFromURI_API19(final Context context, final 
Uri uri) {

// DocumentProvider
if ( DocumentsContract.isDocumentUri(context, uri)) {

// ExternalStorageProvider
if (isExternalStorageDocument(uri)) {

[jira] [Commented] (CB-10857) Camera.getPicture return null for Google Drive (camera 2.1.1)

2016-03-15 Thread Dagfinn Parnas (JIRA)

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

Dagfinn Parnas commented on CB-10857:
-

Have debugged the issue. 
FileHelper.getRealPathFromURI_API19 is the method which handles the logic. 
In this method DocumentsContract.isDocumentUri(context, uri) returns true, but 
none of the sub if-statements match and therefore it returns null. 

I believe it in this case should return the raw uri via uri.toString(). Example 
uri.toString() 
content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000

If you pass the example uri string above to the File plugin, the file plugin is 
able to read both images and files with no issues. 

Suggest change the following code of FileHelper
{code}
/**
 * @param uri The Uri to check.
 * @return Whether the Uri authority is a GoogleDrive document
 */
public static boolean isGoogleDriveDocument(Uri uri) {
return 
"com.google.android.apps.docs.storage".equals(uri.getAuthority());
}

@SuppressLint("NewApi")
public static String getRealPathFromURI_API19(final Context context, final 
Uri uri) {

// DocumentProvider
if ( DocumentsContract.isDocumentUri(context, uri)) {

// ExternalStorageProvider
if (isExternalStorageDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];

if ("primary".equalsIgnoreCase(type)) {
return Environment.getExternalStorageDirectory() + "/" + 
split[1];
}

// TODO handle non-primary volumes
}
// DownloadsProvider
else if (isDownloadsDocument(uri)) {

final String id = DocumentsContract.getDocumentId(uri);
final Uri contentUri = ContentUris.withAppendedId(
Uri.parse("content://downloads/public_downloads"), 
Long.valueOf(id));

return getDataColumn(context, contentUri, null, null);
}
// MediaProvider
else if (isMediaDocument(uri)) {
final String docId = DocumentsContract.getDocumentId(uri);
final String[] split = docId.split(":");
final String type = split[0];

Uri contentUri = null;
if ("image".equals(type)) {
contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;
} else if ("video".equals(type)) {
contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;
} else if ("audio".equals(type)) {
contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;
}

final String selection = "_id=?";
final String[] selectionArgs = new String[] {
split[1]
};

return getDataColumn(context, contentUri, selection, 
selectionArgs);
}else if (isGoogleDriveDocument(uri)){
return uri.toString();
}
}
// MediaStore (and general)
else if ("content".equalsIgnoreCase(uri.getScheme())) {

// Return the remote address
if (isGooglePhotosUri(uri))
return uri.getLastPathSegment();

return getDataColumn(context, uri, null, null);
}
// File
else if ("file".equalsIgnoreCase(uri.getScheme())) {
return uri.getPath();
}

return null;
}
{code]


> Camera.getPicture return null for Google Drive (camera 2.1.1)
> -
>
> Key: CB-10857
> URL: https://issues.apache.org/jira/browse/CB-10857
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera
>Affects Versions: 2.1.1
> Environment: Android - Tested on 6.0.1
>Reporter: Dagfinn Parnas
>  Labels: android, mustfix, reproduced, triaged
> Attachments: Filepicker_google_drive.png
>
>
> Camera.getPicture returns null for pictures and other files when using Google 
> Drive in version 2.1.1. Other sources in the generic file picker such as 
> Images, Photos and Astro File Manager works. 
> The camera plugin gets a null value in processResultFromGallery
> 03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null
> The return value from the file picker is
> content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000 
> (see android log below)
> Code sample:
> {code}
> navigator.camera.getPicture(onPhotoURISuccess, onFail, {
> quality: 50,
> correctOrientation: true,
> destinationType: 

[jira] [Updated] (CB-10857) Camera.getPicture return null for Google Drive (camera 2.1.1)

2016-03-14 Thread Dagfinn Parnas (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-10857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dagfinn Parnas updated CB-10857:

Description: 
Camera.getPicture returns null for pictures and other files when using Google 
Drive in version 2.1.1. Other sources in the generic file picker such as 
Images, Photos and Astro File Manager works. 


The camera plugin gets a null value in processResultFromGallery
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null

The return value from the file picker is
content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000 
(see android log below)

Code sample:
{code}
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});
{code}

Android log: 
{code}
03-14 10:48:31.969: I/ActivityManager(914): Displayed 
com.android.documentsui/.DocumentsActivity: +146ms (total +172ms)
03-14 10:48:31.974: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=2, 
sortOrder=2
03-14 10:48:40.310: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:44.279: D/NetlinkSocketObserver(914): 
NeighborEvent{elapsedMs=447463541, 10.4.67.1, [FEA087606419], RTM_NEWNEIGH, 
NUD_STALE}
03-14 10:48:45.778: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:46.192: D/ConnectivityService(914): updateNetworkScore for 
NetworkAgentInfo [WIFI () - 148] to 55
03-14 10:48:48.832: I/Atfwd_Sendcmd(1677): AtCmdFwd service not ready - 
Exhausted retry attempts - :6
03-14 10:48:48.833: I/Atfwd_Daemon(1677): result : -1,Init step :2   
,qmiErrorCode: 0
03-14 10:48:49.211: D/ConnectivityService(914): updateNetworkScore for 
NetworkAgentInfo [WIFI () - 148] to 56
03-14 10:48:49.243: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:52.028: D/Documents(19828): onFinished() 
[content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000]
03-14 10:48:52.049: D/CordovaInterfaceImpl(2469): Sending activity result to 
plugin
03-14 10:48:52.051: D/CameraLauncher(2469): File locaton is: null
03-14 10:48:52.056: I/chromium(2469): [INFO:CONSOLE(39)] "onPhotoURISuccess: 
null", source: 
file:///android_asset/www/neptune/public/application/z_cats_login_bouvet/js/loglevel-persistlogstrings.js
 (39)
{code}

Related to https://issues.apache.org/jira/browse/CB-10270

PS Updated android log

  was:
Camera.getPicture returns null for pictures and other files when using Google 
Drive in version 2.1.1. Other sources in the generic file picker such as 
Images, Photos and Astro File Manager works. 


The camera plugin gets a null value in processResultFromGallery
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null

Code sample:
{code}
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});
{code}

Android log: 
{code}
03-14 10:48:31.969: I/ActivityManager(914): Displayed 
com.android.documentsui/.DocumentsActivity: +146ms (total +172ms)
03-14 10:48:31.974: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=2, 
sortOrder=2
03-14 10:48:40.310: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:44.279: D/NetlinkSocketObserver(914): 
NeighborEvent{elapsedMs=447463541, 10.4.67.1, [FEA087606419], RTM_NEWNEIGH, 
NUD_STALE}
03-14 10:48:45.778: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:46.192: D/ConnectivityService(914): updateNetworkScore for 
NetworkAgentInfo [WIFI () - 148] to 55
03-14 10:48:48.832: I/Atfwd_Sendcmd(1677): AtCmdFwd service not ready - 
Exhausted retry attempts - :6
03-14 10:48:48.833: I/Atfwd_Daemon(1677): result : -1,Init step :2   
,qmiErrorCode: 0
03-14 10:48:49.211: D/ConnectivityService(914): updateNetworkScore for 
NetworkAgentInfo [WIFI () - 148] to 56
03-14 10:48:49.243: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:52.028: D/Documents(19828): onFinished() 
[content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000]
03-14 10:48:52.049: D/CordovaInterfaceImpl(2469): Sending activity result to 
plugin
03-14 10:48:52.051: D/CameraLauncher(2469): File locaton is: null
03-14 10:48:52.056: I/chromium(2469): [INFO:CONSOLE(39)] "onPhotoURISuccess: 
null", source: 
file:///android_asset/www/neptune/public/application/z_cats_login_bouvet/js/loglevel-persistlogstrings.js
 (39)
{code}

Related to https://issues.apache.org/jira/browse/CB-10270

PS Updated android 

[jira] [Updated] (CB-10857) Camera.getPicture return null for Google Drive (camera 2.1.1)

2016-03-14 Thread Dagfinn Parnas (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-10857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dagfinn Parnas updated CB-10857:

Description: 
Camera.getPicture returns null for pictures and other files when using Google 
Drive in version 2.1.1. Other sources in the generic file picker such as 
Images, Photos and Astro File Manager works. 


The camera plugin gets a null value in processResultFromGallery
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null

Code sample:
{code}
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});
{code}

Android log: 
{code}
03-14 10:48:31.969: I/ActivityManager(914): Displayed 
com.android.documentsui/.DocumentsActivity: +146ms (total +172ms)
03-14 10:48:31.974: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=2, 
sortOrder=2
03-14 10:48:40.310: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:44.279: D/NetlinkSocketObserver(914): 
NeighborEvent{elapsedMs=447463541, 10.4.67.1, [FEA087606419], RTM_NEWNEIGH, 
NUD_STALE}
03-14 10:48:45.778: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:46.192: D/ConnectivityService(914): updateNetworkScore for 
NetworkAgentInfo [WIFI () - 148] to 55
03-14 10:48:48.832: I/Atfwd_Sendcmd(1677): AtCmdFwd service not ready - 
Exhausted retry attempts - :6
03-14 10:48:48.833: I/Atfwd_Daemon(1677): result : -1,Init step :2   
,qmiErrorCode: 0
03-14 10:48:49.211: D/ConnectivityService(914): updateNetworkScore for 
NetworkAgentInfo [WIFI () - 148] to 56
03-14 10:48:49.243: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:48:52.028: D/Documents(19828): onFinished() 
[content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000]
03-14 10:48:52.049: D/CordovaInterfaceImpl(2469): Sending activity result to 
plugin
03-14 10:48:52.051: D/CameraLauncher(2469): File locaton is: null
03-14 10:48:52.056: I/chromium(2469): [INFO:CONSOLE(39)] "onPhotoURISuccess: 
null", source: 
file:///android_asset/www/neptune/public/application/z_cats_login_bouvet/js/loglevel-persistlogstrings.js
 (39)
{code}

Related to https://issues.apache.org/jira/browse/CB-10270

PS Updated android log

  was:
Camera.getPicture returns null for pictures and other files when using Google 
Drive in version 2.1.1. Other sources in the generic file picker such as 
Images, Photos and Astro File Manager works. 

Android log indicates exception android.os.OperationCanceledException being 
thrown. (the operation in Google drive source of the file picker was not 
cancelled, but a file in it was clicked) 

The camera plugin gets a null value in processResultFromGallery
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null

Code sample:
{code}
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});
{code}

Android log: 
{code}
03-14 10:20:58.628: I/ActivityManager(914): Displayed 
com.android.documentsui/.DocumentsActivity: +171ms (total +204ms)
03-14 10:20:58.633: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:20:58.637: W/Documents(19828): Failed to query
03-14 10:20:58.637: W/Documents(19828): android.os.OperationCanceledException: 
The operation has been canceled.
03-14 10:20:58.637: W/Documents(19828): at 
android.os.CancellationSignal.throwIfCanceled(CancellationSignal.java:54)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.ContentProviderClient.query(ContentProviderClient.java:132)
03-14 10:20:58.637: W/Documents(19828): at 
com.android.documentsui.DirectoryLoader.loadInBackground(DirectoryLoader.java:167)
03-14 10:20:58.637: W/Documents(19828): at 
com.android.documentsui.DirectoryLoader.loadInBackground(DirectoryLoader.java:94)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:66)
03-14 10:20:58.637: W/Documents(19828): at 
android.os.AsyncTask$2.call(AsyncTask.java:295)
03-14 10:20:58.637: W/Documents(19828): at 
java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-14 10:20:58.637: W/Documents(19828): at 

[jira] [Updated] (CB-10857) Camera.getPicture return null for Google Drive (camera 2.1.1)

2016-03-14 Thread Dagfinn Parnas (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-10857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dagfinn Parnas updated CB-10857:

Attachment: Filepicker_google_drive.png

> Camera.getPicture return null for Google Drive (camera 2.1.1)
> -
>
> Key: CB-10857
> URL: https://issues.apache.org/jira/browse/CB-10857
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera
>Affects Versions: 2.1.1
> Environment: Android - Tested on 6.0.1
>Reporter: Dagfinn Parnas
> Attachments: Filepicker_google_drive.png
>
>
> Camera.getPicture returns null for pictures and other files when using Google 
> Drive in version 2.1.1. Other sources in the generic file picker such as 
> Images, Photos and Astro File Manager works. 
> Android log indicates exception android.os.OperationCanceledException being 
> thrown. (the operation in Google drive source of the file picker was not 
> cancelled, but a file in it was clicked) 
> The camera plugin gets a null value in processResultFromGallery
> 03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null
> Code sample:
> {code}
> navigator.camera.getPicture(onPhotoURISuccess, onFail, {
> quality: 50,
> correctOrientation: true,
> destinationType: destinationType.FILE_URI,
> sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
> mediaType: Camera.MediaType.ALLMEDIA,
> });
> {code}
> Android log: 
> {code}
> 03-14 10:20:58.628: I/ActivityManager(914): Displayed 
> com.android.documentsui/.DocumentsActivity: +171ms (total +204ms)
> 03-14 10:20:58.633: D/Documents(19828): userMode=0, userSortOrder=0 --> 
> mode=1, sortOrder=1
> 03-14 10:20:58.637: W/Documents(19828): Failed to query
> 03-14 10:20:58.637: W/Documents(19828): 
> android.os.OperationCanceledException: The operation has been canceled.
> 03-14 10:20:58.637: W/Documents(19828):   at 
> android.os.CancellationSignal.throwIfCanceled(CancellationSignal.java:54)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> android.content.ContentProviderClient.query(ContentProviderClient.java:132)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> com.android.documentsui.DirectoryLoader.loadInBackground(DirectoryLoader.java:167)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> com.android.documentsui.DirectoryLoader.loadInBackground(DirectoryLoader.java:94)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:66)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> android.os.AsyncTask$2.call(AsyncTask.java:295)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> java.util.concurrent.FutureTask.run(FutureTask.java:237)
> 03-14 10:20:58.637: W/Documents(19828):   at 
> com.android.documentsui.ProviderExecutor.run(ProviderExecutor.java:107)
> 03-14 10:20:58.640: D/Documents(19828): userMode=0, userSortOrder=0 --> 
> mode=1, sortOrder=1
> 03-14 10:20:59.061: I/ServiceManager(23521): Waiting for service AtCmdFwd...
> 03-14 10:20:59.758: D/NetlinkSocketObserver(914): 
> NeighborEvent{elapsedMs=445799021, 10.4.67.1, [FEA087606419], RTM_NEWNEIGH, 
> NUD_REACHABLE}
> 03-14 10:21:00.035: D/Documents(19828): onFinished() 
> [content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000]
> 03-14 10:21:00.061: I/ServiceManager(23521): Waiting for service AtCmdFwd...
> 03-14 10:21:00.063: D/CordovaInterfaceImpl(21662): Sending activity result to 
> plugin
> 03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null
> 03-14 10:21:00.104: D/cr_Ime(21662): [ImeAdapter.java:140] 
> onCreateInputConnection returns null.
> 03-14 10:21:00.119: I/chromium(21662): [INFO:CONSOLE(39)] "onPhotoURISuccess: 
> null", source: 
> file:///android_asset/www/neptune/public/application/z_cats_login_bouvet/js/loglevel-persistlogstrings.js
>  (39)
> {code}
> Related to https://issues.apache.org/jira/browse/CB-10270



--
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] [Comment Edited] (CB-10270) camera.getPicture() returns an empty string

2016-03-14 Thread Dagfinn Parnas (JIRA)

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

Dagfinn Parnas edited comment on CB-10270 at 3/14/16 9:38 AM:
--

[~jcesarmobile] can confirm that in general it's working with version 2.1.1.
Have however discovered that with Google Drive returns a blank string. 

Testing on Android 6.0.1 and using the following options
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});

[~riknoll] Reported this as https://issues.apache.org/jira/browse/CB-10857


was (Author: dparnas):
[~jcesarmobile] can confirm that in general it's working with version 2.1.1.
Have however discovered that with Google Drive returns a blank string. 

Testing on Android 6.0.1 and using the following options
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});

[~riknoll] Should this be reported as a separate issue?

> camera.getPicture() returns an empty string
> ---
>
> Key: CB-10270
> URL: https://issues.apache.org/jira/browse/CB-10270
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera
>Affects Versions: 2.1.0
> Environment: Android 4.4.2 (api 19)
>Reporter: Alexander Sorokin
>Priority: Critical
>  Labels: android, mustfix, reproduced, triaged
> Attachments: mobilespec-camera.7z
>
>
> Code sample to reproduce:
> {code}
> navigator.camera.getPicture(onSuccess, onFail, { 
> destinationType: Camera.DestinationType.FILE_URI,
> sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
> correctOrientation: true
> });
> {code}
> {{onSuccess}} is called with an empty string as an argument.
> if {{correctOrientation}} is {{false}}, everything works as expected.



--
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] [Created] (CB-10857) Camera.getPicture return null for Google Drive (camera 2.1.1)

2016-03-14 Thread Dagfinn Parnas (JIRA)
Dagfinn Parnas created CB-10857:
---

 Summary: Camera.getPicture return null for Google Drive (camera 
2.1.1)
 Key: CB-10857
 URL: https://issues.apache.org/jira/browse/CB-10857
 Project: Apache Cordova
  Issue Type: Bug
  Components: Plugin Camera
Affects Versions: 2.1.1
 Environment: Android - Tested on 6.0.1
Reporter: Dagfinn Parnas


Camera.getPicture returns null for pictures and other files when using Google 
Drive in version 2.1.1. Other sources in the generic file picker such as 
Images, Photos and Astro File Manager works. 

Android log indicates exception android.os.OperationCanceledException being 
thrown. (the operation in Google drive source of the file picker was not 
cancelled, but a file in it was clicked) 

The camera plugin gets a null value in processResultFromGallery
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null

Code sample:
{code}
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});
{code}

Android log: 
03-14 10:20:58.628: I/ActivityManager(914): Displayed 
com.android.documentsui/.DocumentsActivity: +171ms (total +204ms)
03-14 10:20:58.633: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:20:58.637: W/Documents(19828): Failed to query
03-14 10:20:58.637: W/Documents(19828): android.os.OperationCanceledException: 
The operation has been canceled.
03-14 10:20:58.637: W/Documents(19828): at 
android.os.CancellationSignal.throwIfCanceled(CancellationSignal.java:54)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.ContentProviderClient.query(ContentProviderClient.java:132)
03-14 10:20:58.637: W/Documents(19828): at 
com.android.documentsui.DirectoryLoader.loadInBackground(DirectoryLoader.java:167)
03-14 10:20:58.637: W/Documents(19828): at 
com.android.documentsui.DirectoryLoader.loadInBackground(DirectoryLoader.java:94)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:66)
03-14 10:20:58.637: W/Documents(19828): at 
android.os.AsyncTask$2.call(AsyncTask.java:295)
03-14 10:20:58.637: W/Documents(19828): at 
java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-14 10:20:58.637: W/Documents(19828): at 
com.android.documentsui.ProviderExecutor.run(ProviderExecutor.java:107)
03-14 10:20:58.640: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:20:59.061: I/ServiceManager(23521): Waiting for service AtCmdFwd...
03-14 10:20:59.758: D/NetlinkSocketObserver(914): 
NeighborEvent{elapsedMs=445799021, 10.4.67.1, [FEA087606419], RTM_NEWNEIGH, 
NUD_REACHABLE}
03-14 10:21:00.035: D/Documents(19828): onFinished() 
[content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000]
03-14 10:21:00.061: I/ServiceManager(23521): Waiting for service AtCmdFwd...
03-14 10:21:00.063: D/CordovaInterfaceImpl(21662): Sending activity result to 
plugin
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null
03-14 10:21:00.104: D/cr_Ime(21662): [ImeAdapter.java:140] 
onCreateInputConnection returns null.
03-14 10:21:00.119: I/chromium(21662): [INFO:CONSOLE(39)] "onPhotoURISuccess: 
null", source: 
file:///android_asset/www/neptune/public/application/z_cats_login_bouvet/js/loglevel-persistlogstrings.js
 (39)


Related to https://issues.apache.org/jira/browse/CB-10270



--
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] [Updated] (CB-10857) Camera.getPicture return null for Google Drive (camera 2.1.1)

2016-03-14 Thread Dagfinn Parnas (JIRA)

 [ 
https://issues.apache.org/jira/browse/CB-10857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dagfinn Parnas updated CB-10857:

Description: 
Camera.getPicture returns null for pictures and other files when using Google 
Drive in version 2.1.1. Other sources in the generic file picker such as 
Images, Photos and Astro File Manager works. 

Android log indicates exception android.os.OperationCanceledException being 
thrown. (the operation in Google drive source of the file picker was not 
cancelled, but a file in it was clicked) 

The camera plugin gets a null value in processResultFromGallery
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null

Code sample:
{code}
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});
{code}

Android log: 
{code}
03-14 10:20:58.628: I/ActivityManager(914): Displayed 
com.android.documentsui/.DocumentsActivity: +171ms (total +204ms)
03-14 10:20:58.633: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:20:58.637: W/Documents(19828): Failed to query
03-14 10:20:58.637: W/Documents(19828): android.os.OperationCanceledException: 
The operation has been canceled.
03-14 10:20:58.637: W/Documents(19828): at 
android.os.CancellationSignal.throwIfCanceled(CancellationSignal.java:54)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.ContentProviderClient.query(ContentProviderClient.java:132)
03-14 10:20:58.637: W/Documents(19828): at 
com.android.documentsui.DirectoryLoader.loadInBackground(DirectoryLoader.java:167)
03-14 10:20:58.637: W/Documents(19828): at 
com.android.documentsui.DirectoryLoader.loadInBackground(DirectoryLoader.java:94)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:312)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:69)
03-14 10:20:58.637: W/Documents(19828): at 
android.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:66)
03-14 10:20:58.637: W/Documents(19828): at 
android.os.AsyncTask$2.call(AsyncTask.java:295)
03-14 10:20:58.637: W/Documents(19828): at 
java.util.concurrent.FutureTask.run(FutureTask.java:237)
03-14 10:20:58.637: W/Documents(19828): at 
com.android.documentsui.ProviderExecutor.run(ProviderExecutor.java:107)
03-14 10:20:58.640: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:20:59.061: I/ServiceManager(23521): Waiting for service AtCmdFwd...
03-14 10:20:59.758: D/NetlinkSocketObserver(914): 
NeighborEvent{elapsedMs=445799021, 10.4.67.1, [FEA087606419], RTM_NEWNEIGH, 
NUD_REACHABLE}
03-14 10:21:00.035: D/Documents(19828): onFinished() 
[content://com.google.android.apps.docs.storage/document/acc%3D1%3Bdoc%3D3000]
03-14 10:21:00.061: I/ServiceManager(23521): Waiting for service AtCmdFwd...
03-14 10:21:00.063: D/CordovaInterfaceImpl(21662): Sending activity result to 
plugin
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null
03-14 10:21:00.104: D/cr_Ime(21662): [ImeAdapter.java:140] 
onCreateInputConnection returns null.
03-14 10:21:00.119: I/chromium(21662): [INFO:CONSOLE(39)] "onPhotoURISuccess: 
null", source: 
file:///android_asset/www/neptune/public/application/z_cats_login_bouvet/js/loglevel-persistlogstrings.js
 (39)
{code}

Related to https://issues.apache.org/jira/browse/CB-10270

  was:
Camera.getPicture returns null for pictures and other files when using Google 
Drive in version 2.1.1. Other sources in the generic file picker such as 
Images, Photos and Astro File Manager works. 

Android log indicates exception android.os.OperationCanceledException being 
thrown. (the operation in Google drive source of the file picker was not 
cancelled, but a file in it was clicked) 

The camera plugin gets a null value in processResultFromGallery
03-14 10:21:00.066: D/CameraLauncher(21662): File locaton is: null

Code sample:
{code}
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});
{code}

Android log: 
03-14 10:20:58.628: I/ActivityManager(914): Displayed 
com.android.documentsui/.DocumentsActivity: +171ms (total +204ms)
03-14 10:20:58.633: D/Documents(19828): userMode=0, userSortOrder=0 --> mode=1, 
sortOrder=1
03-14 10:20:58.637: W/Documents(19828): Failed to query
03-14 10:20:58.637: W/Documents(19828): 

[jira] [Commented] (CB-10270) camera.getPicture() returns an empty string

2016-03-14 Thread Dagfinn Parnas (JIRA)

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

Dagfinn Parnas commented on CB-10270:
-

[~jcesarmobile] can confirm that in general it's working with version 2.1.1.
Have however discovered that with Google Drive returns a blank string. 

Testing on Android 6.0.1 and using the following options
navigator.camera.getPicture(onPhotoURISuccess, onFail, {
quality: 50,
correctOrientation: true,
destinationType: destinationType.FILE_URI,
sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
mediaType: Camera.MediaType.ALLMEDIA,

});

[~riknoll] Should this be reported as a separate issue?

> camera.getPicture() returns an empty string
> ---
>
> Key: CB-10270
> URL: https://issues.apache.org/jira/browse/CB-10270
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera
>Affects Versions: 2.1.0
> Environment: Android 4.4.2 (api 19)
>Reporter: Alexander Sorokin
>Priority: Critical
>  Labels: android, mustfix, reproduced, triaged
> Attachments: mobilespec-camera.7z
>
>
> Code sample to reproduce:
> {code}
> navigator.camera.getPicture(onSuccess, onFail, { 
> destinationType: Camera.DestinationType.FILE_URI,
> sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
> correctOrientation: true
> });
> {code}
> {{onSuccess}} is called with an empty string as an argument.
> if {{correctOrientation}} is {{false}}, everything works as expected.



--
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-10270) camera.getPicture() returns an empty string

2016-03-07 Thread Dagfinn Parnas (JIRA)

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

Dagfinn Parnas commented on CB-10270:
-

[~riknoll] any idea on when the PR can be resolved and when a new version of 
the camera plugin is published to NPM? 
Have a large GoLive soon which is dependent on this fix and need to plan our 
options accordingly (currently using phonegap build, so can only use plugins 
which are published on npm)

> camera.getPicture() returns an empty string
> ---
>
> Key: CB-10270
> URL: https://issues.apache.org/jira/browse/CB-10270
> Project: Apache Cordova
>  Issue Type: Bug
>  Components: Plugin Camera
>Affects Versions: 2.1.0
> Environment: Android 4.4.2 (api 19)
>Reporter: Alexander Sorokin
>Priority: Critical
>  Labels: android, mustfix, reproduced, triaged
> Attachments: mobilespec-camera.7z
>
>
> Code sample to reproduce:
> {code}
> navigator.camera.getPicture(onSuccess, onFail, { 
> destinationType: Camera.DestinationType.FILE_URI,
> sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
> correctOrientation: true
> });
> {code}
> {{onSuccess}} is called with an empty string as an argument.
> if {{correctOrientation}} is {{false}}, everything works as expected.



--
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] [Created] (CB-9941) InAppBrowser support for Safari View Controller on iOS9

2015-11-03 Thread Dagfinn Parnas (JIRA)
Dagfinn Parnas created CB-9941:
--

 Summary: InAppBrowser support for Safari View Controller on iOS9
 Key: CB-9941
 URL: https://issues.apache.org/jira/browse/CB-9941
 Project: Apache Cordova
  Issue Type: Improvement
  Components: Plugin InAppBrowser
 Environment: iOS9
Reporter: Dagfinn Parnas


Apple introduced Safari View Controller in iOS9 in order to improve the 
interaction between apps that includes external web content. 

In Cordova, the interaction with external web content is handled through the 
InAppBrowser plugin. 

We've already experienced that Apple asks questions as part of the approval 
process related to support of Safari View Controller. Other cordova apps in the 
App Store will most likely experience the same. 

We hope support for Safari View Controller can be added to the InAppBrowser. 
There is a third-party plugin for it 
(https://github.com/EddyVerbruggen/cordova-plugin-safariviewcontroller) , but 
we would argue that such an important feature ought to be part of a plugin 
maintained by the Apache Software Foundation. 

As a commercial entity we need to rely on mature and proven solutions that will 
be maintained in the future and are not dependent on any one individual.





--
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