Steps fluctuate when using Google Fit - android

I've developed a fitness app which uses Google Fit API to capture the users steps, calories and exercises minutes.
After rolling out the app, I've received a number of feedback that the steps fluctuate( e.g one moment it increases to 2300, next moment it drops to 1900). When the user cross check against the Google Fit app, they see the same.
I am using the Recording API to get the latest steps. I was only able too simulate this fluctuation when i shake the phone continuously ( instead of walking) in the attempt to increase the steps.
What I notice was the steps increase but within moments it drop back to the original step before i start shaking the phone. I was wondering if Google Fit some how detected that i was "cheating" and reverted the steps. Right after that when i walk normally, the steps still reverted. I takes a while before Fit begin to record my steps again.
However my users claimed that they did not shake the phone but instead walked normally but still face the issue.
Would really appreciate it if anyone could enlighten me as i couldn't find any post on this. TIA!

Related

Real Time Multiplayer Best way for pushing updates on android

I'm currently developing a Real-Time Multiplayer top down shooter.
The Multiplayer is "working" and I'm currently struggling with pushing the player updates such as position and fired shots.
My first try was using the service "appWarp" which worked perfectly but isn't free and only provided around 2 Million Messages in the free version which i completely filled in around 2 weeks with only 2 devices and 2 players. ( Maybe way to much updates send )
Then I implemented Google Play Game Services and tried using this to send the updates:
I'm able to use "sendUnreliableMessage" for Position updates, which works faster than appWarp used to. I use interpolation to get over the package loss issue here which works alright.
But here the problem is with firing shots. The nature of UnreliableMessages is that packages can get lost, which happens a lot. Shooting 4 times only makes around 1 or 2 of them appear on the other device. Which means that 2 packages are getting lost. Using "sendRealiableMessage" i can achieve around 2-3 packages getting through but with, of course a higher latency. Which makes the shots appear after around 1 second on the other device.
For a fast paced real time multiplayer game this is not what i wanted to achieve.
So what is a better way to do this ? I found web based solutions like socket.io but don't really know which fits the best for my needs.
I found this website which contains a big list of every web based solution for this problem but don't really know where to start.
https://www.leggetter.co.uk/real-time-web-technologies-guide/#_hosted-realtime-services
I am really really thankful if someone could help me with this problem!.
Since you're asking for opinion, I can suggest you try Multiplayer in Unity. It is the leading game engine as of today, so you can expect a huge support from a stupendous user-base.
Another option would be Photon. Hope these suggestions helps.

Google fit padometer

I want to use google fit Activity detection function in my application .When my phone doesn't have google fit application Everything is working fine except the padometer part (Means the steps detection in background). And when i install google fit app in my phone and turn on activity detection the steps are counted and working fine .
So my question is in that way my application is gonna be google fit app dependent .If user don't have fit app installed my application won't show the sensor data(steps,activity name,distance etc). So correct me here How to deal with that problem .Because google fit application not came in all devices by default. So without google fit app how i can sense padometer data and activity name and distance etc..
You can refer to step detection algo in https://github.com/bagilevi/android-pedometer. To make your results more accurate, whatever values you get from this algo is not stable, so store it in a list say 10 values and for every 10 values, find 2 minimum and 2 maximum of it. Eliminate them and for remaining 6 values, calculate the average and this would give you a better result.

Is there a way to keep people from cheating a pedometer?

I want to create an android app that involves keeping track of your steps however it will be crucial to the app that the person will not be able to increase the steps taken by shaking their phone. Is there any method to make sure that the person is actually moving and not just shaking their phone

Google Glass Heating Issue

I am developing a glassware, which shows you cards (images + text) from a list. To see all the Cards one by one you just need to move you head around and the information got changed. The application is some where similar to the What's Around glassware.
I have implemented SensorManager to get the users current orientation, And based on it current direction the application decides which card to show.
here all the images are coming from the web server so each time when card is selected there is a network call for the images (Caching Bitmaps is implemented).
Now, What my problem is, when I start and use the application the glass got Heat-Up so quickly in less than 1 min.
Could any one please suggest me any thing to fix this issue.
Note : google glass os version : XE22

App using Accelerometer in Android

I am biggener in android. I am trying to implement a fitness app that can keep track of the running speed and running distance in Android. How can i calculate the above mentioned things ?
In theory you could analyse windows of accelerometer data and count the number of peaks and the forces of those to determine running. Then, if the user has entered an average step distance, that could give an equation of distance.
Would be a lot easier using GPS as it provides the speed directly.
You might be interested in this library: https://github.com/mcharmas/Android-ReactiveLocation I recently added Activity Recognition, which can tell you whenever a user starts running. Might take a little while from one begins to run before the phone 'knows' that as being the activity, though.

Categories

Resources