문제

My app has the ability to backup and restore SharedPreferences using an BackupAgentHelper class. However there are two entries that must not restored.

Is there a way to reset them after restoring again?

I don't want to put them in a different SharedPreference, they have to be in the same file.

도움이 되었습니까?

해결책

Use the onBackup or onRestore methods of the BackupAgent to clear out the values before or after the operation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top