Questions tagged [sensormanager]

193 questions
4
votes
0 answers

Android: Get accurate azimuth

I've searched a while about how to get the most accurate azimuth of device and came up with this: //Activity members private SensorManager sensorManager; private float mAzimuth = 0.0f; private float[] mRotation = null; private float rMat[] = new…
michael
  • 3,295
  • 12
  • 44
  • 83
4
votes
2 answers

Android sensor listener does not get unregistered or sensor still retrieves values

I have some problems with SensorManager.unregisterListener. They are similar with Android, Thread, Cannot unregister SensorEventListener and SensorEventListener doesn't get unregistered with unregisterListener() method. But I could not find my…
Ispas Claudiu
  • 1,684
  • 2
  • 26
  • 52
4
votes
1 answer

Combining multiple Android Sensors with helper Classes

I am trying to build an application that would allow me to retrieve data from multiple sensors simultaneously. I still have not figured out how I will get there, so I started by implementing a SensorObject class for a structured layout. This…
DottoreM
  • 135
  • 3
  • 21
4
votes
2 answers

Remapping coordinate system in Android app

I'm implementing a simple Android app, in which I need to identify the north. So I've implemented SensorEventListener and I used something like this: @Override public void onSensorChanged(SensorEvent event) { if(event.sensor.getType() ==…
GVillani82
  • 16,419
  • 26
  • 96
  • 162
4
votes
1 answer

Android: How does one deal with inaccurate baromters?

I have been using a Samsung Galaxy S3 to work on an app that uses the barometer estimate the user's altitude. I use SensorManager.getAltitude(p0, p), and set p0 equal to the sea-level pressure reported at the nearest airport. I set p equal to the…
Probity
  • 41
  • 1
  • 2
3
votes
1 answer

Multiple internal sensors of same 'type'

Android's SensorManager class will return a list of Sensors of a specified type. I am wondering if a device had, for example, multiple internal temperature sensors (TYPE_AMBIENT_TEMPERATURE), how might I distinguish between them? Would…
westsider
  • 4,929
  • 5
  • 33
  • 51
3
votes
0 answers

JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8

JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0x88 string: '!3o�y�' in call to NewStringUTF from int android.hardware.SystemSensorManager.nativeGetNextSensor(android.hardware.Sensor, int) Happens in…
3
votes
0 answers

Android Accelerometer Skipping Frames

I have finally have figured out how to implement the accelerometer in Android, but it seems to be skipping frames. I suspect this because when I use the acceleration data like this : velX += event.values[0]*(deltaTime/1000); velY +=…
Ajay
  • 417
  • 6
  • 19
3
votes
1 answer

Sensor Fusion: Which sensors are required for finding Rotation Vector?

Background: My aim is to figure out the tilted angles of a phone, for example for a game where tilting the phone backwards implies "stepping on the gas" and tilting left/right implies turning a steering wheel left and right. I was watching this talk…
3
votes
0 answers

Google Glass Heating Issue

I am developing a glassware, which shows you cards (images + text) from a list. To see all the Cards one by one you just need to move you head around and the information got changed. The application is some where similar to the What's Around…
3
votes
0 answers

How to move the object on the touch of a finger using SensorManager?

I have a problem and i can't find a answer for it... I'm using now a SensorManager in my Android game in eclipse. But I want to remove that and replace it with code so the object moves by the touch of the finger on the screen. Now I'm using…
3
votes
3 answers

SensorEvent onChanged Multithreading?

I'm detecting the orientation of the device to check if it's placed upside-down on a surface, then calling a method on that. The problem I ran into is the fact that a user may unintentionally turn the device's orientation to that position for a…
user1889890
3
votes
1 answer

Android Proximity Sensor - Incorrect value

I've run into an issue trying to create an application that keeps track of Proximity Sensor values. The intent of the application is to record the instantaneous proximity value on regular intervals (say 30 seconds). Following the API Documentation,…
Iv4n
  • 359
  • 1
  • 4
  • 16
3
votes
1 answer

how to getRotationMatrix having only accelerometer sensor in device

I want to get device rotation and i have achieved somehow but the code is not working which device is not present with Magentic sensor,Orientation sensor and Gyroscope sensor. But i have seen some app those are working like XClinometer and iHandy…
Manmohan Badaya
  • 2,308
  • 1
  • 19
  • 33
3
votes
0 answers

Positioning of device towards a target like Panorama images app in Android

I hope most of you have used the Panorama Image option in Camera app. They ask/force the user to move the device in one direction e.g. if you take 1st image then you move to 2nd image and then it will show you a TARGET BOX and when you reach that…
Khawar
  • 5,107
  • 4
  • 25
  • 51
1
2
3
12 13