Is it possible to access the native step-counter on mobile platforms.
I was wondering if there was a way to see the number of steps displayed in the native health apps for ios and android.
I'm not looking for a way to count steps using the accelerometer on the device. Although if someone with more experience on mobile platforms recommends this method i would be willing to look into it.
Answer by Lukezin · Jul 29, 2016 at 12:29 PM
It is possible to access step-counter on Android by performing a query:
#if UNITY_ANDROID
[code goes here]
#endif
There is a free plugin that allows Unity to access sensors natively using the Android API. https://github.com/kshoji/Unity-Android-Sensor-Plugin
Remember, this is Android only, for iOS I have nothing figured out yet.
Hope to have helped.
Answer by Lukezin · Jul 28, 2016 at 05:40 PM
It is possible to access step-counter on Android by performing a query:
#if UNITY_ANDROID
[code goes here]
#endif
There is a free plugin that allows Unity to access sensors natively using the Android API. https://github.com/kshoji/Unity-Android-Sensor-Plugin
Just go to https://github.com/kshoji/Unity-Android-Sensor-Plugin/tree/develop/library/release Get the .jar file and drop it on your project's assets. The repository has more information on how to use, it's pretty straight forward and it works with the latest Google Android API calls.
Remember, this is Android only, for iOS I have nothing figured out yet.
Hope to have helped!