-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Maui Android intent filter ActionView for MimeTypes not working #22261
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
@ninachen03 What do you mean with "Cannot repro it"? The app is crashing as well, isn't it? So you can repro it. I am using a Mac with Rider an did run it on a Google Pixel 4a with Android 13. |
@sven-s if you override createwindow in your app.xaml and return a new window that should work around the issue for now. |
@PureWeen CreateWindow creates already a new window. I do not understand, how to return a new window, if the method already does the job. Do you have any example code? |
@sven-s can you record a video? I tried to test your repro and it works fine for me
|
@PureWeen I recorded a video with the crash: https://app.screencast.com/ESAs9L6kW09D9 |
@sven-s So, I'm pretty sure this is the correct behavior and the recommendation from the exception is correct. If you modify your App.xaml.cs file so it looks like this public partial class App : Application
{
public App()
{
InitializeComponent();
}
protected override Window CreateWindow(IActivationState? activationState)
{
var windpw = new Window(new AppShell());
return windpw;
}
} And then you run your app, you'll notice that the pdf is launched in a new activity. here's the activity that is launched from the file app and here's the original app So, you basically have two active activities and thus need two separate windows to manage them. |
Description
I want to handle pdf files with a Maui App on Android. For that I use an intent filter.
When running the maui app on a real device and selecting the maui app as a destination from another app (like the tesla app of handle the pdf receipt), the maui app crashes, if it is already open. The crash log looks like:
LaunchMode is set up SingleTop, but that does not help.
Steps to Reproduce
I provided a minimal Maui app just with the intent filter attribute.
When you try to open(view) a pdf file with the installed maui app, the result will be
Link to public reproduction project repository
https://github.com/sven-s/OpenPdf
Version with bug
8.0.21 SR4.1
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 13
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: