Daniel L.
Daniel L.

Reputation: 5140

Sending an image from android client to google app engine

I'm writing a mobile android application which send an image (as Base64 encoded byte array) to a Google app engine server. On the server I want to supply the image I got from the client to a third party module which expects it to be a Bitmap. The problem is that I can't find a way to get create an image from the encoded byte array on GAE. Each thing I tried failed due to app engine restrictions: "x is not supported by Google App Engine's Java runtime environment".

Any suggestions?

Upvotes: 3

Views: 383

Answers (2)

Stuart Langley
Stuart Langley

Reputation: 7054

Why not use the Image API setImageData method, which takes a byte array of image data to create an Image object that can be used with the rest of the image APIs?

Upvotes: 2

vivek_jonam
vivek_jonam

Reputation: 3297

That Google App Engine doesn't support some javax classes.

Would imageIO class if available solves your problem? then the possible answer is as follows:

  1. Download the classes of ImageIO class(see this question to know how)
  2. create your own jar file with those class files
  3. Add the jar file to your /WEB-INF/lib/ folder
  4. Use the ImageIO class in your application logic

Does this solutions seems to work?

Upvotes: 0

Related Questions