Skip to content

Commit ea5308d

Browse files
authored
Add dataExtractionRules to suppress allowBackup deprecation warning and ensure compatibility with Android 12+ backup policies (#41)
* fix: resolve deprecated allowBackup warning for Android 12+ Add dataExtractionRules to suppress allowBackup deprecation warning and ensure compatibility with Android 12+ backup policies * Applied Spotless check
1 parent 4f463a3 commit ea5308d

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ xmlns:tools="http://schemas.android.com/tools">
2222
<application
2323
android:name=".PokedexApp"
2424
android:allowBackup="false"
25+
android:fullBackupContent="false"
26+
android:dataExtractionRules="@xml/no_backup"
2527
android:enableOnBackInvokedCallback="true"
2628
android:icon="@mipmap/ic_launcher"
2729
android:label="@string/app_name"

app/src/main/res/xml/no_backup.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Designed and developed by 2024 skydoves (Jaewoong Eum)
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<data-extraction-rules>
18+
<cloud-backup>
19+
<exclude domain="root" />
20+
<exclude domain="file" />
21+
<exclude domain="database" />
22+
<exclude domain="sharedpref" />
23+
<exclude domain="external" />
24+
</cloud-backup>
25+
<device-transfer>
26+
<exclude domain="root" />
27+
<exclude domain="file" />
28+
<exclude domain="database" />
29+
<exclude domain="sharedpref" />
30+
<exclude domain="external" />
31+
</device-transfer>
32+
</data-extraction-rules>

0 commit comments

Comments
 (0)