OckhamsRazor
OckhamsRazor

Reputation: 4906

Android: Where is a large app's data stored?

You know those 300mb gameloft games? They usually come as very small apk files off the market. Then you have to download the rest of the game from their server. My questions: Why doesn't the size of the apk increase to 300mb? What is the format of these files? Also, if I delete this app, does the rest of the downloaded 300mb get deleted too? How does the os manage this if this data is not part of the apk?

Thanks!

Upvotes: 1

Views: 373

Answers (1)

CommonsWare
CommonsWare

Reputation: 1006614

Why doesn't the size of the apk increase to 300mb?

Why would it? The APK isn't 300MB. If they download 300MB to external storage, the amount of free external storage would drop by 300MB, but the APK would not grow by 300MB.

Also, if I delete this app, does the rest of the downloaded 300mb get deleted too?

Ideally, yes. Well-written apps like this would use getExternalFilesDir() to get a location on external storage to use for the bulk data that the app downloads. This directory will be deleted when the app is uninstalled.

Upvotes: 2

Related Questions