JackKirk Well-Known Member Licensed User Longtime User Nov 12, 2016 #1 At my request: https://www.b4x.com/android/forum/threads/request-for-phonesensors-accuracy-property.72930/ Erel just added an Accuracy property to the Phonesensors object: https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/#post-463591 He also added a Timestamp property which is also very useful for my purposes (I was using DateTime.Now which is not as accurate). I am assigning the Timestamp property to a Long but I seem to be getting milliseconds, not nanoseconds as indicated in the documentation. Am I doing something wrong or is the Timestamp property faulty. Thanks...
At my request: https://www.b4x.com/android/forum/threads/request-for-phonesensors-accuracy-property.72930/ Erel just added an Accuracy property to the Phonesensors object: https://www.b4x.com/android/forum/threads/updates-to-internal-libraries.59340/#post-463591 He also added a Timestamp property which is also very useful for my purposes (I was using DateTime.Now which is not as accurate). I am assigning the Timestamp property to a Long but I seem to be getting milliseconds, not nanoseconds as indicated in the documentation. Am I doing something wrong or is the Timestamp property faulty. Thanks...
Erel B4X founder Staff member Licensed User Longtime User Nov 13, 2016 #2 The Phone library returns the value as it receives from the OS: https://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp There are various issues related to inconsistency with the timestamp meaning. However it should be nanoseconds. https://code.google.com/p/android/issues/detail?id=7981 Upvote 0
The Phone library returns the value as it receives from the OS: https://developer.android.com/reference/android/hardware/SensorEvent.html#timestamp There are various issues related to inconsistency with the timestamp meaning. However it should be nanoseconds. https://code.google.com/p/android/issues/detail?id=7981
JackKirk Well-Known Member Licensed User Longtime User Nov 13, 2016 #3 Yuk - looks like another musty little corner - guess its back to Datetime.Now for consistency across all Android devices. Upvote 0
Yuk - looks like another musty little corner - guess its back to Datetime.Now for consistency across all Android devices.