我的应用程序需要安装很少的其他app,我需要确切地知道什么时候安装过程完成。我正在使用下面的检测包添加,更换等。
<receiver android:name=".services.InstallReceiver">
<intent-filter >
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.PACKAGE_ADDED" />
<action android:name="android.intent.action.PACKAGE_CHANGED" />
<action android:name="android.intent.action.PACKAGE_INSTALL" />
<action android:name="android.intent.action.PACKAGE_REMOVED" />
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data android:scheme="package" />
</intent-filter>
</receiver有时,应用程序安装失败(因为它们有时是系统应用程序,或者更大的版本已经存在等等)。
有办法检测这些故障吗?日志有发生的细节,但我无法从packagemanager或InstallAppProgress.java获得这些细节。
W/InstallAppProgress: Replacing package:com.xxxx.xxxx
W/PackageManager: Can't install update of com.xxxx.xxxx update version 308 is older than installed version 312
D/InstallAppProgress: Installation error code: -25
I/InstallAppProgress: Finished installing com.diune.pictures发布于 2016-11-02 19:37:32
区块报价安装错误代码:-25
此错误代码标识您试图安装已安装的包的旧版本。
https://stackoverflow.com/questions/37253323
复制相似问题