Source/CSBackend/Platform/Android/Main/Java/com/chilliworks/chillisource/core/LocalNotificationStore.java
/**
	 * Writes the notification list to the shared preferences in JSON form.
	 * 
	 * @author Ian Copland
	 * 
	 * @param The notifications list to write.
	 */
Writes the notification list to the shared preferences in JSON form.

@author Ian Copland

@param The notifications list to write.
Writes the notification list to the shared preferences in JSON form . @author Ian Copland @param The notifications list to write .
private void writeNotifications(List<LocalNotification> in_notifications)
	{
		try
		{
			JSONArray jsonNotifications = new JSONArray();
			for(LocalNotification notification : in_notifications)
			{
				jsonNotifications.put(notification.toJson());
			}
			JSONObject jsonRoot = new JSONObject();
			jsonRoot.put(k_notificationArrayName, jsonNotifications);
			SharedPreferences sharedPref = CSApplication.get().getAppContext().getSharedPreferences(m_sharedPreferenceName, Context.MODE_PRIVATE);
			SharedPreferences.Editor editor = sharedPref.edit();
			editor.putString(k_notificationJsonKey, jsonRoot.toString());
			editor.commit();
		}
		catch (JSONException e)
		{
			Logging.logFatal("An exception occurred while writing the local notification Json: \n" + ExceptionUtils.ConvertToString(e));
		}
	}
private void writeNotifications ( List < LocalNotification > in_notifications ) { try { JSONArray jsonNotifications = new JSONArray ( ) ; for ( LocalNotification notification : in_notifications ) { jsonNotifications . put ( notification . toJson ( ) ) ; } JSONObject jsonRoot = new JSONObject ( ) ; jsonRoot . put ( k_notificationArrayName , jsonNotifications ) ; SharedPreferences sharedPref = CSApplication . get ( ) . getAppContext ( ) . getSharedPreferences ( m_sharedPreferenceName , Context . MODE_PRIVATE ) ; SharedPreferences . Editor editor = sharedPref . edit ( ) ; editor . putString ( k_notificationJsonKey , jsonRoot . toString ( ) ) ; editor . commit ( ) ; } catch ( JSONException e ) { Logging . logFatal ( "An exception occurred while writing the local notification Json: \n" + ExceptionUtils . ConvertToString ( e ) ) ; } }
Writes the notification list to the shared preferences in JSON form.
Writes the notification list to the shared preferences in JSON form .