-
Create an Android app on Gimbal Manager. Set the Package Name to
com.gimbal.android.sample
. -
After creation, copy the Gimbal API Key and paste it into the value of
GimbalIntegration.GIMBAL_APP_API_KEY
. -
Run it! After granting Location permissions, the Sample App should provide Place events and Communicates based on user location and proximity to beacons. Additional setup is required in Gimbal Manager to set up Places and Place-based Communications. See the section below for details on setting up push messaging for Time-based Communications.
The Sample App is written to remove as much of the setup work as possible. That said, there are few steps to initialize Firebase and to to let Gimbal know that it should turn on messaging.
-
Sign in to the Firebase Console: https://console.firebase.google.com
-
If you don't already have a Firebase project that you've been using for Gimbal SDK communications, add one.
-
Do you already have an Android app corresponding to this Sample App in your Firebase project?
- NO: Add one. The following numbered items should match the configuration steps in the
Console.
- Call it
com.gimbal.android.sample
so it matches the sample app package. Register it. - Download
google-services.json
to theapp
subdirectory of the Sample App project. - You may skip app verification.
- Call it
- YES: From the Project Overview page:
- Click on the Android app badge/button near the top of the main content panel
- Click on the Settings gear in the small panel that bubbles up for the app.
- Scroll down to the "Your apps" section and download
google-services.json
to theapp
subdirectory of this Sample App project.
- NO: Add one. The following numbered items should match the configuration steps in the
Console.
-
Set up an Application in Gimbal Manager for the Sample App. (You may skip this if you have already done this.)
- Create an Android Application. Set the Package Name to
com.gimbal.android.sample
. - After Application creation, enter the Cloud Messaging Key in the Push Configuration tab. Get this value from the Cloud Messaging tab of your Firebase app's settings. Then click Save Push Configuration.
- Create an Android Application. Set the Package Name to
-
Uncomment the final line of
app/build.gradle
:apply plugin: 'com.google.gms.google-services'
-
Change the value of
GimbalIntegration.ENABLE_PUSH_MESSAGING
totrue
. -
Run it! Opt in to the location permissions if prompted.
-
Send a push Communication to your app.
a. Create a new Communication at https://manager.gimbal.com/communicate/new
b. Change the Triggering Event toTime Triggered: Now (Instant)
c. Enter a name for the Communication, and a Title and Description text that will be seen on your test device.
d. Click "Save & Publish"