user1029750
user1029750

Reputation: 1

Storing the context in shared preference

How can i store a context in shared preference ? Is it possible? if yes, then give some hint and if possible sample code..

Upvotes: 0

Views: 889

Answers (1)

Diego Torres Milano
Diego Torres Milano

Reputation: 69368

The SharedPreferences class provides a general framework that allows you to save and retrieve persistent key-value pairs of primitive data types. You can use SharedPreferences to save any primitive data: booleans, floats, ints, longs, and strings. You cannot save Context.

Upvotes: 2

Related Questions