1

I want to upload data to a server from my android application.For this I want to use NameValuePair in my code

ArrayList<NameValuePair> nameValuePairs = new  ArrayList<NameValuePair>();

nameValuePairs.add(new BasicNameValuePair("image",image_str));

But unfortunately NameValuePair is deprecated now.What are the posssible alternatives to this and how can I upload image without using NameValuePair?

user317461
  • 185
  • 1
  • 2
  • 8
  • Try to use Multipart Entity Builder. http://stackoverflow.com/questions/33041906/how-to-send-image-and-json-object-data-in-android-by-using-multipartentitybuilde – sumit singh Oct 24 '15 at 13:09
  • Multipart Entity Builder is also deprecated.Please suggest another approach. – user317461 Oct 24 '15 at 17:17

0 Answers0