cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-3358) Switch Camera and Capture APIs to use Android Base64 instead of Commons-Codec Base64
Date Fri, 17 May 2013 16:23:15 GMT

    [ 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: * <a href="http://www.ietf.org/rfc/rfc2045.txt">Base64</a>
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

Mime
View raw message