Android Question Problems with shared preferences

corvo

Member
Licensed User
Longtime User
Hi, i'm trying to access to shared preferences, but i don't find any good example, plz someone can share something?

Thank u
 
Thank u Erel, but i need to read a value of a software, how i can get this value? ( i know the name of this value) There is a get string?
 
Upvote 0
Yes Erel, i want to read a value of another app, i olked whit the programmer and he told to me to serach a value of a sharedpreference
 
Upvote 0
The preferences are stored by default under:
/data/data/YOUR_PACKAGE_NAME/shared_prefs/YOUR_PACKAGE_NAME_preferences.xml

Try to read the other app file with File.ReadString. If it works then you will be able to extract the value with an XML parser.

However by default your app will not have access permission to this file.
 
Upvote 0
Thank u Erel, i tryed it whit this code


Dim
gugu AsString

gugu=
"/data/data/com.app name/shared_prefs/"

File.Copy(gugu,"com.app name_preferences.xml",File.DirDefaultExternal,"com.app name_preferences.xml")

but i got an error "Access Denied" maybe i can do this
 
Upvote 0
Back
Top