- Home /
Limit on the amount of data I can store on Android Devices?
Hello I am working on a project available for android devices and in this project we save a large amount of data .
Basically we record and objects movements and save it so that the user can come back and review the playback later . We are trying to optimize our save data but currently we are recording roughly 4 MB's data for every 30 seconds of recording .
The purpose of saying that is i am seeing a pattern that when I save a certain amount of data ( 12 MB's on on the HTC 1X and 36 MB's on the MOTO G) my apps stop opening and DDMS is telling me that the app is crashing with a memory error .
I checked to make sure the act of saving isn't crashing and when i don't approach the memory thresholds I am seeing the app is fine but once too much data is saved the app starts crashing on load and when i erase the app data I can open the project again .
So I have come to ask two questions , has anyone else experienced this before ? and are there any suggestions on how I can fix this issue ?
the big head scratcher is the fact that though I save all of this data I don't load it into memory unless the player goes through the Load data flow , if that's the case why would the app throw a memory error for data that is not even referred to at start up ?
Probably would help if you'd tell us what kind of data you are storing and how much. At those sizes that you mentioned I'd imagine you saving the position of an object every second, and a bunch of other data .. so my guess would be to not do something like that and just store every important part and do the rest via code..
An example would be moving a character - just store what the player us doing at that moment and for how long.. on a PC it would mean something like:
hold W for 30 seconds - so you'd just save that as 1 line in the file and then read it and do exactly what the line says.. do an action according to the W key for 30 seconds.
Only problem with this would probably be physics as they might generate a lot more data than simple player input.
you are very right I am recording the position every second , unfortunately I don't know of any way to fix it for my particular case because our project is a very physics based mobile experience so the input is through touch interactions . Thankfully the largest amount of recorded data aside from the audio files is this list of position vectors but this list get's very large very quickly .
I can try to research the best way to implement a solution like what you mentioned though , I hadn't thought to do that before .
Your answer
Follow this Question
Related Questions
HELP!! My Unity Crashed and scenes and objects are gone 1 Answer
Restarting UnityPlayer inside of Android activity 0 Answers
unity main crash 0 Answers
Game crash after splash screen (Unity Logo showup-than crash) 1 Answer
My mobile game crashes once a certain number of textures have been loaded. What can I do about that? 0 Answers