Skip to content

Intent filter throws an exception in maui #8832

@hasankhan175

Description

@hasankhan175

Description

Sharing files to MAUI application using android Intent filter throws the following exception 'Cannot access a closed Stream.' What could be causing this?

Steps to Reproduce

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density, ScreenOrientation = ScreenOrientation.Portrait)]
[IntentFilter(new[] { Intent.ActionSend }, Categories = new[] { Intent.CategoryDefault }, DataMimeType = "application/*")]
public class MainActivity : MauiAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
if (Intent.Action == Intent.ActionSend)
{
}
}
}

Version with bug

6.0.408 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 11

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-hostingExtensions / Hosting / AppBuilder / Startuparea-core-lifecycleXPlat and Native UIApplicationDelegate/Activity/Window lifecycle eventsplatform/androids/needs-reproAttach a solution or code which reproduces the issues/no-recent-activityIssue has had no recent activityt/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions