From wiki.ginstr.com
Jump to: navigation, search
m (formatting)
m
Line 8: Line 8:
 
;Description
 
;Description
 
: <code>[[GnIBeacon]]</code> inherits regular Android <code>[http://developer.android.com/reference/android/widget/View.html View]</code> widget.
 
: <code>[[GnIBeacon]]</code> inherits regular Android <code>[http://developer.android.com/reference/android/widget/View.html View]</code> widget.
: It provides the ability to collect BLE information and generate iBeacon fingerprints. After iBeacon fingerprint is generated <code>[[gn:act_setOnBLE]]</code> event is triggered
+
: It provides the ability to collect BLE information and generate [[iBeacon]] fingerprints. After [[iBeacon]] fingerprint is generated <code>[[gn:act_setOnBLE]]</code> event is triggered
  
 
==XML Attributes Description==
 
==XML Attributes Description==
Line 23: Line 23:
 
|-
 
|-
 
| title="Attribute" | <code>gn:maxDistance</code>
 
| title="Attribute" | <code>gn:maxDistance</code>
| title="Description" | max distance to valid iBeacon
+
| title="Description" | max distance to valid [[iBeacon]]
 
|-
 
|-
 
| title="Attribute" | <code>gn:sortColumn</code>
 
| title="Attribute" | <code>gn:sortColumn</code>

Revision as of 13:14, 12 July 2017

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]" />