霍尼维尔的EDA51扫描适配
This commit is contained in:
@ -14,7 +14,8 @@ public enum BrandEnum {
|
||||
ROCKCHIP("瑞芯微电子", "rockchip"),
|
||||
TEST("测试设备", "test"),
|
||||
IDATA("匿名设备", "idata"),
|
||||
HONEY_WELL("霍尼维尔", "mobiwire"),
|
||||
HONEY_WELL_EDA50P("霍尼维尔EDA50P", "mobiwire"),
|
||||
HONEY_WELL_EDA51("霍尼维尔EDA51", "honeywell"),
|
||||
ALPS("阿尔卑斯", "alps");
|
||||
|
||||
private String name;
|
||||
|
||||
@ -86,7 +86,8 @@ public class MainActivity extends AppCompatActivity implements ResultListener{
|
||||
case ALPS:
|
||||
adapter = new AlpsAdapter(this, this);
|
||||
break;
|
||||
case HONEY_WELL:
|
||||
case HONEY_WELL_EDA50P:
|
||||
case HONEY_WELL_EDA51:
|
||||
adapter = new HoneywellAdapter(this, this);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -57,10 +57,15 @@ public class HoneywellAdapter implements Adapter {
|
||||
}
|
||||
|
||||
public void openContinueScan(){
|
||||
/**
|
||||
* 扫描正常
|
||||
*/
|
||||
if("eda50p".equals(Build.MODEL.toLowerCase())){
|
||||
|
||||
if("eda50p".equals(Build.MODEL.toLowerCase())){ // 扫描正常
|
||||
intent = new Intent(context, ScanServiceEDA50P.class);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
context.getApplicationContext().startForegroundService(intent);
|
||||
}else {
|
||||
context.getApplicationContext().startService(intent);
|
||||
}
|
||||
}else if("eda51".equals(Build.MODEL.toLowerCase())){ // 扫描正常
|
||||
intent = new Intent(context, ScanServiceEDA50P.class);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
context.getApplicationContext().startForegroundService(intent);
|
||||
|
||||
Reference in New Issue
Block a user