Navigation after file share intent is not working
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 296
Description
Description
If you want to navigate to another page when an intent is called (e.g. to share a pdf file to the MAUI app) the app only opens on the MainPage without any further navigation.
I hope the approach in the reproduction project is the one of the right ways since I have not found any documentation for working with intents in the MAUI context properly.
Steps to Reproduce
- Create a File > New .NET MAUI app
- Add to the MainActivity the Intent Filters
Intent.ActionSend, Intent.ActionViewto allow deep linking / opening our Maui app from a URL
[IntentFilter(
new[] { Intent.ActionSend, Intent.ActionView },
Categories = new[] { Intent.CategoryDefault },
DataMimeType = @"application/pdf")]
- Set
LaunchMode = LaunchMode.SingleTopin Activity - Add a
GoToAsync()call for another page inOnNewIntent() - Build and run the app
- Open or share a pdf file from another app (e.g. my files app) to the MAUI app
Expected outcome: another page opens
Actual outcome: the MainPage is displayed
Link to public reproduction project repository
https://github.com/daydar-ilx/NavigationAfterIntentBug
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
No response
Relevant log output
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the public NavigationAfterIntentBug reproduction project and inspect MainActivity, especially the OnNewIntent() handler and its GoToAsync() call. Reproduce the file-share or open-intent flow on Android 12, then trace why the app remains on MainPage. Done means the intended page opens after the intent is received.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100