Location based push notifications

13
Location Based Push Notifications for Mobile Apps

description

Slides from lightning talk given at Esri UC Dev Meetup, July 2012

Transcript of Location based push notifications

Page 1: Location based push notifications

Location Based Push Notifications for Mobile Apps

Page 2: Location based push notifications

Problem

Need to add native push notifications to QuakeFeed iOS app based on location of events and user’s area of interest

Page 3: Location based push notifications

Simple User Experience

• Subscribe to Channels– Geographic Filter

(Area of Interest)– Attribute Filter

(Minimum Magnitude)

• Receive Notifications

Page 4: Location based push notifications

What About Android?

Although QuakeFeed is an iOS app, this solution works for Android too

So don’t sleep…

Hey!

Page 5: Location based push notifications

Goal

Server-less, cloud-based solution

Page 6: Location based push notifications

Solution Architecture

+

+

ArcGIS Online

(Easy As…)

Page 7: Location based push notifications

ArcGIS Online• Define Geographic Areas of Interest• Stored in the Cloud

“SanFran” Channel

“SoCal” Channel

Page 8: Location based push notifications

What Is Parse

• User and Device Management• Schema-less database in the Cloud• REST API for push notifications• Native iOS and Android SDKs, Plus REST API• Incredibly Cheap– Free Level: 1M API calls + 1M Push Notifications

Page 9: Location based push notifications

How We Use Parse

• Anonymous User Accounts• Store Channel Preferences in Cloud DB• Store Processed Events in Cloud DB• Send Push Notification Through REST API

Page 10: Location based push notifications

• Ties our solution together• Run Python Scripts in the Cloud– Or Ruby, Go, Node, etc.

• Insanely Cheap– 5 cents/hr billed by the second

• Massively Scalable– 1000s of concurrent processes

Page 11: Location based push notifications

Python Script Psuedo-code

• Pull USGS Geo-RSS feed for Earthquakes• Check for new Seismic Events– Keep track of processed Quakes in Parse DB

• Query ArcGIS Online for Spatial Channels• Assemble Push Notification Payload• Send Notification via Parse REST API

Page 12: Location based push notifications

Other Use Cases

• Keep in mind that any of the elements could change in real time:– Geographic Area of Interest– Attributes of Interest– User Channel Subscriptions

• Short List– Field Management (Worker Notification)– Emergency Event Coordination– Alerts when Assets Divert from Expected Routes

Page 13: Location based push notifications

Contact Info

James Richardsjames (at) artisanglobal (dot) com

If Interested in Beta Testing QuakeFeedOr Adapting This Solution to Another Use Case

Drop Me a Line