C corvo Member Licensed User Longtime User Oct 13, 2013 #1 Hi, i'm trying to access to shared preferences, but i don't find any good example, plz someone can share something? Thank u
Hi, i'm trying to access to shared preferences, but i don't find any good example, plz someone can share something? Thank u
Erel B4X founder Staff member Licensed User Longtime User Oct 14, 2013 #2 See this tutorial: PreferenceActivity tutorial Upvote 0
C corvo Member Licensed User Longtime User Oct 14, 2013 #3 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
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?
Erel B4X founder Staff member Licensed User Longtime User Oct 14, 2013 #4 Do you want to read a value of a different app? In most cases the preferences are saved in the internal folder, which is not accessible from other apps. Upvote 0
Do you want to read a value of a different app? In most cases the preferences are saved in the internal folder, which is not accessible from other apps.
C corvo Member Licensed User Longtime User Oct 14, 2013 #5 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
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
Erel B4X founder Staff member Licensed User Longtime User Oct 14, 2013 #6 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
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.
C corvo Member Licensed User Longtime User Oct 14, 2013 #7 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
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
Erel B4X founder Staff member Licensed User Longtime User Oct 14, 2013 #8 This means that you do not have access to this app data folder (as expected). Upvote 0