app download/upgrade from market apk programmatically

if there's A apk and B apk and both are uploaded market (google play store),

  • does A can upgrade A apk from market without moving to play store? (user doesn't see play store activity, and A apk just download A apk from market url)

  • does A can download B apk from market without moving to play store?

  • i found unofficial market api, but i want to know official way to do it. Thanks,

    @ i tested market api to download apk from market, then i got 404 error, and found that google changed login process to auth 2.0 is there anyone suceed to download from market programmatically without moving to play store?


    First you need to download the apk and store it on the phone's storage. Then you can install that apk using this code,

    Intent promptInstall = new Intent(Intent.ACTION_VIEW)
        .setDataAndType(Uri.parse("file:///path/to/your.apk"), 
                        "application/vnd.android.package-archive");
    startActivity(promptInstall);
    

    This intent launches the install dialog with the user, where the user will choose to authorize permissions to the apk being requested to install.

    But remember there is no official way to do this, there are many ways and according to me this seems like a good way to do this

    链接地址: http://www.djcxy.com/p/67450.html

    上一篇: Google App引擎锁定

    下一篇: 应用程序下载/升级从市场apk程式化