I'm running Android on a system-on-a-chip board (ODROID-U2). So, there are scenarios when I don't have any keyboard or screen connected to the board. Anyway, there is a small service app running which I want to update if a new release is available (developed by me).
So there are two options. a) download a new APK from an URL or b) plug an USB stick into the device and install the new update if found.
I already read this article but some question remain. Maybe you can give me a starting point.
- How would you implement a periodical loop that checks if an update is available online.
- How can the downloaded APK file be installed automatically without showing it in the file explorer? This article opens the explorer instead.
- Using an USB stick instead of Web-download needs to listen on android.intent.action.UMS_CONNECTED intent and then looking for a new APK file on the stick, right?