Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I build my own Android app store server? [closed]

Requirements:

  1. Has to be accessible through the Internet, not just internal corporate networks (i.e. must have a front end interface)
  2. App Store server has to be hosted internally (i.e. no third-party hosting services)
  3. Preferably securable by username/password
  4. Preferably able to automatically push updates to authorized devices

The reasoning behind this is that we want to do a limited beta of our app to about 1,000 users, and we need a way to distribute updates to those users' devices without making our beta software accessible to the general public.

We initially explored simply hosting the APKs on an Apache web server, but since we wanted to limit access, we tried putting a username/password on the web server. Well, it turns out that the Android download manager has a bug that prevents downloading files to the phone if it's protected by htaccess.

Next we thought of using an FTP server and then just installing an FTP client on each beta tester's device, but that's pretty janky. This is now our final option.

An "internal" app store server seems to be the best bet. Is there a solution out there for this? Preferably a free/open source one, if that's possible.

like image 490
user1236635 Avatar asked Oct 09 '22 13:10

user1236635


1 Answers

For starters: Even if you can't access the APK directly by URL with htaccess in tact, you can hide it behind some server-side code like a php file which simply checks if the user's credentials are valid, and returns a file attachment instead of an html page if everything checks out. If you're going browser-based, I'd recommend this approach over using an FTP client.

However, in your list of requirements: Assuming these are retail, non-rooted, non-custom-ROMMED devices, it's not going to be possible to automatically push application updates to devices. The best you can do is alert the user, and even download the APK- But when you fire the intent to install the APK, the user still has to see the request and manually approve the install. If you look at third party market apps like Amazon and appbrain, they have to do things the same way. Note that in order to install apps this way, the user will have to manually enable installing apps from "unknown sources", which effectively means sources other than the Google Play Store, using the Settings app.

That said, that limitation only applies for replacing the full APK. There's nothing stopping you from downloading updated resources (images, sounds, text, db updates) via a background service, but that's something that would have to be baked into the app, not the private market.

like image 82
Alexander Lucas Avatar answered Oct 12 '22 12:10

Alexander Lucas