In this application we will be utilizing the Pusher Android SDK's client-side library to quickly build a real-time data table.
The flow of the app is that when the user launches the app, (s)he will fill out a form to add a new employee to an employees table and click a “save” button. This will send a POST request to our server. In this tutorial, we will use a simple NodeJS server to provide a single API endpoint. Once our server receives the POST request, it will render the data to all connected clients, which will show the data on their tables in realtime.
To set up this project in your machine you'll need to take a few steps.
- Install Android Studio if you haven't already
- Clone this repo and open in AS
- Sync the project and import all required dependencies
- Create a Pusher Account and get your credentials ready for use
- Set up a simple Node.js server with your pusher credentials to handle your requests as described in the article
- Update your package.json with the neccesary dependencies
- Run the node server with the app.js file also linked in the article, do update it with your own credentials
- Update the java code with your own pusher credentials
- And finally run the app and give it a spin