Note that there are some explanatory texts on larger screens.

plurals
  1. POHandling full disk storage in Android
    primarykey
    data
    text
    <p>This question has evolved a bit from the initial one, here's a short info:</p> <p>I filled up the disk storage on the emulator and got it absolutely useless - the process android.process.acore is displaying the "... has stopped unexpectedly" dialog in a loop, so nothing can be done on the system. I can't even turn it off with the power button on the right (it's tried to power off for 10 minutes now, logcat is full of exceptions). Great it's an emulator, I wonder what would happen if it was my real device..</p> <p>Maybe someone can elaborate on the reasons for this behavior - should it be like this?</p> <p>Here's the initial question, please also refer to my edits:</p> <p>I'm curious about handling a random situation such as running out of disk storage on an Android device.</p> <p>I looked over the examples on <a href="http://developer.android.com">developer.android.com</a> and I see they don't even bother to do exception handling.</p> <p>I can see that when it comes to SQLite classes, there are a couple of exceptions, such as <a href="http://developer.android.com/reference/android/database/sqlite/SQLiteOutOfMemoryException.html">SQLiteOutOfMemoryException</a>, but I can't find any information when and how to handle these scenarios.</p> <p>Does anyone have experience with:</p> <ul> <li>bulletproofing an app for such an edgy situation</li> <li>ways to test this on an emulator</li> <li>feedback from frustrated users (maybe heard of any frustration with the example-apps or even core apps..?)</li> </ul> <p>Thanks in advance for your time guys.</p> <p>[<strong>Edit</strong>]</p> <p>I also run into this bite on Android issue tracker:</p> <p><a href="http://code.google.com/p/android/issues/detail?id=1653">http://code.google.com/p/android/issues/detail?id=1653</a></p> <p>It's kind of mysterious.. and seems it's a ghost since 2008.</p> <p>[<strong>Edit2</strong>]</p> <p>Alrite, with the advice from the comments: I just did a test using:</p> <pre><code>dd if=/dev/urandom of=file </code></pre> <p>with parameters bs and count chosen to fit the remaining space,</p> <p>and filled the /data partition.</p> <p>How amazed I am that Google Maps just crashed on the SQLiteFullException. Actually all the apps crash - even Phone.</p> <p>Is it true that nobody handles those exceptions? Is it ok that those applications just get killed with the "..has stopped unexpectedly"?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload