Firebase Java Realtime Database Quickstart
The Java Firebase Database quickstart demonstrates how to connect to and use the Firebase Realtime Database using Java through a simple social blogging app. It will interoperate with the Web, iOS and Android database quickstarts.
This server will:
- Update the star counts for all posts.
- Send notifications when a post has been stared.
- Run weekly job listing the top 5 posts.
- Create your project on the Firebase Console.
- Create a service account as described in Adding Firebase to your Server and download the JSON file.
- Copy the json file to this folder and rename it to service-account.json.
- Change the DATATBASE_URL variable in Database.java to be the URL of your Firebase Database.
- From the database directory run ./gradlew build run to start run the quickstart.
- Configure and run one of the Database quickstarts for Web,
iOS or
Android.
Then use one of these apps to publish new posts: you should see console output when one of your posts have
received a new star and the starred counter should be kept up to date by the app.
https://firebase.google.com/support/
© Google, 2016. Licensed under an Apache-2 license.