hi,
Im messing around with sensor managers and sensor listeners. I seem to be having an issue getting the data to output to my activity. The app compiles fine but once it launches the textviews that are supposed to show data for orientation (X, Y, and Z) all display "false"
Anyone have anyone have any idea whats happening?
Can we assume you are not running this in the emulator?
Sorry I left that out, but that is correct. I'm running it on my Moto Droid. Also my target api lvl is 7.
Related
Adam accelerometer values Test
I and many other have noticed that the Adams accelerometer is not working as it should. So I ran an app on it called "Accelerometer values" which plots the devices X,Y AND Z values on a panel of graphs. I also ran this on my Droid X with exact same settings, and in the same orientaion.
Using the Droid as a control, of which I know the values are set correctly. I compared to the two. And this is what I found.
Settings in portriate orientation
1."Relative to the control", the adams X & Y axis are swaped. (x is y, y is x)
2. "^", The Y axis on Adam(X on Droid) displays the same numeric value as the control when tilted in the same direction. example Adam 5.0, control 5.0
3. "^", The X axis on Adam(Y on Droid) displays opposite numeric values as the control
when tilted in the same direction. example Adam -5.0, control 5.0
4. "^", The Z axis are the same on both.
Results with settings in landscape orientation are the same.
Hopefully a dev can fix this, but this confirms that the Adams accelerometer is not set properly.
Yes, i meet the same problem when i play any games with accelerometer... hope someone can help to fix it.
Hopefully there will be a way to relay this info to NI.
Perhaps a repost to TINA on NIA or RISHI on NIH
-CC
EDIT: In talking about this in IRC, it was mentioned that it seems the apps are using the values incorrectly, and some apps have been fixed.. So it may not be a Adam issue.
labyrinth Games prooves your points. Adams is using wrong values. Someone please fix this issue.
My point is that weither the device in question is set to run in portrait(phone) or landscape( most tablets) shouldnt nessesitate a change in the way the accelerometer works. Seeing as most apps for android work in portrait and landscape perfectly fine on phones, then why the HELL would one change the accelerometer settings on tablets. Even the Xoom aparently is having this kind of problem, and most other large android tablets.
There has got to be a way to port/change these settings. Maybe isolating what we need from another rom. Unless this is a hardware issue and accelerometer itself is positioned differently or something stupid like that.
the ony way to fix is by settiny ur calibration to the settings u want try diif position and calibrate , see if it works
I was curious, as I wasnt sure if it available or not, whether there existed an app for our phones, that could replicate what the leap motion does for our PC's? Basically is there any application for our phones to use the proximity sensor or something of that matter so that when you wave your hand over your phone, maybe it will scroll down or move to the next page. I understand it probably wont understand depth, but at least the simple motions could be recorded and translated into actions on the pc.
So, I could not find the answer to this, when is it exactly the doze mode activated (becoming active).
All articles only mention, after some time when the device is stationary (no movement).
How long is that some time?
After some read, found this article:
https://newcircle.com/s/post/1739/2015/06/12/diving-into-android-m-doze
And here is the source code of the DeviceIdleController:
http://tools.oesf.biz/android-MNC/xref/com/android/server/DeviceIdleController.java
It looks like, the doze mode will be activated after 1 hour (2 times 30 minutes).
But again, I am not Java developer, probably there are much more detail in the process.
What if the device is moved? Will the doze mode "cancelled"?
Well, it would be nice if custom ROM developer could add some customization in this, like shorten the activation time. Or even better, after the doze mode activated, it will stay active even if the device is moved (inside pocket), until the user do something (e.g. waking up, pressing button).
We need a developer to perform doze!!!!!
Enviado desde mi Nexus 6 mediante Tapatalk
I had these exact same questions. How long does it take to enter doze and how much does it take to wake from doze? Like if I bump my phone on desk is it going to hop out of doze mode? Would be cool to alter the time limits. Glad someone is looking into this!
And what parameters are measured for "stationary"? If the GPS is involved then truckers, EMTs, highway patrols and there like will never hit doze.
Sent from my Nexus 6 using Tapatalk
Hoyt Thompson said:
And what parameters are measured for "stationary"? If the GPS is involved then truckers, EMTs, highway patrols and there like will never hit doze.
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
I would really hope Google would have considered that when making doze.
Sent from my Nexus 6
Mr Patchy Patch said:
I would really hope Google would have considered that when making doze.
Sent from my Nexus 6
Click to expand...
Click to collapse
I am sure they did but it would be easier for the devs to tweak it or us to use it to its potential if a more descriptive instruction is given rather than "stationary"
inquiring minds want to know and searches are turning up few results
Hoyt Thompson said:
And what parameters are measured for "stationary"? If the GPS is involved then truckers, EMTs, highway patrols and there like will never hit doze.
Sent from my Nexus 6 using Tapatalk
Click to expand...
Click to collapse
If I am not mistaken, the doze will detect "significant motion" for that stationary checking.
Code:
void startMonitoringSignificantMotion() {
if (mSigMotionSensor != null && !mSigMotionActive) {
mSensorManager.requestTriggerSensor(mSigMotionListener, mSigMotionSensor);
mSigMotionActive = true;
}
}
void stopMonitoringSignificantMotion() {
if (mSigMotionActive) {
mSensorManager.cancelTriggerSensor(mSigMotionListener, mSigMotionSensor);
mSigMotionActive = false;
}
}
However, how much significant? That's up to the manufacturer implementation. At least this is not defined in the software. That's what I understood. This is an explanation I found:
http://stackoverflow.com/questions/...-of-type-significant-motion-sensor-in-android
But again, I am not Android developer.
I guess, to know about that significant motion, you can install this app (FREE) and then test with some motions
https://play.google.com/store/apps/details?id=com.axelk.sensorapp
From the app description:
Android Sensors is an very useful and simple application.
With Sensor Test for Android on your device you can view and read ALL AVAILABLE android-sensors. (similar to Sensor Box for Android or Phone Tester)
Additionally, you'll receive via the info button other useful information such as the sensor works and what it does.
I'd appreciate a good rating and a +1 (Google+)!
Sensor Test for Android is tested on different devices and versions.
I was not able to test all 8000 different types of Android devices, it´s possible that on some devices appear errors.
Affected people with a not working Sensor-Test-App should reboot and run it again.
Sensor Test for Android is still under construction!
If you have any troubles with your device, please send me an e-mail with the problem (Device-type, Android version, screenshot) before submitting a bad rating.
[email protected]
List of available sensors: (not all sensors will be present in your device)
- ACCELEROMETER
- MAGNETIC FIELD
- ORIENTATION
- GYROSCOPE
- LIGHT
- PRESSURE
- TEMPERATURE
- PROXIMITY
- GRAVITY
- LINEAR ACCELERATION
- ROTATION VECTOR
- RELATIVE HUMIDITY
- AMBIENT TEMPERATURE
- MAGNETIC FIELD UNCALIBRATED
- GAME ROTATION VECTOR
- GYROSCOPE UNCALIBRATED
- SIGNIFICANT MOTION
- STEP DETECTOR
- STEP COUNTER
- GEOMAGNETIC ROTATION VECTOR
- HEART RATE
About me:
Sensor Test for Android is my technicians work I programmed in the summer holidays of my training as a technician (electrical engineering).
Before starting programming, I knew just how to spell JAVA.
I only had contact with LabView, a "painting by numbers" for programmers. For this application a documentation will be created, with which following students can easily incorporated into the Java programming language.
I'd appreciate a good rating and a +1 (Google+)!
Downloaded the sensor app @gogol seems a good amount of movement is needed for significant motion be counted(walking a few steps). Gonna do some more testing... Thanks for the info!
anthonyg45157 said:
Downloaded the sensor app @gogol seems a good amount of movement is needed for significant motion be counted(walking a few steps). Gonna do some more testing... Thanks for the info!
Click to expand...
Click to collapse
Good to know!
I am wondering if putting the phone inside our pocket would trigger significant motion. Otherwise, we need to put it lay down stationary on the table
Thanks for the experiment.
This is interesting, "Agressive Doze" mode from Greenify!
http://forum.xda-developers.com/apps/greenify/aggressive-doze-experimental-feature-t3223731
This isn't based on anything code related but Pebble users are reporting that on marshmallow their pebble's lose connection to the phone app almost 15 minutes on the dot after the phone screen turning off so that's my guess
Seriously 1 hour for doze mode to be activated? Sounds flawed. I'm still hesitating whether to buy Nexus 6...
How is the experiment goes?
Hi all, I'm new here and to android programming, I don't know Java so am using c++. I am programming graphics routines to directly read/write pixels to buffers/SDL surfaces for sprites/polygons etc.
A problem I'm having is that when the device is rotated and the orientation switches between landscape/portrait the screen surface is getting messed up and I can no longer access it.
Is there a way in c4droid/SDL2 to set and lock the orientation to landscape? The only solution I've been able to find online is to set it in the manifest file of the APK but how do I do that with c4droid since that is what I'm creating the APK file with?
Another issue involving the manifest file is setting permissions since there are things I don't need and would prefer it if the installer didn't ask for.
Thanks in advance for any help with this.
Stonemonkey.
Well, I've kind of got the rotation issue sorted, I was trying to do some things in sdl2 the way I'd done it in SDL with the surface I was drawing to, it's mostly fixed by copying my buffer to a texture and scaling that onto the screen instead of doing the scaling myself, not managed to lock the orientation yetbut I think it might be possible to extract, edit and replace the manifest from the generated apk, would that be right?
Another issue I'm having, I'm software rendering, and using some inline assembly but can't seem to access the fpu, i get some error during compiling saying'selected processor does not support arm mode' I've tried setting some switches (although to be honest I'm not sure exactly what I'm doing) to select different CPUs or to select arm mode but I'm just getting'permission denied' errors when i try to compile.
ok, so I'm using APK Editor to edit the manifest and i can remove all the permissions except WRITE_EXTERNAL_STORAGE, when i try to remove that, my app crashes straight away when i try to run it but I'm not trying to write anything, the only thing im accessing is loading a sound file from the resource folder. Anyone got any ideas what might be the problem?
Turns out c4droid uses a software implementation for floating points but ive found a way to access the vfp and neon coprocessors now so that's that problem solved.
Hi,
Does someone knows what is the path to get readings from this sensors?
I've been looking in /sys but can not seem to find any
best regards
Finger print sensor path would be good as well. Maybe we can port the pixel notification scrolling
Perhaps if you do an strace on the native calibration binary it will tell you what paths the sensors are located on. See for details:
http://forum.xda-developers.com/nexus-6p/help/formatted-nexus-6p-persist-partition-t3453035
http://elinux.org/Android_Tools#strace
"Sensor readout" on the google play store recognizes the 6P sensors, but doesn't show any path information in the app. Dev probably could help with that, or for that matter decompling the app source code if not obfuscated.