Android :: How To Examine SharedPreferences From Adb Shell
Aug 7, 2009
Now that we can Examining sqlite3 Databases from a Remote Shell, is it possible to examine SharedPreferences from adb shell? Since it would be much more convenient to examine and manipulate SharedPreferences from command line when debugging. Or put in another way, in what files SharedPreferences are saved, and how to view and modify these files?
View 1 Replies
Jul 3, 2010
How do you overclock Droid (rooted)? How do you confirm or examine clock speed?
View 23 Replies
View Related
Nov 21, 2010
My problem is using SharedPreferences. I just created a <PreferenceScreen> which holds inside a <ListPreference> with an array of 5 different values. Very simple! The array of values are different numbers: 1, 2, 5, 10 and 30.Every time I change the setting, the application remembers that and I can see the setting I chose when I access the preferences once again (as an user). Now, in the code, when I retrieve the setting using the key (e.g. getString("delay", default_delay);), I always get the default value, it seems that the SharedPreferences does not find my setting. Can anybody help? I have read about SharedPreferences.getEditor().commit(), but that should be used only when changing settings from the code, not from the UI preferences.
View 2 Replies
View Related
Mar 3, 2010
I'm just wondering, if there is a limit on amount of data I can store in SharedPreferences. ( and if yes, what limit).
View 7 Replies
View Related
Nov 19, 2010
I make an app with some activities.
The first is the login.
If I login correctly, I pass to the second activity, and I want download a stream (like twitter), but I cannot keep the session.
I saved user & pass in sharedpreferences, how can i keep the session through all activities?
View 1 Replies
View Related
Jun 23, 2010
I am trying to save the date of file parsing, so that when next time user, opens the application, the date can be checked against the last parsing date. I am using shared preference to save the data and retrieve it, but getting error. here is the code:
SharedPreferences settings = getPreferences(0);
String today = new Date(System.currentTimeMillis()).toString();
SharedPreferences.Editor edit = settings.edit();
System.out.println("******** Today : " + today);
edit.putString("lastdate", today);
String fetch = settings.getString("lastdate", "0");
System.out.println("******** Fetch : " + fetch);
txtTest.setText(fetch);
but I am getting null pointer error. am I missing something?
View 2 Replies
View Related
Feb 7, 2009
I'm implementing a feature that requires a password, is it safe to store using SharedPreferences.Editor? Is there another recommended way for storing passwords?
View 8 Replies
View Related
Mar 6, 2009
I've just tracked down a weird bug in our app where SharedPreferences were failing between power cycles of the phone.
It turns out that one of the strings we were saving had an "&" in it. When I look at the xml that is being persisted I see that this is being encoded as && instead of just &
This means that when you come to read the settings back you don't get any values at all. Is this a known issue? I see lots of posts about preferences dissappearing, but nothing about this.
View 3 Replies
View Related
Sep 10, 2010
How do I delete SharedPreferences data for my application?
I'm creating an application that uses a lot of web services to sync data. For testing purposes I need to wipe out some SharedPreferences values when I restart the app.
View 1 Replies
View Related
Oct 6, 2010
If not, is there any workaround? I have an array list of objects that have a name and an icon pointer. I do not want to use a database.
View 2 Replies
View Related
Sep 28, 2009
I'm trying to prepare an update to one of my apps and I just realized that the updated version cannot read or write over the previous version's SharedPreferences.
Some details: * I'm using the 1.6 SDK and compiling for 1.5.3. * My androidmanifest.xml does not have a sharedUserId (I didn't think I need one if I was not sharing data between different apps).
How to reproduce: * Install my current app from the market * Run the app * Exit and save the setting - invoking SharedPreferences Editor commit (it's using MODE_PRIVATE) * Now install my new update (via a browser download) * Run the app * Everything works fine * Exit & Save *** Now reboot the phone * Run the app again ==> Can no longer access old data or write over it!!
Did I do something wrong? Is it because of the sharedUserId thing? Is it because of the way I'm testing - via market then browser? Why is LogCat reporting a UID change? ==> mismatched uid: 10031 on disk, 10046 in settings; Can I recover from this? I don't want to delete all of my users' data. error ...
View 4 Replies
View Related
May 30, 2010
I'm having a hard time figuring out the best way to pass simple values from onPause and onResume in the Android activity lifecycle. I understand how to use get and put extra bundles for activity to activity data, but does that work for passing data between the same activity? Should i used SharedPreferences?
View 1 Replies
View Related
Apr 2, 2010
Does somebody knows where the file with the actual stored SharedPreferences is located?
View 1 Replies
View Related
Oct 12, 2010
I want to change the android sharedPreferences save path,the sharedPreferences save in /data/data/xxx.xxx.xxx/shared_prefs,i want to change path to /sdcard. how i do?
View 1 Replies
View Related
Sep 2, 2010
From what I can incur out of the SharedPreferences documentation, I can update a preference, add one or clear all preference values in a shared preference file.
But I want to completely clear everything inside a shared preference file, not just the values, but the preferences they refer to as well.
View 2 Replies
View Related
Aug 5, 2010
Currently, I'm using the following code across all of my activities in my app to store application level variables and carry values between activities..
prefs = this.getSharedPreferences("MyPrefs", Context.MODE_PRIVATE);
I didn't have a PreferenceActivity prior to this, but now I do and I am looking to store a few user prefs from this new PreferenceActivity in the same sharedPreferences tag, "MyPrefs".
I know I can access the PreferenceActivity SharedPrefs from my activities via
prefs = PreferenceManager.getDefaultSharedPreferences(this);
but I would like those values saved to my current sharedPreferences tag, "MyPrefs", but I'm not sure how to do this.
View 1 Replies
View Related
Jul 19, 2010
I love how SharedPreferences work in android and I would like to know if there is an easy way to save them to another file so I could load a previous instance of the prefs and vice versa. Basically when you load this file, all the preferences would change to how you had it before at once. I want to be able to swap 3 or 4 different versions of the same pref keys in this way. Is there an easy way to do this?
View 1 Replies
View Related
Mar 9, 2009
We have an online multiplayer game that saves some login information in the SharedPreferences. Our app is copy protected and everything was going really well until this weekend when we released an update for it. It seems that at least some of the people are having their SharedPreferences deleted when they updated too the new app. As you can imagine our users are furious because they're all loosing their profiles, and our ranking is dropping fast.
We've tried to reproduce this a hundreds ways but are unable. We're wondering if this could be related to installing a copy protected app over a copy protected app? Since that's the only situation we haven't tested and can't test.
View 8 Replies
View Related
Sep 2, 2010
I want to store a time value and need to retrieve and edit it. Can somebody guide me here with a sample code/project please?
View 2 Replies
View Related
Feb 3, 2010
Why are my SharedPreferences suddenly deleted, after I updated my game in the Market?
Here is the logcat...
View 4 Replies
View Related
Oct 23, 2010
How can I retrieve SharedPreferences for a widget during an update pushed by a broadcast receiver?I have a static BuildUpdate method on my AppWidgetProvider, but I cannot work out how to retrieve my shared preferences as I do not have an appropriate context.
View 12 Replies
View Related
Jun 21, 2011
My first android application has to do with showing activities at different times. All works fine ... except that when I retrieve the shared preferences in an activity activated from the notification manager, all my options are reset to default values.
Similarly, when I try to reinstall an alarm after the phone is switched off, all the previously stored shared preferences options are non-existent.Is there something special that has to be set in the manifest, or do I have to retrieve the context in a special manner? from a broadcastReceiver?
View 12 Replies
View Related
Sep 14, 2009
We want to store credentials for a user to a web service so the user doesn't have to repeatedly login, but we're concerned about security. We can't store a hash on the database, but we could probably use JCE encryption locally.
Is the content in SharedPreferences secured on the Android device?
View 14 Replies
View Related
Sep 14, 2013
How to delete an item from a ListView.
I have a layout which includes the listview, an edittext and a button. On button click, the edittext's string is added to the listview. Clicking on a listview item opens a dialog which asks for confirmation to delete that item. When confirmation is received, the item appears to delete. But when the delete button is clicked on another item, the item deletes, but the previous item reappears in its spot. From my limited understanding, I assume that the item doesn't delete from the SharedPreferences, and so when they are loaded again, the item reappears. I've tried clearing the SharedPreferences before saving after delete, but this didn't work (though I could've been doing it wrong).
I've included the whole class incase to test it out in IDE. I understand there are a lot of unneeded objects and the code is quite messy which is a result of me screwing around with the code to try and get this to work. Though everything works as it should, aside from deletion.
[HIGH]
package com.example.send2omni;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
[Code]....
And here's the layout to save some time:
[HIGH]
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
androidrientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
[Code]...
View 1 Replies
View Related
Nov 11, 2010
I have an Android library project that makes calls to PreferencesManager.getDefaultSharedPreferences.
I have 2 version of my app, paid/free, and they are not able to access the preferences stored by the library code.
Can someone tell me the right way to store values in SharedPreferences in library code and have the values available to projects that include the library?
View 2 Replies
View Related
Aug 28, 2009
I want to use command like "ls","mkdir","cd","./"..etc, in the app, somebody says use Runtime class,
Runtime.getRuntime().exec("ls");
but there is nothing happen.. I also use logcat to observe, but have the same result.
so could app use (linux) command?
View 6 Replies
View Related
Feb 17, 2010
The only thing I found is to cross compile bash. Is there another way to have tab completion in the Android shell?
View 2 Replies
View Related
Oct 19, 2010
I have a rooted device, I type "su" in adb shell, then I try to traceroute. It says "traceroute: not found". I can't find traceroute in any bin folders.
View 1 Replies
View Related
Oct 28, 2010
I would like to be able to send an actual SMS message from a shell using just the command line and not relying on any apk to do so. I am interested in sending this message between phones, not from the emulator to the phone. For example, by running the command: service call phone 2 s16 "1234567890"
I can place a call from phone to phone using the command line. The 'service list' command shows an isms service, which I can't seem to provide the correct arguments for. I would assume that one of the args should be a PDU string but haven't had any luck so far.
View 2 Replies
View Related
Oct 13, 2009
I find that when I am running 2 android devices connected to 1 linux machine, I find I can get ADB shell to exit abnormally. If I start a shell on Device 1, then on Device 2 start a shell and type reboot. Device 2 resets like expected, but the shell on device 1 will exit. I find that functionality of running controlling multiple devices with ADB very useful for testing. My question is can anyone reproduce this? Has this been fixed upstream? Is ADB planning on first class support for multiple devices, or was this an after thought feature? Any help debugging this, or possible just a little information in the right direction so I can make a patch myself.
View 5 Replies
View Related