@Override public void onClick(View v) { try { switch (v.getId()) { case R.id.btnBTCtest: gSoundpool.play(sp2, 1, 1, 0, 0, 1); connectBT(); break; case R.id.btnStop: gSoundpool.play(sp1, 1, 1, 0, 0, 1); g_BluetoothService.stopDeviceMode(); break; case R.id.btnRSteptest: gSoundpool.play(sp2, 1, 1, 0, 0, 1); gMsg = "-"; updateText(); g_BluetoothService.clearData(); g_BluetoothService.getStep(); break; case R.id.btnHRSTtest: gSoundpool.play(sp1, 1, 1, 0, 0, 1); gMsg = "-"; updateText(); g_BluetoothService.clearData(); g_BluetoothService.getHrStress(); gGraph0.resetData(); gGraph0.setVisibility(View.VISIBLE); gGraph1.setVisibility(View.INVISIBLE); gGraph0.drawStart(); break; case R.id.btnAccTest: gSoundpool.play(sp1, 1, 1, 0, 0, 1); gMsg = "-"; updateText(); g_BluetoothService.clearData(); g_BluetoothService.getAccelerometer(); gGraph1.resetData(); gGraph0.setVisibility(View.INVISIBLE); gGraph1.setVisibility(View.VISIBLE); gGraph1.drawStart(); break; case R.id.btnSetRun20: gSoundpool.play(sp2, 1, 1, 0, 0, 1); gMsg = "-"; updateText(); g_BluetoothService.setRunningTime(BluetoothService.RT_20SEC); break; case R.id.btnSetRunContinue: gSoundpool.play(sp1, 1, 1, 0, 0, 1); gMsg = "-"; updateText(); g_BluetoothService.setRunningTime(BluetoothService.RT_CONTINUE); break; } } catch (RemoteException e) { } }