I am seeking information about using Firebase (as database) for Java. Is this possible along with hosting of Java (using Spring framework) project over Firebase hosting.
It is possible. Use Google App Engine an environment for running application code in the cloud; Platform as a service (PaaS).
Below is description how make to make basic example.
In the this tutorial, you'll learn how to:
Create a backend service running on App Engine using Android Studio.
Connect the backend service to your data in Firebase.
The sample app stores a to-do list in Firebase, which automatically synchronizes the data across devices, and then uses backend logic running on App Engine to send out daily reminder emails:
https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio
By connecting App Engine to a Firebase database, you can perform complex logic on data without having to manage synchronization and updates; Firebase handles that for you.
No. Firebase offers hosting for static assets only.
The Google Cloud Run seems is most suitable for what you want.
Consider to check the documentation and pricing. Like firebase, cloud run also has a free tier that can help you develop your app with no costs.
The cloud run supports several programming languages including Java.
Once created the service you can try to connect to your firebase project...
Cloud Run Java Documentation
Related
I have a Java App Engine standard project (for about 4 years), using the Cloud Datastore (with Objectify). One of my services is using GCM to push notifications to mobile clients. Google has announced that GCM is deprecated and will be shut down 11th of April, and from then on Firebase messaging should be used instead of GCM.
After reading the docs it seemed straight forward to migrate, however I cannot create a Firebase database on my existing project, apparently I need to create a new App Engine project for this?
My question is, how can I use messaging on my existing App Engine project?
Starting a new project seems to me a bit overkill just to migrate from GCM to FCM.
Currently, once you select a database for your GCP project, you can't switch back. That's why you would have to create a new GCP project and a new App Engine.
I'm not very familiar with the Firebase products or the migration process from GCM to FCM, but if what you need is to switch from Cloud Datastore to Cloud Firestore, be aware that this change will be done automatically in the future.
You can also contact GCP support directly and request the upgrade.
I figured it out, I'm not able to create a new Firestore database, which is the "new" Firebase database currently in beta. This because I already using the Cloud Datastore in my current app engine project and cheese two cannot coexist whiten the same app engine project. However I was able to create a "old" Firebase database (real time database).
I don't really need a new database or my existing one migrated, I only need messaging to work (FCM) and using the Admin SDK the only way to initialise the library I need a database.
So I am planning on creating a side project which is similar to Twitter, where the basic functions are to create accounts and store data such as username/password. And for users to create statuses and allow them to be visible on a 'news feed' so it should store the status in the database as well.
The front-end will be developed and designed for Android using Java, but how will I connect it to the database and what should I be using?
I recommend you to use firebase as a back-end database. It is very easy to learn and configure. For more info visit this link: Firebase
I am slightly confused with the Firebase client library that is available for Java. In the documentation, it says that the library should be used on the server. Recently, I came across Google App Engine. A PaaS service that allows application code to be put in the cloud.
Could I write the server code using the Firebase client library and deploy that as application code on Google App Engine? That way my application could connect with Firebase through the App engine.
I am asking this questions from the perspective of creating a Java application; the same libraries available for Android are not available for Java desktop applications. The only library that can be used in Java is the server library.
Thank you.
That is possible with the firebase-server-sdk.
You find an example deploying a servlet to appengine and access firebase from within the servlet here: https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio
Just skip the android stuff and scroll down to MyServlet source code.
But be aware of the scaling setting you need to use firebase on app engine.
I'm creating a network based android application. So
1) I've installed Google App Engine Plugin in eclipse IDE and start developing a network based android applications where all information of customers are stored in GAE Datastore.
2) I've created a new Web-Application and stored Entities in datastore. Can i retrieve those values and show in my android application and add new details in from my application to GAE Datastore.
Please Help Me, I'm new to Web Service, SOAP, REST, JSON etc.
Can anyone tell me a simple method to store and fetch values from Cloud DB to Android App.
There are two apparent options:
Use Cloud Endpoints. They are proprietary and not my favourite. Also they are only available for Android, iOS and JS.
Use web services, my favourite would be JAX-RS, specifically RESTEasy+Jackson. See this GAE example and simple Android client.
I am currently developing an android application using eclipse and I already have a website developed in PHP and MySQL, can some one guide me how to connect to my website database through android for exchanging data
The simpliest, but maybe not so elegant way to do it, is writing special php-scripts for the queries, sending http requests from the android-app to these scripts and getting the results as json-arrays.
Check out this: http://www.helloandroid.com/tutorials/connecting-mysql-database
You need a Webservice Written Using REST Protocol or SOAP protocol or SimpleXML....
Using any of the above three links you may communicate throught Mysql DB to interact ur Android App Requests
To connect the Android Application to Webservices below given Two Links could be helpful
Android App Development and Web Server Interactions
interacting with web services and android
UPDATED
Below Link Might be most helpful to you.. chk it
Connection to DB from Android Device