From wiki.ginstr.com
Revision as of 13:14, 12 July 2017 by Mark (talk | contribs)
Jump to: navigation, search

GnIBeacon

Widget XML tag
<com.ginstr.widgets.GnIBeacon>
Description
GnIBeacon inherits regular Android View widget.
It provides the ability to collect BLE information and generate iBeacon fingerprints. After iBeacon fingerprint is generated gn:act_setOnBLE event is triggered

XML Attributes Description

Attribute Description
gn:scanTimeout timeout in miliseconds between two BLE readings
gn:scanDuration BLE reading time in miliseconds
gn:maxDistance max distance to valid iBeacon
gn:sortColumn sort fingerprint results by defined column

Can be

  • MAC
  • UUID
  • major
  • minor
  • txPower
  • rssi
  • distance
gn:sortOrder sort fingerprint results by defined sort order

Can be

  • asc or regular
  • desc or reverse
gn:returnedResultType type of returned list

Can be

  • MAC
  • UUID
  • major
  • minor
  • txPower
  • rssi
  • distance
gn:returnedResult max number of returned results

Can be

  • hardcoded, i.e. 100
gn:targetWidgetId represents a list widget where BLE fingerprint will be constantly stored

Can be

Example

<com.ginstr.widgets.GnIBeacon
  android:id="@+id/iBeacon" 
  android:layout_width="match_parent" 
  android:layout_height="wrap_content" 
  gn:scanTimeout="10000" 
  gn:scanDuration="5000" 
  gn:maxDistance="50" 
  gn:returnedResultType="MAC" 
  gn:returnedResult="1000" 
  gn:sortColumn="distance"
  gn:sortOrder="regular"			   
  gn:act_setOnBLE="[gn:act_copyData]|[@+id/iBeacon,@+id/page16_IBeaconDropDown]" />