sharedpreferences Questions

4

Solved

i am building a log in screen using flutter and save user data in shared preference if it is right then i tested the saved data in the second screen and it has been already saved when the app is c...
Weepy asked 13/9, 2018 at 20:36

6

Solved

I'm developing an android application. I'm using android 2.2 In my application I am capturing GPS data and sending it to service with the 1 hour time interval. If user exits from application it's ...
Margaretmargareta asked 26/11, 2012 at 4:13

5

Solved

How fast are SharedPreferences? Is there a way to put them in memory for reading? I have a small amount of data that a ListView has to query to display each cell, and I'm worried that a call to fla...
Dentalium asked 2/10, 2013 at 23:10

6

In an Android Kotlin project, I implemented EncryptedSharedPreference feature based on this link using the androidx.security library and it worked well in debug mode. But in release mode, I keep ge...
Marquess asked 1/6, 2020 at 15:41

9

Solved

I am using SharedPreferences in my android app. I am using both commit() and apply() method from shared preference. When I use AVD 2.3 it shows no error, but when I run the code in AVD 2.1, apply()...
Tachygraphy asked 11/5, 2011 at 7:26

4

I am new to android development. Currently, I would like to encrypt a custom named Shared Preference and integrate with PreferenceScreen but failed to do so. I am using dependencies: androidx.sec...

11

Solved

I have a list of products, which i retrieve from webservice, when app is opened for first time, app gets product list from webservice. I want to save this list to shared preferences. List<Prod...
Checkup asked 23/1, 2015 at 10:20

8

Solved

I am looking an android Shared Preferences and I am wondering is there a way to just check if the preferences file exists. SharedPreferences mySharedPreferences ; mySharedPreferences=getSharedPr...
Glee asked 5/8, 2011 at 20:9

24

Solved

I need to get user objects in many places, which contain many fields. After login, I want to save/store these user objects. How can we implement this kind of scenario? I can't store it like this: S...
Religiose asked 22/8, 2011 at 9:45

2

I have written a flutter app. The app is using sharedPreferences version 0.5.7 to store data. The issue is when I debug the app on my device, there is no data loss. But when it is published on Play...
Mimamsa asked 19/3, 2021 at 21:42

8

Solved

I've defined an instance of SharedPreferences that used on multi-process mode. public class Prefs { private static SharedPreferences prefs; private static SharedPreferences.Editor editor; pr...
Macule asked 7/1, 2015 at 20:1

29

Solved

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...
Parnas asked 10/9, 2010 at 18:34

7

Solved

I have a SyncAdapter running on its own process separately from the main app process. I'm using a static wrapper class around my SharedPreferences that creates a static object on process load (App...
Transferase asked 2/3, 2014 at 15:46

38

Solved

I have an ArrayList with custom objects. Each custom object contains a variety of strings and numbers. I need the array to stick around even if the user leaves the activity and then wants to come b...
Brennen asked 14/8, 2011 at 15:46

4

Solved

I am developing an application in which I have to store very sensitive data and it should not come in contact with the user. I got to know from this source that if a device is rooted then accessing...
Fricke asked 27/9, 2014 at 15:37

8

Solved

I have an ArrayList of an object. The object contains the types 'Bitmap' and 'String' and then just getters and setters for both. First of all is Bitmap serializable? How would I go about serializi...
Naval asked 20/2, 2013 at 13:38

3

Solved

1) In the bellow picture I want to understand why sharedPreferences.getString() give me type mismatch that it may return null but sharedPreferences.getBoolean() and sharedPreferences.getInt() doesn...
Blaubok asked 5/9, 2019 at 22:25

8

Solved

I want to save/recall an integer array using SharedPreferences. Is this possible?
Madai asked 24/8, 2011 at 13:3

8

I have an android app with a number of activities, and a number of specific preference files that are created. When a user sign out of my app, I want to delete absolutely all shared preferences. Un...
Sanorasans asked 21/8, 2013 at 4:12

5

Solved

I want to clear all but one SharedPreference. If I've saved 10+, is there a better way then removing each individually? This gets a bit redundant: preferences.edit().remove("1").commit(); preferen...
Lavone asked 30/4, 2014 at 18:6

11

Solved

In my app there is a button (activity1). When user clicks it, I want no sound in the game. I thought I should do this by using sharedpreferences in activity1 in the onClick method of the button: Sh...
Thought asked 31/5, 2011 at 10:20

1

Solved

I've been searching for the best approach to using Shared Preferences in MVVM architecture in Android but I could just find pieces and thus having no clear image over ho to do it in the best way. T...
Melody asked 8/5, 2022 at 10:20

6

Solved

I am using Shared Preferences in my Flutter app and what I would like to do is store SharedPreferences as a field on startup and then use it synchronously in the app. However I'm not sure if I'm no...
Annam asked 2/4, 2018 at 5:10

5

Solved

I'm creating Shared Preferences as follows preferences = getSharedPreferences("text", 0); final Editor editor = preferences.edit(); String s1 = serverIP.getText().toString(); String s2 = serverPo...
Yenyenisei asked 6/1, 2012 at 12:7

2

So we have a Flutter app - and it has a bunch of user preferences. To date, we've been using shared_preferences plugin to handle them (like everyone else in Flutter-land). Life was happy. Now, our...
Siegbahn asked 27/2, 2019 at 17:16

© 2022 - 2024 — McMap. All rights reserved.