卸载后如何删除动态功能模块?

问题描述 投票:0回答:1

我的应用程序有2个功能:“base”和“extend”。

清单扩展功能:

<dist:module
    dist:onDemand="true"
    dist:title="@string/title_extend">
    <dist:fusing dist:include="true" />
</dist:module>

使用SplitInstallManager - > startInstall下载功能

使用Split InstallManager卸载 - >延迟卸载

使用SplitInstallManager - > getInstalledModules检查已安装的模块

扩展功能从Play商店成功加载并按预期工作。当此功能变得不必要时 - 卸载它。

更多,SplitInstallManager具有回调:SuccessListener,FailureListener,CompleteListener。成功完成安装和卸载(无错误)。

但是,在卸载Extend功能(以及重启应用程序后)后,它将保持安装状态。

如何从应用程序中删除卸载的功能(需要删除没有使用过的代码和资源)?

android-app-bundle dynamic-feature
1个回答
0
投票

正如deferredUninstall方法的API中所解释的那样:

一旦调用,Play商店将尝试最终在后台删除这些模块。

当应用程序在接下来的24小时内某个时间点不工作时,将删除已卸载的模块。

© www.soinside.com 2019 - 2024. All rights reserved.