|
@ -58,6 +58,10 @@ import com.ouxuan.oxface.abgate.GateUnavailableDialog; |
|
|
import com.ouxuan.oxface.abgate.ABGateManager; |
|
|
import com.ouxuan.oxface.abgate.ABGateManager; |
|
|
import com.ouxuan.oxface.device.GateABController; |
|
|
import com.ouxuan.oxface.device.GateABController; |
|
|
|
|
|
|
|
|
|
|
|
// 添加语音模块导入 |
|
|
|
|
|
import com.ouxuan.oxface.device.voice.VoicePlayerManager; |
|
|
|
|
|
import com.ouxuan.oxface.device.voice.VoiceType; |
|
|
|
|
|
|
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -205,6 +209,9 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
private ABGateManager abGateManager; |
|
|
private ABGateManager abGateManager; |
|
|
private boolean isGateCheckEnabled = false; // AB门检测是否开启 |
|
|
private boolean isGateCheckEnabled = false; // AB门检测是否开启 |
|
|
|
|
|
|
|
|
|
|
|
// 新增语音播放管理器 |
|
|
|
|
|
private VoicePlayerManager voicePlayerManager; |
|
|
|
|
|
|
|
|
// 方案二:添加状态标识控制订单选择页面的显示,避免重复弹出 |
|
|
// 方案二:添加状态标识控制订单选择页面的显示,避免重复弹出 |
|
|
private static boolean isOrderSelectionActivityShowing = false; // 订单选择页面是否正在显示 |
|
|
private static boolean isOrderSelectionActivityShowing = false; // 订单选择页面是否正在显示 |
|
|
private static boolean isOrderVerificationResultActivityShowing = false; // 订单核销结果页面是否正在显示 |
|
|
private static boolean isOrderVerificationResultActivityShowing = false; // 订单核销结果页面是否正在显示 |
|
@ -235,6 +242,9 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
// 初始化解锁密码弹窗 |
|
|
// 初始化解锁密码弹窗 |
|
|
initUnlockPasswordDialog(); |
|
|
initUnlockPasswordDialog(); |
|
|
|
|
|
|
|
|
|
|
|
// 初始化语音播放管理器 |
|
|
|
|
|
initVoicePlayerManager(); |
|
|
|
|
|
|
|
|
initView(); |
|
|
initView(); |
|
|
|
|
|
|
|
|
// 初始化网络状态指示器 |
|
|
// 初始化网络状态指示器 |
|
@ -261,6 +271,8 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
// 启动内存优化周期性任务 |
|
|
// 启动内存优化周期性任务 |
|
|
startMemoryOptimizationTask(); |
|
|
startMemoryOptimizationTask(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新小程序码 |
|
|
// 更新小程序码 |
|
|
android.util.Log.d(TAG, "准备调用updateMiniQrcode方法"); |
|
|
android.util.Log.d(TAG, "准备调用updateMiniQrcode方法"); |
|
|
updateMiniQrcode(); |
|
|
updateMiniQrcode(); |
|
@ -1566,6 +1578,13 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
protected void onDestroy() { |
|
|
protected void onDestroy() { |
|
|
super.onDestroy(); |
|
|
super.onDestroy(); |
|
|
|
|
|
|
|
|
|
|
|
// 释放语音播放器资源 |
|
|
|
|
|
if (voicePlayerManager != null) { |
|
|
|
|
|
voicePlayerManager.release(); |
|
|
|
|
|
voicePlayerManager = null; |
|
|
|
|
|
LogManager.logInfo(TAG, "语音播放器资源已释放"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 销毁网络状态指示器 |
|
|
// 销毁网络状态指示器 |
|
|
if (networkStatusIndicator != null) { |
|
|
if (networkStatusIndicator != null) { |
|
|
networkStatusIndicator.destroy(); |
|
|
networkStatusIndicator.destroy(); |
|
@ -2581,12 +2600,31 @@ public class OXFaceOnlineActivity extends BaseActivity implements View.OnClickLi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
|
|
|
* 初始化语音播放管理器 |
|
|
|
|
|
*/ |
|
|
|
|
|
private void initVoicePlayerManager() { |
|
|
|
|
|
try { |
|
|
|
|
|
voicePlayerManager = VoicePlayerManager.getInstance(); |
|
|
|
|
|
voicePlayerManager.initialize(this); |
|
|
|
|
|
|
|
|
|
|
|
LogManager.logInfo(TAG, "语音播放管理器初始化完成"); |
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
LogManager.logError(TAG, "语音播放管理器初始化失败", e); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
* 查验订单列表 |
|
|
* 查验订单列表 |
|
|
* 根据modeType和verifyCode等参数获取相应的数据查询参数并发送网络请求 |
|
|
* 根据modeType和verifyCode等参数获取相应的数据查询参数并发送网络请求 |
|
|
*/ |
|
|
*/ |
|
|
private void getCheckOrder() { |
|
|
private void getCheckOrder() { |
|
|
LogManager.logInfo(TAG, "开始查验订单列表,modeType: " + modeType); |
|
|
LogManager.logInfo(TAG, "开始查验订单列表,modeType: " + modeType); |
|
|
|
|
|
|
|
|
|
|
|
// 播放正在进行人脸识别语音 |
|
|
|
|
|
if (voicePlayerManager != null) { |
|
|
|
|
|
voicePlayerManager.playVoice(VoiceType.FACE_RECOGNITION); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 人脸验证模式下不需要暂停摄像头,保持视频流继续运行 |
|
|
// 人脸验证模式下不需要暂停摄像头,保持视频流继续运行 |
|
|
if (modeType != OrderVerificationManager.TYPE_FACE_VERIFICATION) { |
|
|
if (modeType != OrderVerificationManager.TYPE_FACE_VERIFICATION) { |
|
|
// 非人脸验证模式(验证码、扫码等)才暂停摄像头 |
|
|
// 非人脸验证模式(验证码、扫码等)才暂停摄像头 |
|
|