use of com.squareup.seismic.ShakeDetector in project SharedPreferenceInspector by PrashamTrivedi.
the class DemoActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_demo);
SharedPreferences defualtPref = PreferenceManager.getDefaultSharedPreferences(this);
defualtPref.edit().putString("Test", "Done").apply();
SharedPreferences anotherPref = getSharedPreferences("Prasham", MODE_PRIVATE);
anotherPref.edit().putString("Test", "Love you life").apply();
anotherPref.edit().putInt("Test Int", 1138).apply();
anotherPref.edit().putFloat("Test Float", 11.38F).apply();
anotherPref.edit().putLong("Test Long", 113834).apply();
anotherPref.edit().putBoolean("Test Boolean", true).apply();
SensorManager sensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
ShakeDetector sd = new ShakeDetector(this);
sd.start(sensorManager);
}
Aggregations