agenda€¦ · beacons & gps case study android & beacons dummy app • • • ble....

43

Upload: others

Post on 18-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 2: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Agenda

What, Why & How

Bluetooth versus BLE

Beacons & GPS

Case Study

Android & Beacons

Dummy App

Page 3: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 4: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Page 5: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 6: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 7: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Page 8: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

BLE

Page 9: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 10: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Security Equipments

Page 11: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 12: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Page 13: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 14: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Advantage to Developers

Before BLE After BLE

An app would need to be running in the foreground or background to communicate with a BLE device.

An app can be launched into background if a specific BLE device is recognized.

Page 15: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

••

Page 16: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 17: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 18: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 19: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 20: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 21: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 22: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 23: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 24: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 25: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 26: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 27: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 28: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 29: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 30: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

••

••

Page 31: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 32: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 33: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Page 34: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

•••

Page 35: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 37: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 38: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Use Case : Luggage Tracker

Page 39: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Implementing Broadcast Receiver@Override

public void onReceive(Context context, Intent intent) {// TODO Auto-generated method stub

if (BluetoothAdapter.ACTION_STATE_CHANGED.equals(intent.getAction())) {int state = intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, -1);Intent i;switch (state) {case BluetoothAdapter.STATE_OFF:

if (MyBeaconService.isStarted) {i = new Intent(context, MyBeaconIntentService.class);i.putExtra("StartBeaconService", false);context.stopService(i);

}Log.i(TAG, "Bluetooth State : OFF");break;

case BluetoothAdapter.STATE_ON:Log.i(TAG, "Bluetooth State : ON");if (!MyBeaconService.isStarted) {

i = new Intent(context, MyBeaconIntentService.class);i.putExtra("StartBeaconService", true);context.startService(i);

}break;

}}

}

Page 40: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Registering Ranging Listener in Service’s onCreate() method

@Overridepublic void onCreate() {

super.onCreate();

beaconManager.setMonitoringListener(new BeaconManager.MonitoringListener() {

@Overridepublic void onExitedRegion(Region arg0) {

// TODO Auto-generated method stubUtil.postNotification(getBaseContext(),

"Alert Luggage Tracker",notificationManager, 1,AllDemosActivity.class);

}

@Overridepublic void onEnteredRegion(Region arg0, List<Beacon> arg1) {

// TODO Auto-generated method stub

}});

}

Page 41: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need

Connecting to BeaconManager’s Service in Service’s onStartCommand()@Override

public int onStartCommand(Intent intent, int flags, int startId) {beaconManager.connect(new BeaconManager.ServiceReadyCallback() {

@Overridepublic void onServiceReady() {

try {beaconManager.startMonitoring(BEACONS);

} catch (RemoteException e) {Log.e(TAG, "Cannot start ranging", e);

} catch (Exception e) {e.printStackTrace();

}}

});

return START_NOT_STICKY;}

Page 42: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need
Page 43: Agenda€¦ · Beacons & GPS Case Study Android & Beacons Dummy App • • • BLE. Security Equipments • • • Advantage to Developers Before BLE After BLE An app would need