简体   繁体   中英

Is it possible to get an on dynamic feature module size before starting to download it?

I would like to know if it is currently possible to know the on dynamic feature module size before we start to download it. I didn't find an answer to it anywhere on the web =/.

NO.

But there is a hack for it.

  1. If your dynamic module size < 10MB
  2. call SplitInstallRequest builder in the background on App launch.
  3. implement SplitInstallStateUpdatedListener onStateUpdate() call back.
  4. in SplitInstallSessionStatus.DOWNLOADING state you get size of your module.
  5. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM