Accessing preferences using an activity