Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D3ADFDF58 for ; Fri, 17 May 2013 16:23:15 +0000 (UTC) Received: (qmail 47294 invoked by uid 500); 17 May 2013 16:23:16 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 47272 invoked by uid 500); 17 May 2013 16:23:16 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 47259 invoked by uid 99); 17 May 2013 16:23:16 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 May 2013 16:23:16 +0000 Date: Fri, 17 May 2013 16:23:15 +0000 (UTC) From: "Andrew Grieve (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-3358) Switch Camera and Capture APIs to use Android Base64 instead of Commons-Codec Base64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-3358?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13660833#comment-13660833 ] Andrew Grieve commented on CB-3358: ----------------------------------- I think we can do this now. The Base64 API docs say it's available in froyo and not eclair: http://developer.android.com/reference/android/util/Base64.html Looks like we're already using it in a couple of spots anyways! agrieve@agrieve-macbookpro ~/git/cordova/cordova-android/framework (master) $ grep -r Base64 . ./src/com/squareup/okhttp/HttpResponseCache.java:import com.squareup.okhttp.internal.Base64; ./src/com/squareup/okhttp/HttpResponseCache.java: byte[] bytes = Base64.decode(line.getBytes("US-ASCII")); ./src/com/squareup/okhttp/HttpResponseCache.java: String line = Base64.encode(bytes); ./src/com/squareup/okhttp/internal/Base64.java: * Base64 encoder/decoder. ./src/com/squareup/okhttp/internal/Base64.java:public final class Base64 { ./src/com/squareup/okhttp/internal/Base64.java: private Base64() { ./src/com/squareup/okhttp/internal/http/HttpAuthenticator.java:import com.squareup.okhttp.internal.Base64; ./src/com/squareup/okhttp/internal/http/HttpAuthenticator.java: String encoded = Base64.encode(bytes); ./src/com/squareup/okhttp/internal/http/HttpResponseCache.java:import com.squareup.okhttp.internal.Base64; ./src/com/squareup/okhttp/internal/http/HttpResponseCache.java: byte[] bytes = Base64.decode(line.getBytes("US-ASCII")); ./src/com/squareup/okhttp/internal/http/HttpResponseCache.java: String line = Base64.encode(bytes); ./src/org/apache/cordova/api/PluginResult.java:import android.util.Base64; ./src/org/apache/cordova/api/PluginResult.java: this.encodedMessage = Base64.encodeToString(data, Base64.NO_WRAP); ./src/org/apache/cordova/CameraLauncher.java:import org.apache.commons.codec.binary.Base64; ./src/org/apache/cordova/CameraLauncher.java: * Compress bitmap using jpeg, convert to Base64 encoded string, and return to JavaScript. ./src/org/apache/cordova/CameraLauncher.java: byte[] output = Base64.encodeBase64(code); ./src/org/apache/cordova/CordovaArgs.java:import android.util.Base64; ./src/org/apache/cordova/CordovaArgs.java: return Base64.decode(encoded, Base64.DEFAULT); ./src/org/apache/cordova/FileUtils.java:import org.apache.commons.codec.binary.Base64; ./src/org/apache/cordova/FileUtils.java: default: // Base64. ./src/org/apache/cordova/FileUtils.java: byte[] base64 = Base64.encodeBase64(bytes); > Switch Camera and Capture APIs to use Android Base64 instead of Commons-Codec Base64 > ------------------------------------------------------------------------------------ > > Key: CB-3358 > URL: https://issues.apache.org/jira/browse/CB-3358 > Project: Apache Cordova > Issue Type: Bug > Reporter: Joe Bowser > Assignee: Joe Bowser > Fix For: 3.0.0 > > > One of the benefits of turfing Froyo is that we don't need Commons-Codec anymore, and can use Android's Base64 utility methods. This is to keep track of us turfing commons-codec. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira