Proximity App via SDK
(Redirected from Creating A Proximity App with SDK)
Jump to navigation
Jump to search
Steps
- Prerequisites
- 1 x computer with android studio
- 1 x Android phone with android 5.0
- 1 x Estimote proximity beacon
- Proximity Beacon Setup
- Download estimote app
- Configure ->find beacons -> login -> enable Estimote monitoring
- Download estimote app
- Download Estimote Example App
- https://github.com/Estimote/Android-Proximity-SDK
- Import SDK into Android Studio
- Estimote will automatically import their basic Methods and app interface
- Add Permissions to build.Gradle
- In your build.gradle tab add estimote SDK lines that will grab your necessary permissions
- general-SDK
- perimeter-SDK
- Estimote-mustard
- In your build.gradle tab add estimote SDK lines that will grab your necessary permissions
- Add Proximity Observer to Activity class
- Set up Cloud Credentials inside generated onCreate method
- Credentials will give your app the ability recognize specific beacon ID’s
- Add Proximity Observer Object
- To add the Proximity Object you will need to create a builder inside your onCreate method underneath your Credentials
- Set up Cloud Credentials inside generated onCreate method
- Define Proximity Zones
- Log onto Estimote app and select your beacon, in edit, select beacon attachments
- In beacon attachments define location and ownership of beacon
- Creating Proximity Zone Objects
- Add a Proximity Zone beneath your Proximity Observer Builder
- If desired, it is possible to create multiple zones for different beacons
- Add a Proximity Zone beneath your Proximity Observer Builder
- Log onto Estimote app and select your beacon, in edit, select beacon attachments
- Start Proximity Observing
- Requires location permissions in your build.gradle
- ACCESS_FINE_LOCATION
- At the end of your onCreate Method define a new proximity zone “proximityObserver”
- Proximity observer will have 3 cases
- Requirements fulfilled - proximityObserver.start
- Requirements missing - log error message
- Requirements error - log error message
- Each case will return null.
- Proximity observer will have 3 cases
- Requires location permissions in your build.gradle
- POST Requests
- You will need to create a post request so your app can talk to Amazon Web Services
- Need two instances of request
- 1st POST request will be under your proximity observer
- A generic POST template found online works perfectly
- Paste code in and modify parameters ensuring that they match up with the AWS side
- Username
- Password
- beaconID
- Open
- Set open to TRUE or 1
- 2nd POST request will be entered beneath onExit action
- 1st POST request will be under your proximity observer
- A generic POST template found online works perfectly
- Paste code in and modify parameters ensuring that they match up with the AWS side
- Username
- Password
- beaconID
- Open
- Set open to False or 0
- 1st POST request will be under your proximity observer
- 1st POST request will be under your proximity observer
You should be good to go!
Example Code for Each Part
To find code in text format, follow this link