Pushlink for dedicated devices
Switch branches/tags
Nothing to show
Clone or download
Latest commit f701df7 Sep 19, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app Android Oreo Sep 19, 2018
.gitignore First commit Sep 18, 2018
README.md Fancier doc Sep 19, 2018
build.gradle First commit Sep 18, 2018
gradle.properties First commit Sep 18, 2018
gradlew First commit Sep 18, 2018
gradlew.bat First commit Sep 18, 2018
settings.gradle First commit Sep 18, 2018

README.md

Sample app using pushlink CUSTOM strategy to perform background updates

Background updates synonyms:

  • Installing apk without user interaction
  • Silent updates
  • Zero-touch updates
  • KIOSK apps
  • POS - Point of Sale apps
  • Dedicated devices
  • COSU - Corporate Owned Single Use devices

Warning

  • This only works in devices running Android 6 (Marshmallow, API 23) or higher
  • This sample requires the app to be a device owner. Device owner is NOT device admin.
  • There must be just one device owner and it can't be unset without factory reset.
  • Setting a device owner requires an unprovisioned device. In other words: a device without accounts, like google account, etc.
  • Bottom line: Use emulator or a test born device before releasing to production

Steps

  1. Clone and replace the string "yourApiKey"
  2. Build a signed APK and upload it to Pushlink
  3. Run the APK you just uploaded and execute:
adb shell dpm set-device-owner com.pushlink.background/.PushlinkAdminReceiver
  1. Make some visible change (like hello world NEW) and run again
  2. Wait and see the magic happen

Resources

https://developer.android.com/work/cosu

https://codelabs.developers.google.com/codelabs/cosu/index.html

https://developer.android.com/guide/topics/admin/device-admin

http://florent-dupont.blogspot.com/2015/01/android-shell-command-dpm-device-policy.html