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

Navigation after file share intent is not working #11754

Open
daydar-ilx opened this issue Nov 30, 2022 · 6 comments
Open

Navigation after file share intent is not working #11754

daydar-ilx opened this issue Nov 30, 2022 · 6 comments
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@daydar-ilx
Copy link

daydar-ilx commented Nov 30, 2022

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

  1. Create a File > New .NET MAUI app
  2. Add to the MainActivity the Intent Filters Intent.ActionSend, Intent.ActionView to allow deep linking / opening our Maui app from a URL
[IntentFilter(
    new[] { Intent.ActionSend, Intent.ActionView },
    Categories = new[] { Intent.CategoryDefault },
    DataMimeType = @"application/pdf")]
  1. Set LaunchMode = LaunchMode.SingleTop in Activity
  2. Add a GoToAsync() call for another page in OnNewIntent()
  3. Build and run the app
  4. 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

@daydar-ilx daydar-ilx added the t/bug Something isn't working label Nov 30, 2022
@PureWeen PureWeen added area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/android 🤖 labels Nov 30, 2022
@PureWeen PureWeen added this to the Backlog milestone Nov 30, 2022
@ghost
Copy link

ghost commented Nov 30, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@MauriceMarschik
Copy link

Any news on this?
I am also trying to implement receiving shared files in my app.
I thought it is a standard feature for many apps but it turns out to be a complete nightmare to implement in MAUI.
On Android, Shell seems to produce many issues.
On Windows I have not found a way to actually get access to the shared file.
Haven't tried iOS or mac yet.

@itldg
Copy link

itldg commented May 25, 2023

I am also very interested in this question

@itldg
Copy link

itldg commented May 25, 2023

我检查了你的代码,没有什么问题,只是一些大小写错误

I checked your code, there is nothing wrong with it, just some local capitalization errors

@pledi
Copy link

pledi commented Jul 6, 2023

The if check in the example should be
if (intent.Action == Intent.ActionSend) not if (Intent.Action == Intent.ActionSend)

same capitalization error in the ActionView check.

@homeyf homeyf added the s/triaged Issue has been reviewed label Sep 4, 2023
@homeyf
Copy link
Collaborator

homeyf commented Sep 4, 2023

Verified this issue with Visual Studio Enterprise 17.8.0 Preview 1.0. Can repro on android platform with sample project.
https://github.com/daydar-ilx/NavigationAfterIntentBug
image

@homeyf homeyf added the s/verified Verified / Reproducible Issue ready for Engineering Triage label Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants