美好的一天每个人。安装新的apk并删除以前的
这里s the situation. I got an android application and it
sling更新它的自我。所以它下载apk文件的新版本,并做到这一点。
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(uri, "application/vnd.android.package_archive");
intent.addFlags(intent.FLAG_ACTIVITY_NEW_TASK);
mApp.startActivity(intent);
安装开始,但停止并显示消息“应用程序无法安装”。我发现原因是 - 我的新apk没有签名,以前的版本是。
所以我需要我的应用程序来删除它的自我和安装新的(unsinged)apk。或者做任何事情来让我的新apk安装并运行。我需要在以前的应用程序代码中执行此操作。