Android从自己的服务器自动更新 [英] Android autoupdate from own server

查看:373
本文介绍了Android从自己的服务器自动更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在寻找一个很好的例子,如何更新我自己开发的应用程序。所以,我在我的设备上安装了apk,当我启动它时,我想检查我的服务器上是否存在任何更新。如果是,请从网络服务器下载并安装。

Ive been looking for a good example, how to update my own developed application. So, I have an installed apk on my device and when I started it I'd like to check if any updates are exist on my server. If it does, then download from the webserver and install it.

首先,如果有任何更新,我必须检查我的服务器。如果确实如此,则下载并安装它。

At first I have to check to my server if there are any updates. If it does then download and install it.

哪种方法最好?任何人都可以给我看一些教程或者可能的例子吗?

Which is the best way for that? And anybody could show me some tutorial or maybe example?

再次感谢您的回答

推荐答案

查看此链接。它在异步任务中使用HTTP连接从URL下载APK文件。下载完成后,它会启动一个新的打算显示/安装APK(看到这篇文章)。

Check out this link. It uses a HTTP connection in an async task to download the APK file from an URL. When the download is finished it starts a new intend for showing/installing the APK (see this article).

这篇关于Android从自己的服务器自动更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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