Here is my situation:
I have a RESTful WCF service running on my server, this service is designed to receive various types of people data from a database and makes this data available as a single JSON object. It works great!
[EDIT] There is another service that supports image cache in the file system on the server. When a request is sent to the RESTful service, this service then requests an image from the image service. If the image is already in the cache (the same width, height and person as the request), it returns this (as an array of bytes). We MUST use this service to retrieve images.
Now what I want is an image of this person. In our database, the image is long raw (ew). However, I have already addressed this issue (previous paragraph). Now the image is an array of bytes. I'm new to android and I'm not sure what the best way to get this image. What I thought I could do was add an array of bytes to the JSON object, and then use a base64 decoder to convert it to a drawn image. However, every time I try, time runs out and tells me that it was expecting a ',' or ']' at some arbitrary char buffer index for the JSON object.
I managed to pull small pieces of data from the JSON object without problems, but now that it has a huge array of bytes in it, JSONObject hates me. What would be the best way to get this image from my service?
Matt grogan
source share