在安装新应用之前,自动卸载旧应用 [英] Automatically uninstalling the older app before installing the new one

查看:82
本文介绍了在安装新应用之前,自动卸载旧应用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已在Play商店上发布了我的应用,并且进行了更新,由于我进行了一些数据库结构更改,因此可能导致较旧的应用崩溃,并且在尝试自动完成安装后数据库迁移的工作时,我非常烦恼.因此,我希望在更新过程中安装新的旧手机之前,可以从用户电话中完全自动卸载旧的手机,这是一个简单的解决方案.有什么办法可以包含这样的配置?

I published my app on play store and I have made an update that may cause the older one to crash due to some database structure changes that I have made and I have had a hell of hustle trying to automate DB migration upon installation. So I want the to completely auto-uninstall the old one from users phone before new one is installed during update as an easy solution. Is there a way I can include such configurations?

推荐答案

否,无法在安装之前强制卸载.但这听起来像是您可以在升级时使用 SQLiteOpenHelper 删除数据库.

No, there is no way to force uninstallation before installation. But it sounds like you could just delete your DB on upgrade using SQLiteOpenHelper

这篇关于在安装新应用之前,自动卸载旧应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆