[android-developers] Re: Accelerometer not working when screen turns off

2018-03-28 Thread sardar khan
How Google Fit app works when phone is locked and how he get sensor values. And Our apps don't get sensor values when phone is locked. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving email

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2016-06-10 Thread Amir Farazmand
@ Dianne Hackborn, this is a big issue and I guess deserves more than your wishy-washy answer. Android/Java are not just programming languages but cultures that define the people who dont want sticking to control freaks such as Steve Jobs and Bill Gates. Many people like to have this feature so

[android-developers] Re: Accelerometer use (G's and frequency)

2012-10-17 Thread Christian Nikolaj Thomsen
1) and 2) are hardware dependent. If you need something with higher acceleration range than standard handsets, you'd probably have to have it built. Accelerometer - chips are made to many different specs, but generally, the higher sensitivity, the lower the range. Remember also that there can b

[android-developers] Re: Accelerometer use (G's and frequency)

2012-10-16 Thread Chris Sarbora
I'm totally talking out of my butt (have not looked at the relevant code) but I'm guessing that questions 1 and 2 have more to do with driver/hardware limits than Android-imposed limits. On Monday, October 15, 2012 6:55:47 PM UTC-7, Guillermo Polonsky wrote: > > Did you get a reply on any of the

[android-developers] Re: Accelerometer range

2012-10-15 Thread Guillermo Polonsky
Hi, the link is broken, is it possible to share its content? BTW, I own a Samsung Galaxy S2 and the highest G I can get is 3.3, is there any possibility to get higer Gs? Thanks in advance. Guillermo. El viernes, 10 de junio de 2011 16:33:24 UTC-3, Ted escribió: > > I am writing an app that uses a

[android-developers] Re: Accelerometer use (G's and frequency)

2012-10-15 Thread Guillermo Polonsky
Did you get a reply on any of these questions? I'm interested too. BTW, I don't think is would be probably to get more than 3Gs as for example the accelerometer of the Samsung Galaxy S2 can detect a maximum of 19m/s^2 which is approx 3.3Gs Best Regards. Guillermo. El lunes, 23 de julio de 2012 1

[android-developers] Re: Accelerometer range

2012-09-18 Thread Dan Reznik
Ted I would love to switch the range on my galaxy s3 to +/- 4 or 8g. The chip used by the S3 appears to be the SMB380 Have you had any luck on this matter over the last year? Dan On Friday, June 10, 2011 4:33:24 PM UTC-3, Ted wrote: > > I am writing an app that uses accelerometer. After some te

[android-developers] Re: Accelerometer not working when screen turns off

2012-09-14 Thread Detroit Tea
Partial wake lock doesn't work for me either. SCREEN_DIM_WAKE_LOCK works. I'm using a Cliq XT running CM7. On Wednesday, August 25, 2010 3:38:25 AM UTC-7, Furiaceca wrote: > > Hello, > I tried few days ago with my HTC Desire and the official Froyo > release ... but when the screen is off the

[android-developers] Re: Accelerometer frequency

2012-08-07 Thread 신후철
hi i'm trying to logging the data received with timestamps for magnetic field sensor, could you give me the java code that you used in this article? 2009년 2월 18일 수요일 오후 4시 8분 2초 UTC+9, gjs 님의 말: > > Hi, > > Try logging the data received with timestamps ( in memory ) for > android.hardware.Sen

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2012-08-06 Thread Pavel Brans
Hi all, Three years pased. We faced the same problem. Sensors turn off after turning off the screen. Wake lock does not always help. Is this bug fixed? In what version is it fixed (2х, 4x)? --- Regards, Pavel Konovalov пятница, 28 августа 2009 г., 18:04:11 UTC+3 пользователь polymo

Re: [android-developers] Re: Accelerometer not working when screen turns off

2012-01-20 Thread Mark Murphy
On Fri, Jan 20, 2012 at 10:52 AM, crennie wrote: > I would prefer a way to do it that wouldn't drain the battery. You act as though you have a choice. You do not. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.co

Re: [android-developers] Re: Accelerometer not working when screen turns off

2012-01-20 Thread crennie
I would prefer a way to do it that wouldn't drain the battery. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-d

Re: [android-developers] Re: Accelerometer not working when screen turns off

2012-01-19 Thread Kristopher Micinski
can this not be fixed using a partial wake lock? kris On Thu, Jan 19, 2012 at 11:23 AM, crennie wrote: > I found that if I'm connected with USB and watching Logcat my accelerometer > sensor is still firing even when the screen is off. When I run the same > program with out the USB connected the

Re: [android-developers] Re: Accelerometer not working when screen turns off

2012-01-19 Thread crennie
I found that if I'm connected with USB and watching Logcat my accelerometer sensor is still firing even when the screen is off. When I run the same program with out the USB connected the sensor stop a few seconds after the screen goes dark. I wonder if there is a work around here waiting to be

Re: [android-developers] Re: Accelerometer vs Gravity Sensor in game code?

2011-08-28 Thread Jim Graham
On Sun, Aug 28, 2011 at 08:44:45AM -0700, Adam Ratana wrote: > Here's a very helpful link which may describe more of what goes on with > the sensors in phones, and which to use when, when available: > > Sensor Fusion on Android Devices: > http://www.youtube.com/watch?v=C7JQ7Rpwn2k Thanks. I'll

[android-developers] Re: Accelerometer vs Gravity Sensor in game code?

2011-08-28 Thread Adam Ratana
On Saturday, August 27, 2011 12:28:59 PM UTC-4, Spooky wrote: > > When writing game code, what (if anything) is the difference between > the accelerometer, G-Sensor, and Gravity Sensor? I'd assumed that > they were all different names for the same thing, until I pulled > up specs on my Motorola B

[android-developers] Re: Accelerometer vs Gravity Sensor in game code?

2011-08-28 Thread nadam
> They could be referring to a gyroscope sensor. Probably not. G-sensor is usually referring to the accelerometer and has to do with measuring the gravity combined with the linear acceleration of the device. The gyroscope is for measuring rotational speed. For tilt based games such as Doodle Jump

[android-developers] Re: Accelerometer problem. Compass not rotating.

2011-06-14 Thread gjs
Hi, I don't see any reference to the compass sensor in your code, just a few references to 'bearing' how is it set ? Regards On Jun 15, 3:39 am, Raghav Sood wrote: > Hi all, > > According to the book I am learning from the following code should > create a sad looking, but working, compass. All

Re: [android-developers] Re: Accelerometer problem. Compass not rotating.

2011-06-14 Thread Raghav Sood
I noticed that too but the book I am learning from doesn't say anywhere that you need it. On Wed, Jun 15, 2011 at 10:43 AM, gjs wrote: > Hi, > > I don't see any reference to the compass sensor in your code, just a > few references to 'bearing' how is it set ? > > Regards > > On Jun 15, 3:39 am,

[android-developers] Re: Accelerometer and the samplin rate

2011-01-14 Thread ip332
First of all it all device dependent because SENSOR_DELAY_FASTEST has value 0ms in Android git but 10ms - Samsung Galaxy S. Using 0ms should result in close to 100% CPU usage so some sensors drivers have internal logic to prevent such case and add some delay inside. On the other side "sampling rat

Re: [android-developers] Re: Accelerometer not working when screen turns off

2010-08-26 Thread Jonathan Weinberg
I have not been able to test yet with an HTC device running Froyo. Adding to the list, I am getting reports that Samsung is having some trouble with this too. On Wed, Aug 25, 2010 at 6:38 AM, Furiaceca wrote: > Hello, > I tried few days ago with my HTC Desire and the official Froyo > release ..

[android-developers] Re: Accelerometer not working when screen turns off

2010-08-25 Thread Furiaceca
Hello, I tried few days ago with my HTC Desire and the official Froyo release ... but when the screen is off the sensor never provide any data: I use Partial Wake lock but this doesn't work. Have you success by using Partial Wake lock? Which smartphone are you using? Thanks a lot Carlo On 16 Lug,

[android-developers] Re: Accelerometer not working when screen turns off

2010-07-16 Thread Bret Foreman
My application will run extensively in partial wakelock mode and I'm very curious to see what standby power consumption consequences that has for various popular phones. Maybe we should start a thread just for that purpose where people can post their observations of battery life in this mode for va

[android-developers] Re: Accelerometer not working when screen turns off

2010-05-27 Thread BobG
Its the backlight that sucks coulombs. If you can dim that way down, you're golden. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, sen

[android-developers] Re: Accelerometer not working when screen turns off

2010-05-27 Thread Jonathan
I heard back from the developer at Google. This should be fixed starting in 2.2. :-) A partial wake lock will be required in order to keep the sensors running when the CPU goes in standby, but the screen turning off will no longer stop the sensors from running. Although I would prefer not to ha

[android-developers] Re: Accelerometer not working when screen turns off

2010-05-26 Thread Jonathan
FYI - it looks like Issue 3708 referenced above has now been addressed! I am reaching out to the developer to see if we can get further clarification as to how exactly this has been addressed and in which release. Encouraging news! On May 11, 7:11 pm, Jonathan wrote: > I'm hoping we don't start

[android-developers] Re: Accelerometer not working when screen turns off

2010-05-11 Thread Jonathan
I'm hoping we don't start debating the usefulness of this issue here. It has been debated quite enough in other threads and on other forums. All I would like at this point is some official response from someone who knows why the behavior is what it is. If it is firmware and it is controlled by the

Re: [android-developers] Re: Accelerometer not working when screen turns off

2010-05-11 Thread mike
On 05/11/2010 03:56 PM, Kelly wrote: I hear the word 'firmware' being used, which is closely monitored and work on by the manufacturer (HTC, Motorola, Sony Ericsson). I can unserstand why google would have nothing to say, since this is likely 100% controlled by the phone manufacturer who wants to

[android-developers] Re: Accelerometer not working when screen turns off

2010-05-11 Thread Kelly
I hear the word 'firmware' being used, which is closely monitored and work on by the manufacturer (HTC, Motorola, Sony Ericsson). I can unserstand why google would have nothing to say, since this is likely 100% controlled by the phone manufacturer who wants to extend battery life by turning off per

[android-developers] Re: Accelerometer not working when screen turns off

2010-05-11 Thread Jordan Frank
Holy crap, this again?!? I just discovered this because we ordered four Nexus Ones to do some demos of our research on the Discovery Channel. All of a sudden what was working perfectly on the G1 stopped working altogether on the Nexus One. If you read the archives of this list, you'll see that I'v

Re: [android-developers] Re: Accelerometer not working when screen turns off

2010-04-26 Thread mike
I'll third that on wanting to know what's up. Some insight as to whether this is a hardware issue on some platforms would be pretty nice too... the same thing happens on the iPhone but getting any insight from them is impossible. Mike On 04/24/2010 09:14 AM, Jonathan wrote: Thanks Lance. I saw

[android-developers] Re: Accelerometer not working when screen turns off

2010-04-24 Thread Jonathan
Thanks Lance. I saw that... it is one of the highest ranked issues out there and the comments are being abused quite a bit, but there does not seem to be any response from Google about whether or not they plan to correct this going forward, or if they feel it is something that even needs to be cor

[android-developers] Re: Accelerometer not working when screen turns off

2010-04-24 Thread Lance Nanek
http://code.google.com/p/android/issues/detail?id=3708 On Apr 13, 6:32 am, Jonathan wrote: > As I understand it, there seems to have been a change in the OS that > prevents the accelerometer from running when the screen turns off and > the phone CPU goes into its power saving state.  Can this be

[android-developers] Re: Accelerometer - direction of shake?

2010-04-09 Thread Bob Kerns
The Nyquist theorem states that you need to sample at least 2x the frequency you are sampling to be able to capture it. However, you'll also get various spurious beat signals which can be large compared to the actual signal if you try to push too close to that 2x. That is, if you sample 1 Hz faster

Re: [android-developers] Re: Accelerometer - direction of shake?

2010-04-09 Thread Jason LeBlanc
How much faster? On Apr 8, 2010 7:32 PM, "BobG" wrote: If you move the phone left and right when looking at the screen, thats moving in the x axis, so if you take sanples faster than you are shaking it, as ordained by Mr Nyquist, you will see the accel increasing, then slowing down, stopping, an

[android-developers] Re: Accelerometer - direction of shake?

2010-04-08 Thread BobG
If you move the phone left and right when looking at the screen, thats moving in the x axis, so if you take sanples faster than you are shaking it, as ordained by Mr Nyquist, you will see the accel increasing, then slowing down, stopping, and accelerating back the other way. The info you asked for

[android-developers] Re: Accelerometer - direction of shake?

2010-04-08 Thread Kumar Bibek
Well, only the accelerometer might not be useful in this scenario. You should also think on the lines of orientation. If you use only the accelerometer, obviously you will not get consistent results. Say, if someone is sleeping or turned up side down. :) Try searching for some examples. I am sure

Re: [android-developers] Re: accelerometer driver example?

2010-02-10 Thread Robin Getz
On Wed 10 Feb 2010 10:19, Robin Getz pondered: > On Tue 9 Feb 2010 20:48, Lance Nanek pondered: > > This mentions the accelerometer: > > http://pdk.android.com/online-pdk/guide/sensors.html > > Thanks - that helps, but - I'm to understand that there is no > kernel/userspace > API standard for se

Re: [android-developers] Re: accelerometer driver example?

2010-02-10 Thread Robin Getz
On Tue 9 Feb 2010 20:48, Lance Nanek pondered: > This mentions the accelerometer: > http://pdk.android.com/online-pdk/guide/sensors.html Thanks - that helps, but - I'm to understand that there is no kernel/userspace API standard for sensors, and that every device manufacture is on their own to m

[android-developers] Re: accelerometer driver example?

2010-02-09 Thread Lance Nanek
This mentions the accelerometer: http://pdk.android.com/online-pdk/guide/sensors.html On Feb 9, 2:48 pm, Robin Getz wrote: > On Fri 5 Feb 2010 11:45, Robin Getz pondered: > > > Where is an example of an accelerometer driver that properly connects > > to the android sensor event API? > > >http://d

[android-developers] Re: accelerometer driver example?

2010-02-09 Thread Robin Getz
On Fri 5 Feb 2010 11:45, Robin Getz pondered: > Where is an example of an accelerometer driver that properly connects > to the android sensor event API? > > http://developer.android.com/reference/android/hardware/SensorEvent.html > > We have an accelerometer driver - http://patchwork.kernel.org/p

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread windstorm
The problem is if you want to filter the acc to get rid of the car shaking, you first need to decide what's the frequency range of "real value" and what's the frequency range of "shaking". It's kind of tricky to set the threshold for the filter. Any one got good method? PhoenixofMT wrote: > I can

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread TonyDoc
Hi PhoenixofMT, I've looked into augmenting the accelerometer data with GPS info. The major hurdle is not the physics, it's the resolution of the GPS data provided, which is only timestamped to the nearest second! This makes it extremely difficult the calculate any sort of realistic figures withou

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread TonyDoc
Hi, As PhoenixofMT said, calibration from factory is poor, but sufficient for most games and the like. I had to write a similar calibration routine into my software before I managed to get any realistic figures from the accelerometer. The user is required to sit the device in the various orientati

[android-developers] Re: Accelerometer on Motorola Droid

2010-01-19 Thread PhoenixofMT
I can't provide much on this. I'm not a developer, but I may be able to provide some insight. I've been wanting to find a way to calibrate the accelerometers on my droid since I installed the tricorder app. It bugs me that the X and Y axes are off by about .2 ms^-2 in both orientations. In my searc

[android-developers] Re: Accelerometer Reading ranges

2010-01-17 Thread ko5tik
On Jan 16, 9:37 pm, MPower123 wrote: > I just hope theres an API call to set the resolution to 2g or 4g mode. TANJ - AFAIR, there is no such official API in android SDK (though you may be able to hack around or have more luck with native code ) -- You received this message because you are su

[android-developers] Re: Accelerometer Reading ranges

2010-01-16 Thread MPower123
I was inclined to thinking most of the android phones would come with relatively the same accelormeter chip. >From what i've read the blackberries and iphone either have a better chip or better logic has been used to smooth out the signal. I guess for the most accurate reading I would need to set

[android-developers] Re: Accelerometer Reading ranges

2010-01-16 Thread ko5tik
I looked at my favorite seller of electronic stuff - while BMA1502 sells for 1.50 from 100+, there are chips for about $120 apiece ( with much better resolution and answer times) - guess which ones will be built into your $300 smartphone ;) -- You received this message because you are subscribed

[android-developers] Re: Accelerometer Reading ranges

2010-01-16 Thread ko5tik
It's accurate enough to steer a toy car on display by tilting device, but I would not use this sensor to deliver nuclear warhead ( there definitely better ones ) Of course you can write some filter, but it would be tricky because: - your sample times are not guaranted to be equal (android is n

[android-developers] Re: Accelerometer Reading ranges

2010-01-15 Thread Chris McClanahan
yes, ko5tik brings up a good point: each android phone may have a different model accelerometer. the info i posted earlier was specific to the Droid phone, which has this sensor: http://www.st.com/stonline/products/literature/ds/15094/lis331dlh.pdf there is an api call to get the max value readi

[android-developers] Re: Accelerometer Reading ranges

2010-01-15 Thread MPower123
Can anyone comment on the accelerometer's accuracy? I've read on other threads that, in general, it is very in accurate but has anyone tried to write a signal conditioner to smooth out the signal? On Jan 14, 4:35 pm, Chris McClanahan wrote: > I believe the max accelerometer reading is 40, thus ma

[android-developers] Re: Accelerometer Reading ranges

2010-01-15 Thread ko5tik
On Jan 14, 2:17 am, MPower123 wrote: > Hi, > > I am writing a game for android phone and I want to know what is the > range of values that can be read from the accelerometer? I want to > know how many Gs can be read from the accelerometer? > Or is this dependant on the phone? I've seen an Iphone

[android-developers] Re: Accelerometer Reading ranges

2010-01-14 Thread Chris McClanahan
I believe the max accelerometer reading is 40, thus making it sensitive to about (40/9.81)=4.077472G. On Jan 13, 3:17 pm, MPower123 wrote: > Hi, > > I am writing a game for android phone and I want to know what is the > range of values that can be read from the accelerometer? I want to > know h

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread Dianne Hackborn
You need to hold a partial wake lock if you want to ensure that the CPU continues to run while the screen is off. There are very, very few exceptions to this -- broadcasts received from the alarm manager being the big one. There may be a few other broadcasts that hold a wake lock for you while th

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread polymorph
Ok, thanks for the reply Mark. It seems the documentation doesn't state either way whether anything will or will not continue to function while in standby. I wonder if there's anyone from the Android team that could let me know the official stance on this? There's also the situation with the He

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread Mark Murphy
polymorph wrote: > It's in a background service which does get called for GPS location > changes and other things while in standby, so I'd expect it to do so > for the sensor changes too (as it did used to in standby). The subtle point I was trying to get across is that a regression in an undocum

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread polymorph
> Where in the documentation does it say that sensor readings will wake up > the device to call your code? Hi Mark, It's in a background service which does get called for GPS location changes and other things while in standby, so I'd expect it to do so for the sensor changes too (as it did used t

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread Mark Murphy
polymorph wrote: > Yes, I hope they manage to get this fix rolled in very soon! > > I don't have a Magic anymore, but I had a Developer friend try a > Partial wakelock on his, and it did work, so that does seem to be a > temporary workaround on that. However it doesn't solve it for the > Hero, a

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread polymorph
Yes, I hope they manage to get this fix rolled in very soon! I don't have a Magic anymore, but I had a Developer friend try a Partial wakelock on his, and it did work, so that does seem to be a temporary workaround on that. However it doesn't solve it for the Hero, and I don't know if the Samsun

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread Yuri Dario
> >http://code.google.com/p/android/issues/detail?id=3708 > > this means my application in the Market is broken too. At least I need > to update the description... this is really bad. and worse, ADC2 is about to reach deadline. --~--~-~--~~~---~--~~ You receive

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread Yuri Dario
Hi, > http://code.google.com/p/android/issues/detail?id=3708 this means my application in the Market is broken too. At least I need to update the description... this is really bad. Yuri --~--~-~--~~~---~--~~ You received this message because you are subscribed

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread polymorph
Yes, I already have a bug report in for this: http://code.google.com/p/android/issues/detail?id=3708 On Aug 30, 8:11 am, Alexander Kosenkov wrote: > I have posted bugreport to Android: > > http://code.google.com/p/android/issues/detail?id=3717 > > Please vote up or add comments if you face wi

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-30 Thread Alexander Kosenkov
I have posted bugreport to Android: http://code.google.com/p/android/issues/detail?id=3717 Please vote up or add comments if you face with this problem. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Develo

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-29 Thread Alexander Kosenkov
I have exactly the same problem with Hero! My app works fine on G1 but does not receive accelerometer events on Hero in standby with partial lock. What could we do? Have you posted bugreport to Android? --~--~-~--~~~---~--~~ You received this message because you ar

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-29 Thread Yuri Dario
Hi, > the Magic or Hero when I tried partial wake locks (you mentioned > trying on ADP1, ie a G1 - have you tried it on any other handsets?) there are over 100 users now, so I think it works; I'll ask someone I know has a magic. > It has worked in the past without any requirement on a wake loc

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-29 Thread polymorph
Thanks for the reply, but this didn't seem to work for me on either the Magic or Hero when I tried partial wake locks (you mentioned trying on ADP1, ie a G1 - have you tried it on any other handsets?) It has worked in the past without any requirement on a wake lock as well, so I believe somethi

[android-developers] Re: Accelerometer OnSensorChanged() no longer occur in standby

2009-08-29 Thread Yuri Dario
Hi, > I have tried a wakelock, but only the full, screen-on wakelock allows > it to work, which is undesirable behaviour. my background service gets accelerometer events with a partial wake lock (and screen off). ADP1 with latest 1.5 firmware drop by HTC. bye, Yuri --~--~-~--~~--

[android-developers] Re: Accelerometer Speaker Interference Workarounds?

2009-08-28 Thread Chris Stratton
it might be interesting to slowly sweep a sine wave across the audio range while plotting variation in the accelerometer reading... On Aug 28, 9:40 pm, Robert Green wrote: > And that's almost exactly what I see.  I notice extra bad numbers > coming through on certain frequencies of sound.  I kno

[android-developers] Re: Accelerometer Speaker Interference Workarounds?

2009-08-28 Thread Robert Green
And that's almost exactly what I see. I notice extra bad numbers coming through on certain frequencies of sound. I know I've complained about one or two things in the past but this really is a pretty bad flaw. Let's hope future devices don't have the same problems. On Aug 28, 7:56 pm, Chris St

[android-developers] Re: Accelerometer Speaker Interference Workarounds?

2009-08-28 Thread Chris Stratton
On Aug 28, 7:39 pm, Robert Green wrote: > It's no secret that both the HTC Dream and HTC Magic have problems > with sound from the built-in speaker interfering with the > accelerometer.  I'm currently having the problem with my new game and > am not sure how I'm supposed to work around it.  Quit

[android-developers] Re: Accelerometer shake side-to-side detection issue

2009-08-02 Thread doubleslash
The shaking corresponds to a big jump in the 2nd derivative of the acceleration along the direction of interest. I don't know if onSensorChanged is called frequently enough to let you detect that blip though. On Jul 31, 12:44 pm, Alex Corbi wrote: > Hi everybody, > > I'm developing an app and i

[android-developers] Re: Accelerometer data

2009-06-30 Thread House n @ MIT
Thanks for the help. You were right, Peli, I was using the old constant for the new interface. I made that small change, and everything is looking the way it should now. Thanks again! On Jun 30, 10:53 am, Peli wrote: > Then the solution is quite simple: > > Housen@ MIT used the deprecated con

[android-developers] Re: Accelerometer data

2009-06-30 Thread Peli
Then the solution is quite simple: House n @ MIT used the deprecated constant (@deprecated) SensorManager.SENSOR_ACCELEROMETER = (const) 2 with the new API, while jdesbonnet used Sensor.TYPE_ACCELEROMETER = (const) 1 The constant value used above (=2) corresponds to Sensor.TYPE_MAGNETIC_FIELD =

[android-developers] Re: Accelerometer data

2009-06-30 Thread jdesbonnet
I checked with my Vodafone branded HTC Magic (using Android 1.5 API). Using SensorEventListener and the following code to register the listener: Sensor accSensor = mSensorManager.getSensorList (Sensor.TYPE_ACCELEROMETER).get(0); mSensorManager.registerListener(accSensorListener, accSensor, SENSOR

[android-developers] Re: Accelerometer data

2009-06-30 Thread Peli
> x: 12.5625 y: 20.8125 z: -16.4375 Unfortunately, I didn't have a chance yet to try out sensors through the SDK 1.5 API on a real device yet, but these numbers look like they could be from a compass (in microTesla). Did you try rotating the device around its axis, while lying flat on

[android-developers] Re: Accelerometer data

2009-06-30 Thread jdesbonnet
I had a good laugh at this one. I could be wrong, but often when complex arithmetic code involving physical units fail and the code originates from the US it usually means one thing.. hint: Mars Climate Orbiter disaster (http://en.wikipedia.org/wiki/Mars_Climate_Orbiter). The figure you mention (

[android-developers] Re: Accelerometer

2009-06-25 Thread Sundog
> 9.8m/s^2 is an approximation, however the accelerometer is being influenced > by forces and noise, the only way to over come it would be to sample the > noise and then try to cancel it out. Or you can simply integrate the result over time. --~--~-~--~~~---~--~~

[android-developers] Re: Accelerometer

2009-06-25 Thread Delta Foxtrot
2009/6/26 kalyan simhan > there seems to be some problem with my accelerometer... > the values of x,y,z fluctuate even when it is stationary.. kept > in one place... why is this.. how can i overcome it.. > what is the unit of the value im getting.. im guessing 1 unit = 1g > 9.8m/s^2 is an approx

[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-11 Thread Sundog
Thanks much! Actually for my purposes ignoring the sensor for a second will work just fine, but I will check out your info for the next time around. I'm kinda designing my new game BASED on the limitations of the phone... i.e. choosing the complexity of the views based on how much the poor innum

[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-11 Thread TjerkW
Nope this problem is is also on the htc magic .. check my post for a solution using a damper. Somewhere else in this group ... On 11 jun, 22:28, Sundog wrote: > I'd be very interested to know if anyone besides G1 owners has seen > this? My best guess is that it's a design flaw specific to this >

[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-11 Thread Sundog
I'd be very interested to know if anyone besides G1 owners has seen this? My best guess is that it's a design flaw specific to this phone... and if so, no fix will be forthcoming. On Jun 11, 2:20 pm, Sundog wrote: > Just a "me too" to report that this problem is real and is still here > under Cu

[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-11 Thread Sundog
Just a "me too" to report that this problem is real and is still here under Cupcake. Play a sound and the accelerometer goes haywire for a second. Only fix I can see is ignoring the accelerometer while SFX are playing... kinda not really a good workaround for a game. On Jun 8, 8:25 am, TjerkW wr

[android-developers] Re: Accelerometer readings -> Screen coordinates

2009-06-08 Thread Robert Green
Understand that the accelerometer shows force in 3 directions. When the phone isn't moving, it will have 9.8m/s2 (gravity) reading on it. You can use that to figure out exactly where the phone is pointed. You can get 3 vectors to show the angle of X,Y and Z relative to gravity if you use arctan(r

[android-developers] Re: Accelerometer/Orientation sensor problem

2009-06-08 Thread TjerkW
Same problem here, when playing sounds during my game (in which you control the gameplay with accelerometer) the accelerometer gives strange values. On 24 mei, 13:29, Bonifaz wrote: > I have the same problem of wired accelerometer data while music is > playing. > > Does anyone have a workaround

[android-developers] Re: Accelerometer is cukoo???

2009-05-31 Thread youssef henry
i found a solution of this problem: in the onSensorChanged function public void onSensorChanged(int sensor, float[] values) { /* that is the normal code with have the problem float x=values[0]; float y=values[1]; float z=values[2]; which 0,1,2 is the Acceleromete

[android-developers] Re: Accelerometer is cukoo???

2009-05-31 Thread youssef henry
i have the same problem, anyone can help? On Fri, May 15, 2009 at 5:06 PM, doubleslash wrote: > > This problem occurs only when activity is set explicitly to landscape > in manifest. Anyway to make it work in landscape? > Thanks > > On May 14, 10:16 pm, doubleslash wrote: > > I see an accelerat

[android-developers] Re: Accelerometer/Orientation sensor problem

2009-05-24 Thread Bonifaz
I have the same problem of wired accelerometer data while music is playing. Does anyone have a workaround for this. Some kind of filter mechanism perhaps. I use "FloatMath.sqrt(x*x + y*y + z*z)" for shake detection. But even with that formular, playing music always detects shake, just raising th

[android-developers] Re: Accelerometer is cukoo???

2009-05-15 Thread doubleslash
This problem occurs only when activity is set explicitly to landscape in manifest. Anyway to make it work in landscape? Thanks On May 14, 10:16 pm, doubleslash wrote: > I see an acceleration of -9 in the y-direction ( due to gravity, of > course). Now, keeping the phone fixed, not rotating the s

[android-developers] Re: Accelerometer power tied to display backlight power

2009-04-20 Thread Jordan Frank
Good news! I upgraded my device to cupcake, and it appears that I can now receive onSensorChanged events when the screen is off, provided that I hold a Partial Wake Lock. However, the sampling frequency seems to be far more sporadic. I think that it has to do with the fact that cupcake now flips

[android-developers] Re: Accelerometer power tied to display backlight power

2009-04-20 Thread Jordan Frank
Known but not resolved. Even in the bug report that is mentioned in the thread that you quoted, the only response has been "things might have changed in cupcake". Of course determining what has changed, or if this specific problem has been fixed requires wiping the phone and installing cupcake*, w

[android-developers] Re: Accelerometer power tied to display backlight power

2009-04-17 Thread Carter
This is a known issue. See this thread: http://groups.google.com/group/android-developers/browse_thread/thread/1b7202c957084742 On Apr 17, 4:18 am, David Burström wrote: > Hi Jordan, > > I can only agree with your findings. Regardless of which lock is being > used, the service stops sending ca

[android-developers] Re: Accelerometer power tied to display backlight power

2009-04-17 Thread David Burström
Hi Jordan, I can only agree with your findings. Regardless of which lock is being used, the service stops sending callbacks as soon as the screen turns off or the power button is pressed. :David On Mar 16, 3:01 pm, Jordan Frank wrote: > A partial wakelock doesn't help because, as I have alread

[android-developers] Re: Accelerometer/Orientation sensor problem

2009-04-03 Thread chow
I have noticed that the speaker output does effect the magnetic compass reading a bit. Not too surprising, since the speaker uses an electromagnet. This is probably what is causing the sensor to jitter around. As for the accelerometers, I would guess that the movement of the speaker cone itself is

[android-developers] Re: Accelerometer or orientation for rolling ball code?

2009-03-24 Thread deepdr...@googlemail.com
aren't accelerometer and orientation sensor one and the same thing? -- http://www.deepdroid.com On Mar 23, 11:20 pm, Carl Whalley wrote: > If I'm reading things right, the accelerometer measures physical > forces (i.e. movement) and the orientation sensor gives the tilt of > the handset. If yo

[android-developers] Re: Accelerometer or orientation for rolling ball code?

2009-03-23 Thread clark
IMO, I'd go with the accelerometer implementation. The reason being that for a rolling ball you could use the values for the X and Y axis, perhaps scale them a bit to meet your needs. I've done exactly that on a test application I was working on. Going with the orientation implementation, you w

[android-developers] Re: Accelerometer power tied to display backlight power

2009-03-16 Thread Jordan Frank
A partial wakelock doesn't help because, as I have already explained, as soon as the display goes off, the accelerometers go off. I can keep the CPU awake, and my program continues to run when the display is off. However, as soon as the display goes off, the accelerometers go silent. So this is w

[android-developers] Re: Accelerometer power tied to display backlight power

2009-03-15 Thread Marco Nelissen
That's why you'd use a *partial* wakelock. On Sun, Mar 15, 2009 at 6:57 AM, Jordan Frank wrote: > > My fault for not explaining myself better. I want to still be able to > collect accelerometer data while the display is off. I'm well aware of > the fact that I can keep the display on, but if I

[android-developers] Re: Accelerometer power tied to display backlight power

2009-03-15 Thread Jordan Frank
My fault for not explaining myself better. I want to still be able to collect accelerometer data while the display is off. I'm well aware of the fact that I can keep the display on, but if I want to, for instance, create a pedometer application that counts footsteps while in the user's pocket, the

[android-developers] Re: Accelerometer power tied to display backlight power

2009-03-14 Thread Stoyan Damov
http://developer.android.com/reference/android/os/PowerManager.WakeLock.html On Sat, Mar 14, 2009 at 8:23 PM, Jordan Frank wrote: > > Hi, > > Although I haven't received confirmation from anyone at Google, I can > confidently state that when the power to the display goes off, one can > no longer

[android-developers] Re: Accelerometer frequency

2009-02-19 Thread Jordan Frank
I've done some experiments with the accelerometers, and so I figured that I would share the results. As for precision, the values are floats. I don't know how else to quantify the precision without looking at the specs for the actual sensors being used. Qualitatively, the noise in these sensors i

  1   2   >