[google-appengine] Building an Android Application with Google App Engine

2015-05-30 Thread Joe Seph


Hello guys,
so currently, we are building a mobile  social network application where 
users will be able to upload and view Pictures and Musics files.
we have 2 scenarios in order to implement the GAE with our android 
application and backend control panel. 
- First scenario is to implement the GAE PHP with our application backend 
and let the backend handle all the APIS requests from the mobile side and 
handle them with the GAE but for in case i need to upload a certain image 
to the GAE I will need to encode the image to base64 and decode it on the 
server and then upload it into the GAE and then wait until the upload 
process finishes and return the Reference to the backend then update the 
status on the mobile side as you can notice this scenario will cost me a 
lot of time and the quality of the image will be dropped due to encoding 
and decoding .



- Second scenario is to implement the GAE Directly to the android side and 
let it upload files(Jpg,mp3) directly to the GAE (No need for Base64) and 
then send the references from GAE to the mobile side in order to be sent to 
Backend to be saved in the database .



I'm not sure if the GAE works with android to achieve the second scenario 
as it will be best solution which will decrease time and will bypass 
decoding and encoding Process. 

so what do you guys think about the above solutions and what is the best 
optimized and efficient solution in your opinion?

thanks ,

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/217092b4-d2f8-4d6a-8ab9-cec88898d053%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [google-appengine] Building an Android Application with Google App Engine

2015-05-30 Thread Karl MacMillan
  

> On May 30, 2015, at 10:57 AM, Joe Seph  wrote:
> 
> 
> Hello guys,
> 
> so currently, we are building a mobile  social network application where 
> users will be able to upload and view Pictures and Musics files.
> we have 2 scenarios in order to implement the GAE with our android 
> application and backend control panel. 
> - First scenario is to implement the GAE PHP with our application backend and 
> let the backend handle all the APIS requests from the mobile side and handle 
> them with the GAE but for in case i need to upload a certain image to the GAE 
> I will need to encode the image to base64 and decode it on the server and 
> then upload it into the GAE and then wait until the upload process finishes 
> and return the Reference to the backend then update the status on the mobile 
> side
> 
> 

I’m a little confused about what you mean by GAE and how that might be 
different from the PHP backend. I’m getting a sense that you mean something 
specific here but are using the terms in a different way than is usually used, 
which is making it hard to answer your question.


I also wonder if you are making this harder than it needs to be. A typical 
approach that people use for uploading data is to simply expose a HTTP endpoint 
that the mobile application can POST to with the image data (perhaps as 
multipart form data) and then if they need to return some sort of handle or 
metadata they simply do that in the response. It’s only one round-trip then.


If you are running PHP on Google App Engine, the handler for that HTTP endpoint 
can then put the data wherever. I would suggest storing it in Google Cloud 
Storage and, if helpful, storing some meta-data about the data in the Datastore.


>  as you can notice this scenario will cost me a lot of time and the quality 
> of the image will be dropped due to encoding and decoding .
> 
> 
> 
> 

I’m a little confused about the concern over image quality. Base64 encoding 
does not impact image quality - it is simply an encoding of binary data and is 
lossless (http://en.wikipedia.org/wiki/Base64).


I hope this helps - again, it’s a little hard to understand your question or 
concerns. If I could suggest, it might help if you spend a little more time 
with the App Engine documentation. That might help you answer your own 
questions and it will likely help you ask questions using the terminology from 
the documentation, making it easier for others to help you.


Karl

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8FD067B6-F2B9-4D5C-B3C8-92CB66CB1B52%40rakkoon.com.
For more options, visit https://groups.google.com/d/optout.