SlideShare une entreprise Scribd logo
1  sur  39
Télécharger pour lire hors ligne
Implementing BeaconTechnology inTitanium!!
Martin Hudson!!
BEACONS
Mobile Data Systems!
http://www.mobiledatasystems.co
INDOOR LOCALISATION
• GPS is not an option
- Low spatial discrimination (10m)!
- Poor signal penetrance through buildings!
• Unique building shapes - Signal reflection issues!
• Noisy environment - Many signals, varying crowd
density
BEACONTECHNOLOGY
• Small Bluetooth emitting devices!
• Battery powered!
• Significantly larger range than NFC!
• Uses Bluetooth Low Energy (LE) protocol
Geofencing
Passive process, alerting
user to location based
information!
Outdoors
- Reminders!
Indoors
- Art gallery
walkthroughs!
- Special offers
Geolocation
Active process, providing
user with precise
location!
Outdoors & Indoors
- Route navigation
USE CASES
Geofencing
Passive process, alerting
user to location based
information!
Outdoors
- Reminders!
Indoors
- Art gallery
walkthroughs!
- Special offers
Geolocation
Active process, providing
user with precise
location!
Outdoors & Indoors
- Route navigation
USE CASES
BARRIERSTO ENTRY
• Upfront costs
- Beacons, licences for services!
• Implementation
- Installation of beacons, databases, content!
• Security
- Physical and software
BEACONS IN ACTION
BEACONS IN ACTION
UUID Major
RSSI Minor
Power Complement
ABSORPTION ISSUES
ABSORPTION ISSUES
ABSORPTION ISSUES
BUFFER ZONES
BUFFER ZONES
BUFFER ZONES
BUFFER ZONES
Entrance Region
Exit Region
BUFFER ZONES
BUFFER ZONES
BUFFER ZONES
BUFFER ZONES
BUFFER ZONES
1 2
3 4
TRIANGULATION
1 2
3 4
Triangulation is highly inaccurate
- Reflection
TRIANGULATION
1 2
3 4
Triangulation is highly inaccurate
- Reflection
- Refraction
TRIANGULATION
1 2
3 4
Each point
x,y co-ordinates
Collect several training data sets
at different orientations
Beacon 1 RSSI!
Beacon 2 RSSI!
Beacon 3 RSSI!
Beacon 1 RSSI!
Beacon 2 RSSI!
Beacon 3 RSSI!
Beacon 1 RSSI!
Beacon 2 RSSI!
Beacon 3 RSSI!
Beacon 1 RSSI!
Beacon 2 RSSI!
Beacon 3 RSSI!
FINGERPRINTING
Mobile device receives
an RSSI from each
beacon, creating its
own data set.
The received data set is compared with the training
data set to estimate the most probable user location
1 2
3 4
FINGERPRINTING
TIBEACON MODULE
• Allows you to create up to 5 beacon regions!
• Regions defined by;!
- UUID!
- UUID and major!
- UUID, major, and minor
ACCESSINGTHE MODULE
To access the module in JavaScript, you would do the
following;!
!
!
TheTiBeacon variable is a reference to the Module
object.
var TiBeacon = require("co.mobiledatasystems.tibeacon");
REFERENCE
The following functions are exposed;!
• initializeBeaconMonitoring - used to register the app with core location services
• startMonitoringBeaconRegion - can be called several times and is used to
register a region with core location services
• stopMonitoringBeaconRegion - used to stop and clear down a region and
remove it from core location services!
• stopAllBeacons - used to stop and clear down all the beacon regions and remove
them all from core location services!
• sendLocalNotification - a convenience function that allows you to send an
immediate local notification
initializeBeaconMonitoring
arguments:!
• success - A function that is called when the module successfully registers with core location
services.!
• error - A function that is called when the module fails to register with core location services.!
• region - A function that is called when we detect we have entered or exited a beacon region.!
• ranged - A function that is called whenever we successfully process beacon monitoring (roughly
every second) and returns the beacons found.!
• change - A function that is called when we detect another beacon is the nearest one.!
purpose: Used to register the app with core location services.We specify the functions that will be called
when one of the modules events fire.
initializeBeaconMonitoring
TiBeacon.initializeBeaconMonitoring({
success:function(e){
//called when we have registered core location services
},
error:function(e){
//called if we fail to register the core location services
alert("This device doesn't support iBeacons");
},
region:function(e){
//called when we enter or exit a region
},
ranged:function(e){
//when the app is in foreground, this returns all the beacons
},
change:function(e){
//called when a new beacon becomes the nearest one
}
});
!
startMonitoringBeaconRegion
arguments: !
• uuid -The uuid we will listen for, estimotes use this by default ‘B9407F30-F5F8-466E-
AFF9-25556B57FE6D’.!
• major -The major value that the beacon will transmit (optional, may be omitted).!
• minor -The minor value that the beacon will transmit (optional, may be omitted).!
• identifier - A string we use to identify the region. It is returned in the beacon data so we can identify the
region the beacon belongs to.!
• notifyEntryStateOnDisplay - Should be left set to true, used for module debugging purposes.!
• keepRanging - When we have exited a region, if false ranging will be switched off until we detect we
entered the region again. This may be slow but significantly saves battery power. Setting to true leaves
ranging on, improving performance at the expense of power consumption.
startMonitoringBeaconRegion
purpose: !
We call this once we have successfully registered the module with core location services. Core
location services will detect when we have entered or exited a beacon region, even if the app is
no longer running and will fire the regionChanged event.This is exposed in the region event in
the 'initializeBeaconMonitoring' function.!
If the app is running in foreground and the 'keepRanging' argument is 'true' then regardless of
whether we are in a region we will continue to check for beacons.!
If a beacon is detected that belongs to the beacon region, its data is returned in the ranged
event.This is exposed in the ranged event in the 'initializeBeaconMonitoring' function. If we
detect that a different beacon in the same region is now neared then the change event is fired.
startMonitoringBeaconRegion
// begin monitoring a specific region.
// must initialise beacons before calling this method
// we can call this several times to create different regions to monitor
!
beacons.startMonitoringBeaconRegion({
uuid:'B9407F30-F5F8-466E-AFF9-25556B57FE6D',
identifier:'all', // a logical name that is returned when beacons
// fire events so we can easily identify which
// region they belong to
!
notifyEntryStateOnDisplay:true,
!
keepRanging:true // tells the module to keep on ranging even if
// no beacons are in a region, this improves
// performance at the expense of power consumption
});
!
!
stopMonitoringBeaconRegion
arguments:!
• identifier -The string we used to identify the region when we started monitoring.!
purpose: Stop monitoring for that region and remove it from core location services.You can therefore safely
call startMonitoringBeaconRegion again to begin monitoring for the same region if you then wish.
stopMonitoringBeaconRegion
arguments:!
• identifier -The string we used to identify the region when we started monitoring.!
purpose: Stop monitoring for that region and remove it from core location services.You can therefore safely
call startMonitoringBeaconRegion again to begin monitoring for the same region if you then wish.
stopAllBeacons
arguments: None!
purpose: Stop monitoring for all the regions and remove them from core location services.
stopping Monitoring
// stop monitoring for a specific region
!
// we can stop a specific region
TiBeacon.stopMonitoringBeaconRegion({
identifier:'all'
});
!
// …or we can stop monitoring all the regions
// stop monitoring all regions
TiBeacon.stopAllBeacons();
sendLocalNotification
arguments:!
• message -The string we will display in the local notification.!
• sound -The sound we will play when the local notification fires.!
purpose:A convenience method to send a local notification. Even if the app is no
longer running, if we detect a region event (i.e. we have entered or exited a
region) core location services will open the app and trigger the region event for a
few seconds before shutting down again.You can therefore call this function to
trigger a local notification to alert the user that they have entered or exited a
beacon region.
sendLocalNotification
TiBeacon.initializeBeaconMonitoring({
success:function(e){
//…
},
error:function(e){
//…
},
region:function(e){
// we can use the convenience method to trigger a local
// notification… even if the app isn't running!
!
// we can test for 'entered' or 'exited'
if(e.status === 'entered' && e.identifier === 'all'){
beacons.sendLocalNotification({
message:'Hello from the beacon demo',
sound:'/sounds/siren.mp3'
});
}
},
ranged:function(e){
//…
},
change:function(e){
//…
}
});
LICENSE
Commercial, Royalty free, see license details.!
You are allowed to use the module in as many titanium projects
as you like, including any commercial apps you sell.
Martin Hudson MSc!
MAPM mobile data systems ltd.!
email: martin.hudson@mobiledatasystems.co
Public repo: https://bitbucket.org/tojoroja/tibeacon

Contenu connexe

Similaire à Using iBeacons in Titanium

iBeacons - the new low-powered way of location awareness
iBeacons - the new low-powered way of location awarenessiBeacons - the new low-powered way of location awareness
iBeacons - the new low-powered way of location awareness
Stefano Zanetti
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 series
openbala
 
Windows Phone 8 - 15 Location and Maps
Windows Phone 8 - 15 Location and MapsWindows Phone 8 - 15 Location and Maps
Windows Phone 8 - 15 Location and Maps
Oliver Scheer
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
Droidcon Berlin
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background Agents
Oliver Scheer
 

Similaire à Using iBeacons in Titanium (20)

iBeacons - the new low-powered way of location awareness
iBeacons - the new low-powered way of location awarenessiBeacons - the new low-powered way of location awareness
iBeacons - the new low-powered way of location awareness
 
Windows phone 7 series
Windows phone 7 seriesWindows phone 7 series
Windows phone 7 series
 
Droid con 2015 - experimenting monitoring and proximity techniques using andr...
Droid con 2015 - experimenting monitoring and proximity techniques using andr...Droid con 2015 - experimenting monitoring and proximity techniques using andr...
Droid con 2015 - experimenting monitoring and proximity techniques using andr...
 
Autonomous underwater vehicle positioning system(Project IEEE)
Autonomous underwater vehicle positioning system(Project IEEE)Autonomous underwater vehicle positioning system(Project IEEE)
Autonomous underwater vehicle positioning system(Project IEEE)
 
SFScon 2020 - Alex Bojeri - BLUESLEMON project autonomous UAS for landslides ...
SFScon 2020 - Alex Bojeri - BLUESLEMON project autonomous UAS for landslides ...SFScon 2020 - Alex Bojeri - BLUESLEMON project autonomous UAS for landslides ...
SFScon 2020 - Alex Bojeri - BLUESLEMON project autonomous UAS for landslides ...
 
Experimenting Monitoring and Proximity techniques using Android potential and...
Experimenting Monitoring and Proximity techniques using Android potential and...Experimenting Monitoring and Proximity techniques using Android potential and...
Experimenting Monitoring and Proximity techniques using Android potential and...
 
Rover technology ppt
Rover technology pptRover technology ppt
Rover technology ppt
 
Gigigo Keynote - Geofences & iBeacons
Gigigo Keynote - Geofences & iBeaconsGigigo Keynote - Geofences & iBeacons
Gigigo Keynote - Geofences & iBeacons
 
Developing context aware applications with iBeacons technology
Developing context aware applications with iBeacons technologyDeveloping context aware applications with iBeacons technology
Developing context aware applications with iBeacons technology
 
Headless Apps on BlackBerry 10.2.1
Headless Apps on BlackBerry 10.2.1Headless Apps on BlackBerry 10.2.1
Headless Apps on BlackBerry 10.2.1
 
Mobile development in age of Internet of Things and programming Apple Watch
Mobile development in age of Internet of Things and programming Apple WatchMobile development in age of Internet of Things and programming Apple Watch
Mobile development in age of Internet of Things and programming Apple Watch
 
Windows Phone 8 - 15 Location and Maps
Windows Phone 8 - 15 Location and MapsWindows Phone 8 - 15 Location and Maps
Windows Phone 8 - 15 Location and Maps
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
 
Alberto Guarino "When iPhones and Wearables Dance the Bluetooth Dance: Lesson...
Alberto Guarino "When iPhones and Wearables Dance the Bluetooth Dance: Lesson...Alberto Guarino "When iPhones and Wearables Dance the Bluetooth Dance: Lesson...
Alberto Guarino "When iPhones and Wearables Dance the Bluetooth Dance: Lesson...
 
I os developers_meetup_4_sessionon_locationservices
I os developers_meetup_4_sessionon_locationservicesI os developers_meetup_4_sessionon_locationservices
I os developers_meetup_4_sessionon_locationservices
 
iBeacons e le novità di BLE [Mokapp 2013]
iBeacons e le novità di BLE [Mokapp 2013]iBeacons e le novità di BLE [Mokapp 2013]
iBeacons e le novità di BLE [Mokapp 2013]
 
Building a Mobile Location Aware System with Beacons
Building a Mobile Location Aware System with BeaconsBuilding a Mobile Location Aware System with Beacons
Building a Mobile Location Aware System with Beacons
 
Integrated Network Operation & Monitoring
Integrated Network Operation & MonitoringIntegrated Network Operation & Monitoring
Integrated Network Operation & Monitoring
 
Windows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background AgentsWindows Phone 8 - 6 Background Agents
Windows Phone 8 - 6 Background Agents
 
[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...[Part 2] automation of home appliances using raspberry pi – implementation of...
[Part 2] automation of home appliances using raspberry pi – implementation of...
 

Dernier

Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Cara Menggugurkan Kandungan 087776558899
 

Dernier (6)

Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312
 
Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & Examples
 
Mobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsMobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s Tools
 
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
 
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
 

Using iBeacons in Titanium

  • 1. Implementing BeaconTechnology inTitanium!! Martin Hudson!! BEACONS Mobile Data Systems! http://www.mobiledatasystems.co
  • 2. INDOOR LOCALISATION • GPS is not an option - Low spatial discrimination (10m)! - Poor signal penetrance through buildings! • Unique building shapes - Signal reflection issues! • Noisy environment - Many signals, varying crowd density
  • 3. BEACONTECHNOLOGY • Small Bluetooth emitting devices! • Battery powered! • Significantly larger range than NFC! • Uses Bluetooth Low Energy (LE) protocol
  • 4. Geofencing Passive process, alerting user to location based information! Outdoors - Reminders! Indoors - Art gallery walkthroughs! - Special offers Geolocation Active process, providing user with precise location! Outdoors & Indoors - Route navigation USE CASES
  • 5. Geofencing Passive process, alerting user to location based information! Outdoors - Reminders! Indoors - Art gallery walkthroughs! - Special offers Geolocation Active process, providing user with precise location! Outdoors & Indoors - Route navigation USE CASES
  • 6. BARRIERSTO ENTRY • Upfront costs - Beacons, licences for services! • Implementation - Installation of beacons, databases, content! • Security - Physical and software
  • 8. BEACONS IN ACTION UUID Major RSSI Minor Power Complement
  • 22. 1 2 3 4 Triangulation is highly inaccurate - Reflection TRIANGULATION
  • 23. 1 2 3 4 Triangulation is highly inaccurate - Reflection - Refraction TRIANGULATION
  • 24. 1 2 3 4 Each point x,y co-ordinates Collect several training data sets at different orientations Beacon 1 RSSI! Beacon 2 RSSI! Beacon 3 RSSI! Beacon 1 RSSI! Beacon 2 RSSI! Beacon 3 RSSI! Beacon 1 RSSI! Beacon 2 RSSI! Beacon 3 RSSI! Beacon 1 RSSI! Beacon 2 RSSI! Beacon 3 RSSI! FINGERPRINTING
  • 25. Mobile device receives an RSSI from each beacon, creating its own data set. The received data set is compared with the training data set to estimate the most probable user location 1 2 3 4 FINGERPRINTING
  • 26. TIBEACON MODULE • Allows you to create up to 5 beacon regions! • Regions defined by;! - UUID! - UUID and major! - UUID, major, and minor
  • 27. ACCESSINGTHE MODULE To access the module in JavaScript, you would do the following;! ! ! TheTiBeacon variable is a reference to the Module object. var TiBeacon = require("co.mobiledatasystems.tibeacon");
  • 28. REFERENCE The following functions are exposed;! • initializeBeaconMonitoring - used to register the app with core location services • startMonitoringBeaconRegion - can be called several times and is used to register a region with core location services • stopMonitoringBeaconRegion - used to stop and clear down a region and remove it from core location services! • stopAllBeacons - used to stop and clear down all the beacon regions and remove them all from core location services! • sendLocalNotification - a convenience function that allows you to send an immediate local notification
  • 29. initializeBeaconMonitoring arguments:! • success - A function that is called when the module successfully registers with core location services.! • error - A function that is called when the module fails to register with core location services.! • region - A function that is called when we detect we have entered or exited a beacon region.! • ranged - A function that is called whenever we successfully process beacon monitoring (roughly every second) and returns the beacons found.! • change - A function that is called when we detect another beacon is the nearest one.! purpose: Used to register the app with core location services.We specify the functions that will be called when one of the modules events fire.
  • 30. initializeBeaconMonitoring TiBeacon.initializeBeaconMonitoring({ success:function(e){ //called when we have registered core location services }, error:function(e){ //called if we fail to register the core location services alert("This device doesn't support iBeacons"); }, region:function(e){ //called when we enter or exit a region }, ranged:function(e){ //when the app is in foreground, this returns all the beacons }, change:function(e){ //called when a new beacon becomes the nearest one } }); !
  • 31. startMonitoringBeaconRegion arguments: ! • uuid -The uuid we will listen for, estimotes use this by default ‘B9407F30-F5F8-466E- AFF9-25556B57FE6D’.! • major -The major value that the beacon will transmit (optional, may be omitted).! • minor -The minor value that the beacon will transmit (optional, may be omitted).! • identifier - A string we use to identify the region. It is returned in the beacon data so we can identify the region the beacon belongs to.! • notifyEntryStateOnDisplay - Should be left set to true, used for module debugging purposes.! • keepRanging - When we have exited a region, if false ranging will be switched off until we detect we entered the region again. This may be slow but significantly saves battery power. Setting to true leaves ranging on, improving performance at the expense of power consumption.
  • 32. startMonitoringBeaconRegion purpose: ! We call this once we have successfully registered the module with core location services. Core location services will detect when we have entered or exited a beacon region, even if the app is no longer running and will fire the regionChanged event.This is exposed in the region event in the 'initializeBeaconMonitoring' function.! If the app is running in foreground and the 'keepRanging' argument is 'true' then regardless of whether we are in a region we will continue to check for beacons.! If a beacon is detected that belongs to the beacon region, its data is returned in the ranged event.This is exposed in the ranged event in the 'initializeBeaconMonitoring' function. If we detect that a different beacon in the same region is now neared then the change event is fired.
  • 33. startMonitoringBeaconRegion // begin monitoring a specific region. // must initialise beacons before calling this method // we can call this several times to create different regions to monitor ! beacons.startMonitoringBeaconRegion({ uuid:'B9407F30-F5F8-466E-AFF9-25556B57FE6D', identifier:'all', // a logical name that is returned when beacons // fire events so we can easily identify which // region they belong to ! notifyEntryStateOnDisplay:true, ! keepRanging:true // tells the module to keep on ranging even if // no beacons are in a region, this improves // performance at the expense of power consumption }); ! !
  • 34. stopMonitoringBeaconRegion arguments:! • identifier -The string we used to identify the region when we started monitoring.! purpose: Stop monitoring for that region and remove it from core location services.You can therefore safely call startMonitoringBeaconRegion again to begin monitoring for the same region if you then wish.
  • 35. stopMonitoringBeaconRegion arguments:! • identifier -The string we used to identify the region when we started monitoring.! purpose: Stop monitoring for that region and remove it from core location services.You can therefore safely call startMonitoringBeaconRegion again to begin monitoring for the same region if you then wish. stopAllBeacons arguments: None! purpose: Stop monitoring for all the regions and remove them from core location services.
  • 36. stopping Monitoring // stop monitoring for a specific region ! // we can stop a specific region TiBeacon.stopMonitoringBeaconRegion({ identifier:'all' }); ! // …or we can stop monitoring all the regions // stop monitoring all regions TiBeacon.stopAllBeacons();
  • 37. sendLocalNotification arguments:! • message -The string we will display in the local notification.! • sound -The sound we will play when the local notification fires.! purpose:A convenience method to send a local notification. Even if the app is no longer running, if we detect a region event (i.e. we have entered or exited a region) core location services will open the app and trigger the region event for a few seconds before shutting down again.You can therefore call this function to trigger a local notification to alert the user that they have entered or exited a beacon region.
  • 38. sendLocalNotification TiBeacon.initializeBeaconMonitoring({ success:function(e){ //… }, error:function(e){ //… }, region:function(e){ // we can use the convenience method to trigger a local // notification… even if the app isn't running! ! // we can test for 'entered' or 'exited' if(e.status === 'entered' && e.identifier === 'all'){ beacons.sendLocalNotification({ message:'Hello from the beacon demo', sound:'/sounds/siren.mp3' }); } }, ranged:function(e){ //… }, change:function(e){ //… } });
  • 39. LICENSE Commercial, Royalty free, see license details.! You are allowed to use the module in as many titanium projects as you like, including any commercial apps you sell. Martin Hudson MSc! MAPM mobile data systems ltd.! email: martin.hudson@mobiledatasystems.co Public repo: https://bitbucket.org/tojoroja/tibeacon