Need help with app distribution outside Play Store
I’m developing a private Android application for a select group of friends. I have no plans to upload it to the Google Play Store since it’s for personal use.
I’m currently figuring out how to set up automatic updates for those who installed the app. I’m considering using free cloud storage services to store the updated APK files.
Has anyone been able to create a method where the app checks for updates and can download them directly from services like Dropbox or Google Drive? I’m in search of a solution that doesn’t involve paid hosting.
What would be the best way to manage version checks and programmatically install the APK? Any sample codes or advice would be greatly appreciated.
I did this exact thing with an internal company app two years back. GitHub Releases beat traditional cloud storage hands down. You can upload APKs as release assets and use their API to check for updates programmatically. The download links are stable and don’t need auth tokens like Drive does. I set up a background service that checks for new versions weekly. When it finds one, the app downloads the APK to external storage and fires an ACTION_VIEW intent with the file URI. Users still have to manually approve installation because of Android’s security restrictions, but it’s pretty streamlined. One thing that bit me: use FileProvider for Android 7.0+ when passing the APK to the installer. Raw file URIs will crash on newer versions. Also think about delta updates if your APK is big - downloading just the changes instead of the whole file saves your users’ bandwidth.
I built something like this for a beta app last year. Skip Dropbox/Drive - Firebase Hosting works way better and it’s free. Just upload your APK there and create a JSON file with version info for your app to check against. Here’s the catch: Android won’t auto-install APKs from unknown sources. Users have to give permission. I worked around this by showing a notification when updates are available, then using an intent to prompt installation of the downloaded APK. For version checking, I stored the current version in SharedPreferences and compared it with the version number from my Firebase JSON file. DownloadManager handles the actual download - saves you a ton of work. Don’t forget REQUEST_INSTALL_PACKAGES permission in your manifest for Android 8.0+.
gitHub releases work great, but for something simpler try surge.sh or Netlify. I just upload my apks there with a version.txt file that has the current version number. The app reads that file, compares it to the local version, and downloads if there’s an update. Just remember to handle the install properly - you’ll need INSTALL_UNKNOWN_APPS permission on newer android versions.