Hii dev, apa kamu juga mengalami hal serupa? Oke bagus, itu artinya kamu juga sedang masa transisi dari kekunoan menuju kekinian 😃

Oke tidak perlu bertele-tele, jadi konsekuensi menggunakan SDK versi 23 - ke atas adalah kamu harus bisa beradaptasi dengan beberapa aturan mainnya, tentu saja versi baru membawa budaya baru (future) salah satunya jika kita mengaktifkan autobackup.
allowBackup true membuat shared pareference masih ada saat aplikasi Anda di uninstall
android:allowBackup="true"
maka kita juga perlu menyediakan berkas xml untuk menampung data-data yang akan disimpan.
Mekanismenya adalah sistem android akan mengupload data user ke akun Google Drive mereka, dimana hal itu secara khusus diproteksi oleh kredensial akun Google milik pengguna. Secara default max size data yang dibackup adalah 25MB per user, namun dalam prosesnya kamu dapat mengcustomnya atau menonaktifkannya.
Bagaimana caranya? kamu punya 2 pilihan mendisable atau membuat file xml.
1. Disable allowBackup
android:allowBackup="false"
2. Buat Undang-Undang berupa File XMLÂ
Wkwkwk sori gua sebut UU karena file tersebut didedikasikan untuk mendefinisikan aturan main proses backup, biar sistem Android gak sembarangan backup barang tidak penting atau barang sensitif 😃.
Oke langsung saja, buka project, klik kanan folder res -> new -> android resource directory -> ganti resource type ke "xml" -> OK.
Lalu diisi apa? ini saya kasih contoh format yang standar.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<full-backup-content xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This file is referenced from android:fullBackupContent in AndroidManifest.xml, and controls
exclusions/inclusions for the default backup policy. -->
<!-- Shared preferences files can be excluded using the "sharedpref" domain. -->
<!-- Be sure to exclude any device-specific identifiers, such as the GCM registration key. -->
<!-- You may also wish to exclude directories that contain device-specific session tokens or
sensitive user credentials. -->
<exclude domain="sharedpref" path="gcm"/>
<exclude domain="sharedpref" path="SESSION_AUTH"/>
<!-- Databases can be excluded using the "database" domain. -->
<exclude domain="database" path="user.db"/>
<!-- Additional domains include "file", "external", "root", and "path". See
http://developer.android.com/preview/backup/index.html for more details.
Additionally, content in the cache directory, external storage, and the no_backup directory
(see android.content.Context#getNoBackupFilesDir()) are excluded by default. If you need
to backup data in one of these locations, use the <include> directive. -->
</full-backup-content>
<exclude> untuk membuat pengecualian, sedangkan <include> untuk menyertakan hal-hal tertentu. Kebetulan pada kasus diatas saya membuat pernyataan backup semua file-file yang ada di folder sharedpref, kecuali file dengan nama "gcm" & "SESSION_AUTH.
Jika sudah, barulah definisikan di manifest kamu di dalam tag <application>
android:fullBackupContent="@xml/my_rule_backup"
Ok beres, gitu aja kok repot. Good job!