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

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

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -