geotrigger service - recent proceedings · 2014-08-06 · •the geotrigger api uses oauth2 •...
TRANSCRIPT
![Page 1: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/1.jpg)
Geotrigger Service Davy Stevenson, Kenichi Nakamura Esri R&D Center, Portland
![Page 2: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/2.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Overview
![Page 3: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/3.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
GeoEvent Processor • On premise server appliance
• Can be installed behind firewalls
• Dedicated industrial-strength GPS
• Life or death? Choose GeoEvent Processor
![Page 4: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/4.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger Service • Cloud-based
• Consumer-grade GPS
• Perfect for iOS and Android apps
![Page 5: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/5.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
What could your app do if it knew where it was?
![Page 6: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/6.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
What is a Geotrigger?
![Page 7: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/7.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
What about Battery Drain?
![Page 8: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/8.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Increases power near content
Decreases power use away from
content
![Page 9: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/9.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Text Label Rough Mode
Least Battery Drain
Delayed Messaging
![Page 10: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/10.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Text Label Fine Mode
Most Battery Drain
Fastest Messaging
![Page 11: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/11.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Text Label Adaptive Mode
Less Drain
Fast Messaging
![Page 12: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/12.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
![Page 13: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/13.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Use Cases
![Page 14: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/14.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
This bridge will be closed on Saturday for a marathon!
![Page 15: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/15.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
traffic ahead!
![Page 16: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/16.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
New house for sale!
![Page 17: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/17.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service Esri UC 2014 | Technical Workshop | Geotrigger Service
Historic town hall, founded in 1897 on Capitol St.
![Page 18: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/18.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
![Page 19: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/19.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service pdx.esri.com
![Page 20: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/20.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Getting Started
![Page 21: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/21.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Create an account at developers.arcgis.com/en/sign-up/ or log in if you
already have an account
![Page 22: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/22.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Create an application developers.arcgis.com/en/applications/
![Page 23: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/23.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Apple
• Go to your Apple Developer account to get a Push Certificate (iOS)
• Make sure the push cert has been set on your app and that your app is registered to handle push notifications
https://developer.apple.com/notifications/
Register for Push Notifications
![Page 24: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/24.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Register for Push Notifications Android
• Get a GCM key (Google)
• Make sure the GCM key is in the push notification settings for your app and that you have set your GCM sender ID when you initialize the Geotrigger Service.
developer.android.com/google/gcm/
![Page 25: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/25.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Test your Push Notifications!
![Page 26: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/26.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
SDKs for iOS and Android Wraps native location services on
each platform
Provides a set of tracking profiles for low, medium, and high power consumption
Push Notification Handling
![Page 27: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/27.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
SDK App Project
![Page 28: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/28.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger SDK for iOS Get the SDK from Github or CocoaPods
• pod ‘GeotriggerSDK’
• Ensure your app has ‘Location Updates’ and ‘Background Fetch’ background modes enabled
• Call one of the setupWithClientId: methods
![Page 29: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/29.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger SDK for Android Get the Sample App and SDK from GitHub:
• github.com/esri/geotrigger-sdk-android
• Change the package name in the sample app or add the required permissions to your existing AndroidManifest.xml
• Use the GeotriggerHelper to start the Geotrigger Service
![Page 30: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/30.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Test your triggers! • Create test triggers
• Walk around outside to test push notifications
• 100m radius minimum
![Page 31: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/31.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger API • Manage devices,
triggers, and tags
• Access trigger history
• Build custom statistics
![Page 32: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/32.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
• Location should be used to enhance
• Explain why you are using location in app description
• Be prepared for app rejection, so submit at least 2-3 weeks before you plan to launch
Submitting Your App to iTunes
![Page 33: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/33.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger Service API
![Page 34: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/34.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Authentication • The Geotrigger API uses OAuth2
• Requests to the Geotrigger API require an access token
• To get an access token make a request with the client_id and client_secret to the “oauth2/token” endpoint of ArcGIS Online
• Devices register with ArcGIS Online using only the client_id, and are given a refresh token in addition to the access token.
![Page 35: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/35.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Triggers • Define what happens when someone enters or leaves a place
• Triggers have a location that can be a circle or a polygon (EsriJSON or GeoJSON)
• Date and time ranges can restrict when triggers are active
• Triggers can have a limit to the number of times they can be fired
![Page 36: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/36.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Tags • Used to associate triggers with devices
• Device must share a tag with a trigger to fire the trigger
• Example: Trigger labeled with ‘restaurant’ tag, user subscribes to ‘restaurant’ coupons.
![Page 37: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/37.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger Editor
![Page 38: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/38.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Editor Overview • A visual interface for managing triggers
• List all triggers and filter by tag or trigger ID
• Create triggers by drawing trigger boundaries as circles and polygons
• Define and update trigger rules
![Page 39: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/39.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger API Routes • /trigger/list
• /trigger/create
• /trigger/update
• /trigger/delete
![Page 40: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/40.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger Editor: List View
![Page 41: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/41.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
/trigger/list
{ "triggerIds": [...], "tags": [...], "geo": {...}, }
• List all triggers associated with an application
• All parameters are optional, used for filtering results:
![Page 42: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/42.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
/trigger/list response { "triggers": [ { "triggerId": "portland_city_greeting", "condition": { ... }, "action": { ... }, "tags": [ ... ], } ], "boundingBox": { "xmin":-122.703123092651, "ymin":45.5058656770835, "xmax":-122.669820785522, "ymax":45.5359943919756, "spatialReference": {"wkid": 4326} } }
![Page 43: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/43.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger Editor: Create/Update View
![Page 44: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/44.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Tags
![Page 45: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/45.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Condition
![Page 46: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/46.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Action
![Page 47: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/47.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Advanced Properties
![Page 48: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/48.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
POST /trigger/create { "condition": { "direction": "enter", "geo": { "latitude": 45.5165, "longitude": -122.6764, "distance": 240 } }, "action": { "callbackUrl": "http://example.com/trigger", }, "setTags": ["office", "red", “blue”], }
![Page 49: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/49.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Advanced Trigger Properties • Trigger ID
• Custom IDs can be specified on create, but cannot be updated.
• Rate Limit • Number of seconds between executions, per device. Default 30. Set to 0 for no minimum.
• Times • Maximum number of executions, per device. Default 0 for no maximum.
• Properties • Arbitrary properties saved with the trigger.
![Page 50: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/50.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Advanced Trigger Properties There are more options not yet covered by the editor that you can access programmatically:
• boundingBox
• geoFormat
• fromTimestamp & toTimestamp
![Page 51: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/51.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
POST /trigger/update { "triggerIds": [ ... ], "condition": { ... }, "action": { ... }, // to manage tags, you can use addTags, removeTags, or setTags "addTags": [ ... ], }
• Update multiple triggers by passing more than one ID in the triggerIds array, selecting by tag, or by geography
![Page 52: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/52.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Managing Tags • Manage tags using addTags, removeTags, and setTags
• addTags: array of tags to add to the set of current tags
• removeTags: array of tags to remove from set of current tags
• setTags: array of tags to replace the current set of tags
![Page 53: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/53.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger Faker
![Page 54: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/54.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Faker Overview • A web application for sending location updates and
testing triggers
• Create a fake device or spoof an existing device
• Draw a point and radius to send location updates and fire triggers from the comfort of your workspace
![Page 55: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/55.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Geotrigger Faker: Sending Location Updates
![Page 56: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/56.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
POST /location/update { "locations": [ { "latitude": 45.5194753769039, "longitude": -122.67609357921172, "accuracy": 55, "timestamp": "2014-03-11T17:07:24.727Z" } ], "previous": { "latitude": 45.51976103506265, "longitude": -122.67519235698273, "accuracy": 67, "timestamp": "2014-03-11T17:07:27.313Z" } }
![Page 57: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/57.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Callback Payload • JSON data that is sent to a callback URL when a trigger is fired
• Enable the callbackURL parameter within the trigger action.
• Can be used to create a customized app experience
![Page 58: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/58.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Callback Payload
{ "triggeredAt": { "iso8601": "2014-03-10T21:23:59.446+00:00", "unix": 1394486639 }, "trigger": { "triggerId": "Barista", "condition": { ... }, "action": { ... }, "times": 0, "rateLimit": 0, "tags": [...] }, "device": { "deviceId": “wKZsNENYcw5saINT", "tags": [...] }, "location": { "latitude": 45.519767717082, "longitude": -122.67545700116897, "accuracy": 17, "trackingProfile": "adaptive", "timestamp": "2014-03-10T21:23:54.592+00:00" } }
![Page 59: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/59.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Custom Notifications • API provides a way to send a notification to a device
• Can be used with callback payload to send customized push notifications
• Target devices by ID, geography or tag
![Page 60: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/60.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
POST /device/notify // request { "tags": ["red"], "text": “Welcome Red Team!", "data": {"foo": “bar"} } // response {"devices": [ {"3XgGh30aTlEKlK91": "queued"}, {"8907123u9yasdjkn": “queued"}] }
![Page 61: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/61.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Demo
![Page 62: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/62.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Full Documentation https://developers.arcgis.com/geotrigger-service/
Getting Started, iOS & Android Setup, API Reference, SDK Reference, Developer Tools (Editor & Faker)
![Page 63: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/63.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Open Source • Geotrigger Editor & Geotrigger Faker are open source
• github.com/esri/geotrigger-editor • github.com/esri/geotrigger-faker
• Client Libraries in various languages:
• github.com/esri/geotrigger-js • github.com/esri/geotrigger-ruby • github.com/esri/geotrigger-go • github.com/esri/geotrigger-python
![Page 64: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/64.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Summary
![Page 65: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/65.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Test Outside • Create Triggers
• Take device out in real world
• Take laptop too!
• Use Geotrigger Editor & Geotrigger Faker to dynamically modify shape & size of triggers and to test location updates
• Start out with large triggers
![Page 66: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/66.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Developer Friendly • Easy for iOS and Android developers to use.
• Drop into existing app
• Build new app
• Support other platforms by using location/update
![Page 67: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/67.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
What’s Next? Offline triggers
Feature Service integration
Configurable Solutions
![Page 68: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/68.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service
Thank You!
Please fill out the session survey: First Offering ID: 1155 Online - www.esri.com/ucsessionsurveys Paper - pick up an put in drop box
![Page 69: Geotrigger Service - Recent Proceedings · 2014-08-06 · •The Geotrigger API uses OAuth2 • Requests to the Geotrigger API require an access token • To get an access token make](https://reader034.vdocuments.us/reader034/viewer/2022042300/5ecab97b4e865934646508ba/html5/thumbnails/69.jpg)
Esri UC 2014 | Technical Workshop | Geotrigger Service