prago
prago

Reputation: 5413

How Google play store updates user apps automatically

How does Google play store app installs updates to the existing user apps ? I am trying to mimic a part of the functionality of Google play store, which is auto updating my app. I tried with the following approaches :

1) Run adb command "install -r -g /sdcard/myapp.apk" --> It failed giving the error:

'IOException:Error executing command'

2) Intent i = Intent(Action_View); i.setDAtaAndType(Uri.fromFile("pathTomyapk"); But no luck, this intent launches a launcher which inturn asks user to install the updates.

I want to get rid of that launcher, any ideas?

Upvotes: 0

Views: 581

Answers (3)

prago
prago

Reputation: 5413

Well the answer for my question is - It's not possible. Atleast without rooting or without flashing a custom ROM. If you are trying on a rooting device probably the adb commands would work. If you are able to include your app in /system partition of a device then it is possible. For now Thanks for reading this.

Upvotes: 0

PAD
PAD

Reputation: 2330

You should have a look at https://www.pushlink.com/

It has different update strategies that may be interesting for you. Of course, the "totally silent" update is only for rooted device, but the other more conventionnal strategies have the advantage of updating the app without neither leaving the app nor opening the Play Store to validate etc.

PS : I'm not affiliated to PushLink :)

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1006779

Build your own custom ROM, where your Play Store replacement is the designated market for the device, the way the Amazon AppStore for Android is on Fire devices.

There might be something for auto-update for devices that are part of Android for Work, though I haven't looked into that.

Otherwise, apps cannot silently update themselves, for obvious security reasons.

Upvotes: 4

Related Questions