I have captured image from android and passed it to the database side using arraylist in the string form. Now the problem is how to convert this string to BLOB and save it in the database using servlets.
Thank you guys for the help
Here is the android code: new Thread(new Runnable() {
@Override
public void run() {
// TODO Auto-generated method stub
ArrayList<NameValuePair> postparameters=new ArrayList<NameValuePair>();
postparameters.add(new BasicNameValuePair("profile",image.toString()));
String response=null;
try{
response=RegisterHttpReq.executeHttpPost("http://10.0.2.2:8080/epass_admin/storeImage", postparameters);
String res = response.toString();
System.out.println(res);
String resp = res.replaceAll("\\s+", "");
}catch(Exception e){}
}
}).start();
try{
Toast.makeText(getApplicationContext(), "Image uploaded successfully", Toast.LENGTH_LONG).show();
Intent in=new Intent(getApplicationContext(),Imageset.class);
image=imv.getDrawingCache();
Bundle extras = new Bundle();
extras.putParcelable("imagebitmap", image);
in.putExtras(extras);
startActivity(in);
}catch(Exception e){}
}
});