On 5 February 2011 15:35, Kostya Vasilyev <[email protected]> wrote:

> The memory card is accessible and writable by anyone, including other
> applications and the user, and storing the timestamp as text is practically
> begging for someone to mess with it.

Not fully agreee. If you do this right way, it will somehow serve the
purpose. Choose path and filename wisely (resist from naming your file
like my_app_name/timestamp.txt). Additionally you may want to write
device ID too to prevent sharing that file. And if you write some
"noise" (like /dev/random :) around your timestamp data to bload the
file slightly (say 512/1024 bytes) then some 'hackers wannabe' may
stay away. Of course one may put some effort and hide path and
filename in the code so it's not easily spotable by just peeking the
binary. I'd also fake timestamp on the file once created to make it
older that app installation. Or just be creative yourself :)

> I'd suggest you use SharedPreferences:

Uninstalling the app and doing fresh install kills this type of "protection" so
it's not the solution. SD card file will survive it.

-- 
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

Reply via email to