Thanks. I'll use a WakeLock in my IntentService.onHandleIntent. On Oct 19, 1:09 am, Mark Murphy <[email protected]> wrote: > On Mon, Oct 18, 2010 at 7:04 PM, Stakka <[email protected]> wrote: > > I have a service that needs to write some data to the internal storage > > using RandomAccessFile. > > Do I need to use a WakeLock to make sure the data won't get corrupted > > if the service process gets killed? > > WakeLocks have nothing to do with processes being killed. WakeLocks > are to keep the CPU awake. If you are writing some data to the > internal storage at a point in time when the device might want to go > to sleep (e.g., as a scheduled operation via AlarmManager), holding a > WakeLock is a really good idea. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Warescription: Three Android Books, Plus Updates, One Low Price!
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

