Using shared preferences vs. bundle in Android -


the app i'm making retrieves between 1 , 2 dozen records table in db pieces of data can used during app (the table has 6 fields). won't need stored permanently on device. shared preferences used or should utilizing bundle?

you can query db , data want , store in normal fashion in variables.

sharedpreferences used when want retain data between different app executions.

bundle used when want safely transfer data between activities or between activity , fragment.

so unless have such requirements, can store them in normal variables.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -