19
ESTIMOTE BEACONS DEVELOPMENT Get started by Mateusz Klimczak @ Movade

[Hack3City] Estimote Beacons development - get started

Embed Size (px)

DESCRIPTION

Presentation from Hack3City 2014 on 05.05.14 about getting started on Estimote Beacons development on iOS and Android platforms.

Citation preview

Page 1: [Hack3City] Estimote Beacons development - get started

ESTIMOTE BEACONS DEVELOPMENT

Get started by Mateusz Klimczak @ Movade

Page 2: [Hack3City] Estimote Beacons development - get started

IOS - REQUIREMENTS

Bluetooth Low Energy (4.0, AKA SMART), supported devices:

iPhone 4s+

iPad 3+

iPad mini 1+

iPod touch 5+

Page 3: [Hack3City] Estimote Beacons development - get started

IOS - INSTALLATION

Manual

CocoaPods - recommended

Page 4: [Hack3City] Estimote Beacons development - get started

COCOAPODS

CocoaPods is the Objective-C dependency manager

You specify the dependencies for your project in one easy text file

CocoaPods resolves dependencies between libraries, fetches source code for the dependencies, and creates and maintains an Xcode workspace to build your project

Page 5: [Hack3City] Estimote Beacons development - get started

COCOAPODS - USAGEInstallation (only first time):sudo gem install cocoapods

Create Podfile (in project directory):touch Podfile

Edit & save Podfile:platform :ios, 7.0 target :YourAppName do pod 'EstimoteSDK', '~> 1.3' end

Run CocoaPods (it can take a few minutes for the first time):pod install

From now you open .xcworkspace file instead of .xcodeproj file

Page 6: [Hack3City] Estimote Beacons development - get started

COCOAPODS - PROJECT

Page 7: [Hack3City] Estimote Beacons development - get started

COCOAPODS

GitHub:https://github.com/CocoaPods/CocoaPods

Official webpage (with pods search engine):http://cocoapods.org/

Page 8: [Hack3City] Estimote Beacons development - get started

IOS - PREREQUISITES

Add required frameworks to your project:

CoreBluetooth.framework

CoreLocation.framework

SystemConfiguration.framework

Page 9: [Hack3City] Estimote Beacons development - get started

IOS - PREREQUISITES

Page 10: [Hack3City] Estimote Beacons development - get started

IOS - PREREQUISITES

In your project settings add to Capabilities -> Background modes:

Use Bluetooth LE accessories

Acts as a Bluetooth LE accessory

Background fetch

Remote notifications

Page 11: [Hack3City] Estimote Beacons development - get started

IOS - PREREQUISITES

Page 12: [Hack3City] Estimote Beacons development - get started

IOS - MORE INFO

https://github.com/Estimote/iOS-SDK

Page 13: [Hack3City] Estimote Beacons development - get started

IOS - POTENTIAL PROBLEMS

From iOS 7.1 detecting beacons problem can appear, possible solutions:1. Shut down and restart - some people have reported that this is all that was needed to fix their device after the iOS 7.1 upgrade.2. Toggle Bluetooth OFF and back ON - Swipe up to access Control Center and tap the Bluetooth icon, wait at least 30 seconds, then toggle it back on. This can often repair a device which is experiencing connection issues. 3. Kill (force quit) the offending app - Start by double clicking Home to launch the multitasking cards interface. Touch and hold the card for the app, then toss it up and away. This will force the app to quit and it will be fully reloaded the next time the app is opened.4. Clear and reset your Bluetooth device pairing - Go to Settings>Bluetooth and tap on the (i) icon for the offending device. Tap on Forget this Device. Now you should be able to re-add and re-pair the Bluetooth hardware to your device." Source: https://community.estimote.com/hc/en-us/articles/201872076-Issues-with-detecting-beacons-in-iOS-7-1-

Page 14: [Hack3City] Estimote Beacons development - get started

ANDROID -REQUIREMENTS

Android 4.3 or above

Bluetooth Low Energy (4.0, AKA SMART)

Page 15: [Hack3City] Estimote Beacons development - get started

ANDROID - INSTALLATION

Copy estimote-sdk-preview.jar to your libs directory Download direct link: https://github.com/Estimote/Android-SDK/raw/master/EstimoteSDK/estimote-sdk-preview.jar

Page 16: [Hack3City] Estimote Beacons development - get started

ANDROID - INSTALLATION

Add following permissions and service declaration to your AndroidManifest.xml:

<service android:name="com.estimote.sdk.service.BeaconService" android:exported="false"/>

<uses-permission android:name="android.permission.BLUETOOTH"/> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

Page 17: [Hack3City] Estimote Beacons development - get started

ANDROID - MORE INFO

https://github.com/Estimote/Android-SDK

Page 18: [Hack3City] Estimote Beacons development - get started

SECURITY PROBLEM - BOTH PLATFORMS

Unprotected read&write!

Anyone can read what our beacon broadcast

Anyone can write to our beacon - change its UUID, range, frequency….

Page 19: [Hack3City] Estimote Beacons development - get started

CONTACT INFO

[email protected]

Facebook group: Hack3city Estimote