android - How to make SharedPreferences read/write work on non-UI thread? -


sharedpreferences read , write operations default working on ui thread. how make run in other threads avoid blocking main thread?

sharedpreferenced related context. can reference through context.

you can pass context parameter class. example in constructor.

in activity do:

myclass myclass = new myclass(this); 

Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

android - MPAndroidChart - How to add Annotations or images to the chart -