Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pass Class Object to MultiPart Entity in android

 
hemanth uppada
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have to work on an application where i need to send the class object as Parameter using Multipart Entity along with a file. I have checked that the Multipart addpart method doesn't accept an Object to post to Web Api.Below is the Code i have tried. Any Suggestions on how to pass the object would be great.



The Web Api is developed in Dotnet which is why the windows mobile app has sent the parameters as


 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

What is "the class object"?

Note that MultipartEntity is deprecated, you should use MultipartEntityBuilder instead. But regardless, the 2nd parameter to addPart is a ContentBody, so the ServiceJobFileModel class needs to implement that interface.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic