package com.hisun.pos.utils.printer;
import android.util.Log;
import com.hisun.pos.activity.CashierChoosePaymentActivity;
import com.pax.gl.IGL;
import com.pax.ippi.dal.interfaces.IDal;
import com.pax.ippi.emv.interfaces.IEmv;
public class GetObj {
private static IDal dal;
private static IGL gl;
private static IEmv emv;
// 获取IDal dal对象
public static IDal getDal() {
dal = CashierChoosePaymentActivity.dal;
if (dal == null) {
Log.e("IPPITest", "dal is null");
}
return dal;
}
// 获取IGL gl对象
public static IGL getGL() {
gl = CashierChoosePaymentActivity.gl;
if (gl == null) {
Log.e("IPPITest", "gl is null");
}
return gl;
}
// 获取IEmv emv对象
public static IEmv getEmv() {
emv = CashierChoosePaymentActivity.emv;
if (emv == null) {
Log.e("IPPITest", "emv is null");
}
return emv;
}
}
IDal dal对象可在MainActivity中注册NeptuneUser对象获得,dal = neptuneUser.getService().getDal();
public static NeptuneUser neptuneUser;
public static IDal dal;
public static IGL gl;
public static IEmv emv;
@Override
protected void setLayout() {
setContentView(R.layout.activity_cashier_choose_payment);
neptuneUser = NeptuneUser.getInstance(this);
dal = neptuneUser.getService().getDal();
gl = neptuneUser.getService().getGl();
emv = neptuneUser.getService().getEmv();
}
@Override
protected void onResume() {
super.onResume();
neptuneUser.register();
}
@Override
protected void onPause() {
super.onPause();
neptuneUser.unRegister();
}
补充:获取pos机设备信息的API百富a920使用说明,源自demo
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/shouji/article-121093-3.html
这么惨
加工过程就算有虫卵也会烤熟了