有没有办法在Android上自动更新应用程序? [英] Is there a way to automatically update application on Android?

查看:150
本文介绍了有没有办法在Android上自动更新应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应用程序,将最有可能成为pinstalled设备上的$ P $。这也将是适用于谷歌播放。有没有一种方法来更新未通过谷歌播放下载的情况下,因为谷歌播放不通知用户的更新。

I'm developing an application that will most likely be preinstalled on devices. It will be also available on Google Play. Is there a way to update those instances that are not downloaded through Google Play, since Google Play won't notify users about an update.

我在想,这里为建议,试图定期与我的网站,并在更新可用时,下载。

I was thinking about, as suggested here, trying to contact my site periodically, and when update is available, download it.

有没有办法自动执行此更新,甚至是悄无声息,让用户不必做任何事情(如手动运行包)。或者,当我的网站显示更新可用,向用户提供通过更新谷歌播放,即使它不是通过市场(编辑安装:此谷歌播放的选择将是preferable,因为比用户就不必检查允许安装非市场消息人士。)

Is there a way to do this update automatically, or even silently, so that user doesn't have to do anything (like running the package manually). Or, when my site shows update is available, to offer users an update through Google Play, even though it's not installed through Market ( This Google play option would be preferable, because than users wouldn't have to check "allow install of non-Market sources".)

推荐答案

我有同样的问题,现在我在查我的应用程序的开始,如果一个孤单新版本在我的配置XML。

i had the same issue, now i check at the start of my app if theres a new version in my configuration xml.

我比较实际的版本与标签我configuration.xml中的< APP_VERSION> 1.1&LT / APP_VERSION> 如果下我问一个自定义AlertDialog如果用户继续升级

I compare the actual version with the tag "< app_version >1.1< /app_version >" of my configuration.xml if its lower i ask with a custom AlertDialog if the user proceed with the upgrade

Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse(myapk_link));
startActivity(intent);    

在下载后,用户必须手动运行包

after the download the user has to run the package manually.

如果您选择从Android市场应用的更新:

if you choose the update from the Android market use:

Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse("market://details?id=com.package.name"));
startActivity(intent);  

com.package.name 必须是您的应用程序的一揽子

com.package.name must be the "package" of your app

Intent intent = new Intent(Intent.ACTION_VIEW ,Uri.parse("market://search?q=" + APP_NAME));
startActivity(intent);  

这篇关于有没有办法在Android上自动更新应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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