Commit 112bda13 by Lee Jaebin

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

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