[App Request] Gyroscope Emulator/Virtual Gyroscope - Android Q&A, Help & Troubleshooting

I recently bought a cardboard. But cant taste many apps because my Android smartphone doesn't have a Gyroscope sensor. So i searched for an app that can mimic the gyroscope functionality by pressing keys or something.
I got these...
1. https://github.com/memsindustrygroup/Open-Source-Sensor-Fusion/wiki/Virtual Gyro
2. http://www.mcubemems.com/products/igyro/
These aren't any app, but proof that Virtual Gyroscope exists. Some lenoveo phones(Like K3 note) use them. So plz let me know, is there any app that can do the same effect in any android device with Accelerometer & Compass sensor. Or, any app that can mimic the effect pressing volume/headphone key.
only look left/right action is required , Accelerometer does look up/down.
Yes by this i wont get a head tracking experience, but at least I can look around and select files to watch videos. Developers can make app(if doesn't exist already) following this idea. I think, it will help many.
Thanks in advance

Hi, I'm also looking for some app that fakes gyro sensor as I have the same problem. In theory a dev could interpret those algorithms from that Github repo and make an emulator, unfortunately this is out of my knowledge.
So I hope someone could help us poor ungyroscoped people.

Yeah, it's big problem with most phones to use VR apps/games that require gyroscope. I have the same problem.
Google should think about gyro pseudo emulation with accelerometers in their Cardboard API or at least implement there something like this lib: https://code.google.com/p/openintents/wiki/SensorSimulator
so anyone could use different phone (with gyro) as remote gyro for phone in cardboard glasses or write gyro emulators much more easily (as this lib can open TCP port for remote sensors data).

Technically, yes, it should be possible, using Xposed.
I am working on a module that eliminate the jitter in unreliable phone's gyroscopes. It does so by hooking to the function that distpaches the various sensors' data to every apps that require them, and it fakes the values before these data get sent.
Since you can easily access any sensor's data, you can do any sensor fusion you want by using the accelerometer and magnetometer, or even just the touch screen, and then fake the gyroscope's values.
If you are interested, here is the Xposed module I'm working on, which shows how to hook to the gyroscope and fake the values:
On github: lrq3000/JitteryGyroFixForCardboard
And to implement sensor fusion, you can either use the new virtual sensors of Android 4, or code it yourself, there's a very good open source app that shows it all here:
On github: KEOpenSource/GyroscopeExplorer

Hey thank you for that info! I'll be taking a look at that as soon as I can, although I'm not an avid dev I hope we can get something for our phones.

shafiaszad said:
I recently bought a cardboard. But cant taste many apps because my Android smartphone doesn't have a Gyroscope sensor. So i searched for an app that can mimic the gyroscope functionality by pressing keys or something.
I got these...
1. https://github.com/memsindustrygroup/Open-Source-Sensor-Fusion/wiki/Virtual Gyro
2. http://www.mcubemems.com/products/igyro/
These aren't any app, but proof that Virtual Gyroscope exists. Some lenoveo phones(Like K3 note) use them. So plz let me know, is there any app that can do the same effect in any android device with Accelerometer & Compass sensor. Or, any app that can mimic the effect pressing volume/headphone key.
only look left/right action is required , Accelerometer does look up/down.
Yes by this i wont get a head tracking experience, but at least I can look around and select files to watch videos. Developers can make app(if doesn't exist already) following this idea. I think, it will help many.
Thanks in advance
Click to expand...
Click to collapse
Yes, same problem here. The facts, med-low or med or med-high device not attached by gyro, except xiaomi. Some people on quorra debated, they have idea to make an app which can do headtracking with camera by detecting pixel shift. Yes i like that idea and the idea sounds possible, but it out of my knowledge. Can anyone make app like that? Or maybe we can ask google to make the app?
Thanks

What about emulating gyro using accelerometer and compass? In the Google Play is app for phones without gyroscope, (we are in space: LINK) so it is possible

I would love to see something like this too. This dev has several VR apps and the head tracking all works perfectly on my Moto G 3rd gen which has no Gyro, so I know it is possible. I've played House of Terror and the head tracking works extremely well and pretty smooth too, I wonder what their method is, I assume compass + accelerometer. https://play.google.com/store/apps/developer?id=Lakento

shafiaszad said:
I recently bought a cardboard. But cant taste many apps because my Android smartphone doesn't have a Gyroscope sensor. So i searched for an app that can mimic the gyroscope functionality by pressing keys or something.
I got these...
1. https://github.com/memsindustrygroup/Open-Source-Sensor-Fusion/wiki/Virtual Gyro
2. http://www.mcubemems.com/products/igyro/
These aren't any app, but proof that Virtual Gyroscope exists. Some lenoveo phones(Like K3 note) use them. So plz let me know, is there any app that can do the same effect in any android device with Accelerometer & Compass sensor. Or, any app that can mimic the effect pressing volume/headphone key.
only look left/right action is required , Accelerometer does look up/down.
Yes by this i wont get a head tracking experience, but at least I can look around and select files to watch videos. Developers can make app(if doesn't exist already) following this idea. I think, it will help many.
Thanks in advance
Click to expand...
Click to collapse
Same problem. I also have a k3 note and it has a virtual gyro. i think there must be something that uses accelateometer and magnetometer to detect direction and angle.(and i think this is possible)

Guys try vr player from play store then goto settings and there would be orientation detector set it to accelerometer +compass and you are donw

Same Problem
lrq3000 said:
Technically, yes, it should be possible, using Xposed.
I am working on a module that eliminate the jitter in unreliable phone's gyroscopes. It does so by hooking to the function that distpaches the various sensors' data to every apps that require them, and it fakes the values before these data get sent.
Since you can easily access any sensor's data, you can do any sensor fusion you want by using the accelerometer and magnetometer, or even just the touch screen, and then fake the gyroscope's values.
If you are interested, here is the Xposed module I'm working on, which shows how to hook to the gyroscope and fake the values:
On github: lrq3000/JitteryGyroFixForCardboard
And to implement sensor fusion, you can either use the new virtual sensors of Android 4, or code it yourself, there's a very good open source app that shows it all here:
On github: KEOpenSource/GyroscopeExplorer
Click to expand...
Click to collapse
I bought a vr case and have the same problem my galaxy sm a510m (A5 2016) doesnt have gyro! When i saw that i couldnt believe it.... it opens with my fingerprint for the love of crist!!! :crying:

Any solutions?
I have a moto g 3 and can't experience Pokemon go neither vr visor from one plus
Sent from my MotoG3 using XDA-Developers mobile app

Is there still hope?
If there is no way (for whatever reason) to emulate a gyro...is there a method to add a gyroscope sensor to an android?
Sent from a Samsung Galaxy J7 user

Same here, i too need an APP that simulate the gyro functions.
Hope that someone could implement that using compass and accelerometer!
Thanks

Some app like this would be so cool...
I was a bit dissapointed after buying the Moto X Play and noticing it doesn't have gyroscope so no Augmented Reality on Pokemon GO.

Im so sad, i had a moto g2 and bought motog3 1 month ago, this thing doesnt have a gyroscope while motog2 had one. Is there no solution for this? I mean, with something like a virtual gyroscope

pokulan said:
What about emulating gyro using accelerometer and compass? In the Google Play is app for phones without gyroscope, (we are in space: LINK) so it is possible
Click to expand...
Click to collapse
I've tested with my Moto G 3rd and works well. I hope somebody develop some hook in Xposed to work with accelerometer and compass...

or lests just hope the pokemon go app support accelerometer + compass it in the future.

I feel where you all are coming from. I agree there needs to be an app, an xposed module, or something to get this functionality. I'm gonna try and figure this out, there's a post on stackoverflow about this. A guy was talking about how in order to do it you'd need to recreate files similar to the ones that poll the actual hardware. He's basically saying you need to create some sort of mock gyroscope polling code right above the hardware level. I don't think that's the best approach, we gotta go top down not bottom up on this. I don't know much about the inner workings of android but I know this, looking at how to grab sensor data just using a plain app uses the classes sensor and sensor manager. As far as i can tell these are fed with information by the sensor event listener. That is fed by the object sensor event. It states right on the documentation "This class represents a Sensor event and holds information such as the sensor's type, the time-stamp, accuracy and of course the sensor's data." Its a generic sensor class which means we could possibly give it a fake gyroscope right?
Now, back to the sensor event listener, on the documentation it says "The application doesn't own the event object passed as a parameter and therefore cannot hold on to it. The object may be part of an internal pool and may be reused by the framework.". That means sensor event listener is literally just the messenger and should take whatever it finds as long as its valid. It seems like it will take whatever is passed to it correctly if we can make an event that it hears.
Now, amazingly on the sensor event page shows some fantastic stuff. Sensor event class is literally a 4 field class and I believe gets its values from that "hardware polling code" that sits above the hardware level. (the code that other guy was talking about.). If we can just make up some sensor events that mimic a gyroscope using accelerometer + compass and hope that the sensor event listener is configured to pick it up (I don't see why not) then I think this could be a possible solution. With all that being said, I'm just a beginner when it comes to android. I'm a college kid with a background in c and java just trying to piece the puzzle pieces together and play some pokemon lol.
Edit: So I may have been way off the mark, I'm not sure anymore. I found this though, a way to use actual custom sensors with android http : // riansanderson.blogspot . com/2012/03/integrating-sensors-into-android . html . Sorry for the spaces, I can't post links. After more java delving it seems it is not possible to create your own spoofed sensor or sensor event if your code is not in the same package as android.hardware.Sensor or SensorEvent
Edit2: So I guess unless you can get code to run in that android.hardware package, you'd have to do something like that link above and make like a fake driver for fake hardware.. I suppose if you could modify android.hardware.sensor to just make a gyroscope sensor and take the values from the accelerometer and modify those on the fly.

Try this solution
hello all from Egypt
this tutorial isn't mine or my invention you can say it's information sharing
I am Waleed and i have Huawei honor 4x which has no gyroscope at all, but i found some solution to this problem which is:
1- you must have ROOT (without root you can't do anything at all)
2- install root explorer if it isn't installed in your mobile and be sure to allow root permission to it
3- download the attached xml file which activate soft gyroscope in your mobile and place this file in your SD card
4- open root explorer and copy the xml file you downloaded and go to this path "/system/etc/permissions" and paste the file there and be sure the file exists in this place
5- reboot the phone then install any app from Google play to check the gyroscope i suggest sensor box
6- I hope this information is valuable and useful for you
thanks

Related

[Q] Driver or app / use GPS to spoof magnetometer

There are a lot of devices out there without a built-in magnetometer, such as the Parrot Asteroid Smart (runs gingerbread, it's a double-DIN sized car stereo head unit). Without a magnetometer, lots of apps that expect one default to true north and otherwise don't function well. I've searched an there isn't a current app/driver that will respond to magnetometer direction requests with current (or previous) GPS heading.
So here's my plan:
create a driver that sits in between the magnetometer and user-ring applications. When a request is made for current compass direction, the driver redirects to the GPS and requests current (or if not moving, previous) heading. Voila! Apps that want to talk to the compass are now happy.
This could be used for other things as well, such as bypassing the internal magnetometer (on devices where there is one), useful for playing Ingress to override the cruddy compass experience (on my HTC one, which I prefer to call my HT cone).
So, why the post? I think I've searched pretty well, looking for "no compass", "no magnetometer" and '" simulate magnetometer' gps" but the only app I found was for some ancient version of Windows Mobile, and that app put predictive data in between the applications and GPS data, smoothing the GPS output. (The concept is the same, however .... intercept geo requests and respond with modified (or in my case, new) data.)
I'm getting to work creating a driver, but so far it's not very easy going, but it is almost going (thank you github, stackoverflow) but I can't be the first person to try and use GPS heading to simulate magnetometer direction. There are base classes that provide direction, 99% of the direction apps out there are simply requesting compass direction, certainly not crunching raw magnetometer data. Conceptually it should be easy to hook that call (compassGetDirection) and respond with gpsGetHeading data.
I still haven't asked a question. So, in the interest of being annoying (yes, <==noob), please assume all the above sentences are in the form of a question, like "what do you think of ..." and "have any of you ..." or "is it possible to ..."

Fix gyroscope drift and Google Cardboard

I'm hoping someone can help. I bought the P9000 as a low cost phone to demo Cardboard apps. It has everything I need, a good screen, copious memory, SD card storage, and all the required sensors.
Except it hasn't worked correctly, once. There is a drift to the left which makes VR apps impossible to use and there seems to be some mismatch between the viewer and the screen. Regardless of which viewer I use, having scanned the relevant we code and selecting the corresponding viewer profile, there is always a "double effect" the two images are not calibrated correctly so the entire experience is broken.
Does anyone know how to fix this? It's been present in every stock ROM and is also present in Aerom V4.
Thanks
You can try calibrating the gyro in Service Menu
Dial *#*#3646633#*#*
Go to Hardware Testing Tab > Sensor > Sensors Calibration > Gyroscope Calibration
Clear calibration, then calibrate for 20 od 40% tolerance (try what works best for You)
That's great 40% works and stops the drift, any hints on the overlay problem?
It's the distance between your eyes. The phone is a big screen and cardboard needs to be calibrated accordingly. Find the QR code for a similar sized phone, and use that. The QR code on the cardboard set I got produced the same problem, so I scanned a QR for an oppo phone with a5.5 inch screen. Worked for me.
I thought that too but it's not the case I have a number of phones with a 5.5 screen and I don't have this issue with them. I've got a VR headset which allows one to adjust the distance from eye to screen and the distance between the lenses. I cannot make this phone work properly in Cardboard.

[XPOSED] VirtualSensor - Emulate a gyroscope from the accelerometer and compass

Introduction
VirtualSensor is a module built on Xposed that creates several sensors on devices which do not have them. It does sensor fusion using the values from the accelerometer and the compass which are the two main requirements for this module.
There are currently 5 sensors emulated :
TYPE_ROTATION_VECTOR
TYPE_GYROSCOPE
TYPE_GEOMAGNETIC_ROTATION_VECTOR
TYPE_GRAVITY
TYPE_LINEAR_ACCELERATION
Being the most useful sensor for many applications, the gyroscope is the main sensor this project is about.
This module is born as an answer to personal frustration from not being able to use some applications after updating from my older Moto G (i.e. Photo Sphere) and later also as an answer to this thread.
Changelog
Code:
v1.5.1 - 02/08/2017:
This minor version fixes the module for Nougat devices.
See the changelog of v1.5.1 for the more information on what has changed for the major version 1.5.
v1.5 - 02/08/2017:
Finally a new release after (quite) a while. This release should fix the majority of bugs encountered on current and previous versions of Android.
With the precious help of people on Github, the cardboard hook has been (hopefully) improved.
The overall stability and reliability should be better now.
This release will stay marked as beta until relevant and good feedback is received, to please head over to Github if you can and report issues if any (or add to the exising issues to check wether they still exist)
v1.41 - 01/08/2016:
* Fixed the module, previous version broke it because of proguard minify, do not use version v1.4
v1.4 - 31/07/2016: /!\ This version is broken, avoid it /!\
* Added a check for already existing native sensors so that they don't get overridden by the module
* Now checks the values of the accelerometer and magnetic sensor against their accuracy. This means that the output values contain less noise without loosing too much precision
* Added a simple GUI to quickly get informations about the module. This part also calculates the values the gyroscope should return and compares them against the one the module actually returns
* Some hooks are now made on higher-level API (public available functions for apps), which means that specific device code should no longer break them
* Fixed a recurrent exception (ConcurrentModificationException)
v1.32 - 29/07/2016:
* Fix the mRequiredPermssion field no available on SDK < 20
Hotfix #2 for v1.3
v1.31 - 29/07/2016:
* Fixes the issue with SDK <= 18 where mStringType doesn't exist in the Sensor class
Hotfix for v1.3
v1.3 - 29/07/2016:
* Sensors are now added in a proper way. They should no longer accidentally override existing sensors / cause compatibility issues
* All gyroscope axes are fully functional !
* If it didn't work before for you on JellyBean-Lollipop, try now, it might (fixed the check for initialisation of SystemSensorManager)
* Started to work on a new filter system for the gyroscope mainly
v1.21 - 25/07/2016:
Hotfix for v1.2 to avoid crashes on JB devices.
v1.2 - 26/07/2016:
* Fixed compatibility with SDK18-22 (Android JellyBean 4.3 - Android Lolipop 5.1)
* Added a little more log
* Calculation for the gyroscope is now based on the calculated gravity sensor data, which (should) makes it work as intended in any orientation
* The virtual sensors now have a little more information in the created Sensor class, just to make sure this isn't an issue
v1.11 - 25/07/2016:
Hotfix for v1.1, fixes an exception raised in some cases when trying to get the accelerometer's min delay.
v1.1 - 25/07/2016:
* Added support for all SDK versions from SDK16 to SDK23+, this means all android versions starting from Jelly Bean should be supported
* Added a lot of new sensors : TYPE_ROTATION_VECTOR, TYPE_GEOMAGNETIC_ROTATION_VECTOR, TYPE_GRAVITY and TYPE_LINEAR_ACCELERATION
* Still no support for Pokémon GO though, working on it
* Some exceptions fixed
* Code refactored a lot
v1.0 - 23/07/2016:
Initial release.
Known issues
Right now, the Z-axis is not emulated as it always returned wrong values (Investigating this right now) Fixed
Some applications use the NDK instead of the SDK to access the sensors, the workaround is to hook them seperately, but that isn't done yet
There is some jitter even though the values are smoothed using a lowpass filter and averaged out
Disclaimer
Code:
Though it is unlikely this could happen given the modifications it does, the responsibility is yours for whatever happens after installing and using this module.
Download
Github : https://github.com/Frazew/VirtualSensor/releases/
Xposed Repository : http://repo.xposed.info/module/fr.frazew.virtualgyroscope
Contributing
There is a Github project for this module so please do not hesitate to contribute to it. I'll be glad to share knowledge and code. Please know that I'm not (yet? ) a professional coder and that errors are quite likely to happen.
XDA:DevDB Information
VirtualSensor, Xposed for all devices (see above for details)
Contributors
Frazew
Source Code: https://github.com/Frazew/VirtualSensor
Xposed Package Name: fr.frazew.virtualgyroscope
Version Information
Status: Testing
Current Stable Version: v1.5.1
Stable Release Date: 2017-08-02
Created 2016-07-23
Last Updated 2017-08-02
Reserved
I supposed you tested this with Pokemon GO, as is the reason of so many requests for a virtual gyroscope so I'll suppose is still nor working due my specific device.
Motorola Moto X Play, running CyanogenMod 13.
Thanks for your work!
Thanks for chance to get normal VR experience
Works great with Lenovo Vibe P1 (this device has a jittering problem with its own pseudo-gyro). Tested with Youtube 360 videos. Works great for watching up/down and rotate. As well as you said z-axis is not working at all, so it's impossible to move point of view to the left/right. Can help you with testing on my device, if you want. I have Lenovo Vibe P1 with Android 6.0, TWRP and Root.
P.S. Is there any way to turn on z-axis for testing, for example by using your project at github. I'm not sure if I will understand there something, I was coding before only at C#, but I can try.
OliverG96 said:
I supposed you tested this with Pokemon GO, as is the reason of so many requests for a virtual gyroscope so I'll suppose is still nor working due my specific device.
Motorola Moto X Play, running CyanogenMod 13.
Thanks for your work!
Click to expand...
Click to collapse
I did not test it with Pokémon GO, however I think the hook will have to be made in the app itself. I'll look into it right now
EDIT: Pokémon GO uses the TYPE_ROTATION_VECTOR sensor. This sensor requires data from the gyroscope. I'm working right now on emulating it.
Saratsin said:
Works great with Lenovo Vibe P1 (this device has a jittering problem with its own pseudo-gyro). Tested with Youtube 360 videos. Works great for watching up/down and rotate. As well as you said z-axis is not working at all, so it's impossible to move point of view to the left/right. Can help you with testing on my device, if you want. I have Lenovo Vibe P1 with Android 6.0, TWRP and Root.
P.S. Is there any way to turn on z-axis for testing, for example by using your project at github. I'm not sure if I will understand there something, I was coding before only at C#, but I can try.
Click to expand...
Click to collapse
Glad to see that it works ! I could make another build with the Z axis activated but I really need to look a bit more into it. The problem with it is that it seemed to return higher values than the other axes. This generally broke the calibration many apps do and though the z-axis worked, they would then ignore the small variations of the other axes.
In case you want to build it yourself, it's quite easy, just remove the multiplication by zero here : https://github.com/Frazew/VirtualSensor/blob/master/app/src/main/java/fr/frazew/virtualgyroscope/XposedMod.java#L156
Can't install it on Jelly bean 4.2.2 :/
first a big THANKS!!!!!
I downloaded sensors tests app.before the module,gyroscope test wasn't there!after the module,voilla!!gyroscope test was there!I openned it and tested side by side with my xperia Z3 tablet.But values was muuuch different...It's ok,we all hope for possible future module updates!again THANK YOU!!!
Dant3s said:
Can't install it on Jelly bean 4.2.2 :/
Click to expand...
Click to collapse
Right now the minimum SDK version is KitKat, that's just because the sensor methods are different on Jelly Bean and I haven't worked on it.
Now that there are people who can actually test it on Jelly Bean I'll make an update to add support for it
Frazew said:
Right now the minimum SDK version is KitKat, that's just because the sensor methods are different on Jelly Bean and I haven't worked on it.
Now that there are people who can actually test it on Jelly Bean I'll make an update to add support for it
Click to expand...
Click to collapse
Glad to hear that, thanks
have see this thread : Help module to simulate Gyroscope with Accelerometer and Compass by nicolobos77
Hey, since we've doubled same purpose module I decided to use yours since its clear that you have much more experience than me and your code is much more elegant. (I never used Xposed before)
I built and ran it on my phone, and noticed exception thrown in logs (made pull request with fix at github), this wasnt big deal, but it seems like even though math is correct, sensor behaves wierd. Output is delayed by ~1 sec. There is also wierd "bounce effect" after rotating at ~20degree/sec and stopping velocity goes to ~-20 degree for a moment and drops back to 0.
Also depending on delay set up by application when registering listener some of apps only seem to get any output other than 0 if I like swing phone very hard. So my guess is that you might have more sensitive sensors in your phone and smoothing methods you applied are overkill for mine. I'll look into it closer later today, or tomorrow and see if changing parameters helps.
Thanks you for your work. One question, my phone has this, link to the image: imgur.com/a/lD7Sg Accelerometer it's fine but compass and orientation sensor are the same thing?. I cant find an app that can show me if I have compass sensor. Thanks you again and sorry for my bad english :/
And can you make a guide like "How to Install or what do you need in order to" or something like that? Please?
Maveroik said:
Thanks you for your work. One question, my phone has this, link to the image: imgur.com/a/lD7Sg Accelerometer it's fine but compass and orientation sensor are the same thing?. I cant find an app that can show me if I have compass sensor. Thanks you again and sorry for my bad english :/
And can you make a guide like "How to Install or what do you need in order to" or something like that? Please?
Click to expand...
Click to collapse
Compass means Magnetic Sensor, so yes, you do have one.
Frazew said:
EDIT: Pokémon GO uses the TYPE_ROTATION_VECTOR sensor. This sensor requires data from the gyroscope. I'm working right now on emulating it.
Click to expand...
Click to collapse
I did some reverse engineering on that matter, Pogo uses whole bunch of sensors: TYPE_GRAVITY, TYPE_GYROSCOPE, TYPE_ACCELEROMETER, TYPE_MAGNETIC_FIELD, TYPE_ROTATION_VECTOR and TYPE_LINEAR_ACCELERATION.
Actually I believe that TYPE_ROTATION_VECTOR can be simulated by copying TYPE_GEOMAGNETIC_ROTATION_VECTOR values.
Mourdraug said:
Hey, since we've doubled same purpose module I decided to use yours since its clear that you have much more experience than me and your code is much more elegant. (I never used Xposed before)
I built and ran it on my phone, and noticed exception thrown in logs (made pull request with fix at github), this wasnt big deal, but it seems like even though math is correct, sensor behaves wierd. Output is delayed by ~1 sec. There is also wierd "bounce effect" after rotating at ~20degree/sec and stopping velocity goes to ~-20 degree for a moment and drops back to 0.
Also depending on delay set up by application when registering listener some of apps only seem to get any output other than 0 if I like swing phone very hard. So my guess is that you might have more sensitive sensors in your phone and smoothing methods you applied are overkill for mine. I'll look into it closer later today, or tomorrow and see if changing parameters helps.
Click to expand...
Click to collapse
Thanks for your, I didn't see this exception when I tested it, but now that you bring it up, it seems obvious.
As for the delay you are talking about, the explanation I have for this is that I filter the output using a mean filter that uses the 10 previous values. This has the advantage of reducing the jitter a lot but it also has the huge disadvantage of adding a lot of delay. I will change this as there are better ways to filter the output than using the mean of the previous values. Like I said, I only tested it with my phone and did not take into account the sensitivity of the sensors. This is actually a good idea and I'll have to change that. Feel free to tweak what you want and make pull requests, that's the best way this module can evolve.
Mourdraug said:
I did some reverse engineering on that matter, Pogo uses whole bunch of sensors: TYPE_GRAVITY, TYPE_GYROSCOPE, TYPE_ACCELEROMETER, TYPE_MAGNETIC_FIELD, TYPE_ROTATION_VECTOR and TYPE_LINEAR_ACCELERATION.
Actually I believe that TYPE_ROTATION_VECTOR can be simulated by copying TYPE_GEOMAGNETIC_ROTATION_VECTOR values.
Click to expand...
Click to collapse
I reverse engineered it too and saw these sensors too. The thing is: TYPE_GRAVITY is a virtual sensor created from the accelerometer so no need to simulate it. TYPE_MAGNETIC_FIELD is the compass and TYPE_LINEAR_ACCELERATION is also a virtual sensor created from the accelerometer so no need to simulate it either. I have right now working code to make the TYPE_ROTATION_VECTOR work. I didn't see the TYPE_GEOMAGNETIC_ROTATION_VECTOR so I did the math directly from the rotation matrix values. I guess I'll change to use its values since it's already there, thanks for your help
EDIT: Actually the TYPE_GRAVITY is not a virtual sensor. My bad, I'll see what I can do to simulate it.
EDIT2: Actually TYPE_LINEAR_ACCELERATION is not always present either, I'll simulate it too. I should verify a bit more before posting stuff.
I would donate some cash if you could get the AR function to work in PoGo! That would be awesome!
wktra said:
I would donate some cash if you could get the AR function to work in PoGo! That would be awesome!
Click to expand...
Click to collapse
No need for cash but I'm currently working on it. I implemented a whole new lot of sensors but sadly PoGo doesn't work with them just yet. I'm investigating this and will make an update once it's ready (I play PoGo too so I'd like to see it work too).
Hi , I just registered to thank you a lot for the effort you're doing.
It doesn's seems to work on my LG G3 S, however thank you a lot and hope someone can help you making it through !
Keep the good work.
Dont work on youtube or pokemon Go in motorola moto g 2015(xt1541). Also i installed Cpu Z and it show the virtual gyro sensor ... I dont know why dont work on 360 video on youtube.(sorry for bad english)

[APP] Standalone navigation app for Wear OS!

I made a standalone navigation app for Wear OS! Here's the link to the app: https://play.google.com/store/apps/details?id=uk.co.onibaku.standalonewearmap
Here's the full description on the app so you can get a glance at the features:
Users can type in a location, or long press on the map to input a destination. They can choose to travel via walking, cycling or car.
The app will navigate the user from their current location to the destination using turn-by-turn navigation. Each step is highlighted on the path, with text to show you what action to take, and how long until you reach that step. The map rotates along with the device, so will follow the forward-facing direction of the watch.
The app only needs an internet connection for the initial retrieval of the directions. After that, it solely relies on GPS until the user arrives at the destination.
This (obviously) only works on watches that have GPS.
If you have any suggestions at all, I'd love to know them.
The next feature I plan to implement is importing a GPX file in from Google Drive, so you can navigate a more unorthodox/scenic route, which would suits cyclists. I initially developed this for when I go cycling, as we don't usually want to take the fastest route somewhere.
Let me know if there any burning features that are needed in this, and I'll do my best to deliver. This is a small side-project, so I don't have too much time to work on it, but I find it quite useful personally, and I hope others will, too.
Someone suggested I release a demo version so people can try it and see if they wish to buy it. I have released one here
It only has the dropped pin functionality, and only allows walking as a navigation mode. The zoom is also locked.
Gentatsu said:
I made a standalone navigation app for Wear OS! Here's the link to the app: https://play.google.com/store/apps/details?id=uk.co.onibaku.standalonewearmap
Here's the full description on the app so you can get a glance at the features:
Users can type in a location, or long press on the map to input a destination. They can choose to travel via walking, cycling or car.
The app will navigate the user from their current location to the destination using turn-by-turn navigation. Each step is highlighted on the path, with text to show you what action to take, and how long until you reach that step. The map rotates along with the device, so will follow the forward-facing direction of the watch.
The app only needs an internet connection for the initial retrieval of the directions. After that, it solely relies on GPS until the user arrives at the destination.
This (obviously) only works on watches that have GPS.
If you have any suggestions at all, I'd love to know them.
The next feature I plan to implement is importing a GPX file in from Google Drive, so you can navigate a more unorthodox/scenic route, which would suits cyclists. I initially developed this for when I go cycling, as we don't usually want to take the fastest route somewhere.
Let me know if there any burning features that are needed in this, and I'll do my best to deliver. This is a small side-project, so I don't have too much time to work on it, but I find it quite useful personally, and I hope others will, too.
Someone suggested I release a demo version so people can try it and see if they wish to buy it. I have released one here
It only has the dropped pin functionality, and only allows walking as a navigation mode. The zoom is also locked.
Click to expand...
Click to collapse
This is looking really good. I want true standalone navigation on my Huawei Watch 2 4G. It has a sim so loads the route standalone and seems to be able to do everything expected...i'm trying the demo version now.
One question though...unless i'm missing something..how do you exit the app? I'm currently having to force close it.
(And as a side note have you checked out the Wear OS app Ghostracer? You can import a gpx file and follow your progress on a map on the watch. Maps are downloadable to the watch, although ive never tried that. My watch has a sim so updates the map as im riding using the watches data. Heavy on the battery though.)
ruggs1234 said:
This is looking really good. I want true standalone navigation on my Huawei Watch 2 4G. It has a sim so loads the route standalone and seems to be able to do everything expected...i'm trying the demo version now.
One question though...unless i'm missing something..how do you exit the app? I'm currently having to force close it.
(And as a side note have you checked out the Wear OS app Ghostracer? You can import a gpx file and follow your progress on a map on the watch. Maps are downloadable to the watch, although ive never tried that. My watch has a sim so updates the map as im riding using the watches data. Heavy on the battery though.)
Click to expand...
Click to collapse
I had not realised that the app does not cease to use GPS whilst it is in sleep mode, so I have added a button to exit the app properly when you drag down. I've just released it now.
I have had a look at it, but it doesn't seem to work unless you have an android phone. I am currently looking into offline maps and importing GPX files. Do you know if it does that via the android app, and how it imports it? I was looking to use Google drive, as that seems to be the only viable storage solution supported on Wear atm.
Gentatsu said:
I had not realised that the app does not cease to use GPS whilst it is in sleep mode, so I have added a button to exit the app properly when you drag down. I've just released it now.
I have had a look at it, but it doesn't seem to work unless you have an android phone. I am currently looking into offline maps and importing GPX files. Do you know if it does that via the android app, and how it imports it? I was looking to use Google drive, as that seems to be the only viable storage solution supported on Wear atm.
Click to expand...
Click to collapse
Thankyou for the exit button, works great. Having tested the demo app i'm happy, and I will purchase. One further comment, the battery drain is heavy, as expected. Any chance of an ambient mode while the map is running to save battery? I may be pushing my luck, but I can only ask!
Ghostracer does indeed need a companion Android app on the phone. The gpx file is loaded into the app on the phone (using a file manager) then passed to the Ghostracer app on the watch. Maps are treated the same, but I just use the data from my sim in the watch to load maps as I ride when needed. You can follow a gpx route standalone on the watch in a similar way to following the route on your app. I am not connected to Ghostracer in any way, I just think its a wonderful app for cyclists and runners (within the watches battery limitations). And the free version allows you to test all its features. It might not be right for you, but it was worth a mention based on what you said earlier. (And the map screen has an ambient mode.... )
ruggs1234 said:
Thankyou for the exit button, works great. Having tested the demo app i'm happy, and I will purchase. One further comment, the battery drain is heavy, as expected. Any chance of an ambient mode while the map is running to save battery? I may be pushing my luck, but I can only ask!
Ghostracer does indeed need a companion Android app on the phone. The gpx file is loaded into the app on the phone (using a file manager) then passed to the Ghostracer app on the watch. Maps are treated the same, but I just use the data from my sim in the watch to load maps as I ride when needed. You can follow a gpx route standalone on the watch in a similar way to following the route on your app. I am not connected to Ghostracer in any way, I just think its a wonderful app for cyclists and runners (within the watches battery limitations). And the free version allows you to test all its features. It might not be right for you, but it was worth a mention based on what you said earlier. (And the map screen has an ambient mode.... )
Click to expand...
Click to collapse
Great . I did play around with the ambient mode, but it was just the same as the standard google maps ambient mode. It takes away the turn-by-turn, location, and path. If I could persist these, and set the GPS to update every 30 secs - 1 minute, I'd probably keep it, but I'm not sure how. I'd like to stick in options to set the GPS update frequency, or have the screen turn back on only for upcoming turns.
That's really cool! That's essentially what I would have liked on my watch but standalone. I really don't like the idea that you HAVE to use a companion app, especially when it's not available for iOS. I know they're competing watches, but I love the price point of android watches compared to Apple's, and their features shouldn't pale in comparison by way of hardware.
How does their ambient map work, if you don't mind me asking? I'd like to look into it. What does their paid version allow you to do? I only had a paid version before someone mentioned to put the free one on, just to give people a flavour of it. I tried to emphasise the main bit, which was the turn-by-turn navigation. The search and other transportation modes were secondary.
Cheers for the feedback and suggestions, though! I really do appreciate it! Let me know if there's anything else you'd like.
Gentatsu said:
Great . I did play around with the ambient mode, but it was just the same as the standard google maps ambient mode. It takes away the turn-by-turn, location, and path. If I could persist these, and set the GPS to update every 30 secs - 1 minute, I'd probably keep it, but I'm not sure how. I'd like to stick in options to set the GPS update frequency, or have the screen turn back on only for upcoming turns.
That's really cool! That's essentially what I would have liked on my watch but standalone. I really don't like the idea that you HAVE to use a companion app, especially when it's not available for iOS. I know they're competing watches, but I love the price point of android watches compared to Apple's, and their features shouldn't pale in comparison by way of hardware.
How does their ambient map work, if you don't mind me asking? I'd like to look into it. What does their paid version allow you to do? I only had a paid version before someone mentioned to put the free one on, just to give people a flavour of it. I tried to emphasise the main bit, which was the turn-by-turn navigation. The search and other transportation modes were secondary.
Cheers for the feedback and suggestions, though! I really do appreciate it! Let me know if there's anything else you'd like.
Click to expand...
Click to collapse
Ghostracers ambient map is black background with white markings until you lift your wrist...but that might not work when using your app while driving (watch off the wrist?).
I've now purchased your app (Google made that hard work!)...all still good. One question...when I zoom the map in the map un-zooms straight back. Any way to make the zoom stick?
ruggs1234 said:
Ghostracers ambient map is black background with white markings until you lift your wrist...but that might not work when using your app while driving (watch off the wrist?).
I've now purchased your app (Google made that hard work!)...all still good. One question...when I zoom the map in the map un-zooms straight back. Any way to make the zoom stick?
Click to expand...
Click to collapse
Do the markings include the path/trail? I've used the black background one before, and the building outlines are (kinda) white. Yeah, I do have my watch affixed to my handlebars on my bicycle.
Great - Thanks! It's much appreciated! How come it was hard work, if you don't mind me asking? Ah, yep. That was one of the first things I forgot to change! I completely forgot about it! I've made it so that if you zoom/pan, it'll stick unless you press the "my location" button again.
Huawei watch 2 built-in GPS not working anymore
ruggs1234 said:
Thankyou for the exit button, works great. Having tested the demo app i'm happy, and I will purchase. One further comment, the battery drain is heavy, as expected. Any chance of an ambient mode while the map is running to save battery? I may be pushing my luck, but I can only ask!
Ghostracer does indeed need a companion Android app on the phone. The gpx file is loaded into the app on the phone (using a file manager) then passed to the Ghostracer app on the watch. Maps are treated the same, but I just use the data from my sim in the watch to load maps as I ride when needed. You can follow a gpx route standalone on the watch in a similar way to following the route on your app. I am not connected to Ghostracer in any way, I just think its a wonderful app for cyclists and runners (within the watches battery limitations). And the free version allows you to test all its features. It might not be right for you, but it was worth a mention based on what you said earlier. (And the map screen has an ambient mode.... )
Click to expand...
Click to collapse
Hi ruggs1234, it was a long time since you wrote your experience with this app. I downloaded the demo today and I tested it. Looks like since last Google's update, the huawei watch 2 doesn't use its built-in standalone GPS. Please, would you mind to check whether you are having this problem now? The only way I got it work was by connecting the watch to a phone through Bluetooth.
Kind regards, Angel
angelrc96 said:
Hi ruggs1234, it was a long time since you wrote your experience with this app. I downloaded the demo today and I tested it. Looks like since last Google's update, the huawei watch 2 doesn't use its built-in standalone GPS. Please, would you mind to check whether you are having this problem now? The only way I got it work was by connecting the watch to a phone through Bluetooth.
Kind regards, Angel
Click to expand...
Click to collapse
Hello Angel,
The app still works ok on my watch, I tested it yesterday.
With my phone switched OFF I use my watches inbuilt sim to start the route (the app needs data to download the initial route, it can use the connected mobile but mine was switched off). I then switch off the sim in my watch and follow the route using only the gps in the watch. The app worked as it always has.
HOWEVER, my watch isn't running the latest version of Wear OS (it's running Wear OS 2.0, Home app 2.16). I never update anything Google if i'm not forced too, their updates often break more things than they fix. Everything I use on the watch works great and i'd like it to stay that way....
Hi,
well, I gave it a test (full paid version) - TicWatch 3 Pro 4g/LTE (all up to date). It doesn't work. All tested in standalone mode (no phone involved).
- app crashes when there is no GPS fix (GPS is on, but no fix yet)
- when I set an route to navigate (pin or search) it just endlessly shows progress circle and nothing else happens (GPS on with fix, LTE on and working)
So...
BR, Doman.
I installed the Demo version on my ticwatch 3 pro gps (updated everything to current versions and no modifications (yet))
App is starting, map is not showing, just the gps location button on the left and a white/grey screen. I can pin a location on the white screen and its actually getting a location next to me and tries to route there - but without any map showing.
Any app for Gear S3 ?

Atrial fibrillation and heart rate monitoring app

Hi all,
I have developed an application for a Wear OS, intended for a robust continuous atrial fibrillation (arrhythmia) and heart rate monitoring, which uses an optical sensor (green light) in the bottom of the watch. I'm currently limited to Fossil Gen 5 watch since my Samsung Galaxy Watch 4 won't give software access to its optical sensor.
Having said that, would anybody here like to test the app on their watches? It still needs to be improved and optimized, therefore, feedback would be appreciated. Also, it would run on other watches, however, in that case I would need to know an address of an optical sensor (Fossil Gen5 PPG sensor is 65572) so I could update the app.
I'd like to publish it in Google Play sometime later, have never done it before, it looks quite tricky, however, I filled most of the things there already.
Update: AFib monitor Google Play link
AndriusG said:
Hi all,
I have developed an application for a Wear OS, intended for a robust continuous atrial fibrillation (arrhythmia) and heart rate monitoring, which uses an optical sensor (green light) in the bottom of the watch. I'm currently limited to Fossil Gen 5 watch since my Samsung Galaxy Watch 4 won't give software access to its optical sensor.
Having said that, would anybody here like to test the app on their watches? It still needs to be improved and optimized, therefore, feedback would be appreciated. Also, it would run on other watches, however, in that case I would need to know an address of an optical sensor (Fossil Gen5 PPG sensor is 65572) so I could update the app.
I'd like to publish it in Google Play sometime later, have never done it before, it looks quite tricky, however, I filled most of the things there already.
Click to expand...
Click to collapse
Hi, I have tried your app, it's great that you are doing this.
I have tested it on Ticwatch Pro 3 GPS, it works correctly, shows heart rate and cardiogram for arrhythmias.
When I started the app for the first time it did not ask me to enable sensor permissions nor did it alert me that it did not have the permission enabled when I started monitoring. I activated them manually and it worked as expected.
About the PPG sensor address for TWP3 I don't know which one it is, I guess it is the same as the Fossil Gen5, because it works.
bernarbernuli said:
Hi, I have tried your app, it's great that you are doing this.
I have tested it on Ticwatch Pro 3 GPS, it works correctly, shows heart rate and cardiogram for arrhythmias.
When I started the app for the first time it did not ask me to enable sensor permissions nor did it alert me that it did not have the permission enabled when I started monitoring. I activated them manually and it worked as expected.
About the PPG sensor address for TWP3 I don't know which one it is, I guess it is the same as the Fossil Gen5, because it works.
Click to expand...
Click to collapse
Thank you so much! Didn't expect such a quick feedback!
I'll try correcting the permission part. And it's great to know, that app is compatible with TWP3.
Just in case, keep in mind, that this app runs in the background and should be stopped manually.
Hi, I would like to try this on my Fossil 6. Do you install the .apk on the watch or phone? Sorry, I've never installed outside of PlayStore.
a0323022 said:
Hi, I would like to try this on my Fossil 6. Do you install the .apk on the watch or phone? Sorry, I've never installed outside of PlayStore.
Click to expand...
Click to collapse
You can utilize this method to install this and any apk directly to WearOS.
A slightly updated version of the app, which now includes a request for permission to use BODY_SENSORS.
Gastopako said:
Hi all,
I have developed an application for a Wear OS, intended for a robust continuous atrial fibrillation (arrhythmia) and heart rate monitoring, which uses an optical sensor (green light) in the bottom of the watch. I'm currently limited to Fossil Gen 5 watch since my Samsung Galaxy Watch 4 won't give software access to its optical sensor.
Having said that, would anybody here like to test the app on their watches? It still needs to be improved and optimized, therefore, feedback would be appreciated. Also, it would run on other watches, however, in that case I would need to know an address of an optical sensor (Fossil Gen5 PPG sensor is 65572) so I could update the app.
I'd like to publish it in Google Play sometime later, have never done it before, it looks quite tricky, however, I filled most of the things there already.
Click to expand...
Click to collapse
Privileged Health SDK | Samsung Developers
Aiming to advance innovation and development of new health and wellness solutions
developer.samsung.com
Looks to me like Samsung has their sensor hidden behind this 'privileged' api, might be worth trying to request access?
Actually I was able to find a couple potential addresses for the Samsung sensor when I poked around a bit, were you unable to actually access the hardware even with the address?
mangobot said:
Actually I was able to find a couple potential addresses for the Samsung sensor when I poked around a bit, were you unable to actually access the hardware even with the address?
Click to expand...
Click to collapse
Thanks for the tip. As I matter of fact I did try contacting them in the exact same way you showed, however, I the declined my request without explanation. Maybe it is because I didn't mention any affiliation with business or something like that. I'll try requesting once again.
I also tried reading all the accessible sensors in Watch 4, however, software access to the PPG sensors is restricted.
I guess the sensor you are referring to is this one:
Samsung PPGBatch Sensor /Type_String: com.samsung.sensor.ppg_batch /Type_number: 69668
Galaxy Watch 4 offers wide range of sensors and I have developed quite a lot of various algorithms, which could be implemented, e.g., continuous SpO2 monitoring (red and infrared optical sensors), confirmation of a suspected atrial fibrillation (detected by using green light optical sensor) using an ECG strip.
I tested app on TicWatch E3 and it does work on this watch. However, I noticed that the quality of the Photoplethysmogram signal is worse than what I get in Fossil Gen 5 watch. With Fossil Gen 5 watch, you don't even have to search for a good spot on the wrist, the quality is always good and it is not the case with TicWatch E3. The algorithm in the app won't throw false alarms because of that, the signal quality is constantly monitored, however, with that kind of quality it would be tricky to detect AF if it was present.
I apologize but I would like some help. I have a ticwatch E3. I apparently installed the app using Wear Installer 2. That app indicated that the installation was was successful. However, the app does not appear in my launcher. Is there something else I need to do?
exswim said:
I apologize but I would like some help. I have a ticwatch E3. I apparently installed the app using Wear Installer 2. That app indicated that the installation was was successful. However, the app does not appear in my launcher. Is there something else I need to do?
Click to expand...
Click to collapse
You might want to consider utilizing Bugjaeger Mobile ADB as a really alternative and innovative solution to the problem of sideloading apps on Wear OS devices.
Thanks for the reply. Another question, as I said the Wear Installer 2 indicated that the app was installed. Would this app appear as an app in settings or in the launcher. If not, where is it on my watch?
Gastopako said:
I tested app on TicWatch E3 and it does work on this watch. However, I noticed that the quality of the Photoplethysmogram signal is worse than what I get in Fossil Gen 5 watch. With Fossil Gen 5 watch, you don't even have to search for a good spot on the wrist, the quality is always good and it is not the case with TicWatch E3. The algorithm in the app won't throw false alarms because of that, the signal quality is constantly monitored, however, with that kind of quality it would be tricky to detect AF if it was present.
Click to expand...
Click to collapse
I would like some help. I have a ticwatch E3. I apparently installed the app using Wear Installer 2. That app indicated that the installation was was successful. However, the app does not appear in my launcher. Is there something else I need to do?
exswim said:
Thanks for the reply. Another question, as I said the Wear Installer 2 indicated that the app was installed. Would this app appear as an app in settings or in the launcher. If not, where is it on my watch?
Click to expand...
Click to collapse
It would appear as an app in the launcher.
Hi, I did some updates to the app, mainly in the representation of the heart rate change over time. There are some as to say, drawbacks because for now heart rate values are saved in a local variable, therefore, if app was closed and restarted, the previous heart rate log would not be saved. I also have some thoughts in adding additional screen for the parameters of atrial fibrillation if one was detected, however, still not sure what information (e.g., beginning and the end of the AF episode, duration of the AF episode, etc. ) regarding this would be relevant for an ordinary user. Maybe some of you might have ideas what info would be of utmost relevance for you.
I would love to use this app on my Samsung Watch 5. I hope you succeed in getting access to the sensors on the Samsung Watches. I think your app would be very popular!
Hi, I know it's a tech site but to anyone suffering from atrial fibrillation-one of the most common but least talked about causes is head and neck posture/atlas position, slumped forward posture- very common with the amount of time we spend on our computers- see Dr John Berg youtube channel -
A good chiropractor or acupuncture practitioner can help to correct these abnormal and harmful postures and could possibly save you from surgery or pacemaker..
Don't ignore other causes which are more serious though-especially in the lat 2 years- lots of people are getting abnormal blood clotting since having a certain injection or getting long covid.
mura20 said:
I would love to use this app on my Samsung Watch 5. I hope you succeed in getting access to the sensors on the Samsung Watches. I think your app would be very popular!
Click to expand...
Click to collapse
Thanks! I haven't motivated myself to fill the request for getting the sensor access yet. It is quite complicated. Another thing that I noticed is that the raw green PPG signal from Galaxy Watch 4 and 5 is sampled at 25 Hz. Mine algorithm uses higher sampling frequency. According to the info provided by Samsung, only RED and Infrared PPGs in Galaxy Watch 4 and 5 are sampled at 100 Hz.
I am planning on improving the app by integrating it with Health Connect or with something similar. Currently the app stores, e.g., heart rate data in temporary variables, which are cleared as soon as the app is restarted. Another option was to write data in the main storage; however, data management seems tricky to me, I wouldn't want to deal with databases on my own.
Are you able to get raw RED and IR PPG sensor data (or any of the PPG sensor data)?

Categories

Resources