I have very little idea how html works.What i want to do is exactly similar to the following but on android
As alternative you can use Retrofit.
You can specify a call like this:
@Multipart
@POST("/user/photo")
Call updateUser(@Part("photo") RequestBody photo, @Part("description") RequestBody description);
then create it like this:
Retrofit retrofit = new Retrofit.Builder()
.baseUrl("https://api.github.com")
.build();
GitHubService service = retrofit.create(GitHubService.class);
and finally execute it like this:
service.updateUser(Photo, description).enqueue() --> asynchronous
service.updateUser(Photo, description).execute() --> synchronous
See the documentation here