Some users who rooted the redmi using "native root" method might have noticed that when you call su from a terminal it shows "Warning: Generic atexit() called from legacy shared library". It might stop some command line operations from going further (in my case the debian-kit script). It is the problem caused due to old "su" binary. So here is the new one I retrieved from my Mi3. It works perfectly in redmi 1s too. You can replace it directly and apply the necessary permissions(chmod 644 /system/xbin/su) or replace the one in zip files using 7zip.
Affichage des articles dont le libellé est called. Afficher tous les articles
Affichage des articles dont le libellé est called. Afficher tous les articles
jeudi 25 décembre 2014
vendredi 19 décembre 2014
onSensorChanged not called topic
Hello Guys,
i have an issue with my "onSensorChanged" event. I write a test app to acces my accelator sensor on the "Samsung Galaxy S5 Mini". This is my code:
My MainActivity implements the SensorEventListener:
And i implement onSensorChanged and onAccuracyChanged as well:
Not even "Log.d("Test", "SensorChange");" is called a single time.
Im workink with Android Studio 0.8.14 at the moment. I use a older version cause i got some truble to import 0.8.14 project to the version 1.0. The wierd thing is that i create a simillar app with eclipse some days ago. And got no issues to read the accelator sensor. I would be glad if someone knows how to solve this problem.
i have an issue with my "onSensorChanged" event. I write a test app to acces my accelator sensor on the "Samsung Galaxy S5 Mini". This is my code:
My MainActivity implements the SensorEventListener:
Code:
public class MainActivity extends Activity implements SensorEventListener {
Code:
@Override
public void onSensorChanged(SensorEvent event) {
Log.d("Test", "SensorChange"); //never called
if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
float[] vals = event.values.clone();
tvX.setText("X: " + Float.toString(vals[0]));
tvY.setText("Y: " + Float.toString(vals[1]));
tvZ.setText("Z: " + Float.toString(vals[2]));
}
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
}
Im workink with Android Studio 0.8.14 at the moment. I use a older version cause i got some truble to import 0.8.14 project to the version 1.0. The wierd thing is that i create a simillar app with eclipse some days ago. And got no issues to read the accelator sensor. I would be glad if someone knows how to solve this problem.
By:
dd
On 11:14
Inscription à :
Articles (Atom)