强制更新我的Andr​​oid应用程序 [英] Force update my android application

查看:121
本文介绍了强制更新我的Andr​​oid应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图强迫登录之前更新我的应用程序,如果有可用的更新版本。我可以检查更新,并能够在设备上安装应用,我和更新替换我的老版本,在这一切的过程中,我想开/自动调用我的应用程序没有手动,(我可以手动打开我的应用程序)结束后,我不能使用SQLite数据库维护与应用程序或任何其他APK这将迫使强行调用我的应用程序somedata。

I am trying to force update my application before login, if there is any updated version available. I can check for update and able to install application in device, I replace my old version with updated one, at the end of all this process I want to open/invoke my application automatically not manually, (I can open my application manually), I can not use sqlite database to maintain somedata from application or any other APK which will force to invoke my application forcefully.

任何建议将是非常美联社preciable。

Any suggestion would be highly appreciable.

感谢。

我在问题中提到,我可以从我的服务器上安装新的apk文件更新应用程序,甚至我知道Android市场处理安装,并会要求调用应用程序,但对我来说我必须做同样的我的临时服务器通过过程来测试我的应用程序。我可以检查更新,并从我的临时服务器安装的应用程序,以更新后的APK安装我的老版本卸载得到,也没有办法,我要引用我的新版本的应用程序。

As I mentioned in my question that i can update application by installing new apk file from my server, even i know that android market handles the installation and will ask to invoke application, but in my case I have to do the same on my staging server to test my application by process. I am able to check for update and install application from my staging server, to updated apk installation my old version get uninstall and there is no way I have to invoke my new version application.

任何建议将AP preciable。

Any suggestion would be appreciable.

推荐答案

您可以轻松地调用从您的应用程序的Web服务,以找出是否有新版本可用,引导用户通过Android浏览器下​​载。这种方法的优点之一是在升级速度,而不是'大爆炸'的做法,是所有受支持市场的一些控制。

You could easily call a web service from your app to find out if a newer version is available and to direct users to download it via the Android Browser. One advantage of this approach is some control over upgrade rate rather than the 'big bang' approach which is all that is supported by the Market.

http://example.com/update.jsp?version$c$ C = 3

在那里的版本code来自清单版本。然后,我将有服务或者返回空白(无更新)或该用户应直接获得新的apk的URL。

where the versionCode comes from the manifest version. Then I would have the service either return blank (no update) or a URL to which the user should be directed to get the new apk.

您可以从

        getPackageManager().getPackageInfo(getPackageName(), 0).versionCode 

请引发新意图访问URL。然后,用户被发送到下载APK浏览器

Please trigger a new intent to visit the URL. The user then gets sent to the browser which downloads the apk

这篇关于强制更新我的Andr​​oid应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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