Using TripDetector.AWARENESS
Follow this guide to use the TripDetector.AWARENESS feature
Enable Google Awareness API
Create or use an existing project in https://console.cloud.google.com/
Navigate to "APIs and Services" by either using the search in Google Cloud Services or by using this link: https://console.cloud.google.com/apis/dashboard
Select "Enable APIs and Services" then search for and select "Awareness API". (https://console.cloud.google.com/apis/library/usercontext.googleapis.com)
Select "Enable" and wait until the process has finished
Now that the API has been enabled, lets get a key to use in the app.
Select the "Credentials" tab
Click "Create Credentials" -> "API key". This will generate an unrestricted key.
In the dialog with the key showing, select "Edit API key"
Set the application restriction to "Android Apps"
Under Android Restrictions click "Add"
Follow the instructions on the screen to add your app's fingerprint to the restrictions
Add Awareness API to Manifest
Add the following to your app's manifest and replace "API_KEY" with the key generated using the above instructions
Add Feature to IMSTripManager
When adding TripDetectors, include the TripDetector.AWARENESS feature
Last updated