SlideShare a Scribd company logo
1 of 23
GEOFENCING 
LOWLANDS WPDEV 2014 
JOOST VAN SCHAIK 
18-10-2014 
CARPE TERRA
AGENDA 
• Hello world / Plugs en andere blabla 
• Wat 
• Waarom 
• Hoe (Foreground en Background) 
• Lessons learned 
• Q&A
HELLO 
• Joost van Schaik aka LocalJoost 
• Dotnetbyexample 
• Windows Platform Development MVP 
• 4 open sources libraries, 1 nog actief 
• [insert fancy title of the day] @ Vicrea Solutions 
• Web development / Geo-ict
</COMMERCIALS> 
</PLUGS>
WAT IS GEOFENCING? 
“Geofencing is a technology that defines a virtual boundary 
around a real-world geographical area. In doing so, a radius of 
interest is established that can trigger an action in a geo-enabled 
phone or other portable electronic device.” 
Thus speaketh Technopedia 
http://www.techopedia.com/definition/14937/geofencing
WAAROM 
• Notificatie als je ergens in de buurt komt 
• Of als je weggaat 
• Of als iemand anders (je kind b.v.) ergens in de buurt komt
NIEUW
GEOFENCING 
• … al een tijdje in Windows 8.x 
• … maar wel nieuw in Windows Phone! 
• … PCL/Universal apps.
TWEE MANIEREN 
• Foreground (in actieve app) 
• Scenario : wat is hier nu, poor mans’ ‘sathé prikke prikker gis’ 
• Background task 
• Waarschuw me wanneer ik in de buurt ben
DEMO 1 – SHOP FINDER
LESSONS LEARNED (1) 
• Capabilities/Location 
• Application/Toast capable 
• Dwell time! (default 10s) 
• Alleen cirkels
LESSONS LEARNED (2) 
• Kaart voor Windows 8 ->Bing Maps SDK, Native, x64 
• Toast notifications in foreground process – beter van niet 
• Toast notifications op Windows simulator – überhaupt niet 
• Windows Phone emulator superieur aan Windows emulator. 
• Partial classes: (nog meer) code sharing
DEMO 2 – SHOP FINDER
RECAP TESTEN GEOTRIGGERS OP WINDOWS 
1. Deploy local 
2. Register task 
3. Deploy to simulator 
4. Maak geofences 
5. Zet simulator locatie 
6. Enable toolbar debug/location 
7. Selecteer background taks in lifecycle events dropdown 
8. Background taks activated – één keer.
WAAROM ZO MOEILIJK?
LESSONS LEARNED 
• Registratie background task iha 
• Background task in WinRt component 
• Sealed classes, IAsyncOperation<T> ipv Task<T> 
• LocationTrigger background tasks : max 1 x per 2 minuten 
• Badge logo voor Windows 
• Niet zo geschikt voor high-speed, real-time tracking kleine gebieden 
• Demonstreren geofencing trigger = tricky business
TIPS & TRICKS 
• Route mode 
• Meerdere korte simulaties 
• Initiële positie opzetten dan pas geofences 
• Verse start per test 
• Scheur niet op hoge snelheid door kleine geofences (of hoge 
dwell time)
CREDITS / MEER INFO 
• http://blog.rajenki.com/2014/04/trigger-background-task-using-geofence- 
windows-phone-8-1/ 
• http://blogs.windows.com/buildingapps/2014/05/28/using-the-windows-phone- 
emulator-for-testing-apps-with-geofencing/ 
• http://wp.qmatteoq.com/how-to-create-and-debug-a-background-task-in- 
windows-8-part-2/ 
• Ook leuk om naar de kijken: SensorCore
ALS JE NOG STEEDS NIET GENOEG VAN ME HEBT 
http://dotnetbyexample.blogspot.com 
@localjoost (80K+ tweets – follow is op 
eigen risico) 
joostvanschaik@outlook.com 
localjoostnl

More Related Content

Viewers also liked

Geofencing and the Future
Geofencing and the FutureGeofencing and the Future
Geofencing and the Futurekbecton
 
Using Drupal to Build the VA App Store
Using Drupal to Build the VA App StoreUsing Drupal to Build the VA App Store
Using Drupal to Build the VA App StoreDonna Rodriguez
 
Geofencing & Fleet Management
Geofencing & Fleet ManagementGeofencing & Fleet Management
Geofencing & Fleet ManagementFleet Commander
 
Geofencing and Location Marketing Success Stories
Geofencing and Location Marketing Success StoriesGeofencing and Location Marketing Success Stories
Geofencing and Location Marketing Success StoriesLocaid Technologies
 
Location Based Mobile Marketing | Non-App Geofencing By Thumbvista
Location Based Mobile Marketing | Non-App Geofencing By ThumbvistaLocation Based Mobile Marketing | Non-App Geofencing By Thumbvista
Location Based Mobile Marketing | Non-App Geofencing By ThumbvistaThumbvista
 
Geo-Location/Geo-Fencing
Geo-Location/Geo-FencingGeo-Location/Geo-Fencing
Geo-Location/Geo-FencingSqueeze Mobi
 
Crime Prevention and Control - 3 Different Approaches
Crime Prevention and Control - 3 Different ApproachesCrime Prevention and Control - 3 Different Approaches
Crime Prevention and Control - 3 Different Approachesmattyp99
 
Building the Future Landscape of Geofencing SXSW workshop Teaser
Building the Future Landscape of Geofencing SXSW workshop TeaserBuilding the Future Landscape of Geofencing SXSW workshop Teaser
Building the Future Landscape of Geofencing SXSW workshop TeaserJenessa Carder
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedSlideShare
 

Viewers also liked (12)

Geofencing and the Future
Geofencing and the FutureGeofencing and the Future
Geofencing and the Future
 
Geofencing in the Hospitality Industry
Geofencing in the Hospitality IndustryGeofencing in the Hospitality Industry
Geofencing in the Hospitality Industry
 
Using Drupal to Build the VA App Store
Using Drupal to Build the VA App StoreUsing Drupal to Build the VA App Store
Using Drupal to Build the VA App Store
 
Geofencing & Fleet Management
Geofencing & Fleet ManagementGeofencing & Fleet Management
Geofencing & Fleet Management
 
Geofencing and Location Marketing Success Stories
Geofencing and Location Marketing Success StoriesGeofencing and Location Marketing Success Stories
Geofencing and Location Marketing Success Stories
 
GPS & Geo-Fencing
GPS & Geo-FencingGPS & Geo-Fencing
GPS & Geo-Fencing
 
Location Based Mobile Marketing | Non-App Geofencing By Thumbvista
Location Based Mobile Marketing | Non-App Geofencing By ThumbvistaLocation Based Mobile Marketing | Non-App Geofencing By Thumbvista
Location Based Mobile Marketing | Non-App Geofencing By Thumbvista
 
Geo-Location/Geo-Fencing
Geo-Location/Geo-FencingGeo-Location/Geo-Fencing
Geo-Location/Geo-Fencing
 
Near Miss, Incident & Accident Reporting App - Safety Sayings, Phrases & Slogans
Near Miss, Incident & Accident Reporting App - Safety Sayings, Phrases & SlogansNear Miss, Incident & Accident Reporting App - Safety Sayings, Phrases & Slogans
Near Miss, Incident & Accident Reporting App - Safety Sayings, Phrases & Slogans
 
Crime Prevention and Control - 3 Different Approaches
Crime Prevention and Control - 3 Different ApproachesCrime Prevention and Control - 3 Different Approaches
Crime Prevention and Control - 3 Different Approaches
 
Building the Future Landscape of Geofencing SXSW workshop Teaser
Building the Future Landscape of Geofencing SXSW workshop TeaserBuilding the Future Landscape of Geofencing SXSW workshop Teaser
Building the Future Landscape of Geofencing SXSW workshop Teaser
 
LinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-PresentedLinkedIn SlideShare: Knowledge, Well-Presented
LinkedIn SlideShare: Knowledge, Well-Presented
 

Similar to Geofencing

Cross platform mapping with Universal Windows Apps
Cross platform mapping with Universal Windows AppsCross platform mapping with Universal Windows Apps
Cross platform mapping with Universal Windows AppsJoost van Schaik
 
Coding for kids - TechDaysNL 2015
Coding for kids - TechDaysNL 2015Coding for kids - TechDaysNL 2015
Coding for kids - TechDaysNL 2015Fons Sonnemans
 
Nllug Dev06 Domino Globetrotting
Nllug Dev06 Domino GlobetrottingNllug Dev06 Domino Globetrotting
Nllug Dev06 Domino GlobetrottingBluecube
 
PFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsPFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsRichard Tuin
 
Verdien geld met je app tips voor het ontwikkelen
Verdien geld met je app tips voor het ontwikkelenVerdien geld met je app tips voor het ontwikkelen
Verdien geld met je app tips voor het ontwikkelenSteven Palmaers
 
Workshop Video op Mobiel 23-11-2011
Workshop Video op Mobiel 23-11-2011Workshop Video op Mobiel 23-11-2011
Workshop Video op Mobiel 23-11-2011Pierre Gorissen
 
Tussentijdse presentatie 22/11/2012
Tussentijdse presentatie 22/11/2012Tussentijdse presentatie 22/11/2012
Tussentijdse presentatie 22/11/2012Tim Ameye
 
Presentation x pages-mobile-2014-01-08-a
Presentation x pages-mobile-2014-01-08-aPresentation x pages-mobile-2014-01-08-a
Presentation x pages-mobile-2014-01-08-aPettrie de Bondt
 
Bouw cross-platform mobiele apps met PhoneGap
Bouw cross-platform mobiele apps met PhoneGapBouw cross-platform mobiele apps met PhoneGap
Bouw cross-platform mobiele apps met PhoneGapDion Olsthoorn
 
Nieuwe mogelijkheden in Cyberdam 2.3
Nieuwe mogelijkheden in Cyberdam 2.3Nieuwe mogelijkheden in Cyberdam 2.3
Nieuwe mogelijkheden in Cyberdam 2.3Pieter van der Hijden
 
Node.js: waarom en hoe
Node.js: waarom en hoeNode.js: waarom en hoe
Node.js: waarom en hoeFrank Louwers
 
Xxter training basic v1 sept 2012
Xxter training basic v1 sept 2012Xxter training basic v1 sept 2012
Xxter training basic v1 sept 2012Freddyvangeel
 
Multimedia les 9
Multimedia les 9Multimedia les 9
Multimedia les 9Erik Duval
 
Sessie 2 Podcasts Produceren Klg.Key
Sessie 2 Podcasts Produceren Klg.KeySessie 2 Podcasts Produceren Klg.Key
Sessie 2 Podcasts Produceren Klg.KeySee Genius
 
Silverside CCTY Developers Update
Silverside CCTY Developers UpdateSilverside CCTY Developers Update
Silverside CCTY Developers UpdateThimo Jansen
 
Multimedia: les 1
Multimedia: les 1Multimedia: les 1
Multimedia: les 1Erik Duval
 
Front end development - Les 01
Front end development - Les 01Front end development - Les 01
Front end development - Les 01Atticus
 

Similar to Geofencing (20)

Cross platform mapping with Universal Windows Apps
Cross platform mapping with Universal Windows AppsCross platform mapping with Universal Windows Apps
Cross platform mapping with Universal Windows Apps
 
Coding for kids - TechDaysNL 2015
Coding for kids - TechDaysNL 2015Coding for kids - TechDaysNL 2015
Coding for kids - TechDaysNL 2015
 
Nllug Dev06 Domino Globetrotting
Nllug Dev06 Domino GlobetrottingNllug Dev06 Domino Globetrotting
Nllug Dev06 Domino Globetrotting
 
PFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsPFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele tests
 
Joomla in een doosje
Joomla in een doosjeJoomla in een doosje
Joomla in een doosje
 
Verdien geld met je app tips voor het ontwikkelen
Verdien geld met je app tips voor het ontwikkelenVerdien geld met je app tips voor het ontwikkelen
Verdien geld met je app tips voor het ontwikkelen
 
Workshop Video op Mobiel 23-11-2011
Workshop Video op Mobiel 23-11-2011Workshop Video op Mobiel 23-11-2011
Workshop Video op Mobiel 23-11-2011
 
Tussentijdse presentatie 22/11/2012
Tussentijdse presentatie 22/11/2012Tussentijdse presentatie 22/11/2012
Tussentijdse presentatie 22/11/2012
 
Presentation x pages-mobile-2014-01-08-a
Presentation x pages-mobile-2014-01-08-aPresentation x pages-mobile-2014-01-08-a
Presentation x pages-mobile-2014-01-08-a
 
Eindpresentatie
EindpresentatieEindpresentatie
Eindpresentatie
 
Bouw cross-platform mobiele apps met PhoneGap
Bouw cross-platform mobiele apps met PhoneGapBouw cross-platform mobiele apps met PhoneGap
Bouw cross-platform mobiele apps met PhoneGap
 
Nieuwe mogelijkheden in Cyberdam 2.3
Nieuwe mogelijkheden in Cyberdam 2.3Nieuwe mogelijkheden in Cyberdam 2.3
Nieuwe mogelijkheden in Cyberdam 2.3
 
Node.js: waarom en hoe
Node.js: waarom en hoeNode.js: waarom en hoe
Node.js: waarom en hoe
 
Xxter training basic v1 sept 2012
Xxter training basic v1 sept 2012Xxter training basic v1 sept 2012
Xxter training basic v1 sept 2012
 
Multimedia les 9
Multimedia les 9Multimedia les 9
Multimedia les 9
 
Robocon @ Immune-it
Robocon @ Immune-itRobocon @ Immune-it
Robocon @ Immune-it
 
Sessie 2 Podcasts Produceren Klg.Key
Sessie 2 Podcasts Produceren Klg.KeySessie 2 Podcasts Produceren Klg.Key
Sessie 2 Podcasts Produceren Klg.Key
 
Silverside CCTY Developers Update
Silverside CCTY Developers UpdateSilverside CCTY Developers Update
Silverside CCTY Developers Update
 
Multimedia: les 1
Multimedia: les 1Multimedia: les 1
Multimedia: les 1
 
Front end development - Les 01
Front end development - Les 01Front end development - Les 01
Front end development - Les 01
 

Geofencing

  • 1. GEOFENCING LOWLANDS WPDEV 2014 JOOST VAN SCHAIK 18-10-2014 CARPE TERRA
  • 2. AGENDA • Hello world / Plugs en andere blabla • Wat • Waarom • Hoe (Foreground en Background) • Lessons learned • Q&A
  • 3. HELLO • Joost van Schaik aka LocalJoost • Dotnetbyexample • Windows Platform Development MVP • 4 open sources libraries, 1 nog actief • [insert fancy title of the day] @ Vicrea Solutions • Web development / Geo-ict
  • 4.
  • 5.
  • 6.
  • 8. WAT IS GEOFENCING? “Geofencing is a technology that defines a virtual boundary around a real-world geographical area. In doing so, a radius of interest is established that can trigger an action in a geo-enabled phone or other portable electronic device.” Thus speaketh Technopedia http://www.techopedia.com/definition/14937/geofencing
  • 9. WAAROM • Notificatie als je ergens in de buurt komt • Of als je weggaat • Of als iemand anders (je kind b.v.) ergens in de buurt komt
  • 10. NIEUW
  • 11. GEOFENCING • … al een tijdje in Windows 8.x • … maar wel nieuw in Windows Phone! • … PCL/Universal apps.
  • 12. TWEE MANIEREN • Foreground (in actieve app) • Scenario : wat is hier nu, poor mans’ ‘sathé prikke prikker gis’ • Background task • Waarschuw me wanneer ik in de buurt ben
  • 13. DEMO 1 – SHOP FINDER
  • 14. LESSONS LEARNED (1) • Capabilities/Location • Application/Toast capable • Dwell time! (default 10s) • Alleen cirkels
  • 15. LESSONS LEARNED (2) • Kaart voor Windows 8 ->Bing Maps SDK, Native, x64 • Toast notifications in foreground process – beter van niet • Toast notifications op Windows simulator – überhaupt niet • Windows Phone emulator superieur aan Windows emulator. • Partial classes: (nog meer) code sharing
  • 16. DEMO 2 – SHOP FINDER
  • 17. RECAP TESTEN GEOTRIGGERS OP WINDOWS 1. Deploy local 2. Register task 3. Deploy to simulator 4. Maak geofences 5. Zet simulator locatie 6. Enable toolbar debug/location 7. Selecteer background taks in lifecycle events dropdown 8. Background taks activated – één keer.
  • 19. LESSONS LEARNED • Registratie background task iha • Background task in WinRt component • Sealed classes, IAsyncOperation<T> ipv Task<T> • LocationTrigger background tasks : max 1 x per 2 minuten • Badge logo voor Windows • Niet zo geschikt voor high-speed, real-time tracking kleine gebieden • Demonstreren geofencing trigger = tricky business
  • 20. TIPS & TRICKS • Route mode • Meerdere korte simulaties • Initiële positie opzetten dan pas geofences • Verse start per test • Scheur niet op hoge snelheid door kleine geofences (of hoge dwell time)
  • 21.
  • 22. CREDITS / MEER INFO • http://blog.rajenki.com/2014/04/trigger-background-task-using-geofence- windows-phone-8-1/ • http://blogs.windows.com/buildingapps/2014/05/28/using-the-windows-phone- emulator-for-testing-apps-with-geofencing/ • http://wp.qmatteoq.com/how-to-create-and-debug-a-background-task-in- windows-8-part-2/ • Ook leuk om naar de kijken: SensorCore
  • 23. ALS JE NOG STEEDS NIET GENOEG VAN ME HEBT http://dotnetbyexample.blogspot.com @localjoost (80K+ tweets – follow is op eigen risico) joostvanschaik@outlook.com localjoostnl

Editor's Notes

  1. Windows Phone applicatie demonstreren Opzet applicatie: Universal app Twee hulp assemblies, al eens eerder getoond, beetje uitgekleed MappingUtilities voor berekenen cirkels op kaart, prachtig stuk wiskunde, (doen als of je het uitlegt)… begrijp ik ook niets van En het berekenen van cirkels van Geofences – kunnen nl alleen cirkels zijn. Let op, allemaal leuk PCL. Als source hier gekoppeld om te kunnen laten zien wat ik doe. En ook één voor Windows, hier zitten alleen methods in om Geopoint <-> Location conversie te doen Windows Phone 8.1 app XAML – best wel simpel XAML.cs – ook niet bar veel Alles zit in de shared Manifest – Application/Toast enabled, Capabilities/Location Shared: LocationObject “Database” Notice: alles heeft een ID Je weet zeker dat je deze winkels deels niet gaan tegenkomen ;) MainPage.cs ToggleGeofences Maakt fences aan Tekent ze ook – implementatie in non shared code (moet dus in allebei!!!) Verwijdert ook fences – ‘t Is tenslotte een toggle Callback GeofenceStateChanged AddFence Daadwerkelijk maken van een Geofence. Key (string) Eventuele oude eerst verwijderen Ik maak standaard 50 meter Mask - events op enter en exit Geen single use (iedere hit rapporteren) Aanmaken dwelling time 1 seconde. GeofenceStateChanged Lees fence ‘reports’ Voor elke ‘report’ het ID En dan bij dat ID het object zoeken. En dan een toast. ShowToast – gejatte code. Maak een toast notications. Wel leuk – in shared code. Windows app demo Demo beduidende trickier. Omdat posities moeten worden ingesteld kan dat alleen in simulator Maar in de simulator werken toast niet. – dus alleen in debug pane zie je wat… Neem coordinaat uit lijst. Opzet windows app: Nagenoeg identiek Zelfde application settings. XAML - Bing Maps ipv here Maps X64, geldt ook voor het MappingUtilities.Windows Project Alleen wijze waarop je geometries tekent is helaas anders Layers Location en LocationCollection Jammer dat er zoveel divergentie is nog op dit gebied Maar dat is kaarten en dat is deze keer niet het onderwerp
  2. Demo op Windows Phone Gaat niet geweldig Reden: we gebruiken hier een backgrond task. En een LocationTrigger start maximaal 1x per 2 minuten. Real time is dus een tikje overdreven Structuur project nagenoeg hetzelfde Er is alleen een Background task project bij gekomen Declarations/Background tasks/Location + entry point Dit is een WinRT component. Dus alleen SEALED classes Kan geen task retourneren Dus geen Await? Jawel, maar met een truukje LocationObject erheen verhuisd want die hebben we ook nodig in de background task. BackgroundTask zelf: Enige wat verplicht is, is een public void Run Van Rajen gepikt: static methods voor register, unregister en checken if registered Truukje bij register om awaitable te maken. BackgroundExecutionManager.RequestAccessAsync SetTrigger(new LocationTrigger(LocationTriggerType.Geofence)); ShowToast nog steeds hetzelfde. Windows Phone project Indentiek, behalve extra knopje. Dus weer alles in portable of shared classe Shared project: ToggleTask – niet echt heksenkunst ToggleGeofences beetje simpeler (zet geen geolocator aan, heeft geen zin in background task) Windows 8 project – ook identiek, alleen knopje erbij. En badge logo verplicht! (onder visual assets) Het verschil zit in hoe test je dat ding. Want Het moet in de simulator, want we moeten een locatie zetten Maar toasts worden niet getoond, weet je nog? Om het leuker te maken: background tasks kun je niet registeren op de simulator – geeft exception, omweg Maar door die omweg gaat de geotrigger niet af Dus: Deploy local Register task Deploy to simulator Maak geofences Zet simulator locatie Enable toolbar debug/location Selecteer background taks in lifecycle events dropdown Background taks activated – één keer. Resultaat alleen in debug window.