Real-time Data Sync

Certain use cases demand that the Geofences, Geolines™, Beacons as well as the Actions and Conditions associated with them on the backend, are synced to the mobile devices immediately. The Point SDK can be optionally configured to receive push notifications to enable the real-time data sync. The present implementation supports integration through Google Firebase cloud messaging, however, the future versions of the SDK will allow you to utilize any other push infrastructure, giving you the flexibility to connect your existing push integrations.

Create your Firebase project

To add Zone data sync support to your application you will need to add Firebase to your app, you will need to create a Firebase project. This can be achieved by following steps:

1. If you don’t have a Google Firebase account, then create a free account by clicking on the Get started for free button on home page of Firebase website.

 

2. You can register for a Firebase account using a gmail account.

3. Create a new Firebase project in the Firebase console, if you have an existing Google project associated with your mobile app, you can import it by selecting Import Google Project. To create a new project click on Create New Project.

 

4. A new dialog will appear, enter your project’s name and select your country/region and click on Create Project button.

 

5. You will be taken to your Firebase project page.

 

6. Navigate to the Project settings page by selecting the settings icon next to the project name and then select the Project settings link in navigation menu.

 

7. Navigate to the CLOUD MESSAGING tab.

8. Here you will find the Server key under the Project credentials section, which is required to be added to your Bluedot application on Point Access.

 

Setup Firebase API key for your Bluedot application

Create a new application and add the Firebase Web API Key for it

Click on the New App button in the header to create a new App. The Create a new App form will be displayed.

 

Enter the Firebase Web API Key from the Firebase project setting to the Firebase API Key field. Using this key we will be able to communicate with Firebase to deliver the zones that need to be synced.

 

Edit an existing application and add the Firebase Web API Key for it

If you want to add the Firebase Web API Key to an existing app or edit the key navigate to the App and Beacon Management page and click on the ‘More details’ link of the app.

 

Add the Firebase Web API Key from the Firebase project setting to the Firebase API Key field.

Sync Zones updates to mobile applications

The newly added, updated or deleted zones can be synced to all your mobile devices by selecting the ‘Sync Zones’ button on the Zone Management page of your dashboard.

! The Sync Zones button will only be displayed for those apps which have the Firebase API key added to it and only if there are newly added, updated or deleted zones in the application.

 

Once the zones’ sync process has begun a confirmation message is displayed. Within a few seconds to a minute the zones will be synced to all your devices.

Integrate real-time data sync in your applications

Request the real-time data sync using our Public API

 

Created by Bluedot DevOps on January 23, 2018

Start the discussion