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.
Related
I'm developing a Java Desktop App, using Javafx and I'm trying to receive push notifications from a server. My first approach was to use firebase. I already connected to firebase and even achieve, for test purpose, storing data in firebase database. But the goal I really need is to receive push notifications.
I'm using firebase-admin:6.5.0, but this module doesn't provide me the FirebaseMessagingService class that I need to receive notifications.
I also tried to use firebase-messaging but appear with an error underline after de import.
What I'm doing wrong? It´s even possible to receive push notifications in a Java Desktop app with firebase? What alternative do I have?
Thank you in advance
There is no SDK to receive Firebase Cloud Messaging notifications in a Java client. Consider using another technology to deliver the notifications, such as the Firebase Realtime Database, or Cloud Firestore.
The Admin SDK you use grants fill administrative access to your entire Firebase project. It is meant for use on trusted environments, such as your development machine, or a server you control.
Also see:
Can Firebase Cloud Messaging platform be used to send messages to Java SE receivers/clients?
Is that possible for Win32/64 application to receive push notification message from Firebase?
Can we use FireBase cloud Messaging to send or receive messages or both ways using C++ on Windows Desktop/Console or Linux console appliction?
ControlsFX provides the GUI support for notification ControlsFX
I want to make an android app that has users and everything related to it.
I just want to know if it is possible to use Firebase Firestore instead of Firebase Auth and if yes, how can I do that.
Any example would be appreciated and thanks in advance.
I just want to know if it is possible to use Firebase Firestore
instead of Firebase Auth
I'm assuming that you're asking to use Firebase Firestore instead of Firebase realtime database with Firebase Auth which is the current and stable version for that.
From the documentation:
Cloud Firestore is a flexible, scalable database for mobile, web, and
server development from Firebase and Google Cloud Platform. Like
Firebase Realtime Database, it keeps your data in sync across client
apps through realtime listeners and offers offline support for mobile
and web so you can build responsive apps that work regardless of
network latency or Internet connectivity. Cloud Firestore also offers
seamless integration with other Firebase and Google Cloud Platform
products, including Cloud Functions.
It's actually in beta release but you can use it.
Start using it with this link: https://firebase.google.com/docs/firestore/quickstart
And the available sample: https://github.com/firebase/quickstart-android/tree/master/firestore
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
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 have existing appengine application. I'm planning to develop android application with that existing app. I can only find examples on development of android app w/ new appengine application. Any reference for developing android app for existing appengine project?
There is nothing special about it. You have to add some sort of an API that your mobile apps can use and return data in an easily parsaeble format such as JSON or XML. You have think about whether you need authentication and how to do it (Google accounts are integrated in Android, but you need extra permissions to use them). Then you access them from Android using HttpClient or HTTPUrlConnection.
The 'new' way to do it would be to use Goggle Cloud Endpoints which takes care of authentication and generates an Android client for you automatically. However it is still in
'trusted beta', so you might not be able to use it.
http://endpoints-trusted-tester.appspot.com/