Skip to content

Use file picker for import on Android instead of showing manual instructions#30

Merged
danielchalmers merged 2 commits intomainfrom
copilot/add-file-picker-for-import-data
Oct 27, 2025
Merged

Use file picker for import on Android instead of showing manual instructions#30
danielchalmers merged 2 commits intomainfrom
copilot/add-file-picker-for-import-data

Conversation

Copy link
Contributor

Copilot AI commented Oct 27, 2025

The import data button in settings showed a message box with manual file opening instructions on Android, while using a native file picker on Windows.

Changes

  • Removed platform check in PickAndStartImport method in SettingsPage.razor
  • Android now uses FilePicker.PickAsync() like other platforms
// Before: Platform-specific behavior
if (DeviceInfo.Current.Platform == DevicePlatform.WinUI)
{
    var pickResult = await FilePicker.PickAsync();
    // ... import logic
}
else
{
    await DialogService.ShowJaMessageBox("Find the backup in your files app...");
}

// After: Consistent file picker across all platforms
var pickResult = await FilePicker.PickAsync();
if (pickResult == null)
    return;
App.ActivatedFilePath = pickResult.FullPath;
await StartImport();

MAUI's FilePicker supports Android natively, so the platform check was unnecessary.

Original prompt

Make the import data button in settings open a file picker on android instead of just showing a message box with insrtuctions on how to open the file manually


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: danielchalmers <7112040+danielchalmers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add file picker for import data button in settings Use file picker for import on Android instead of showing manual instructions Oct 27, 2025
Copilot AI requested a review from danielchalmers October 27, 2025 03:58
@danielchalmers danielchalmers marked this pull request as ready for review October 27, 2025 04:46
@danielchalmers danielchalmers merged commit b789d2a into main Oct 27, 2025
3 checks passed
@danielchalmers danielchalmers deleted the copilot/add-file-picker-for-import-data branch October 27, 2025 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants