Android base64 String image not showing manually

  • Replies:0
Samuel
  • Forum posts: 3

May 6, 2018, 12:14:13 PM via Website

Hello, I currently want to show a image in an imageView and then save that image via shared preferences. This works all very good. Now my Problem is that I want a custom predefined image background if the user hasnt choose one image. I converted my Image online to base 64 and got my String like all other settings with this code.

pic.setImageBitmap(decodeToBitmapAndGet(sharedPreferences.getString(String.valueOf(R.string.user_picture_key), String.valueOf(R.string.standard_profile_picture))));

Like I said if I choose a picture is saves correctly. May the base64 string be malformed? If so where can I convert an image to android base64 format?

I converted my image here:
As I cannot post the link here its a standard Base64 Converter I found on Google
"Base 64 Image Encoder"

Thank you for attention !

Reply