sharedpreferences Questions

4

Solved

Does Android provide smth. like that OR do I have to check every time during start of my app "Oh, am I freshly installed? Do I have to initialize the Shared Preferences now?"
Edraedrea asked 6/9, 2010 at 11:51

7

Solved

Using a simple EditTextPreference in my preferences activity: <EditTextPreference android:key="SomeKey" android:title="@string/some_title" android:summary="..." android:numeric="integer" a...
Wizard asked 15/9, 2010 at 20:4

8

Solved

EDIT: The problem described below was due to a very peculiar device issue not caused by any coding-related problem. I have a preferenceActivity in which I have many checkBoxPreferences. The checkB...

4

Solved

I am trying to store a boolean value which is changed every time a button is clicked. I want to do this using shared preferences, however I keep running into this error: Unresolved reference: get...
Nannienanning asked 19/6, 2019 at 8:2

4

The context: I have a flutter app in which it is my goal to handle push notifications messages with firebase messaging to users who are subscribed to a topic. The notification is sent with data tha...

6

Solved

I have the following problem: right now there is an app in the PlayStore that is written in native code (both iOS and Android) which I'm planning on migrating to flutter. My aim is that the users d...

2

Performing a migration from SharedPrefs into DataStore is straightforward and documented very well. However when I want to do a simple "version bump" migration from DataStore to still Dat...

5

Solved

Whenever we have to use shared preferences we have to create an instance of it. In flutter creating an instance of shared preference is asynchronous; final prefs = await SharedPreferences.getInstan...
Allegraallegretto asked 20/7, 2022 at 5:22

3

Solved

I'm trying to clear all the key values of SharedPreferences during logout except 2 keys "EmailID" and "Password". As we know that there is only single SharedPreferences instance allowed in flutter ...
Haemolysin asked 5/6, 2019 at 7:17

6

Solved

I use the EncryptedSharedPreferences from the androidx.security:security-crypto:1.0.0-alpha02 lib to store some Tokens. If i use prefs.edit().remove("token")).apply() or prefs.edit().remove("token"...
Tracietracing asked 25/7, 2019 at 13:20

4

I have been using shared_preferences in flutter, was working fine until now. Suddenly it stopped working, both in iOS and Android. I debugged it step by step and it stores data to pref and while ap...
Medication asked 12/10, 2020 at 14:27

7

Solved

I was using shared_preferences plugin in my Flutter application. From one moment (probably after Flutter upgrade), it started to throw an exception: E/flutter (27778): [ERROR:topaz/lib/tonic/loggi...
Bellyband asked 21/3, 2018 at 13:11

6

Solved

I am allowing the user to create multiple SharedPreferences files, but I also would like the option for them to delete these files. I know I could use internal storage, but that is not my question....
Bandaid asked 25/5, 2011 at 13:34

12

Solved

The common location where SharedPreferences are stored in Android apps is: /data/data/<package name>/shared_prefs/<filename.xml> User with root privileges can navigate to this locati...
Mayo asked 10/5, 2015 at 7:19

11

Solved

I am using shared_preferences dependency in Flutter. Building Xcode (Product->archive - for Generic target) fails with module 'shared_preferences' not found I tried flutter clean, flutter pub ...
Blackandblue asked 29/7, 2020 at 14:4

2

I am using SharedPerefences plugin in Flutter in a macOS application, how can I clear shared preferences? Where are shared preferences stored on disk? Default macos UserDefaults are stored in Libra...
Dianadiandra asked 24/1, 2022 at 16:23

10

Solved

PreferenceManager getDefaultSharedPreferences is deprecated in Android 10. How do I replace it?
Boulogne asked 1/7, 2019 at 10:0

3

Here I want to store all the Ids of product in shared preference. but here when I am storing id using setInt it will store only one Id and remove previous IDs so I want that all id needs to be stor...

1

Android, UMP always returns "OBTAINED" even if the user did not consent or if the user dismissed the form. So it's very hard to do anything with it. I want to know if the user did not con...
Natation asked 5/9, 2023 at 9:33

1

Solved

I wrote a Unit-test with RobolectricsTestRunner included. The unit test passed, but with the following warning: System.logW: No Compatibility callbacks set! Querying change 119147584 All I did in ...
Pyrochemical asked 14/12, 2021 at 14:42

34

My Flutter application uses the Flutter SharedPreferences plugin and send values to the iOS side with platform.invokeMethod. If I start the application, I have this error: [VERBOSE-2:dart_error.cc...
Kolk asked 4/6, 2018 at 19:48

13

Solved

In Android can we store an object of a class in shared preference and retrieve the object later? If it is possible how to do it? If it is not possible what are the other possibilities of doing it?...
Standridge asked 24/3, 2011 at 11:6

8

Solved

I have a login page that saves username and password to SharedPreferences. I have another Activity class that includes a logout button. I want to clear SharedPreferences when I click the logout but...
Nonsense asked 11/6, 2014 at 13:4

7

Solved

I store some payment values in one Activity SharedPreferences spreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); productId = spreferences.getString("productId",...
Omidyar asked 23/7, 2015 at 7:17

1

I am trying to edit a user's set of shared preferences in a more secure way using EncryptedSharedPreferences private fun provideSecureSharedPreference(context: Context): SharedPreferences { val ma...
Shift asked 17/8, 2021 at 23:34

© 2022 - 2024 — McMap. All rights reserved.