List of usage examples for android.media AudioManager FX_FOCUS_NAVIGATION_LEFT
int FX_FOCUS_NAVIGATION_LEFT
To view the source code for android.media AudioManager FX_FOCUS_NAVIGATION_LEFT.
Click Source Link
From source file:edu.ucdavis.glass.sepsis.support.OverviewActivity.java
private GestureDetector createGestureDetector(Context context) { GestureDetector gestureDetector = new GestureDetector(context); // create a base listener for generic gestures gestureDetector.setBaseListener(new GestureDetector.BaseListener() { @Override//from w w w . ja v a2s .c o m public boolean onGesture(Gesture gesture) { if (gesture == Gesture.TAP) { mAudioManager.playSoundEffect(AudioManager.FX_KEY_CLICK); // set up AsyncTask AsyncTask<String, Void, JSONObject> JSON = new LoadJSONAsyncTask((Context) mContext, "Updating all patient's info...", mContext); // run AsyncTask JSON.execute(Global.recentPatients.peek().id); return true; } else if (gesture == Gesture.SWIPE_RIGHT) { finish(); mAudioManager.playSoundEffect(AudioManager.FX_FOCUS_NAVIGATION_RIGHT); startActivity(new Intent(getApplicationContext(), VitalsActivity.class)); return true; } else if (gesture == Gesture.SWIPE_LEFT) { finish(); mAudioManager.playSoundEffect(AudioManager.FX_FOCUS_NAVIGATION_LEFT); startActivity(new Intent(getApplicationContext(), SupportActivity.class)); return true; } return false; } }); return gestureDetector; }