a line is given at Editor is All changes you make in an editor are batched, and not copied back to the original SharedPreferences until you call commit() or apply()
Which is best function to be called if given as commit() and apply() ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
if its multithreaded and written by multiple threads then
commit()is the way to since it Synchronized.. or elseapply()which is asynchronous, so faster and apply never notifies if it fails to write….. see here for more..