联新 pda的支持 已经 adapter 关闭的判断
This commit is contained in:
@ -102,6 +102,8 @@ public class MainActivity extends AppCompatActivity implements ResultListener{
|
||||
adapter = new ZebraAdapter(this, this);
|
||||
case HISENSE:
|
||||
adapter = new HisenseAdapter(this, this);
|
||||
case LACHESIS:
|
||||
adapter = new LachesisAdapter(this, this);
|
||||
}
|
||||
if (null != adapter) {
|
||||
adapter.start();
|
||||
@ -203,8 +205,10 @@ public class MainActivity extends AppCompatActivity implements ResultListener{
|
||||
//webView.loadUrl(url());
|
||||
// voiceEngine.reload();
|
||||
super.onResume();
|
||||
adapter.stop();
|
||||
adapter.start();
|
||||
if (adapter != null) {
|
||||
adapter.stop();
|
||||
adapter.start();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -214,7 +218,9 @@ public class MainActivity extends AppCompatActivity implements ResultListener{
|
||||
}
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
adapter.stop();
|
||||
if (adapter != null) {
|
||||
adapter.stop();
|
||||
}
|
||||
super.onDestroy();
|
||||
if (diPlayer != null) {
|
||||
diPlayer.stop();
|
||||
|
||||
Reference in New Issue
Block a user