NullPointerException
NullPointerException

Reputation: 37577

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

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 ?

Upvotes: 7

Views: 8631

Answers (1)

MusiGenesis
MusiGenesis

Reputation: 75296

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

Upvotes: 9

Related Questions