Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove backup rules from quickeditor manifest #384

Merged
merged 2 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/get-started/get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,12 +314,12 @@ GravatarQuickEditor.logout(Email("{USER_EMAIL}"))
#### Exclude Data Store files from Android backup (optional, but recommended)

Data Store files are subject to Android backups. Encrypted files from the backup won't work when restored on a different device so we have to exclude those files.
If your app has backup rules configured, those that are provided in the SDK won't be used so you have to copy them to your files.
It is encouraged to create those files or copy paste below rules to your own respective files.

<details>
<summary>Instructions</summary>

In `AndroidManifest.xml` add those lines:
In `AndroidManifest.xml` add the below lines. If you already have them, you can skip this step.

```xml
<application
Expand All @@ -329,7 +329,7 @@ In `AndroidManifest.xml` add those lines:
...>
```

Content of the [@xml/data_extraction_rules](https://github.com/Automattic/Gravatar-SDK-Android/blob/trunk/gravatar-quickeditor/src/main/res/xml/data_extraction_rules.xml)
Create [@xml/data_extraction_rules](https://github.com/Automattic/Gravatar-SDK-Android/blob/trunk/gravatar-quickeditor/src/main/res/xml/data_extraction_rules.xml) or modify your file with the below rules.

```xml
<?xml version="1.0" encoding="utf-8"?>
Expand All @@ -353,7 +353,7 @@ Content of the [@xml/data_extraction_rules](https://github.com/Automattic/Gravat
</data-extraction-rules>
```

Content of the [@xml/backup_rules](https://github.com/Automattic/Gravatar-SDK-Android/blob/trunk/gravatar-quickeditor/src/main/res/xml/backup_rules.xml)
Create [@xml/backup_rules](https://github.com/Automattic/Gravatar-SDK-Android/blob/trunk/gravatar-quickeditor/src/main/res/xml/backup_rules.xml) or modify your file with the below rules.

```xml
<?xml version="1.0" encoding="utf-8"?>
Expand Down
9 changes: 3 additions & 6 deletions gravatar-quickeditor/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@

<uses-permission android:name="android.permission.INTERNET" />

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules">
<application>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
Expand All @@ -20,8 +17,8 @@
<provider
android:name=".QuickEditorFileProvider"
android:authorities="${applicationId}.com.quickeditor.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/quickeditor_filepaths" />
Expand Down