How to share preference file to other activities of same application?

Answer:
Use getSharedPreferences("name", MODE_PRIVATE);

Description:
If the preference file is having some name, then only other activities can access it.
MODE_PRIVATE says it is accessible with in the application.  

No comments:

Post a Comment