Can you include large videos files in Android applications?
I was wondering if the Android had any limitations that would prevent 300+ MB's worth of videos to be included in the 开发者_开发知识库application?
Currently, I have several iPhone apps that do this, and due to demand, I am looking at the possibility of porting them over to the Android.
You can have the application download the data on the first run. That data could be directed to the SDCard or whichever location has the most free space available.
I have not yet seen a way to get an APK to automatically install the application to the internal memory card and the included data to the SD Card.
First, most Android devices don't have 300+MB of storage space.
Second, Android applications require twice as much space at install time as the app will need when completed, so a user would need 600+MB free (or 1,200+MB free if you turn on Android Market copy protection).
Third, many users attempt to purchase their apps over 3G and will be rather irritated if you cost them a small fortune just for your app download.
Android 2.2 allows apps to be installed to the SD card. That solves the first two problems, at least somewhat, though the first devices are only getting 2.2 right now.
It's a really bad idea to do this in an Android app. Most Android devices use external storage cards for large data, and has limited internal storage for apps. In latest OS version 2.2, there is a new feature to store applications directly on external storage, but to support the majority of devices you better make it as a separate download.
精彩评论