cczhr

Results 5 issues of cczhr

![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)

需要手动打开开发者模式,该模式默认隐藏,安装1.1.6版本以上的app会在连接时激活该选项(从旧版本升级后需要重新点击安装组件一次再连接iphone),打开开发者模式后重启即可正常使用。 ![image](https://user-images.githubusercontent.com/20502238/190992055-acb3ff2b-9d6d-44d1-b1b7-155d23f0b15f.png)

documentation

https://github.com/mspvirajpatel/Xcode_Developer_Disk_Images/tree/master/Developer%20Disk%20Image

documentation

- 系统版本(必须)/ System version (required):7.0 - 库版本(必须)/ Library version (required):3.2.1 - 问题代码/截图(可选)/ Problem code or screenshot (optional): ```xml ``` ```kotlin class TestPopup (context: Context) : BasePopupWindow(context) { init { setContentView(R.layout.view_popup)...

![image](https://github.com/HMS-Core/hms-scan-demo/assets/20502238/4a77f434-fee3-4884-8522-0741a73a7458) ![image](https://github.com/HMS-Core/hms-scan-demo/assets/20502238/4ac7a0c0-49df-4a58-9905-0abf6d9d57f8) 如图,跟踪到是Context的内存泄漏 代码 [ScanDemo.zip](https://github.com/HMS-Core/hms-scan-demo/files/11902381/ScanDemo.zip)