Android library for sending Harbor Beacons to the Harbor Service in Android-java apps:
- Setup - Get setup
- HarborAndroidBeacon - Run the Beacon Sample app
This project uses/requires:
- Android Studio
- SDK Version API 23: Android 6.0 (Marshmallow)
- Google Play Services
- Maven/JitPack
If you haven't used Harbor before, welcome! You'll need to Sign up for a Harbor account first.
- Install JitPack.
To get started with the Quickstart application follow these steps:
- Open this
HarborAndroidBeacon
in Android Studio
- Copy your organization API Key from the API Keys page.
- Paste your organization API Key from the earlier step in the
MyApplication.java
.
- Copy your AppVersionID from the specific Applications page.
- Paste your AppVersionID in the
MyApplication.java
.
- Copy your Beacon Version ID from the specific Edit Beacon page for the Beacons for your Application.
- Paste your Beacon Version ID in the
MyApplication.java
.
- Run the Beacon Sample app on your Android device or simulator.
- Once you have your app running, you should beacons on the Developer View page for your Application.!
Message Type | Message Data | Description |
---|---|---|
APP_START_MSG | N/A | |
APP_BG_MSG | N/A | |
APP_FG_MSG | N/A | |
APP_KILL_MSG | N/A | |
HEARTBEAT | N/A | |
SCREEN_VIEW | { "screen" : screenName } |
|
SCREEN_DWELL | { "screen": screenName, "time" : timeIntervalSince1970 } |
|
GEOLOCATION | { "latitude" : latitude, "longitude" : longitude, "altitude" : altitudeMeters, "hz_accuracy" : horizontalAccuracyMeters, "vrt_accuracy" : verticalAccuracyMeters |
mHarborLogger.appStart()
mHarborLogger.appBackground()
mHarborLogger.appForeground()
mHarborLogger.appKill()
mHarborLogger.startHeartbeat()
mHarborLogger.stopHeartbeat()
mHarborLogger.logLocation(location)
mHarborLogger.startScreenDwell(viewName)
mHarborLogger.stopScreenDwell(viewName)
This project is licensed under the Apache License, Version 2.0