hms-scan-demo icon indicating copy to clipboard operation
hms-scan-demo copied to clipboard

Sample code for demonstrating Huawei HMS ScanKit capabilities. It illustrates how to help developers quickly build code scanning capabilities.

Results 64 hms-scan-demo issues
Sort by recently updated
recently updated
newest added

![image](https://user-images.githubusercontent.com/20502238/179921800-5b511c9d-ec02-4778-b3bc-519f065b12cc.png) 如图检测到了内存泄漏,也看了下这个问题出现的挺久的,官方还没修复。 这里分享另一种方法解决这个问题思路 1.改造scan-2.6.0.300.aar 重写classes.jar里面的DynamicModuleInitializer,编译后覆盖原文件。 ![image](https://user-images.githubusercontent.com/20502238/179922357-5938a51f-5868-495a-aeeb-339d56328fcb.png) 2.在启动扫码功能前执行initializeModule,传ApplicationContext DynamicModuleInitializer.initializeModule(this.getApplicationContext()); 3.新建一个类继承ScanKitActivity 并重写onDestroy将mRemoteHelper置null ![image](https://user-images.githubusercontent.com/20502238/179924375-3ecfa818-6f4a-49c2-b5b4-b45538017a7a.png) 4.启动Default View Mode改用成以下方式 ![image](https://user-images.githubusercontent.com/20502238/179923160-1477b24c-c754-4291-bc30-76149329ebc1.png) 这样运行暂时没发现有内存泄漏了。 缺点就是要全部本地引用扫码的sdk,每次升级都要覆盖一下DynamicModuleInitializer.class ![image](https://user-images.githubusercontent.com/20502238/179923551-9e59c17a-0767-44a8-948e-7c029b7e1f0f.png) 最后上传了DynamicModuleInitializer.class 有兴趣的可以尝试一下 [classDynamicModuleInitializer.zip](https://github.com/HMS-Core/hms-scan-demo/files/9147516/classDynamicModuleInitializer.zip)

ImageDecoder.decodeBitmap(ImageDecoder.createSource(contentResolver, it)) 这个方法获取的bitmap不能适用于ScanUtil.decodeWithBitmap方法

![3f6fdb2b01218b0bb7e456ff99fac4e](https://user-images.githubusercontent.com/16795061/177554375-2e2b041d-66e1-4ffc-97aa-e006dcfabb96.jpg) 如图所示 扫了没有任何反应

需求:在扫描或识别成功后调用系统振动以便提示用户操作完成 环境:Vivo Y32、Android 11。使用Customized View Mode方式接入统一扫码服务 相关代码: ``` scanView?.setOnResultCallback { result -> scanView?.pauseContinuouslyScan() // 暂停扫码功能,避免重复扫码 vibrate() } // 振动 private fun vibrate() { val vibrator = getSystemService(Context.VIBRATOR_SERVICE) as Vibrator if...

为什么 官网上下载的demo 扫码后可以自动连上Wi-Fi,而你们的源码编译后 扫码后停留设置页面,不回去自动连接 Wi-Fi ,是不是需要上架?

Default View Mode模式下选择识别本地二维码时候,如果选择的图片不是个二维码,没有提示任何反应,反复几次会出现anr和内存泄露问题,测试设备华为mate20pro

系统:5.1 ROM:qcom/msm8916_32 CPU架构:armeabi-v7a SDK:com.huawei.hms:scanplus:2.3.0.300 出错堆栈:(bugly提供) #00 pc 00039f0c /system/lib/libc.so (tgkill+12) [armeabi-v7a::8c4f0ad464a5fba452ed4b44553177da] 2 #01 pc 00013cc9 /system/lib/libc.so (pthread_kill+52) [armeabi-v7a::8c4f0ad464a5fba452ed4b44553177da] 3 #02 pc 000148e7 /system/lib/libc.so (raise+10) [armeabi-v7a::8c4f0ad464a5fba452ed4b44553177da] 4 #03 pc 00011075 /system/lib/libc.so...

确认一下,app集成后,在Google play市场能上架吧?