0

Hello I'm creating application for android no mater what kind but I need to store some information that information are so important because it's kind of result of registration and future settings for application, and now in managing application there is a button which can clear data, is there any way to disable it? I found some threads in internet where people writing that no it's impossible. Or maybe if I'll use internal storage to save that information if the user will press "clear data" it'll also delete files in internal storage or not? I can also use IMEI to identify phone user but what if the IMEI number will be unavailable?

I really need help any idea how I can do it?

Robert
  • 1,272
  • 4
  • 21
  • 40
  • I'll surely answer, but tell me the question, please.. – Mudassir Mar 18 '11 at 07:03
  • Maybe in another word how can I save something like xml file in android phone in that way user can not delete it? – Robert Mar 18 '11 at 07:06
  • 1
    If your data is that sensitive, I'll suggest don't store it on the device. Store it on some server using a web service. Also consider the use of encrypted data. – Mudassir Mar 18 '11 at 07:08
  • Ok but if I really need to do it in that way? I mean save in device? Is the "Clear data" button in managing application removing also files saved in internal storage? – Robert Mar 18 '11 at 07:11

1 Answers1

1

go for sqlite database

you can use SqliteOpenHelper class for storing and retreving data

Sunil Pandey
  • 7,042
  • 7
  • 35
  • 48
  • Yes I know about that but when I'll "Clear data" the data information in database will be lost ;) – Robert Mar 18 '11 at 07:26
  • It's good but still from Android 2.2 what about older. From all of the comments I see only one best way to do it is by web service, but still with one problem what when the IMEI will unavailable. – Robert Mar 18 '11 at 07:49