Android :: Latency When Getting Sensor Data From Phone?
Mar 9, 2010
I am working on a project using HTC magic which requires the data from the electronic compass, including both the accelerometer and magnetic sensor. But I find that there is a significant latency between the move of the phone and the trigger of the sensorChanged event. In other word, the acceleration and magnetic data obtained from sensor are updated about half of a second after my motion. And I have several questions about the problem as follow. Are the orientation data computed by the acceleration and magnetic data? Or are there a physical sensor for orientation? Does the latency result from the android API (using the event) or the physical limitation of the electronic compass? It is said that the model of the electronic compass is AK8976A from Asahi Kasei. Does anybody have the datasheet or know the frequency of the sampling? Any idea to improve the real-time experience?
View 1 Replies
Apr 12, 2010
Despite everything I have read about the difficulty of making low latency audio apps in Android, I am giving it a shot. To start, I loaded each note in an octave into a SoundPool, and then looped through each note that was to be played on that beat and called play(). This didn't even come close to being accurate enough for me, and got especially bad if a lot of notes were being played at once.
From what I read, the only way to do something like this is to mix the audio yourself, though I am not entirely sure how to go about this. My initial thought is that for each beat, I could precompute the sound the sound that is to be played (i.e., combine the wav's), and then pass that stream to an AudioTrack when it is time to be played.
Are there any good examples out there for how to mix audio like this, or libraries I could use to do this for me? How have coders of other music apps dealt with this?
View 8 Replies
View Related
Sep 14, 2010
since map overlay is not activity, how do i get the sensor data so that i can draw on the map overlay? like the direction arrow.
View 7 Replies
View Related
Jul 22, 2009
Am researching a problem with compass and sensor values returned by the phone. I found this thread: http://groups.google.com/group/android-developers/browse_thread/threa. Which seems related, but it's old so I'm starting a new one. I'm getting stuck values from both the compass and orientation sensors. It was fine yesterday, but today, I'm only getting values in a limited range (e.g. compass headings from 240 - 290), no matter how I orient the device. What's even more odd is that the radians returned from the call to Sensor Manager.get Orientation(), which returns radians, is giving consistently out of range values. Anyone see this same behavior, and if so, any fixes? Here's some sample sensor data. Format is heading, pitch, roll. The first set contains raw values, the second set contains values after I've applied the orientation matrix generated by the Sensor Manager. The third set contains values after I've smoothed the data with my own algorithm.
View 4 Replies
View Related
Aug 2, 2010
Just joined the Android group. I'm having problems with the acceleration and orientation sensors.I would like to obtain sensor data (acceleration and orientation values) at regular intervals (10 milliseconds). However, the SensorEventListener doesn't allow you to do that. Does anyone have an idea of how to work around this issue? This is important as I need it to collect data for an app I'm working on.
View 2 Replies
View Related
Jun 3, 2010
Per the current implementation in Sensor Manager, the SensorThread is polling data per below code, final int sensor = sensors_data_poll(values, status, timestamp); it then checks the sensor type if it is registered and processes the data further. For an application which has registered for only one sensor, still to get that particular sensor data, SensorThread has to execute for atleast N-1 loop most of the time. Can anybody provide the insight as to, why SensorThread is waiting to check the sensor type to be returned by the HAL instead of sending sensor information which is currently registered by that application. Wouldn't that increase the performance?
View 2 Replies
View Related
Feb 16, 2010
I would like to continuously send/stream sensor data (GPS, acceleration, etc.) from a device to a server. What would be the best technology to do this? Is it possible to use RTSP? What else would you recommend me to use?
View 3 Replies
View Related
Nov 9, 2010
I am developing an application that read data from sensors and write those data to an XML file when you press a key. i have 2 activity one for button and another is an Activity who implements sensorEventListener. the problem is my main activity is button and couldn't get data from event listener activity. i think the listener activity is not active but when i create an intent and start activity with that intent the program stop working. the button is able to create XML file solely.so how could i read sensor data from sensors,and how to send them to XML file when the button got clicks.
View 1 Replies
View Related
Jun 7, 2010
I'm using Android 2.1 on a HTC Nexus One. I want to collect sensor data while the device is turned off.
By using android.app.Service this works well while the app is in the background but stops working when the display is turned off by the hardware button.
Is there a possibility to collect sensor data while the display is turned off?
View 3 Replies
View Related
Nov 24, 2010
I have written a TestSuite to find out how to calculate the rotation angles from the data you get in SensorEventListener.onSensorChanged(). I really hope you can complete my solution to help people who will have the same problems like me. Here is the code, i think you will understand it after reading it. Feel free to change it, the main idea was to implement several methods to send the orientation angles to the opengl view or any other target which would need it. method 1 to 4 are working, they are directly sending the rotationMatrix to the OpenGl view. method 6 works now too, but i have no explanation why the rotation has to be done y x z.. all other methods are not working or buggy and i hope someone knows to get them working. i think the best method would be method 5 if it would work, because it would be the easiest to understand but i'm not sure how efficient it is. the complete code isn't optimized so i recommend to not use it as it is in your project. Code...
View 1 Replies
View Related
Feb 8, 2010
I have a HTC Hero here, and when I tried to get the list of available sensors on the device by calling ((SensorManager) getSystemService (Context.SENSOR_SERVICE)) .getSensorList(Sensor.TYPE_ALL); I get only the following sensors: D/SensorManager( 6302): found sensor: BMA150 3-axis Accelerometer, handle=0 D/SensorManager( 6302): found sensor: AK8973 3-axis Magnetic field sensor, handle=1 D/SensorManager( 6302): found sensor: AK8973 Orientation sensor, handle=2 D/SensorManager( 6302): found sensor: AK8973 Temperature sensor, handle=3 According to the specs, there should be a light and a proximity sensor on the Hero, and I've seen it in action (the automatic screen brightness adjustment) - so at least the ambient light sensor is definitely there. My question is then, why doesn't the getSensorList return for me the light and the proximity sensors?
View 8 Replies
View Related
Nov 2, 2010
Does anyone know the difference between the orientation sensor and magnetic field sensor on Android?Since I've read that magnetometer is synonymous with digital compass I'm a little bit confused. What are they really?
View 1 Replies
View Related
Oct 30, 2009
Or it's just some virtual sensor the uses the data provided by the accelerometer and the magnetic field sensor to calculate the orientation?
View 7 Replies
View Related
Nov 18, 2009
Can some one point towards any documentation/resources/ threads that can explain how a new sensor support can be added in android sensor framework?
View 2 Replies
View Related
Feb 18, 2010
My home icon is way less responsive than the back icon which seems to be perfectly normal. Sometimes I have to "press" the home icon twice to get the "buzz" and have it move the screen. However the back icon works 99% of the time on the first press. IS there any adjustment I can make or should I bring the phone back. I have had it now for 2 weeks.
View 9 Replies
View Related
Sep 19, 2009
What are my options for playing simultaneous audio on an Android device with the least amount of latency? Am I going to get anything half decent out of the canned SDK, or is that asking too much? The documentation claims that the SoundPool class is capable of playing multiple sounds simultaneously with relatively good performance, but after running some tests in the emulator and on a physical device it seems pretty weak. Is there maybe a trick to it, or do I have to go to a much lower level api for this kind of thing? I've tried using a single sound pool with multiple samples loaded, and I've tried multiple sound pools each managing a single sample. I'm preloading everything, so that when I attempt to play back I have no additional code being executed other than the call to SoundPool.play().
View 2 Replies
View Related
Apr 13, 2010
We are developing an Android video conferencing application. After examining some already existing live-stream applications , we came to the conclusion that all or almost all existing applications have a delay of 3 to 10 seconds. The application we are developing was tested receiving a video stream on the Android device and the same video stream on VLC at the same time.The result of the test is that VLC shows the same part of the video 2 to 10 seconds earlier than our Android application on the phone(HTC hero) depending on the rtsp link used. we haven't found what is the main cause of the delay and also dont know if it is possible to reduce that delay. In our case, as it comes to video conferencing, the delay should be lower than 2 seconds at least. Do you guys have some information about the cause of the delay or even how to reduce it?
View 5 Replies
View Related
Jun 6, 2010
I'm writing an Augmented Reality codes that should works in realtime,
But the VM's garbage collection hinders my program's performance.
I checked my program's execution time for each in OnPrevFrame(byte[], Camera)
and it execution time increases from around 50ms to 120ms at just after each garbage collection.
I copied parts of logs below. (local time is just before and after of signal processing, and global time is time stamps for every onPreviewFrame() calling )Also I executed onPreviewFrame without any signal processing on it, but
the garbage collection is also carried showing debugging message around 60ms it spends for memory release.
Is this garbage collection come from releasing byte[] yuvs image data? ( i uses 320x240 thumb nail )
then this clearly comes from Java's limitation, so there will be no hope for improvement unless
I found a way to directly access camera device? do you think this is feasible? Hope listen to others' comments.
View 3 Replies
View Related
Jul 8, 2009
I am planning to give mobile phone development a shot and was thinking about making some simple multiplayer games. I know latency over local wifi is probably fine but what are the issues with latency over GPRS/3G?
I've searched and the best I've seen is someone saying it was 'high', without presenting any concrete numbers. I suppose latency fluctuations are important as well - does anyone have any info on this?
View 2 Replies
View Related
Sep 22, 2009
I'm interested in developing some software for the android OS using acceleration sensor and I would like to know how precise this technology is in mobile phones ? so I wont be waiting my time.If anyone know something please share!
View 3 Replies
View Related
Oct 26, 2009
I first have to say that I'm biased, 'cus I like to write music apps (like music generation apps). However, this affects games as well. It's somewhat disappointing how OpenGL has made it into the NDK now but there isn't any NDK methods to get to sound to have faster access. Over the weekend I did some more testing and if you make a "drum" app, for example, and play the sound using either SoundPool or AudioTrack, you will get about a 100ms delay buffer, which is clearly audible (gap).
I made a test app where when you touch the screen, upon the DOWN event, it would play a short sound (like a drum sound). It clearly was not real time responsive or even close - you could hear the delay. I'd be interested to know if anyone who has made a game has any trouble with sounds? It seems like they aren't going to really trigger real time enough if you use SoundPool, for example. Am I completely wrong? Seems like your game is going to perform an action, play a sound, but the sound will have latency which I would think would throw off the game a bit..................
View 12 Replies
View Related
Sep 29, 2010
This might not be a big deal to most but today, I went to the Android market looking for a music app, something like NanoStudio for iPhone. I found a lot of 2nd rate loop creation synth nonsense. After trying different free versions of paid software I asked myself "why are there no good music apps for Android?"
I emailed the creators of NanoStudio to ask if there are any plans to release an Android version of their software. here is the reply: "Not until they get their act together with audio latency, no. Shame really because NanoStudio's written to be cross platform" This greatly disappointed me. I am a music producer going on 10 years (hip hop, Trip hop, Electronic, etc..) so you can understand my interest in this issue. iphone, iPod have amazing music apps of this sort. Android has nothing close.
View 12 Replies
View Related
Mar 11, 2010
Which permission needs my application to get access to the location of the user on Android?
View 1 Replies
View Related
Oct 10, 2010
If the Mods decide to delete this and direct you to the OP then thats fine. I just want to spread awareness if this issue. This might not be a big deal to most but I went to the Android market looking for a music app, something like NanoStudio for iPhone. I found a lot of 2nd rate loop creation synth nonsense. After trying different free versions of paid software I asked myself "why are there no good music apps for Android?"
I emailed the creators of NanoStudio to ask if there are any plans to release an Android version of their software. here is the reply: "Not until they get their act together with audio latency, no. Shame really because NanoStudio's written to be cross platform" This greatly disappointed me. I am a music producer going on 10 years (hip hop, Trip hop, Electronic, etc..) so you can understand my interest in this issue. iphone, iPod have amazing music apps of this sort. Android has nothing close.
View 2 Replies
View Related
Jul 22, 2010
My wife and i both have the EVO and for some reason she is always hanging up on people. is there any way to turn off the sensor so that when the phone is takin away from your face it doesnt light up the end call button?
View 4 Replies
View Related
Mar 29, 2014
I'm new to android development and I'm implementing a simple localization method to get used to the device. I've been reading some articles and I can't seem to figure out how the phone figures out sensor accuracy. My guess is that it decides this based on how long its been since it was last calibrated.
View 3 Replies
View Related
May 4, 2010
I was dunking around with settings and got to the g-sensor level. I clicked calibrate, everything seemed fine. Now the phone won't go into landscape mode unless I shake it hard a few times. How the hell do I fix this?
View 9 Replies
View Related
Sep 9, 2010
Is anyone having this issue? Friend of mine has the D2. Says the display does not turn off when next to her face and registers any touches.I don't have a D2, so I don't know what the phone options/settings might be.
View 3 Replies
View Related
Jun 2, 2009
I had a discussion with a few of the Android team member at Google IO, and I'd like to throw the idea out here for general brainstorming with the community. My view is that it is not a good approach to create "sensor-specific" APIs with iterative releases of the Android platform and SDK's. By this, I mean that instead of adding a "location API", and an "accelerometer API", and whatever comes next, we should create a "generic" sensor API that can work with a broad range of sensor types, including sensor configuration, demand read/write/configuration, event notifications, and other functions. In this way, 3rd parties could also add innovative sensing capabilities (or external sensors) to their Android devices which would be "instantly" supported by the platform. Well-known sensor such as collocation and acceleration could have agreed-to sensor names/namespaces, with full extensibility for additional sensor types. As an example, collocation as a 2D longitude/latitude is fine for some apps, but for "inside the building" applications or for other apps involving the need to accurate location of people or resources in 3 dimensions, it doesn't cut it. Additionally, one can easily envision inclusion of RFID, environmental, and other sensors in devices that could dramatically enhance the capabilities of Android applications.
View 4 Replies
View Related
Jan 23, 2009
Where can I find a simple example application that uses the Accelerometer Sensor?
I've seen the Open Intents applications, but I'd rather use the raw Android API, at least until I understand it a little better. I'm surprised at the lack of documentation.
View 3 Replies
View Related