开发者

How do automatically push an Android app from the web onto a phone?

AppBrain's Fa开发者_高级运维st 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?


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).


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜