How can i send an image from php to android, using volley and Json -


im trying load image need load server, have 3 questions:

  1. i don't know how can convert images in bitmaps (this in server side)
  2. how convert bitmap in image (this in android side).
  3. how can send bitmap volley request.

i using volley make request. server method have this:

function getimage($image_path){     $base ='images/practices/'.$image_path;         $binary=base64_encode($base);         $resp['image_binary']= $binary;         print_r(json_encode($resp)); } 

the method using other requests is:

string url = "---------";     jsonobjectrequest request = new jsonobjectrequest(request.method.post, url, null,             new response.listener<jsonobject>() {                 @override                 public void onresponse(jsonobject response) {                         try {                         //here processing of response...                         } catch (jsonexception e) {                             e.printstacktrace();                         }                 }             },             new response.errorlistener() {                 @override                 public void onerrorresponse(volleyerror error) {                     log.e("error",""+error.tostring());                 }             }     );     volleys.getinstance(this).addtorequestqueue(request); 

try glide

or uil

its simple , easy


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -