How to detect acceleration events with BlueSTSDK Android App?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-26 6:29 AM
Hi at all,
I am using the BlueSTSDK Android App to receive data transfered via Bluetooth Low Energy by the STEVAL-STLKT01V1 SensorTile.I would like to detect accelerometer events as orientations, single taps, etc, with this app but I don't undestand how to unblock the 'Accelerometer Events' in the 'Feature list' activity.In the FeatureAccelerationEvent.java file is reported that I must call the following functions:
- detectEvent()- onDetectableEventChange()but I don't know where and how I must call this functions.
Is there anybody that can help me?
Best regards,
Tommaso#sensortile #bluestsdk- Labels:
-
Accelerometers
-
Gyroscopes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-26 8:35 AM
Hi Tommaso,
To receive an acceleration event you have to:
- enable the Feature notification (using the enableNotificaiton Node method)
- register a feature listener for the FeatureAccelerationEvent instance
- enable the event detection using the enableEvent(eventType, true) method.
When the board enables the detection of the event you will receive a callback on the
onDetectableEventChange method.
To stop detecting an event you have to use
enableEvent(eventType, false)
If you need more examples you can look to the
or theBest Regards
Giovanni
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-04-27 5:46 AM
Hi,
very thanks for your answer, I finally resolved my problems with the examples that you suggested me.Best Regards
Tommaso