Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
787 views
in Technique[技术] by (71.8m points)

google app engine - How to send image data to server from Android

I am trying to write an Android application that will take a picture, put the data (byte[]) in an object along with some metadata, and post that to an AppEngine server where it will get persisted in a datastore as a blob. I don't really want to save the image as a file on Android (unless it's absolutely necessary). I searched around for solutions but nothing clear or specific enough came up. My questions are:

  1. how do I post the object to my servlet? Specifically how to properly serialize the object and get the serialized output to an HttpPost or something similar.
  2. once I persist the blob in the datastore, how will I be able to retrieve it as an image to display on a webpage?

Code examples would be very helpful. Also, if the approach I am taking is too complicated or problematic, please suggest other approaches (e.g. saving image as file, posting to server, then deleting).

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...