Sunday, August 21, 2011

[android-developers] Redirect values from PreferenceActivity to SQLiteDatabase

Hi Guys,

after I've successfull implemented several PreferenceActivities, I
decided to insert one EditTextPreference and set
' android:inputType="textPassword" '. This is because I need to
contact a Server with the goal to sync server data with my offline
database on the Android Smartphone and therefore i need beside the
server-url also an system-login and a system password.

Of course I don't want a potential attacker to see the plaintext-
password within the file $(package.name}_preferences.xml. So what I
would like to do is...

- get the entered password from the dialogpreference, encrypt and
store it into the sqlite database
- overwrite the plaintext password in the mentioned preference file.

I created already the DatabaseManager for accessing a table with user-
id and password-collumn, which should store this AES encrypted server
password. The encryption method works also fine.Unfortunately I don't
figured out a way to capture values, which are send from the
DialogPreference and avoid save them to the preferencefile.

Any Ideas ?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment