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

Android: Add import/export options for user data #10416

Merged
merged 1 commit into from Jan 30, 2022

Conversation

JosJuice
Copy link
Member

Apparently there are phones where accessing Dolphin's app-specific directory isn't just annoyingly hard but actually impossible. To give users of those phones at least some kind of way to manage their data (even if it's a lot less convenient than if we were allowed to let the user open the app-specific directory in a file manager), I'm adding a way to export the directory to a zip file and then import it back.

@JosJuice JosJuice force-pushed the android-import-export branch 2 times, most recently from 0c617ff to ecfa326 Compare January 30, 2022 18:26
Copy link
Member

@Simonx22 Simonx22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth noting, but not an issue with the code you added: the AlertDialog for user_data_export_success does not get recreated upon rotation. But this should probably be fixed in a separate pull request in the future. This also affects the AlertDialog prompt if you try to import.

Also, pressing Export User Data and just going back without saving is crashing the app.
Stack trace: https://gist.github.com/Simonx22/43f333a9bb6d93cdc41723669cec91f8

app:layout_constraintVertical_chainStyle="packed"
app:layout_constraintWidth_max="400dp" />

<Button
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The button text should be white. Try adding android:textColor="@color/dolphin_white"

Otherwise it looks like this in dark mode:

This also applies for button_export_user_data and button_open_system_file_manager.

Copy link
Member Author

@JosJuice JosJuice Jan 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want all buttons to have white text, is there no way to set that in the theme...? Ah well, I've done what you suggested for now. If it can be done in the theme, let's do that in another PR.

Copy link
Contributor

@JMC47 JMC47 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Latest version is working now. A bit cumbersome, but I think we want this immediately.

Apparently there are phones where accessing Dolphin's app-specific
directory isn't just annoyingly hard but actually impossible.
To give users of those phones at least some kind of way to manage
their data (even if it's a lot less convenient than if we were
allowed to let the user open the app-specific directory in a
file manager), I'm adding a way to export the directory to a
zip file and then import it back.
Copy link
Member

@Simonx22 Simonx22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm this works on Android 10 and 12. I'm not 100% familiar with the code but it looks sane.

@JMC47 JMC47 merged commit da05173 into dolphin-emu:master Jan 30, 2022
10 checks passed
@JosJuice JosJuice deleted the android-import-export branch January 30, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants