Tushar Chutani
Tushar Chutani

Reputation: 1560

saving data in android application?

I just started my first android application and in this application I plan to save username and password of the user. So my question is is it safe to save user name and password in file without decoding it? I mean can anyone acess data the text files in android? Sorry I have developed for iOS before so I am not sure about that.

thanks

Upvotes: 0

Views: 1301

Answers (2)

kaspermoerch
kaspermoerch

Reputation: 16570

You should take a look at the different types of Data Storage provided to you by the Android framework.

It's probably a little overkill to go ahead and create a database, if you're only going to store username and password - but if you're going to store more than that in a database later on, you might aswell use the database for username and password too.

If it's only username and password, I'd go for using the Shared Preferences.

Upvotes: 1

bos
bos

Reputation: 6535

Assuming the device is not rooted, no application can access an other application's data files unless this application shares it using some kind of a Manager.

Read more about it here: http://developer.android.com/guide/topics/security/security.html

Upvotes: 1

Related Questions