I am doing a project which requires me to query google cloud mysql database to save, delete, retrieve and update data using app build in android studio.
I have been googling for quite some time, all the tutorials are using AppEngine. However in android studio 3.0+, there isn't any App Engine available anymore.
Please give advice / guidance on what should I do?
thanks in advance
Since Android Studio 3 doesn't support AppEngine anymore, you have two options:
Build your own custom backend (web service) to function as a layer that allows database consumption via the Android app. This will require more development effort than option 2.
Set up Firebase and use its database instead.
You will have to do a bit of research on getting Firebase up and running, but you wan't have to build a custom backend.
If using the Google Cloud MySQL database is a must, then you can't get around to foreseeing your own backend layer.
Related
I have been trying to learn how to create an app that allows people to upload images via the web or android.
I know that Android uses content providers to implement a mechanism for the sharing of data between applications. More specifically, Android uses the MediaStore API to make use of this functionality. However, that is limited to other Android devices.
I was wondering how I would go about connecting a web app made using reactjs to an Android app preferably using firebase. However, if it isn't possible in firebase that would be okay too,
I am a beginner in web app development, so I am not particularly sure about how the software's architecture will look like.
I have been struggling to find an updated concise solution online. Can anyone point me in the right direction and if not point me to some resources that will guide me in the right direction.
Thank you!
Attach/configure both of your application to use same database and storage bucket in firebase
As you can see I connected my android application as well as web administration application to same firebase project.
As you can see there is an add app option in firebase console where you can select platform. Register both of your application on same project and thats it.
I know this is a nooby question and I apologise in advance. I'm looking all over but I just can't seem to find any documentation on connecting an Android app built in Android Studio to a Google Cloud SQL Database.
I'm only really doing this to try and find out how it is done because I'm interested in it but I'm very new to Android development. I've connected to a SQL database before from c# but it was only a local one, I've never connected to an online one before and I think the Google Cloud Platform operates a bit differently anyway?
Basically, whenever I try to find documentation for this, it keeps referring back to the Google App Engine, which seems to be a different way to create apps than just writing them in Android Studio (very likely I could be wrong, like I said, I'm very new to Android development).
I've seen that there is documentation for Eclipse with the Google Plugin but can't find anything for Android Studio. Is Android Studio not suited for this type of use?
I've seen that you can create a Google Cloud module for a project in Android Studio but I'm not exactly sure what that entails.
Basically, I would just love a set of very basic steps that I should follow for if I were wanting to write to a Google Cloud SQL DB from an Android app in Android Studio.
Otherwise, any good resources where I could possibly learn more about what I need to do would also be appreciated.
I think my biggest issue currently is that I have exactly 0 backend knowledge and so I'm just not really sure of what is required to set up this connection.
You should not access Cloud SQL directly from your Android (or iOS) or other client because you cannot secure the credentials needed to do so. If you embedded your credentials into your app, someone could extract them and either gain access to your database directly or could cause other trouble for you.
If you are open to other database types and you don't want to explore proxying requests through your own backend, then you should take a look at Cloud Firestore or Firebase Realtime Database. Firebase provides SDKs for Android that allow you to access these securely directly from your app. Firestore will scale better than the Realtime database, but that might not matter for your app.
A similar question and reason for why you shouldn't try to connect directly to Cloud SQL is covered in more depth here.
I am currently using Apache Cordova with Visual Studio 2015 for my mobile app development. I am also using Genymotion emulator and a Sqlite Database.
I noticed, if I am to use two different devices(Merchant POV & Consumer POV) to demonstrate my app, the database I will be using will be not be a synced database due to it being two different devices.
Is there any way I can make sure that both devices are using a synced database?
You would need a custom sync API to synchronize data like that. But if you are only in the early stage of testing your local database, you can make a script that loads some sample data wich will be executed on opening of your app. That way any device will run the same script and then have the same sample data.
But if you want to insert data on a device and then have that same data on another, you will have to sync it with your API.
hope it helps
I want to develop android application like Photofeed application as mentioned on Google cloud sample link or like Instagram. For that I need App Engine SDK but i am not getting how i will achieve this functionality. In my app, i want exact functionalities (uploading image, like and comment on that photo) like Photofeed app shown on that link. For that I'll have to use Google Cloud Storage but Photofeed is for Webapp and i want to develop Mobile app. For that i also referred Mobile back-end starter but not getting much idea. Its quite confusing. Please guide me to develop this application. Is it possible to use Photofeed sample java classes in my android application?
Thank you.
You will need to install Google Plugin for Eclipse and make Android Connected App Engine Application. This is a good starting point.
You can make similar app or any app that connects to GAE as backend in 4 steps as follows:
Make your entity classes: You can use JPA, JDO or Objectify to access the Data Store or use its API directly as done in the sample NoSQL classes (The easiest way is Objectify IMO). Or you can use Google Cloud SQL as done in the SQL classes of the sample ( I never used that in a project so I do not know if there is another way beside the API).
Make REST Endpoints: You can use Google Cloud Endpoints to make REST API for your own app. This will allow you to develop Android, iOS and JavaScript clients in unified way. If needed you can secure it using OAuth too.
Generate Client Libraries: If you are using Eclipse, Google Plugin will provide that in the context menu of the App Engine project so you simply right click and click Generate Client Libraries. It can be done using command line too.
Consume the endpoints in the Android app: This is done really simple as explained here.
Note : You will need a Servlet to upload photos to Google Cloud Storage. You can make use of the one in the sample.
I am a beginner in Android app making. I want to build a basic Cloud app which can take back up of the user's data and can store it on remote server. I know there are millions of such app, but would like to know some link that I can refer to begin my App building.
I hope I am clear with my question.
I recommend using Google App Engine. You can do all of the coding in eclipse, and once you have it set up properly it's fairly painless to deploy your webapp to the server and start testing your android app.
If you require a true relational database, google app engine makes you pay extra. If you don't however, there is no charge for the standard datastore. Also, app engine is free until you have lots of traffic to/from the server.
You can develop in Java or python. Here is the setup guide for eclipse (Java).