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.
Weeds2000 fixed the orientation on our Folio100 to work with games like Asphalt5 and now its possible to play, although graphics are still kinda messed up. but other games like the 3d tilt works nearly perfect now too.
you might find it useful, and VEGAn mod might be able to include this as my FolioTntMod is based of the TNT framework...
Find the download patch i made for our folio in this thread.
it also include a full 360 rotation fix, if you need it
As we all share the same Tegra2 platform and can nearly swap experience here, im posting this to share the fixes weeds2000 made for us...
Hope you find it useful..
Note:
The patch i made might actually work fine as update.zip on your tablet as well, or might need minor adjust to install, but let g tablet modders fix this if needed.
at least now you know its available.
Thank you! One question - do you know what file(s) were altered for the 360 rotation fix? Was it a lib file, for example?
EDIT: Also, to any other modders looking at this, the system.img is a ext2 filesystem image, NOT a yaffs2 image.
roebeet said:
Thank you! One question - do you know what file(s) were altered for the 360 rotation fix? Was it a lib file, for example?
EDIT: Also, to any other modders looking at this, the system.img is a ext2 filesystem image, NOT a yaffs2 image.
Click to expand...
Click to collapse
Roeby wan Kanobi, is this something that could work and be added to TnT Lite? My Clockwork back up just completed
Yes, I can package it as a supplement - I just need to know what to package.
Getting my dev unit ready with TnT Lite 3.1.2. There's also a new music player apk I need to test out.
roebeet said:
Yes, I can package it as a supplement - I just need to know what to package.
Getting my dev unit ready with TnT Lite 3.1.2. There's also a new music player apk I need to test out.
Click to expand...
Click to collapse
This could be another watershed update Also- with the accelerometer corrected, folks will be getting exercise by holding up the G while playing games
added:
Perhaps the one extra update that would be nice is a DSP manager so dB level or gain increases can be made. Modders released a DSP manager on the Incredible that allows increases to 3.5mm and speaker output. Hardware based EQ too.
Perhaps being too picky, but louder speakers would be nice.
Did you see.. they provided the SOURCE!!!!! This is what we need!
roebeet said:
Yes, I can package it as a supplement - I just need to know what to package.
Getting my dev unit ready with TnT Lite 3.1.2. There's also a new music player apk I need to test out.
Click to expand...
Click to collapse
What does the patch change? Would is break things when the application developer fixes the orientation code in their game.
We saw this problem fixed in the application in the Gallery 3D application by google, not in framework. http://android-developers.blogspot.com/2010/09/one-screen-turn-deserves-another.html
roebeet said:
Yes, I can package it as a supplement - I just need to know what to package.
Click to expand...
Click to collapse
okay here are some details.
the framework.jar modified comes from this file: update-smb_a1002-3338-user.zip
the library should be generic, but is required for the gsensor/rotation/orientation fix as part of the new framework.jar changes.
the 2 primary folders in the framework.jar changed are /android/hardware /android/view
you should be able to easily spot the differences in filesizes..
do note: there is another change android\os\Environment.smali as i modified it to work with /mnt/sdcard and /mnt/sdcard/sdcard-disk0 and /mnt/usbdisk-disk0 for compatibility with folio mount functionality.
here is the "vold" also different but works fine with the tap'n'tap framework.
remember that /etc/vold.fstab needs changed to support the more new mount devices if you wish to use that one too.
360 rotation fix is in android\view\WindowOrientationListener$SensorEventListenerImpl.smali
orientation fix is
android\hardware\SensorManager*.smali
but again, the framework.jar is Tap'n'Tap based, so works directly on top of r3338 edition.. and i made a patch in my section with just framework + lib files included.
rothnic said:
We saw this problem fixed in the application in the Gallery 3D application by google, not in framework. http://android-developers.blogspot.com/2010/09/one-screen-turn-deserves-another.html
Click to expand...
Click to collapse
No, as far as i understand, weeds2000 only made the hardware swap sensor reading, so now it acts like a portrait mobile phone, where our Tegra2 has the chip rotated once 90degree.
Dexter_nlb said:
No, as far as i understand, weeds2000 only made the hardware swap sensor reading, so now it acts like a portrait mobile phone, where our Tegra2 has the chip rotated once 90degree.
Click to expand...
Click to collapse
Hmm, so it does a 90 degree rotation. And the device is still a default landscape device. We definitely need to make sure there are no negative effects on games that utilize the acceleromether and worked fine before.
I would assume that the android developers would recommend making this change to framework, instead of handling it in applications if there weren't implications.
Thanks for the explanation - this is something I suspected would fix it, but it's good to see that someone had pushed the idea all the way through to an actual fix.
So, I suspect that when the device boots up, it should be in portrait mode initially (until the sensor kicks in).
roebeet said:
So, I suspect that when the device boots up, it should be in portrait mode initially (until the sensor kicks in).
Click to expand...
Click to collapse
That makes more sense to me if that is true.
I read through the code ... Prior to the code change they were performing the rotation either for Acceleration minus Gy on the y-axis
or Acceleration minus Gz on the z-axis and NOT Acceleration minus Gx on the x-axis. Now the axis swap is always occurring... under all 3 conditions irregardless of sensor.
Dont know why there was an exclusion in the first place for Acceleration minus Gx on the x-axis...
When I get back I will look through the code some more...
rothnic said:
Hmm, so it does a 90 degree rotation. And the device is still a default landscape device. We definitely need to make sure there are no negative effects on games that utilize the acceleromether and worked fine before.
I would assume that the android developers would recommend making this change to framework, instead of handling it in applications if there weren't implications.
Click to expand...
Click to collapse
rothnic said:
I would assume that the android developers would recommend making this change to framework, instead of handling it in applications if there weren't implications.
Click to expand...
Click to collapse
if Google didn't "invent" the different way of reading sensors, there would only be one way of doing it, so developers would not be able to see it, so an update to like 2.2 or higher is now an requirement, right? but if older games do not check, it would work with them, so this fix solves it as i see it.
putting back androidos orientation handling to its original state, as many developers should be reading it.
I have ported the fix for both TnT stock and lite. As well as Vegan beta 4.
http://forum.xda-developers.com/showthread.php?t=892345
gojimi said:
I have ported the fix for both TnT stock and lite. As well as Vegan beta 4.
http://forum.xda-developers.com/showthread.php?t=892345
Click to expand...
Click to collapse
remember its all done by weeds2000 , i cannot/will not take credits for his effort here, i am just sharing the good work done on this fix.
I have released a new version of the fix, this should clean up all the remaining issues with the accelerometer/compass. Code is also much cleaner now. Some weird hacks you may have seen were caused by the legacy API which was used by my test game.
Only known issue up to now is that the mouse coordinates are also rotated.
The source can be found in the zip file attached to the original post, I hope that all changes are prefixed with // XXX:
The source files are based on the nvidia-froyo tree.
Link:
http://forum.xda-developers.com/showpost.php?p=10209624&postcount=38
Doodle jump doesn't work. Game loads upside-down with home buttons on top. If you tilt left you go right...Any fix for this?
Does this work for the VegaN Ginger Edition, or is that fix built into the ROM, I think I am having issues with some games on that ROM.
bmw4aaron said:
Doodle jump doesn't work. Game loads upside-down with home buttons on top. If you tilt left you go right...Any fix for this?
Click to expand...
Click to collapse
I think you can write the developer and tell , that the games is not working normally.. all other games work fine, so why would one game stand out, only reason, bad programming, or misunderstanding of androidOS and orientation. maybe developer thought he should fix the "orientation" in his game on tablet, and forgot other trying to make it reverse.. so: bad programming and choice of developer..he should follow guidelines and not his ideas.
Sky maps worked wonderfully when I first got my tablet a few months ago. However, flashing custom roms seems to have royally screwed up the tilt sensors (I have tried multiple different roms, nothing seems to address it). Compass is okay, but X and Y axes are reversed (i.e. it pitches when it should roll, and vice versa). This happens in both landscape and portrait.
Anyone run into this before, or have any idea how to proceed?
playing SpeedX 3d the tilt sensors worth great, playing table labyrinth where you have to roll the ball through the maze to reach the other side is totally FUBAR, the sensors are opposite of each other which makes it impossible to plays.
So with my finding it works fine with some games and terrible with others.
I noticed the same issue on the a100.
SoHaunted said:
playing SpeedX 3d the tilt sensors worth great, playing table labyrinth where you have to roll the ball through the maze to reach the other side is totally FUBAR, the sensors are opposite of each other which makes it impossible to plays.
So with my finding it works fine with some games and terrible with others.
Click to expand...
Click to collapse
Admittedly, I haven't tried it with too many other apps, but those that I have are problematic (sky maps and several sensor-reading apps). It's frustrating because it used to work just fine with sky maps.
Which version of HC are y'all using, 3.1 or 3.2.
On 3.2 I'm having no problems at all.
Just wondering?
Check out "GPS Status" app on the market, it has an option to calibrate the pitch and roll sensors, maybe you just need a calibration..
It will also show the actual pitch/roll values which may help.
kiwi_mat said:
Check out "GPS Status" app on the market, it has an option to calibrate the pitch and roll sensors, maybe you just need a calibration..
It will also show the actual pitch/roll values which may help.
Click to expand...
Click to collapse
"A Tilt Labrynth" also has a built in calibration tool as well
If I'm not mistaken, those calibration utilities only affect the program that they're part of - they don't have any effect on global settings.
[Edit: I'm using 3.2 (Taboonay 2.1b), though the problem was also present on several other 3.1 and 3.2 roms]
I'm running Skeye and Mobile Observatory on my A500 and havent noticed any problems at all with the x/y axis' being off. Honestly, I haven't paid that much attention since I also have both programs installed on my phone and mostly use it instead since I can mount it to my scope for push-to guidance. But just locating Polaris and other well known objects seem to be spot-on. May want to try another program and see if that fixes the issue.
fasteddy86 said:
If I'm not mistaken, those calibration utilities only affect the program that they're part of - they don't have any effect on global settings.
[Edit: I'm using 3.2 (Taboonay 2.1b), though the problem was also present on several other 3.1 and 3.2 roms]
Click to expand...
Click to collapse
as that maybe true it would help people figure out of the calibration is off on the tablet. if the calibration is off then we can look into why its happening in stead of what apps are having the issues
Timelord83 said:
as that maybe true it would help people figure out of the calibration is off on the tablet. if the calibration is off then we can look into why its happening in stead of what apps are having the issues
Click to expand...
Click to collapse
Well there's no question that my sensors are off. The only apps that work are those that come bundled with a calibration function. There's a long-standing defect logged with elgoog about the fact that there's no easy way to calibrate, but they've not addressed it yet.
I know some phones come with a calibration function, and others at least have files where one can change the values...
In certain apps the axis are swapped - ie horizontal motion affects vertical and vertical motions affect the horizontal. Normal use, most games and a program called Leveller (spirit level type program) it's fine, but in other spirit programs, Krazy Kart Racing and a couple of others, its wrong. I dont know why, cant be the accelerometer if it works most of the time...
Known issue some game manufacturers have added a setting to reverse this.
Look in the game /app setting.
Good luck
Hi, curious question.
I'm wondering why the N7 doesn't allow you to slow scroll/pan down at single pixel steps. Always seems to be in 2-3 pixel jumps. I got a bad habit of scrolling web pages while reading from iOS but on my N7 I get these kinda anoying start/stop jerks.
Is this related to the virtual pixel resolution being lower than the actual screen resolution? And would changing it allow one to match the virtual pixels to the screen pixels and get smoother slow speed panning?
Anyone know if some custom ROMs optimize for this?
BR
POTS101 said:
Hi, curious question.
I'm wondering why the N7 doesn't allow you to slow scroll/pan down at single pixel steps. Always seems to be in 2-3 pixel jumps. I got a bad habit of scrolling web pages while reading from iOS but on my N7 I get these kinda anoying start/stop jerks.
Is this related to the virtual pixel resolution being lower than the actual screen resolution? And would changing it allow one to match the virtual pixels to the screen pixels and get smoother slow speed panning?
Anyone know if some custom ROMs optimize for this?
BR
Click to expand...
Click to collapse
I have been struggling with this issue for days. Looked into kernel code hoping to find anything related to scrolling or touchscreen but nowhere to find such a thing. It has nothing to do with virtual pixel resolution. If you swipe your finger at a degree of between 45-90 (accapted as scroll up by the system), Y coordinates change by 3 pixels where as X coordinates can change by 1.. Therefore its not a limitation, it is kind of scroll sensitivity which is 3px.. I've seen other devices can scroll by 1 pixel.
I believe google has set this value to 3 because of rendering issues, since its gonna render the screen 3 times more if it is set to 1. Maybe it is the optimum sensitivity. Lower than 3 pixels may disrupt buttery smoothness but its just a guess..
I hope one dev can lead us the right piece of code where it is set to 3 and we can change it ourselves to test the best..
You guys can try the problem yourself actually by installing the "Multi-touch accuracy check" app from market, which shows the exact pixel of the touch..
Interesting not to see anyone interested in such an improvement
UP!
Did anyone see this described in another thread? Perhaps the description is too obscure.
POTS101 said:
Did anyone see this described in another thread? Perhaps the description is too obscure.
Click to expand...
Click to collapse
It's been also discussed here..
http://forum.xda-developers.com/showthread.php?t=1932407
Any news on this?
As far as I can see, this is only related to touch screen; if you use a usb mouse, you can actually see the scroll by one pixel at time, and there is no graphical issues. With mouse all seems smoother...
At this point, I think It's an hardware issue of the touch screen, as the system can easly support 1px scrolling
I have the issue as well. Does this affect all Nexus 7? I am surprised so few people are discussing this issue.