I'm trying to silently install an APK onto an Android device in an attempt to build an auto-update feature into my app. The app will download the latest apk and silently install it. This app won't be distributed on the Play store, I'm specifically building it for one type of device for a closed group of users. I've followed the instruction in this SO post to achieve a silent install but I've run into a problem.
I've signed my apk with a certificate I've received from the manufacturer of the device, and I'm trying to silently install my newly downloaded apk using the following code:
Process install = Runtime.getRuntime().exec("pm install -r " + path);
return install.waitFor();
The waitFor() method returns an exit value of 9. I have no idea what that means nor can I find any documentation online that explains what each code means. I found another SO post that explains these codes are arbitrary and up to the specific program to define, and that I ought to consult the documentation / source code of that specific program to determine what that code means. I'm unsure on how to go about doing this, I was expecting the Android documentation for the waitFor() method to explain each code. Does anyone know where I can find information about these exit codes?
Many thanks,
Tony