ragowthaman / AutoTrack

0 stars 0 forks source link

setup backup service for devices #15

Open ragowthaman opened 9 years ago

ragowthaman commented 9 years ago

Done. However locking the files from syncying while read/write is in progress is not done yet.

From:http://developer.android.com/guide/topics/data/backup.html

However, reading and writing to files on internal storage is not threadsafe. To ensure that your backup agent does not read or write your files at the same time as your activities, you must use synchronized statements each time you perform a read or write. For example, in any Activity where you read and write the file, you need an object to use as the intrinsic lock for the synchronized statements: