Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Base64 (included in android since api 8 (2.2)) in a android project api 3 (android 1.5)?

Tags:

android

base64

i need to use Base64 on my app (import android.util.Base64;) but Base64 was included in android with 2.2, api lvl 8. Then when i make the import i get this error: Base64 cannot be resolved, and doesn't give me the possibility to import it, because i am making my project with api lvl 3. For some reasons my app have to be compatible with old versions of android (1.5 1.6 etc..)

it is possible to use Base64 without migrating to api lvl8 ?

like image 911
NullPointerException Avatar asked Jan 29 '11 12:01

NullPointerException


1 Answers

Use a home-grown implementation instead: http://androidcodemonkey.blogspot.com/2010/03/how-to-base64-encode-decode-android.html

like image 156
MusiGenesis Avatar answered Nov 19 '22 06:11

MusiGenesis