Question

I'm not able to create variable in android framework level or application level, which will retain its value even after factory reset or software changes. Same thing I'm able to implement at Modem code which is qualcomm based. In qualcomm we can add NV items.

But i want this in android framework layer or application layer.

I'm working on froyo version 2.2.

Was it helpful?

Solution

As far as I know, ordinary 3rd party application cannot store data that cannot be removed by user. Basically both internal and external storages can be cleared at any time.

Internal application's storage will be cleared on factory reset, when application is uninstalled or when user clicks "Clear data" in "Manage Applications" activity.

External storage is simple sd-card that can be formatted by user at any time on any other device (there are devices that have builtin external storage, but it can be formatted as well from Android's settings).

And there is no API for NV items (which is reasonable, I'd be surprised to see this available to 3rd party application developers).

So, you won't be able to store "non-volatile variable" in Andrdoid. At least not without the root. And even then things might be quite different from device to device.

OTHER TIPS

There is a backup service which might be what you're looking for - store some application preferences in a google cloud - http://developer.android.com/guide/topics/data/backup.html.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top