this would look like a dumb question and it may look like I didn't search out there for an answer but.
The problem is that I am developing an android app and at a certain point I new about
Google Cloud SQL
and
Google App Engine
so I watched like 20-30 tutorial and started implementing, but now I'm stuck and can find no tutorial that shows a step by step simple android code.
Here's what I've done and where I'm stuck right now:
-my android app is working great no single error
-created an app engine project
-turned on Google Cloud SQL service and it's API service and paid for that
-created an instance in the cloud
-and "through the api console" created a table and a small database in my instance
-generated an App Engine backed for my application package
And here it's where I got stuck !!! I don't know how to use the generated files, how things work, how can I access the table in the cloud through my app, COULD FIND NO TUTORIAL explaining how does that happen, all tutorials out there just skip that step as if it's the easiest thing in the world.
I just want to know how does things work together? where to right the methods, what do I have to do to get my data from the table in the instance which is in the cloud...
I would appreciate even any link :) thank you.
You are almost there. The recommended mechanism for you would be to expose your App Engine hosted functionality via a REST service and invoke those services from your Android application.
Google makes it easier for you to do that via the Cloud Endpoints functionality. This will help generate an Endpoints Service (think REST Service) for your Mobile Backend. It will also generate a set of Client classes (in .java for your Android application) that you can use easily to invoke the services from your Android client.
Check out this in-depth tutorial that covers "How to build a mobile app with an App Engine backend"
If you haven't got this figured out yet, this is what I did.
In the developer console note your project number and your API key. Also make sure your cloud instance allows access to your project ID.
Now you can call you cloud SQL database from the android app. but you have to do it as an AsyncTask. It did not work for me until I did this. Create an AsyncTask class and in the doInBackground connect to your DB. I did mine like this:
If you already created an android project, just right click that project > Google > Generate App Engine Backend and start from step 2. I hope this helps.