Commit 112bda13 by Lee Jaebin

SPP通信で連続測定時、エラーになる問題対応

parent 43a5620e
......@@ -573,6 +573,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
mWaitingDialog.setButton(DialogInterface.BUTTON_POSITIVE, getResources().getString(R.string.pairing_search_stop), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Logger.d(TAG, "waiting Dialog stop click : " + mDeviceType);
switch (mDeviceType) {
case DeviceType.centerThermomete:
case DeviceType.radiationThermomete:
......@@ -859,13 +860,13 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
JSONObject sppBluetoothMachineDataJson = new JSONObject();
sppBluetoothMachineDataJson.put(ABookKeys.TASK_QUESTION_ID, mQid);
sppBluetoothMachineDataJson.put("value", strData);
afterABookCheckApi(mCmd, "", 0, "", sppBluetoothMachineDataJson.toString());
// 値が空ではない場合、成功音を出す。
if (strData != null && strData.length() > 0) {
audioPlay();
}
// 閉じる
dismissWaitngDialog();
afterABookCheckApi(mCmd, "", 0, "", sppBluetoothMachineDataJson.toString());
}
/**
......@@ -944,6 +945,7 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
* mediaplayerをセットして、mp3を再生するメソッド
*/
private void audioPlay() {
Logger.d("start audio");
// mMediaPlayerがnullではない場合は、再生終了されてないと見做し、audioStopメソッドを実行
if (mMediaPlayer != null) {
Logger.v("error not stop audio");
......@@ -962,10 +964,11 @@ public class ABVCheckContentViewActivity extends ABVContentViewActivity {
mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mp) {
Logger.d("debug","end of audio");
Logger.d(TAG,"end of audio");
audioStop();
}
});
Logger.d("start audio2");
}
// mediaPlayerを再生終了する
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment