I have 11 videos to include in my App. Each of them is around 9MB. Besides those, I have to a few sound files and image files in the app. Therefore the app size is going 100+MB. Is there any way to accommodate all the files so that app size does not become an issue for me?
Download the files after starting the app for the first time.
Puh..that's quite large. In such a situation I'd
Let the user download your app not containing any videos/audio files that cause the large size
At first run guide the user through a wizard where you download the additionally needed files to the SD card.
Still, downloading nearly 100MB won't be ideal, but better than directly download all of it at the first install. (IMHO)
The most common sollution i've seen is downloading them during the first run of the programme. Just check if everything is available, and if it isn't, download the needed files.
pros:
This way you can also add video's on the fly.
APK size stays small so initial download is quick
Cons:
after downloading the app you can't directly use it: content must be downloaded first
I would suggest you to put them in the assets folder, so they will not be compressed.
This way you'll have problems testing your project with eclipse, so try building it with command line, and then install on device with adb
In my scenario, I had 300+ videos, totalling upto 400+ MB of the size.
I checked with few of them and deployed the app the way i just told.
may not be the best way around, but may work.
You can upload into youtube or make your own simple video streaming server
Related
We are developing one game in Android with cocos2d. Now as per out scenario, we have more than 20MB of just mp3 sound files which occupy the whole lot space of our final apk. Can anyone suggest us a simpler and tactical way to efficiently use all existing sounds in mp3 sounds simultaneously not to increase apk size to more than 25 MB?? Its really urgent.
With many games with large resources, after downloading they actually will connect to a server download the MP3 or high-resolution textures into a known directory. Check out the DataStorage API for more information about this.
Just make sure you cover the case where the user does not have these MP3 files on their device, whether it was because they decided not to download them, doesn't have internet acccess or deleted them.
http://developer.android.com/guide/topics/data/data-storage.html
I've been developing this content-based app for Android which includes over 120 MB of video .mp4-files saved on the raw folder and in addition it includes over 20 MB of sound files also saved in the raw folder.
The problem is I cannot install the app on my Android phone due to limited internal memory to handle all those files. Also, I read somewhere that the app size limit on the Android market is 50MB so I won't be able to even upload the damn thing.
I've saved the videos on the raw folder as I was able to play them fine (using VideoView).
My question is how do i cope with such size, do I have to go through making the user download the content after installing the app or is there any other way of dealing with such sizes (~140 MB).
You cannot distribute an APK through the market that is more than 50MB. Its not a good idea to take up 120MB of the internal storage for a single app as many phones don't have a lot of internal storage space.
You should consider stripping out all of the large files, hosting them on a server and then having the application download the files on the first launch. I would also recommend you save the files to the SD card so you don't use up too much of the precious internal storage.
Edit: I will admit that any time an app tries to download a lot of data on the initial launch I get really frustrated. Make sure you do it in a way that doesn't require the activity to be open the entire time the file is downloading. Do the downloading through a service so the user can at least use their phone while your app is downloading the media files.
Well, if you're sure you need all this content inside your application, the only solution I see is to download the content from a server when the application is opened for the first time. But as a user I think I won't be very happy to have a 150 Mb application on my phone. Do you really need all this data?
The app images (png) in the drawable folder can easily be extracted with a zip tool.
Was thinking that an APK file would be more "closed".
Is this normal?
Is there some way to fix this?
Is this normal?
Absolutely.
Is there some way to fix this?
No, because there is nothing to "fix". Anybody capable of getting at your APK file is also capable of getting at your images wherever else they might be stored (e.g., downloaded from the Internet and cached in on-board flash). And anybody using normal SDK tools can take screenshots of your app and get at your images that way. Protecting images is a pointless exercise.
An APK is really nothing more than a compressed archive. It is completely normal for the PNGs to be accessible from the unzipped APK. Its going to be nearly impossible to prevent a resourceful hacker from getting your images if they want to. You can do things to prevent it but it is going to be more of a headache then its worth.
If you really want to keep the drawables out of the APK you could simply download the drawables from a website the first time your applications loads. This however has other problems because you would then have to prevent unauthorized downloads of the drawables.
I have approximately 80MB+ mp3 files,40MB images in my project.when I try to put 3MB of each these files eclipse takes a lot time to build.is it possible to put all these files in Raw or assets folder?what is the solution to make eclipse build fast.
I think for best practice is to make the user download these files after he installes your app since Android market limits your app size to 50MB.
You can use
AsynTask to download the data asynchronously
I have this same issue, and came to the same conclusion as khr2003. I just want to add that the real limit for Android Market is more like 30MB since an app larger than that is impossible to download to most phones -- you will get out of storage errors.
My app has several image and media files, which are around 1MB each or so. So if i follow the normal way, the app size is crossing over 40MB, which is huge. Is there anyway to avoid this?
I have heard of external storage, but i really don't get any clue of how to work on them!
Do i need to ask all those who instal this to save the images and media files in the external disk and then the app uses those? This makes my files public..isn't it?
I actually don't own a android device. So is it like, whenever people install an app from the market, does it ask if it has to install in the phone memory or the external memory?
I really need your help.
If there is a way, i'd be thankful if you can provide me the step by step details of how this can be done!
Thanks a lot..
Regards
Nithin
There is, from the little I know of this, a slight security risk from putting files onto the SD card. I don't think I personally would worry too much about that since most people that would want access to the files in your apk (Which does not include your source code) could get it regardless without too much trouble.
As of Android 2.2 the user has the option to move an app to their SD card, but only if the developer explicitly tells the app to allow it. I'm fairly sure this only applies to 2.2+ devices though, so being that you are likely going for a larger audience than that it isn't an end-all solution. I am only really pointing this out in case you do end up putting one large file on the market. If so, be sure to allow the transfer to SD card, your app will stay on devices much longer.
Downloading the files online from within the app and saving them out to the SD card would be a good solution, though I am not sure how end users feel about downloading a small app then having to download a very large package before using it. In the end they will have to download it either way, so it is up to you whether you want to ask them to do it up front in the market or afterwards via the app. If you do want to try to download all the content then maybe the code example in this link will help you figure it out :
http://androidsnips.blogspot.com/2010/08/download-from-internet-and-save-to-sd.html
You might consider streaming the files or downloading them inside the application to the sdcard. Speaking from experience my users have had problems downloading apps as big as 30MB. Some phones also have a severely limited internal memory, which is where the applications are downloaded to.