DOwnload base64 image on a protected site using Picasso

后端 未结 2 1812
悲&欢浪女
悲&欢浪女 2021-01-23 04:41

I tried to use this Android Picasso library, How to add authentication headers? to access a protected image that returns the base64 version of the image. My problem is that the

2条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 05:33

    Above answer works great. Then if the base 64 encoded image is further stored inside a JSON Object.

     String jsonData = response.body().string();
     JSONObject Jobject = new JSONObject(jsonData);
     String base64String = (String) Jobject.get("ImageData");
    

提交回复
热议问题