Code example for SharedPreferences

Methods: getLonggetString

0
	} 
	 
	public void load(Context context) {
		if(!loaded) {
			SharedPreferences prefs = context.getSharedPreferences(PREFERENCES, Context.MODE_PRIVATE);
			c2DMRegistrationId = prefs.getString("c2DMRegistrationId", null);
			registeredUserId = prefs.getLong("registeredUserId", -1L);
			pendingC2DMRequestTime = prefs.getLong("pendingC2DMRequestTime", 0);
			pendingSocializeRequestTime = prefs.getLong("pendingSocializeRequestTime", 0);
			lastC2DMRegistrationTime = prefs.getLong("lastC2DMRegistrationTime", 0);
			lastSocializeRegistrationTime = prefs.getLong("lastSocializeRegistrationTime", 0);
			 
			if(logger != null && logger.isDebugEnabled()) {
				logger.debug("Loaded notification state with registration id [" +
						c2DMRegistrationId +
						"], user id [" + 
						registeredUserId +
						"]"); 
			}		 
		}