[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16457860#comment-16457860 ] Giuliano Pascali commented on CB-5398: -- Hi guys after a day I found a solution it works for me. My target was to upload without edit photo from gallery with two fast clicks. The solution I found was to copy the file that we can't access and put in the src of our img. Then we use the copy. Here is the full code. Hope you enjoy. One time I can give my part. $(document).ready(function(){ // Take photo from camera $('#but_take').click(function(){ navigator.camera.getPicture(onSuccess, onFail, { quality: 20, destinationType: Camera.DestinationType.FILE_URL }); }); // Take photo from gallery $("#but_select").click(function(){ capturePhoto() }); function onFail(message) { alert('Failed because: ' + message); } function capturePhoto() { navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, destinationType: Camera.DestinationType.FILE_URI, savePhotoToAlbum : true }); } function onPhotoURISuccess(imageURI) { createFileEntry(imageURI); } function createFileEntry(imageURI) { window.resolveLocalFileSystemURI(imageURI, copyPhoto, fail); } function copyPhoto(fileEntry) { window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSys) { fileSys.root.getDirectory("photos", \{create: true, exclusive: false}, function(dir) { fileEntry.copyTo(dir, "file.jpg", onCopySuccess, fail); }, fail); }, fail); } function onCopySuccess(entry) { //alert(entry.toURL()) var image = document.getElementById('img'); image.src = entry.toURL() + '?' + Math.random(); console.log(entry.fullPath) } function fail(error) { console.log(error.code); } }); Take photo Select photo from Gallery > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: cordova-android, cordova-plugin-camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: jcesarmobile >Assignee: Mike Billau >Priority: Major > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v7.6.3#76005) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15085573#comment-15085573 ] Nicolas Hernandez commented on CB-5398: --- Hey guys, I tried to make changes and give you solutions but none of them work for me. I'm having the same problem on Android, if an image is downloaded, sent by social networks or other means when charging everything works fine, also for handling the picture or upload it to a server but if it's a recent picture and the different folders offered by new operating systems do not work for me. CameraLauncher.java modify the file, also my app.js file (Working with ionic), update the plugin to version 1.2.0 expecting it to work but mistake again. It's strange when the path of a downloaded image is equal to one obtained from the folders. What is the right solution? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: jcesarmobile >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- 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-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14492562#comment-14492562 ] Julien Feltesse commented on CB-5398: - Sorry for reviving this thread but I am still running into this issue ("%3A" instead of ":" in the URL, "requires android.permission.MANAGE_DOCUMENTS" warning etc.) Tested on a stock HTC One Mini running android 4.4.2 and on a Nexus 5 running android 5.1. On both phones, the cordova application (in my case, an ionic app) crashes after selecting a picture when "allowEdit" is set to false. Taking a picture works fine. - I tried to use the plugin's version 0.3.6 and master, to no avail. - cordova -v shows "4.3.0" - the file at platforms/android/CordovaLib/src/org/apache/cordova/IceCreamCordovaWebViewClient.java contains the needsKitKatContentUrlFix method. Any pointers? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: jcesarmobile >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- 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-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011138#comment-14011138 ] Roy Ackermann commented on CB-5398: --- [~mrbillau] [CB-6761|https://issues.apache.org/jira/browse/CB-6761] > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14011109#comment-14011109 ] Mike Billau commented on CB-5398: - [~roy_lecare], I was unable to reproduce the error with your code on Cordova 3.5, Camera 0.2.9 What "source" were you using to select the picture from? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008926#comment-14008926 ] Roy Ackermann commented on CB-5398: --- Now i have installed cordova 3.5 and camera plugin 0.2.9 When i call {code:title=Code|borderStyle=solid} navigator.camera.getPicture(onSuccessGetPhoto, onFailCamera, { targetWidth: 1000,targetHeight: 1000, quality: 65, destinationType: Camera.DestinationType.FILE_URI , saveToPhotoAlbum: false , sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM, correctOrientation:true}); {code} i get the following error: {panel:title=error|titleBGColor=#CE|bgColor=#CE} Could get real path for URI string content://com.android.providers.media.documents/document/image%3A1415 {panel} The success callback and error callback will not be called. If i call the function again, the first and the second image will be processed. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13992742#comment-13992742 ] ASF subversion and git services commented on CB-5398: - Commit 30a75e3fa7d139ce9961b84066293770746d2549 in cordova-plugin-camera's branch refs/heads/master from [~mrbillau] [ https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-camera.git;h=30a75e3 ] Removed invalid note from CB-5398 > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13978074#comment-13978074 ] Markus Voss commented on CB-5398: - this worked for me! Thanks! :) > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13977745#comment-13977745 ] Andrew Grieve commented on CB-5398: --- Filed this as a separate issue (CB-6494). Look there for fix details. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13977552#comment-13977552 ] Randy Lau commented on CB-5398: --- I managed to get a temporary fix working, in line with what people mentioned above in previous months. I based this from the stackoverflow solution Mike Billau suggested here: http://stackoverflow.com/a/20559175/368762 I haven't tested this extensively on any phone other than HTC One on Android 4.4, so let me know if you see any potential gotchas or run into any issues. In /platforms/android/src/org/apache/cordova/camera/CameraLauncher.java {code} private void processResultFromGallery(int destType, Intent intent) { Uri uri = intent.getData(); // process the uri with string detection Context currentContext = this.cordova.getActivity().getApplicationContext(); String processedUriString = getPath(currentContext, uri); Uri newUri = Uri.parse(processedUriString); uri = newUri; {code} And I added these file utility functions in CameraLauncher.java: {code} //Additions for stackoverflow answer on handling different media providers import android.content.ContentResolver; import android.content.ContentUris; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.DatabaseUtils; import android.graphics.Bitmap; import android.net.Uri; import android.os.Build; import android.os.Environment; import android.provider.DocumentsContract; import android.provider.MediaStore; import android.util.Log; import android.webkit.MimeTypeMap; import java.io.File; import java.io.FileFilter; import java.text.DecimalFormat; import java.util.Comparator; {code} {code} /** * Get a file path from a Uri. This will get the the path for Storage Access * Framework Documents, as well as the _data field for the MediaStore and * other file-based ContentProviders. * * //@param context The context. * //@param uri The Uri to query. * //@author paulburke */ public static String getPath(final Context context, final Uri uri) { final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; // DocumentProvider if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) { LOG.e("IceCreamCordovaWebViewClient", "isKitKat + DocumentsContract"); // ExternalStorageProvider if (isExternalStorageDocument(uri)) { LOG.e("IceCreamCordovaWebViewClient", "isKitKat + external storage doc"); 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)) { LOG.e("IceCreamCordovaWebViewClient", "isKitKat + isDownloadsDocument storage doc"); 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)) { LOG.e("IceCreamCordovaWebViewClient", "isKitKat + isMediaDocument storage doc"); 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); } } // MediaStore (and general) else if ("content".equalsIgnoreCase(uri.getScheme())) { LOG.e("IceCreamCordovaWebViewClient", "isKitKat + MediaStore storage doc"); return getDataColumn(context, uri, null, null); } // File else if ("file".equalsIgnoreCase(uri.getScheme())) {
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976727#comment-13976727 ] David Pesce commented on CB-5398: - Bummer, that worked for me. Shoot me an email and we can chat/troubleshoot. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976725#comment-13976725 ] Markus Voss commented on CB-5398: - thanks for the quick reply David. Unfortunately this did not solve my problem. I added the plugin but I still have the same problem :( > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976715#comment-13976715 ] David Pesce commented on CB-5398: - I'm taking a guess here, but I think it's this Plugin - https://github.com/apache/cordova-plugins/tree/master/file-system-roots The current dev branch of camera fixes this issue, but here's the gist of it. The camera saves to the root filesystem and by default Cordova doesn't have access to it. So you need to add the file-system-root plugin to allow the right permissions. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13976703#comment-13976703 ] Markus Voss commented on CB-5398: - I have the same permission problem the full stack trace is: E/DatabaseUtils( 1019): Writing exception to parcel E/DatabaseUtils( 1019): java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image:1376 from pid=8417, uid=10096 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission() E/DatabaseUtils( 1019): at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:467) E/DatabaseUtils( 1019): at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:394) E/DatabaseUtils( 1019): at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:387) E/DatabaseUtils( 1019): at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:339) E/DatabaseUtils( 1019): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:305) E/DatabaseUtils( 1019): at android.os.Binder.execTransact(Binder.java:404) E/DatabaseUtils( 1019): at dalvik.system.NativeStart.run(Native Method) E/AndroidProtocolHandler( 8417): Unable to open content URL: content://com.android.providers.media.documents/document/image%3A1376 > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975215#comment-13975215 ] Randy Lau commented on CB-5398: --- Julian - having the same issue as well. I tried merging in their changes to IceCreamCordovaWebViewClient.java. This change fixed a GET error I saw before the change: ("GET content://com.android.providers.media.documents/document/image%3A13966"). However, I'm still getting the Android permissions issue: ("java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image:13966 from pid=10618, uid=10287 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission()") Am I missing something? I have the MANAGE_DOCUMENTS and INTERNET permissions in my AndroidManifest.xml as well. IceCreamCordovaWebViewClient.java code below: package org.apache.cordova; import java.io.FileNotFoundException; import java.io.IOException; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CordovaResourceApi.OpenForReadResult; import org.apache.cordova.LOG; import android.annotation.TargetApi; import android.net.Uri; import android.os.Build; import android.webkit.WebResourceResponse; import android.webkit.WebView; @TargetApi(Build.VERSION_CODES.HONEYCOMB) public class IceCreamCordovaWebViewClient extends CordovaWebViewClient { private static final String TAG = "IceCreamCordovaWebViewClient"; public IceCreamCordovaWebViewClient(CordovaInterface cordova) { super(cordova); } public IceCreamCordovaWebViewClient(CordovaInterface cordova, CordovaWebView view) { super(cordova, view); } @Override public WebResourceResponse shouldInterceptRequest(WebView view, String url) { try { // Check the against the white-list. if ((url.startsWith("http:") || url.startsWith("https:")) && !Config.isUrlWhiteListed(url)) { LOG.w(TAG, "URL blocked by whitelist: " + url); // Results in a 404. return new WebResourceResponse("text/plain", "UTF-8", null); } CordovaResourceApi resourceApi = appView.getResourceApi(); Uri origUri = Uri.parse(url); // Allow plugins to intercept WebView requests. Uri remappedUri = resourceApi.remapUri(origUri); if (!origUri.equals(remappedUri) || needsSpecialsInAssetUrlFix(origUri) || needsKitKatContentUrlFix(origUri)) { OpenForReadResult result = resourceApi.openForRead(remappedUri, true); return new WebResourceResponse(result.mimeType, "UTF-8", result.inputStream); } // If we don't need to special-case the request, let the browser load it. return null; } catch (IOException e) { if (!(e instanceof FileNotFoundException)) { LOG.e("IceCreamCordovaWebViewClient", "Error occurred while loading a file (returning a 404).", e); } // Results in a 404. return new WebResourceResponse("text/plain", "UTF-8", null); } } private static boolean needsKitKatContentUrlFix(Uri uri) { return android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT && "content".equals(uri.getScheme()); } private static boolean needsSpecialsInAssetUrlFix(Uri uri) { if (CordovaResourceApi.getUriType(uri) != CordovaResourceApi.URI_TYPE_ASSET) { return false; } if (uri.getQuery() != null || uri.getFragment() != null) { return true; } if (!uri.toString().contains("%")) { return false; } switch(android.os.Build.VERSION.SDK_INT){ case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH: case android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1: return true; } return false; } } > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13973568#comment-13973568 ] Julian Frumar commented on CB-5398: --- In KitKat when I pick an image using the org.apache.cordova.camera plugin (https://github.com/apache/cordova-plugin-camera), I am returned to the WebView and I can display the selected image using the returned URL (e.g. content://com.android.providers.media.documents/document/image%3A75043). I then try to upload the selected image to our webserver using the org.apache.cordova.file-transfer plugin (https://github.com/apache/cordova-plugin-file-transfer) and I receive the permission denied message: E/DatabaseUtils(25735): java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image:75043 from pid=10102, uid=10312 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission() Everyone in here is talking as though the issue was resolved, so am I missing something? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13945961#comment-13945961 ] Mateusz Wielgos commented on CB-5398: - This issue is marked as resolved, but I am having problems. I am having this issue on Android 4.4.2. I am using latest cordova-cli, cordova-android, cordova-plugin-file-transfer and cordova-plugin-file from master branches. For navigator.camera.getPicture, I tried to use both NATIVE_URI and FILE_URI. FileTransfer error callback gets called. Looking at FileTransferError properties, they are as follows: code: null source: null target: null http_status: null The image URI passed in, with camera.DestinationType.NATIVE_URI is : content://com.android.providers.media.documents/document/image%3A85 . The image URI passed in, with camera.DestinationType.FILE_URI is exactly the same. I can't go the DATA_URL route as Android 4.0-4.3 support for Blob XHR is non-existent, see : https://code.google.com/p/android/issues/detail?id=39882 . Tried the same thing on Android 4.2.2, no issues. Ideas / help? Thanks! > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904536#comment-13904536 ] Ian Clelland commented on CB-5398: -- Well, Data-URLs can be *very* large; I don't recall what the internal representation of strings in WebKit is; but a base64 representation is at least 133% the size of the source; 266% if it's represented in UCS-2. I wouldn't be surprised at all if a file which technically could fit in RAM would cause an OutOfMemory exception if it were converted to a base64 string and then passed across the bridge. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904521#comment-13904521 ] ASF subversion and git services commented on CB-5398: - Commit d4224e1098ae447a01ad22542b43c9866115d9fb in cordova-amazon-fireos's branch refs/heads/master from [~agrieve] [ https://git-wip-us.apache.org/repos/asf?p=cordova-amazon-fireos.git;h=d4224e1 ] CB-5398 Apply KitKat content URI fix to all content URIs > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13904520#comment-13904520 ] ASF subversion and git services commented on CB-5398: - Commit 5211319f41c46ee287259ba6a48a3a3bc42fb95d in cordova-amazon-fireos's branch refs/heads/master from [~agrieve] [ https://git-wip-us.apache.org/repos/asf?p=cordova-amazon-fireos.git;h=5211319 ] CB-5398 Work-around for KitKat content: URLs not rendering in tags > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901804#comment-13901804 ] Mike Billau commented on CB-5398: - Thanks for looking at this! I've been testing the update and it all seems good, I can access images from any source now, no matter what I set the destination_type to. I did see that sometimes pulling an image from Drive with data_url will cause the app to quit with an Out Of Memory error, even when the same image can be opened with destination_type=file_uri. I can't reproduce this reliably though, I think it might be the known issue of the Camera app shutting down. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901582#comment-13901582 ] ASF subversion and git services commented on CB-5398: - Commit 7741312673e36607f4c985b538f07105e84ae0b8 in branch refs/heads/master from [~agrieve] [ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=7741312 ] CB-5398 Apply KitKat content URI fix to all content URIs > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901585#comment-13901585 ] Andrew Grieve commented on CB-5398: --- Thanks Ian. I've modified it to apply to all content: URIs > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901450#comment-13901450 ] Ian Clelland commented on CB-5398: -- Andrew -- the %3A may not be a sufficient indicator for this -- I've seen other providers using different strings; Drive, for instance, encodes a string like "acc=1;doc=12345678" as "acc%3D1%3Bdoc%3D12345678". I think in general, all URLs using the content:// scheme may have to have their entire path decoded, or at least subject to remapping, as you've done. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > Fix For: 3.5.0 > > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13900733#comment-13900733 ] ASF subversion and git services commented on CB-5398: - Commit 954a1723f1c0ebc432c68facfbda7975027554a2 in branch refs/heads/master from [~agrieve] [ https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;h=954a172 ] CB-5398 Work-around for KitKat content: URLs not rendering in tags > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13873654#comment-13873654 ] Joe Bowser commented on CB-5398: You can file the bug, but it won't be looked at, mostly because the Android Team doesn't read its own Bug Tracker. Also, the bug is this: You're magically supposed to get a photo by using this URL: content://com.android.providers.media.documents/document/image:3951, but since the URI is encoded, it looks like this: content://com.android.providers.media.documents/document/image%A3951. Their goofy new URI system that doesn't use proper URIs is what's broken. They need to accept the proper encoding to get their photos. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13873646#comment-13873646 ] Mike Billau commented on CB-5398: - I'm trying to figure out where in Android there is a URI encoding bug so that we can report it and have the problem fixed upstream. However, I'm starting to think maybe we need to make some changes to incorporate the new Storage Access Framework...more specifically, checking different ContentProviders. I was able to implement the solution here: http://stackoverflow.com/a/20559175/368762 and it seems to work well for accessing images from all of the providers except for Drive. The new way of doing things seems to craft the URI based on which provider the data came from instead of just assuming uri = intent.getData() will be valid. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13871292#comment-13871292 ] Joe Bowser commented on CB-5398: Acutally, you should just run mobile-spec and look at the URI that's passed back. That shows the encoding error > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13871288#comment-13871288 ] Joe Bowser commented on CB-5398: I used the debugger to check what the intent was returning. You could also throw console.logs in as well to see what the string is when you get it out. It should be on line 397 in the CameraLauncher.java app, in the onActivityResult method. In other news, we should refactor this plugin. The methods are too large. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13871092#comment-13871092 ] Mike Billau commented on CB-5398: - [~bowserj], can you please explain how you were able to determine that the first URI "has the READ permission passed back to it"? I couldn't find a bug report for this on the Android tracker and would like to file it but I'm not sure if I understand enough to actually file a decent bug report. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13862241#comment-13862241 ] Yahor Kazlou commented on CB-5398: -- Does anyone solve this problem? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851530#comment-13851530 ] julio cesar commented on CB-5398: - AFAIK, you can't force to launch the gallery > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13851502#comment-13851502 ] Nick Watson commented on CB-5398: - It would be nice if by default behaviour, the gallery was launched and not the file picker > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13850761#comment-13850761 ] Mike Billau commented on CB-5398: - Still broken in 4.4.2. Should we file a bug against Android since this is a URI encoding bug and pretty different than the one posted earlier in the thread? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1.4#6159)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841573#comment-13841573 ] ASF subversion and git services commented on CB-5398: - Commit 9b42839124026c7ed65ae57910927ebd99a580b4 in branch refs/heads/master from [~mrbillau] [ https://git-wip-us.apache.org/repos/asf?p=cordova-docs.git;h=9b42839 ] [CB-5398] Add Android 4.4 quirk about StorageAccessFramework > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841546#comment-13841546 ] Andrew Grieve commented on CB-5398: --- Gotcha! Thanks for the clarification. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841527#comment-13841527 ] Joe Bowser commented on CB-5398: [~agrieve] I think we agree on what a valid URL is: This is valid, but is rejected by Android as invalid: content://com.android.providers.media.documents/document/image%A3951 This is invalid, but gives a security error: content://com.android.providers.media.documents/document/image:3951 The first URL has the READ permission passed back, which is correct. Since we don't have permissions to do anything with the invalid (yet correct according to StackOverflow) URI, we can't access this. This wouldn't be the first time a URI encoding bug broke something on Android. :( > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841440#comment-13841440 ] Mike Billau commented on CB-5398: - Pull request for the quick here: https://github.com/apache/cordova-docs/pull/163 > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13841314#comment-13841314 ] Mike Billau commented on CB-5398: - I'm going to add a note under Android Quirks for getPicture() documenting this quirk for 4.4 and linking out to the stackoverflow post above as possible solutions. Sound good? When we resolve this we can remove the quirk in the documentation. Thanks guys for looking at this. Sorry I don't have anything to add yet but want to do more investigation today. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839664#comment-13839664 ] Andrew Grieve commented on CB-5398: --- Joe - what you describe seems like expected behaviour to me. This is a valid URL: content://com.android.providers.media.documents/document/image%A3951 This is not a valid URL: content://com.android.providers.media.documents/document/image:3951 Maybe I don't understand? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839454#comment-13839454 ] Joe Bowser commented on CB-5398: OK, This is true broken-ness! KitKat in theory handles these URI's like this: content://com.android.providers.media.documents/document/image:3951 KitKat in practice gives you permission to this URI: content://com.android.providers.media.documents/document/image%A3951 So, if you were to decode the URI and try to access the actual image, you get a permissions error, because that's not what you were given permission to access. These permissions are per document and per intent, so just giving your app MANAGE_DOCUMENTS permission isn't going to fly either. This isn't going to be fixed any time soon, and I don't want broken Android behaviour to hold up our release. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839403#comment-13839403 ] Joe Bowser commented on CB-5398: BTW: We need to properly decode the URI, since it's coming in escaped. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839345#comment-13839345 ] Joe Bowser commented on CB-5398: The reason we don't block the release for this is because this is a Camera Plugin issue, and not an issue with the core platform. Since plugins are released separately from the actual platform, there is absolutely no reason to block this release. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839321#comment-13839321 ] Joe Bowser commented on CB-5398: Also, we're not fixing Android 4.4 issues, we're building against Android 4.4 and turning on Android 4.4 features. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839320#comment-13839320 ] Joe Bowser commented on CB-5398: There are no conditions for it to be a blocker. Nothing should block a release short of compile-time failures and security vulnerabilities. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839282#comment-13839282 ] Mike Billau commented on CB-5398: - I followed the suggestion here to force it to always open the Gallery app and that seemed to work as a temporary solution: http://stackoverflow.com/a/20177611/368762 [~agrieve], [~bowserj], what are the conditions for a ticket to be a blocker? This has workarounds but I don't think we should release a 3.3 "to fix android 4.4 issues" without resolving this. I didn't see CB-2432, thanks for pointing that out. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839267#comment-13839267 ] Andrew Grieve commented on CB-5398: --- Likely this is the same root cause as CB-2432 > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13838996#comment-13838996 ] Pablo Reyes commented on CB-5398: - Any one found a solution for this? i post it in http://stackoverflow.com/questions/20248178/kitkat-error-while-trying-to-load-an-image too but i'm still in the same. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13838859#comment-13838859 ] Nick Watson commented on CB-5398: - Definitely having this issue too in Android KitKat 4.4 on my Nexus 5. It launches the file selector. It's ok if I click into gallery and choose the image that way, but selecting any of the files in Documents view does not return the FILE_URI, but a content URL (e.g. content://com.android.providers.media.documents/image:1288) > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13838749#comment-13838749 ] julio cesar commented on CB-5398: - I bug like this was affecting chromium too and they've fixed it. More info: https://code.google.com/p/chromium/issues/detail?id=278640 > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826678#comment-13826678 ] Mike Billau commented on CB-5398: - 2012 Nexus 7 running KitKat installed from https://developers.google.com/android/nexus/images#nakasikrt16o Seeing the same thing as [~jcesarmobile] 1. everything works when destinationType = DATA_URL 2. With destinationType = FILE_URI, I can get images from "Downloads", but any other file picker will return to the app but the image does not appear. 3. With destinationType = FILE_URI, I can successfully access any image if I go through the "Gallery" app first 4. I get the same logcat message (posted above) whenever it unsuccessfully returns to mobilespec after trying to get a picture from Recent, Drive, Images, or External Storage. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826295#comment-13826295 ] julio cesar commented on CB-5398: - I've been doing more tests and "Recent", "Drive", "Images" and "External Storage"* fail "Downloads" works. *To show "External Storage" tap the upper right button -> Settings -> Show advanced devices > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13826283#comment-13826283 ] julio cesar commented on CB-5398: - Joe, but did you use the destinationType.FILE_URI? If you use the return type destinationType.DATA_URL it works, but if you use return type destinationType.FILE_URI I get AndroidProtocolHandler, unable to open content URL: content://com.android.providers.media.documents tested on nexus 5 and nexus 7 2013 > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13825871#comment-13825871 ] Joe Bowser commented on CB-5398: I just tested this with the 2012 Nexus 7 running KitKat, and I get the new file picker, but I'm able to get an image regardless of where I pick it from. This includes photos from Google Plus. Perhaps there's an update between KitKat and KitKat MR1. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13825198#comment-13825198 ] julio cesar commented on CB-5398: - any updates on this? if you are talking about this on the developer mail list, can you provide us the link? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13824028#comment-13824028 ] Mike Billau commented on CB-5398: - On Android 4.4, with Cordova 3.x, it looks like the app just doesn't get the image. However, on Cordova 2.x, the app actually will force quit. > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13823890#comment-13823890 ] julio cesar commented on CB-5398: - Yeah, the gallery works, the problem is just with the new android 4.4 options > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of them, you get an error, AndroidProtocolHandler, unable > to open content URL: the url here with a content://com.android.providers > format. > I've tested on phonegap 2.9 because this is the version I use, but I suppose > it affects all of them. (in fact I use 2.9.1) -- This message was sent by Atlassian JIRA (v6.1#6144)
[jira] [Commented] (CB-5398) Pick image from Library or Photo album on android 4.4
[ https://issues.apache.org/jira/browse/CB-5398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13823835#comment-13823835 ] Mike Billau commented on CB-5398: - This exists on 3.x as well. In the mean time a workaround is to go through the "Gallery" app. So when it says "Recent", "Drive", "Images", and "Downloads", at the bottom of that list will be "Gallery". As far as I can tell this opens up the Gallery app and then you can navigate through those folders and select any of the photos. I'm getting this in LOGCAT: {noformat} 11-15 12:16:24.017: D/CordovaActivity(7351): Incoming Result 11-15 12:16:24.017: D/CordovaActivity(7351): Request code = 50 11-15 12:16:24.017: D/CordovaActivity(7351): We have a callback to send this result to 11-15 12:16:24.037: D/dalvikvm(7351): GC_FOR_ALLOC freed 34K, 3% free 16572K/17084K, paused 8ms, total 8ms 11-15 12:16:24.057: I/dalvikvm-heap(7351): Grow heap (frag case) to 46.700MB for 31961104-byte allocation 11-15 12:16:24.067: D/dalvikvm(7351): GC_FOR_ALLOC freed <1K, 2% free 47783K/48300K, paused 9ms, total 9ms 11-15 12:16:24.227: E/DatabaseUtils(4667): Writing exception to parcel 11-15 12:16:24.227: E/DatabaseUtils(4667): java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image:59 from pid=7351, uid=10083 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission() 11-15 12:16:24.227: E/DatabaseUtils(4667): at android.content.ContentProvider$Transport.enforceReadPermissionInner(ContentProvider.java:457) 11-15 12:16:24.227: E/DatabaseUtils(4667): at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:394) 11-15 12:16:24.227: E/DatabaseUtils(4667): at android.content.ContentProvider$Transport.enforceFilePermission(ContentProvider.java:387) 11-15 12:16:24.227: E/DatabaseUtils(4667): at android.content.ContentProvider$Transport.openTypedAssetFile(ContentProvider.java:339) 11-15 12:16:24.227: E/DatabaseUtils(4667): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:305) 11-15 12:16:24.227: E/DatabaseUtils(4667): at android.os.Binder.execTransact(Binder.java:404) 11-15 12:16:24.227: E/DatabaseUtils(4667): at dalvik.system.NativeStart.run(Native Method) 11-15 12:16:24.237: E/AndroidProtocolHandler(7351): Unable to open content URL: content://com.android.providers.media.documents/document/image%3A59 11-15 12:16:24.247: D/dalvikvm(7351): GC_EXPLICIT freed 31233K, 4% free 16554K/17084K, paused 2ms+2ms, total 25ms 11-15 12:16:24.247: D/Whitelist(7351): Unlimited access to network resources 11-15 12:16:24.247: I/CordovaLog(7351): Found start page location: index.html 11-15 12:16:24.247: I/CordovaLog(7351): Changing log level to DEBUG(3) 11-15 12:16:24.247: D/CordovaActivity(7351): Resuming the App 11-15 12:16:24.247: D/CordovaActivity(7351): CB-3064: The errorUrl is null 11-15 12:16:24.247: D/CordovaLog(7351): file:///android_asset/www/camera/index.html: Line 58 : URL: content://com.android.providers.media.documents/document/image%3A59 11-15 12:16:24.247: I/chromium(7351): [INFO:CONSOLE(58)] "URL: content://com.android.providers.media.documents/document/image%3A59", source: file:///android_asset/www/camera/index.html (58) {noformat} Looks like there is a new permission: MANAGE_DOCUMENTS: http://developer.android.com/reference/android/Manifest.permission.html#MANAGE_DOCUMENTS I tried to add {{android.permission.MANAGE_DOCUMENTS}} to the AndroidManifest.xml but even after doing this, compiling with ADB and installing, I'm still getting the above error and still unable to pick any photos unless I go through the "Gallery" app first. I made sure to set targetSDK=19 which is when this new permission was added. [~bowserj] do you have any ideas on why Android wouldn't be picking up the new permission? Is the problem in {{DatabaseUtils}} that I assume is some Android app? > Pick image from Library or Photo album on android 4.4 > - > > Key: CB-5398 > URL: https://issues.apache.org/jira/browse/CB-5398 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin Camera >Affects Versions: 2.9.0, 3.2.0 > Environment: android 4.4 >Reporter: julio cesar >Assignee: Mike Billau > > An android 4.4 try to pick a photo using pictureSource.PHOTOLIBRARY or > pictureSource.SAVEDPHOTOALBUM and return type destinationType.FILE_URI. > Now android 4.4, when you select the above options, it opens an "open from" > dialog that let you choose from new places as "Recent", "Drive", "Images" > and "Downloads" (the names might not be the same as I use the device in > spanish and translated it). > If you choose any of