Save lines in sharedpreferences.