My first android application has to do with showing activities at different times. All works fine ... except that when I retrieve the shared preferences in an activity activated from the notification manager, all my options are reset to default values. Similarly, when I try to reinstall an alarm after the phone is switched off, all the previously stored shared preferences options are non-existent. Is there something special that has to be set in the manifest, or do I have to retrieve the context in a special manner? from a broadcastReceiver?