Google fit padometer - android

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.

Related

How to use a specific satellite constellation for positioning in Android?

Is there a way to use just a specific constellation set in Android? As far as I know the smartphone would query all available constellations & somehow pick the best one to be used further by other apps that show user location.
In my specific case, I want to get data from a specific constellation set, say GLONAS or GPS. Is that possible? (Again, as far as I know there are ways to check if the data being used is from a specific constellation, but I want the other way around, where I'm only using the data from a specific constellation?)
I'm no expert, but I was researching if it was possible to do so, and found the descrption of the method/API on this page:
https://barbeau.medium.com/gnss-interrupted-the-hidden-android-setting-you-need-to-know-d812d28a3821
Qoute:
Device with Android 7.0 and higher support an official API for pseudorange measurements and navigation messages, which allows developers to calculate positions within apps. Previously, all apps were limited to using positions calculated by the GNSS hardware, which was a black box. The European Union GNSS Agency (GSA) has even produced a how-to manual describing the technical process of using raw measurement data. Google has also open-sourced a set of tools to process and visualize measurements.

Steps fluctuate when using Google Fit

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!

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.

android dynamically change display coordinates for other apps

-- Background:
We are working on a device called Run-n-Read which tracks a user's head movements and translates it to the appropriate text movement on the screen. The use is to help a person read while running on a treadmill or riding in a moving vehicle. You can check a small video on http://weartrons.com.
We have created a small device which contains accelerometer, a micro-controller and bluetooth to send the head location in real time to the tablet every ~17ms to match with the 60fps of display. We used Processing IDE to create a basic app with downloaded book pages to test the prototype.
-- PROBLEM:
We would like to run our app in the background and dynamically change the display coordinates of any other app contents on the screen, whether it's an eBook or twitter etc. Basically our algorithms are running on our external device and sending the display coordinates (in pixels to move up-down left-right) at about 60 times per second. We would like the Android display origin to move by that many pixels during every frame rendering.
I am an electronics engineer and it's my first stab at writing any piece of software, so please let me know if I was not clear or the answer is too obvious.
Android as OS makes sure applications are encapsulated and oblivious from each other. All inter-app communication is done through what is called intents which are in the end messages. And you have to know exactly the other apps declared intents and on top of that you have no assurances that all apps implemented the kind of feature you are requesting.
Therefore I don't think what you want to do (the coordinates change) is possible at all without tinkering with the OS source code and compiling your own version of Android.

Categories

Resources