Source/CSBackend/Platform/Android/Main/Java/com/chilliworks/chillisource/core/LocalNotificationStore.java
/**
	 * Read the notification list from json stored in the shared preferences.
	 * 
	 * @author Ian Copland
	 * 
	 * @return The output notification list.
	 */
Read the notification list from json stored in the shared preferences.

@author Ian Copland

@return The output notification list.
Read the notification list from json stored in the shared preferences . @author Ian Copland @return The output notification list .
private List<LocalNotification> readNotifications()
	{
		SharedPreferences sharedPref = CSApplication.get().getAppContext().getSharedPreferences(m_sharedPreferenceName, Context.MODE_PRIVATE);
		String jsonString = sharedPref.getString(k_notificationJsonKey, "");
		List<LocalNotification> output = new ArrayList<LocalNotification>();
		try
		{
			if (jsonString != "")
			{
				JSONObject jsonRoot = new JSONObject(jsonString);
				JSONArray jsonNotifications = jsonRoot.getJSONArray(k_notificationArrayName);
				for (int i = 0; i < jsonNotifications.length(); ++i)
				{
					JSONObject notificationJson = jsonNotifications.getJSONObject(i);
					LocalNotification notification = new LocalNotification(notificationJson); 
					output.add(notification);
				}
			}
		}
		catch (JSONException e)
		{
			Logging.logFatal("An exception occurred while reading the local notification json: \n" + ExceptionUtils.ConvertToString(e));
		}
		return output;
	}
private List < LocalNotification > readNotifications ( ) { SharedPreferences sharedPref = CSApplication . get ( ) . getAppContext ( ) . getSharedPreferences ( m_sharedPreferenceName , Context . MODE_PRIVATE ) ; String jsonString = sharedPref . getString ( k_notificationJsonKey , "" ) ; List < LocalNotification > output = new ArrayList < LocalNotification > ( ) ; try { if ( jsonString != "" ) { JSONObject jsonRoot = new JSONObject ( jsonString ) ; JSONArray jsonNotifications = jsonRoot . getJSONArray ( k_notificationArrayName ) ; for ( int i = 0 ; i < jsonNotifications . length ( ) ; ++ i ) { JSONObject notificationJson = jsonNotifications . getJSONObject ( i ) ; LocalNotification notification = new LocalNotification ( notificationJson ) ; output . add ( notification ) ; } } } catch ( JSONException e ) { Logging . logFatal ( "An exception occurred while reading the local notification json: \n" + ExceptionUtils . ConvertToString ( e ) ) ; } return output ; }
Read the notification list from json stored in the shared preferences.
Read the notification list from json stored in the shared preferences .