How to read the pressure sensor?
问题 Physical home button press can be detected easily on most of the devices: ... public class ExampleAccessibilityService extends AccessibilityService { ... @Override protected boolean onKeyEvent(KeyEvent event) { if (event.getKeyCode() == KEYCODE_HOME && event.getAction() == ACTION_DOWN) Log.d("Example", "The home key is pressed."); return super.onKeyEvent(event); } } But the code above doesn't work on some devices that have a pressure-sensitive virtual home button. I suppose these Samsung