Android :: How Do I Get Sensor Data On Mapoverlay?

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.

Android :: How do i get sensor data on mapoverlay?


Android :: Bad Compass And Sensor Data

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

Android :: Is It Possible To Get Sensor Data At Regular Intervals?

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

Android :: Sensor Data Poll Mechanism

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

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 View Related

Android :: Streaming Sensor Data From Device To A Server

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

Motorola :: Writing Android Sensor Data To XML File

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

Android : Collect Sensor Data While The Display Is Turned Off?

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

Android :: Need Any Tutorials On Populating MapOverlay

Aug 19, 2010

Does anyone know of any tutorials on populating a Mapview using an overlay at a specific point? e.g adding a marker at a specific lat / lng on your mapview?

View 1 Replies View Related

Android :: How To Use OnSensor Changed Sensor Data In Combination With OpenGL?

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

Android :: MapOverlay Turns Phone Unresponsive

Jun 11, 2010

I'm trying to draw some points (around 200) in a MapOverlay and noticed that the application gets slow and the phone becomes unresponsive. After adding the Log.i message I found the problem, the loop is run endlessly (note that the phone is quiet and there's nothing happening in the background): Is this a "normal" behaviour, a bug in the OS or am I doing something wrong?Here's my code...

View 7 Replies View Related

Android :: No Light Sensor / Proximity Sensor Detected On Hero?

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

Android :: Difference Between Orientation Sensor / Magnetic Field Sensor

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

Android :: Is Orientation Sensor A Physical Sensor Different From Accelerometer?

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

Android :: Add New Sensor Support In Sensor Framework

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

HTC Droid Eris :: My Home Sensor Is Not As Responsive As My Back Sensor

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

Android :: Enhanced Sensor API

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

Android :: Example App That Uses Accelerometer Sensor?

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

Android :: Best Way To Store Application Data / When Data Stored / Data Format Could Change In Future Versions?

Mar 4, 2010

I'm making an Android Java app game (although this question applies to all languages really) and hope to release the first version soon. I'm nervous about how I save data in my game. My problem is that, if in a later update, I decide to store more data or store the same data in a different way, I need to be careful I don't lose or corrupt data for users that upgrade (i.e. I want users to be able to use data created by an old version in the new version, like their high scores from before).For example, say I want to save high scores in version 1.

View 3 Replies View Related

Android :: How Can I Find My GPS Location With GPS Sensor?

Aug 20, 2009

I am currently working with a HTC G1 and I am trying to retrieve my GPS position. But I can not understand very well the documentation. I wrote those lines, but they didn't work.It already write "provider == null" so I guess that "mgr.getBestProvider(new Criteria(), true);" returns null.

View 2 Replies View Related

Android :: Video Motion Sensor App?

Sep 9, 2010

I just got an android, and I love it. But I was wondering if there is an app where it records video, but it automatically starts recording when there is motion, and stops when the motion goes away. I believe its possible, just wondering if is been done.

View 2 Replies View Related

Android :: Sensor Not Being Notified When In Standby

May 28, 2009

I am listening events from accelerometer sensor and everything is going right. The problem occurs when phone gets in standby mode and I am not being notified by sensors anymore. Does Anyone know if it's possible to get sensor notifications, by implementing a listener, even if phone is in standby?

View 2 Replies View Related

Android :: Light Sensor On The Nexus One

May 20, 2010

I'm having some troubles with the light sensor on the Nexus One.

AFAIK, the proper way to read the measures of a sensor is registering a SensorListener through the SensorManager and then wait for the readings on the onSensorChanged method.

My main problem is that the light sensor don't seem very accurate (the readings jump a lot) and I don't get the first reading until the lighting conditions change. I have to change the phone orientation, go outdoors or hide the sensor with my fingers or otherwise I don't receive any value. Is there any way to increase the accuracy or, even more important, to force an initial reading?

BTW, I have tried with SensorManager.SENSOR_DELAY_FASTEST but I haven't noticed any change.

View 2 Replies View Related

Android :: Low Accuracy Of The Accelerometer Sensor?

Jul 9, 2009

We are writing an application that uses acceleration sensor data to plot phone's movement in 3D. We are finding gross inconsistencies in the actual data output by the sensor. Also, sampling rates vary greatly from 8 to 200 millis. (using System.currentTimeMillis())

Specifically, when we try to draw a circle with G1 flat on the table all the time (filtering out gravity accel 9.8), most of the time we would get a plot of phone's position that is not a circle at all. Lots of times, it would be close to a straight line. Sometimes, it would start drawing an arc, but would not close the circle shooting off in a random direction.

We tried to eliminate the time variable, by substituting a constant time sampling rate (10 millis) to calculate phones position, but the result was very close to what we had before (shapewise). Also, the acceleration in Z direction when the phone is displaced lying flat on a table (XY plane) varies too by +/- 2 units which is a lot.

I do not think it is an error in our code, as we have checked it many times. If there were an error indeed and the accelerometer worked properly, we would see a consistently wrong depiction of the phone's movement. Unfortunately, repeating the same movement (circle) would produce sometimes wildly differently shaped plots.

It all comes down to us wanting to know if that is indeed the case that the G1 accelerometer is very unreliable and inconsistent device when used for more or less precise measurements? Is there some documentation/facts paper that would tell us just how reliable accelerometer is?

View 5 Replies View Related

Android :: Get Current Sensor State?

Feb 7, 2010

Yes, I can get sensor update events with SensorEventListener. But this approach has 2 drwwbacks:

1) For some sensors I have to wait for the state to update. For example, temperature may update after a minute!

2) In some cases I can get incorrect readings. For example, the phone lies on a flat surface and does not move. I receive first orientation update event after listener registration. When only a part of the orientation vector changes, other parts may be 0. And it is no way to determine, is it a true 0 degree azimuth or just an incomplete vector. If I move the phone a little, the correct non-zero azimuth appears.

To solve this problems it's possible to create a separate thread that constantly monitors sensors. After some time it will certainly contain true values. But I think that it is an overhead for such simple task.

Is it any other way to get current sensor data?

View 1 Replies View Related

Android :: How To Use Information From Sensor For Augmented Reality?

Jun 21, 2009

Could somebody (Mathias Agopian alias pixelflinger perhaps) please tell me how to use information from sensor for augmented reality stuff. Sorry am not much into graphics stuff but I did try my part to figure stuff out with help of documentation. Didn't miss the note: ""Note: It is preferable to use getRotationMatrix() in conjunction with remapCoordinateSystem() and getOrientation() to compute these values; while it may be more expensive, it is usually more accurate. Tried both. With the above method roll is always negative (in radians) of the roll returned by orientation sensor event. Not the real problem though as these are in the same +/-90 range but negative/opposite. One of these goes against the definition of roll in android documentation. I have the camera on landscape mode and did try with and without the suggestion: ""# Using the camera (Y axis along the camera's axis) for an augmented reality application where the rotation angles are needed : remapCoordinateSystem(inR, AXIS_X, AXIS_Z, outR); Yet no luck. Got a few lessons on quaternions etc. But am sure it is much easier than the mess am getting into. Say, orientation sensor event returns yaw, pitch & roll in say eO[] What are the next steps to get rotation matrix that I could use in opengl to rotate a augmented scene overlapping the camera preview?

View 7 Replies View Related

Android :: Getting Sensor Information From Native Code - C Or C++

Oct 12, 2010

Is this possible to access a sensor data form native code without using Java at all? I need to access to the sensor as fast as possible, but it seems like the "DELAY_FASTEST" parameter when registering an event change is not fast enough.

View 3 Replies View Related

Android :: Disable Light Sensor During Call

Nov 24, 2010

When you talk on the phone in Android the light sensor is working. If you cover the top left corner of the screen, the display turns black and you can't see anything. I would like to cancel that feature and I tried working with Android Sensors and the Light Sensor but it is not working. This is my code:

senMgrLight=(SensorManager)getSystemService(Context.SENSOR_SERVICE);
senMgrLight.registerListener(onSensorListener,
senMgrLight.getDefaultSensor(Sensor.TYPE_LIGHT),
SensorManager.SENSOR_DELAY_FASTEST);

View 2 Replies View Related

Android :: Sensor Listeners - Threads And Responsiveness

Jun 24, 2010

I have two questions about sensor listeners

1. from which thread are sensor values updated and should this be synchronized? can sensor's listener callback be a good place to call custom's view onDraw method? as this should be done from different thread. I cant find anything about it. In another words my problem is that I want to listen to sensors change and draw something on view surface but I dont know which thread (the main thread of the application?) is updating sensor's state

2. If I register sensor listener with SENSOR_DELAY_FASTEST my application is not responsive at all! Raw application with TextView only is not reacting to go back or home button! How should I deal with this or am I doing something wrong?

View 4 Replies View Related

Android :: Sensor Manager API Measures Steps?

May 26, 2010

Is it the SensorManager API that i have to use to measure steps? Any sample code or tutorial?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved