Questions tagged [sensormanager]

193 questions
0
votes
1 answer

SensorManager Error

My SensorManager was working perfectly until today. I didn't change any code, all I did was boot eclipse and now I am getting an error which forces my app to quit; here is what I get: 02-20 11:44:50.835: E/AndroidRuntime(23828): FATAL EXCEPTION:…
Josh
  • 61
  • 9
0
votes
1 answer

How to rotate the image using sensor manager azimuth value in android?

public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //accel sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE); sensor =…
Rajesh Lawrance
  • 161
  • 3
  • 3
  • 9
0
votes
2 answers

Orientation change nullifies SensorManager reference

I am making an application that attaches both location and sensor listeners, so that it can then record changes from them into a file. What's strange is that one of the phones using the application was Force Closing in some instances, which I…
ravemir
  • 905
  • 2
  • 11
  • 27
0
votes
1 answer

Determine height and width of billboard using Android sensors

In the Google Play store there is an app titled Smart Measure that can be used to measure the height and width of an object. I would like to integrate this functionality into a survey app I am developing. Firstly I have done a test or two with this…
Rynardt
  • 5,397
  • 7
  • 29
  • 41
0
votes
1 answer

Android Sensor converting handle / type

I'm using the proximity sensor in my app, and when I register the sensor I can see in the LogCat this line: 07-11 17:14:26.049: E/SensorManager(26240): registerListener :: handle = 4 name= CM3663 Proximity Sensor delay= 10000 Listener=…
Bush
  • 2,282
  • 5
  • 29
  • 55
0
votes
1 answer

Application crashes on SensorManager

I am developing an android application in which i want to use accelerometer. But whenever i call the method : SensorManager sm = (SensorManager)context.getSystemService(Context.SEARCH_SERVICE); my application crashes. My code is : public void…
Muhammad Salman Farooq
  • 1,185
  • 5
  • 25
  • 51
0
votes
2 answers

Display data in text field on Android

How can I display the data obtained by the accelerometer in the EditText text box? It works just using TextView public void onSensorChanged(SensorEvent event) { float x,y,z; x=event.values[0]; y=event.values[1]; z=event.values[2]; …
bella
  • 3
  • 1
  • 6
-1
votes
1 answer

How to get CPU temperature and CPU & RAM usage?

I am developing an application and I do not know how I can get the CPU usage and temperature, example in a textview. I try with TYPE_AMBIENT_TEMPERATURE to get temperature, but it does not work. The log file says that I do not have the sensor, but I…
Wu YiYong
  • 1
  • 2
-1
votes
2 answers

Take picture when phone is straight

I just want to ask a question because I've searched through Google and I can't seem to find anything useful, and read about this and this. The Question is, can I take a picture from camera only when the phone is straight using sensors in android…
A.AL
  • 135
  • 2
  • 12
-2
votes
1 answer

Displaying multiple sensors readings on screen

I am trying to display multiple sensor readings on screen (accelerometer, magnetometer, etc.) in its own line of text. I can change the text onscreen for one type of sensor (accelerometer), but not another sensor. I registered both sensors as…
mojojojo
  • 107
  • 4
-2
votes
1 answer

Android - Launching an app with a shake

I'm a newbie to this field of android development. I'm developing an app which I need to be launched by shaking the device. How can I get this thing done? I read many threads and tried out several codes. but non of them worked. Please be kind…
-3
votes
1 answer

Java Android App

i need your help as fast as possible. I need to create an java android app,that will switch on the music when shaking a phone. So at the initial position the sound is switched off and when shaking it, it starts to play. But when stopping shaking it,…
-3
votes
1 answer

ANDROID TO PROVIDE SENSOR EVENT VALUE ON CLICK (single value)

i tried to get orientation angle using sensormanager on event of onclick of a button and the values to be added in an textview but the sensor value updated each nano seconds on user interface. can you help to create a code to have sensor event vale…
1 2 3
12
13