如何自动将 Android 应用程序从网络推送到手机上?
AppBrain 的 快速 Web 安装 能够将应用程序从其网站直接推送到 Android 上无需用户干预的电话。这需要用户的 Google 帐户凭据或身份验证令牌,因此显然它正在使用某些 Google API。有一个非官方的 Android Market API 项目,但不包括应用安装。
那么它是如何运作的呢?
AppBrain's Fast Web Install is able to push apps from their web site directly onto an Android phone with no user intervention. This requires the user's Google account credentials or auth token, so clearly it's using some Google API. There's an unofficial Android Market API project, but that doesn't include app installation.
So how does it work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为他们通过 Google 云服务向手机发送推送通知,调用手机上的 APK 下载。下载后,就像从 SD 卡安装任何其他 APK 一样,只需安装该应用程序即可。 (该应用程序需要您的许可才能安装应用程序)。
I think they send a push notification to the phone over the Google cloud service invoking the download of the APK on the phone. After downloading the application is simply installed like any other APK installed from the SD card. (The application asks for your permission to install apps).
如果你想支持这样的服务,你必须构建自己的android应用程序。您的应用程序应该侦听来自服务器的推送消息,然后响应它们。它可以从某个位置下载apk文件或者可以启动Android Market。如果您只想支持 Android 2.2+,可以使用 Google Cloud2Device Service - 又名 C2DM,但您仍然应该开发一个应用程序来监听推送消息。
还有另一种方法,但它不是官方的,更像是一种 hack。您可以用 PHP 编写解析器,但您应该请求用户的 google 用户名和密码。然后,您可以使用此帐户登录 market.android.com 并模拟按下网站上的“安装”按钮,这将向手机上的 Market 发出意图并安装应用程序。
If you want to support such service, you have to build your own android application. Your application should listen for push messages comming from your server and then to respond to them. It can download the apk file from a certain location or can start the Android Market. If you want to support only Android 2.2+, you can use the Google Cloud2Device Service - a.k.a. C2DM , but you still should develop an application to listen for a push message.
There is another way, but it is not official and is more like a hack. You can write a parser in PHP, but you should requere the user`s google username and password. Then you can log in with this account on market.android.com and simulate the push of the "Install" button on the web site, which will fire an intent to the Market on the phone and will install the application.