EstimoteBeacons

Improve this doc

$ ionic plugin add cordova-plugin-estimote

Repo: https://github.com/evothings/phonegap-estimotebeacons

This plugin enables communication between a phone and Estimote Beacons peripherals.

Supported platforms

Static Members

ProximityUnknown

Proximity value

ProximityImmediate

Proximity value

ProximityNear

Proximity value

ProximityFar

Proximity value

BeaconColorUnknown

Beacon colour

BeaconColorMintCocktail

Beacon colour

BeaconColorIcyMarshmallow

Beacon colour

BeaconColorBlueberryPie

Beacon colour

BeaconColorSweetBeetroot

Beacon colour.

BeaconColorCandyFloss

Beacon colour

BeaconColorLemonTart

Beacon colour

BeaconColorVanillaJello

Beacon colour

BeaconColorLiquoriceSwirl

Beacon colour

BeaconColorWhite

Beacon colour

BeaconColorTransparent

Beacon colour

RegionStateUnknown

Region state

RegionStateOutside

Region state

RegionStateInside

Region state

requestWhenInUseAuthorization()

Ask the user for permission to use location services while the app is in the foreground. You need to call this function or requestAlwaysAuthorization on iOS 8+. Does nothing on other platforms.

Returns: Promise<any>

requestAlwaysAuthorization()

Ask the user for permission to use location services whenever the app is running. You need to call this function or requestWhenInUseAuthorization on iOS 8+. Does nothing on other platforms.

Returns: Promise<any>

authorizationStatus()

Get the current location authorization status. Implemented on iOS 8+. Does nothing on other platforms.

Returns: Promise<any>

startAdvertisingAsBeacon(uuid, major, minor, regionId)

Start advertising as a beacon.

Param Type Details
uuid string

UUID string the beacon should advertise (mandatory).

major number

Major value to advertise (mandatory).

minor number

Minor value to advertise (mandatory).

regionId string

Identifier of the region used to advertise (mandatory).

Returns: Promise<any>

stopAdvertisingAsBeacon()

Stop advertising as a beacon.

Returns: Promise<any>

enableAnalytics(enable)

Enable analytics.

Param Type Details
enable number

Boolean value to turn analytics on or off (mandatory).

Returns: Promise<any>

isAnalyticsEnabled()

Test if analytics is enabled.

Returns: Promise<any>

isAuthorized()

Test if App ID and App Token is set.

Returns: Promise<any>

setupAppIDAndAppToken(appID, appToken)

Set App ID and App Token.

Param Type Details
appID string

The App ID (mandatory).

appToken string

The App Token (mandatory).

Returns: Promise<any>

startEstimoteBeaconDiscovery()

Start scanning for all nearby beacons using CoreBluetooth (no region object is used). Available on iOS.

Returns: Observable<any> Returns an Observable that notifies of each beacon discovered.

stopEstimoteBeaconDiscovery()

Stop CoreBluetooth scan. Available on iOS.

Returns: Promise<any>

startRangingBeaconsInRegion(region)

Start ranging beacons. Available on iOS and Android.

Param Type Details
region EstimoteBeaconRegion

Dictionary with region properties (mandatory).

Returns: Observable<any> Returns an Observable that notifies of each beacon discovered.

stopRangingBeaconsInRegion(region)

Stop ranging beacons. Available on iOS and Android.

Param Type Details
region EstimoteBeaconRegion

Dictionary with region properties (mandatory).

Returns: Promise<any>

startRangingSecureBeaconsInRegion()

Start ranging secure beacons. Available on iOS. This function has the same parameters/behaviour as startRangingBeaconsInRegion. To use secure beacons set the App ID and App Token using setupAppIDAndAppToken.

Returns: Observable<any>

stopRangingSecureBeaconsInRegion()

Stop ranging secure beacons. Available on iOS. This function has the same parameters/behaviour as stopRangingBeaconsInRegion.

Returns: Promise<any>

startMonitoringForRegion(region, notifyEntryStateOnDisplay)

Start monitoring beacons. Available on iOS and Android.

Param Type Details
region EstimoteBeaconRegion

Dictionary with region properties (mandatory).

notifyEntryStateOnDisplay boolean

Set to true to detect if you are inside a region when the user turns display on, see href="https://developer.apple.com/library/prerelease/ios/documentation/CoreLocation/Reference/CLBeaconRegion_class/index.html#//apple_ref/occ/instp/CLBeaconRegion/notifyEntryStateOnDisplay|iOS">https://developer.apple.com/library/prerelease/ios/documentation/CoreLocation/Reference/CLBeaconRegion_class/index.html#//apple_ref/occ/instp/CLBeaconRegion/notifyEntryStateOnDisplay|iOS documentation</a> for further details (optional, defaults to false, iOS only).

Returns: Observable<any> Returns an Observable that notifies of each region state discovered.

stopMonitoringForRegion(region)

Stop monitoring beacons. Available on iOS and Android.

Param Type Details
region EstimoteBeaconRegion

Dictionary with region properties (mandatory).

Returns: Promise<any>

startSecureMonitoringForRegion(region, notifyEntryStateOnDisplay)

Start monitoring secure beacons. Available on iOS. This function has the same parameters/behaviour as EstimoteBeacons.startMonitoringForRegion. To use secure beacons set the App ID and App Token using setupAppIDAndAppToken.

Param Type Details
region EstimoteBeaconRegion

Region

notifyEntryStateOnDisplay boolean

Returns: Observable<any>

stopSecureMonitoringForRegion(region)

Stop monitoring secure beacons. Available on iOS. This function has the same parameters/behaviour as stopMonitoringForRegion.

Param Type Details
region EstimoteBeaconRegion

Region

Returns: Promise<any>

connectToBeacon(beacon)

Connect to Estimote Beacon. Available on Android.

Param Type Details
beacon Beacon

Beacon to connect to.

Returns: Promise<any>

disconnectConnectedBeacon()

Disconnect from connected Estimote Beacon. Available on Android.

Returns: Promise<any>

writeConnectedProximityUUID()

Write proximity UUID to connected Estimote Beacon. Available on Android.

writeConnectedMajor()

Write major to connected Estimote Beacon. Available on Android.

writeConnectedMinor()

Write minor to connected Estimote Beacon. Available on Android.

EstimoteBeaconRegion

Param Type Details
state
(optional)
string
major number
minor number
identifier
(optional)
string
uuid string

API

Native

General