nfc - OTA updates for Device Owner Android Application(Kiosk mode) -


i able make app, device owner app through nfc mentioned here. want update app on air, couldn't find method without rooting.

google providing many options enterprises develop apps mentioned here, providing way update application through ota.

looking solution.

this pure speculation i've never tried use package installer api myself:

you try set installer package device owner app (using packagemanager.setinstallerpackagename()). installer package need separate apk signed same certificate device owner apk.

getpackagemanager().setinstallerpackage("<device.owner.package.name>", "<installer.package.name>"); 

from installer apk, use packageinstaller prepare update:

packageinstaller pi = getpackagemanager().getpackageinstaller(); int sessid = pi.createsession(new packageinstaller.sessionparams(packageinstaller.sessionparams.mode_full_install)); packageinstaller.session session = pi.opensession(sessid); outputstream out = session.openwrite("app"); // .. write updated apk file out session.fsync(out); session.commit(...); session.close(); 

i'm not sure if silently installs update though (or if works @ in way have expected).


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -