adam
- Forum posts: 1
Apr 15, 2013, 3:40:52 PM via Website
Apr 15, 2013 3:40:52 PM via Website
Hi
I have to do a project for my school using Accelerometer in android device. I have written the code you need in XML and java. Uses eclipse for the construction. For the operation of Accelerometer, i use the code below:
private SensorManager sm;
private Sensor s;
sm = (SensorManager) getSystemService (SENSOR_SERVICE);
s = sm.getDefaultSensor (Sensor.TYPE_ACCELEROMETER);
sm.registerListener (this, s, SensorManager.SENSOR_DELAY_NORMAL);
when i go to run the program simulator enters the application, but not showing up nothing .
Once you remove these commands I normally displays the GUI i have made.
Please help..!
I have to do a project for my school using Accelerometer in android device. I have written the code you need in XML and java. Uses eclipse for the construction. For the operation of Accelerometer, i use the code below:
private SensorManager sm;
private Sensor s;
sm = (SensorManager) getSystemService (SENSOR_SERVICE);
s = sm.getDefaultSensor (Sensor.TYPE_ACCELEROMETER);
sm.registerListener (this, s, SensorManager.SENSOR_DELAY_NORMAL);
when i go to run the program simulator enters the application, but not showing up nothing .
Once you remove these commands I normally displays the GUI i have made.
Please help..!