我想知道在我们开始下载之前是否可以知道动态功能模块的大小。我在网络上的任何地方都没有找到答案=/。
问问题
76 次
1 回答
0
NO.
But there is a hack for it.
- If your dynamic module size < 10MB
- call SplitInstallRequest builder in the background on App launch.
- implement SplitInstallStateUpdatedListener onStateUpdate() call back.
- in SplitInstallSessionStatus.DOWNLOADING state you get size of your module.
- install your module by SplitCompat.install(context) when user want to use it.
Note: This approach violate the rule of dynamic delivery But you can consider it as per your requirement or need.
于 2020-06-08T08:17:00.887 回答