Android app structure: DLC via in-app billing - android

I'm building an android app that provides several interactive adventures to the user. These use a lot of media (sound files and images, plus some xml), and therefore a lot of space.
I'm planning on a freemium model where the app is downloaded free with one adventure, and the user can buy more from Google Play.
What I'm wondering is:
1) How do I structure my app so as not to blow 50mb apk?
2) Does internal storage have a size limit?
3) The in-app billing examples I've seen all assume that it's for something trivial that's already in the app. How do I set it up so that an adventure is downloaded when it's purchased?

You can use addons on the Play Store that go up to 2GB (IIRC), so 50mb is only a limit fo the APK. Internal storage is limited by the device's /data partition size, but there is no per-app limit (at least not in stock Android). As for 3, you need to have your own server, verify purchases on it and give the app a link to download data once you get a valid order. How exactly you save, load and manage the downloaded data is up to your app.

Related

Android APK with pre-installed localized data

We have an Android application that supports up to 5 languages. If we were to pre-install a set of data, we would normally add 5 zip files (1 for each language). However, the data has since grown to be 100Mb each. As such, its not possible to package all the 5 zips in the assets folder.
What options do we have to creating a APK with pre-installed data? Is it possible for users to install a extension pack based on their device locale? Or do we have to upload 5 APKs in the Play Store, one for each language.
In documentation, it is given -
Google Play currently requires that your APK file be no more than
100MB . If your app exceeded 100MB, you had to host and download the additional resources yourself when the user opens the app.
Read this about APK Expansion Files.
Also, In this answer, it is given how to make .obb file as .zip file and upload it on Play Store.
OR
You can also make a check on App opens / or ask the user to download the language pack and download it directly from the server .(That would be simpler and easier one).

Saved Games API or Drive API for Android?

I need to save some game information which can be accessed later on the current device or on a different device.
Should I really use Google Saved Games API over Google Drive API ?
My thoughts: Google Saved Games API requireS Google Drive API as a prerequisite, e.g. when setting up the client. scores, achievements, and leaderboards are separate to the Saved Games API, so I can still have those without using Saved Games API.
So rather than having to deal with Snapshots, and Google Saved Games work flow, I could just access Drive API.
Maybe the only benefit might be Google Saved Games conflict resolution functions. Maybe there is conflict resolution for Drive.
UPDATE
Having done some more reading up on this topic the benefits of conflict resolution and the delayed upload when internet connections are unavailable make it worthwhile using Saved Games API over Drive.
This video gives details of the Saved Games API, and my thoughts are now that Saved Games would probably be better.
From Android version: 6.0 (API 23) onward this can easily be achieved as by default Android performs an Auto backup of files. ie Files of the type:
Shared preferences files.
Files in the directory returned by getFilesDir().
Files in the directory returned by getDatabasePath(String), which also includes files created with the SQLiteOpenHelper class.
Files in directories created with getDir(String, int).
Files on external storage in the directory returned by getExternalFilesDir(String).
Now you can turn this feature on or off by changing the value here in Manifest file:
<application ...
android:allowBackup="true">
This keeps a backup in the users Google Drive, and the space is limited to 25MB and that space is not counted against the user's space quota.
More information regarding this is available here:
Auto Backup for Apps
More information regarding including and excluding various files from backing up is provided here:
Android Auto backup for Apps
So from API 23 onward you can save the game related info in any of the aforementioned files and not worry about retrieving it later.

Android App Downloads N APK's From PlayStore

Is it possible to download any number of apks onto an external storage from an Android app? I want to download certified Android apps from the Play Store for analysis purpose.
I've thought about writing a web crawler that would use the Play Store as the root URL. The PlayStore however downloads and installs all APKS straight to the device. There is also no Google Play Store API that would take care of the authentication.
I thought it would be fun to write an app that would do the same and download all the apks and store them in the external storage instead of the /downloads.
Any tips, leads or suggestions greatly appreciated!
Thank you

Related concept for iOS like "APK Expansion Files in Android"

I'm expecting suggestions for the concept related to APK Expansion Files in Android.
Google Play currently requires that your APK file be no more than 50MB. For most applications, this is plenty of space for all the application's code and assets. However, some apps need more space for high-fidelity graphics, media files, or other large assets. Previously, if your app exceeded 50MB, you had to host and download the additional resources yourself when the user opens the app. Hosting and serving the extra files can be costly, and the user experience is often less than ideal. To make this process easier for you and more pleasant for users, Google Play allows you to attach two large expansion files that supplement your APK.
Does apple give any support like this?
In my case I have 180MB audio file, I don't want to keep that with app resource. After installation I want this download from APPLE store.
I can able to keep this in my server and download when app opens first time, but I would like to know is there any other way to supplement for iPA.
Thanks InAdvance.
The maximum size of your ipa could be up to 2GB. For sizes upper than 50mb will be downloaded through WiFi or from iTunes. ipa less than that could also be downloaded through 3G network.
Try to make your app size as minimum as possible as users don't really like apps with larger size..
Well there's no thing here in iOS like APK Extension Files in Android.. Everything is your one single ipa which is compressed form of your binaries and resources.
Apple doesn't offer a facility for this specific use case.
You'll have to download the content when your app starts for the first time. Remember to store it in the caches directory or set the "do not backup" flag on the files. This is according to Apple's guidelines and required for app review. If you store it in the Caches directory, iOS may decide to delete the data when disk space is low, so be prepared to download it again if it doesn't exist when your app starts.
Unless you're using in-app purchases and targetting iOS 6 users only, you'll have to host it on your own servers. In-app purchases cannot be free.

Android: from Copy Protection to Application Licensing

MY app on Android has a new major module added to it which changes the app size from ~10Mb to ~100Mb. The plan is to implement "Application Licensing" and allow app to a) be installed on SD card, b) download heavy bits (video) from inside the app when needed after installation. My question is: what will happen to previous users? On their devices the app is installed in internal memory from the start due to Copy Protection. Will an update automatically move the app to SD?
If you are downloading the bits after installation, you can allow the user to continue to choose where to put the application (I assume it remains 10MB for the base application?), and any additional content is downloaded to the SD card by you in-app. As long as you hold a reference to the location of the video, so as you know whether it exists or not (by doing a check of the file system at the expected location), you can determine whether it needs downloading or not.
Might also be worth, for complete understanding, to have a look at the features that the Play Store offers for large applications - you can set applications to require additional downloads hosted by Google Play, with the user being informed of the total application size.
Of course, if you are going to increase the size of the main application and have it left on the internal memory, some users may have problems with the new file size. They will be informed that it couldn't be installed when it updates, and will have to move it to SD card.

Categories

Resources