Adding Shared Preferences Code

Adding Shared Preferences Code