Skip to content

IntentFilterAttribute is missing PathSuffix and PathAdvancePattern #8235

Description

@Digifais

Android application type

Classic Xamarin.Android (MonoAndroid12.0, etc.), .NET Android (net7.0-android, etc.)

Affected platform version

Xamarin.Android 13.2.0.6, .NET 7.0.306

Description

IntentFilterAttribute is missing PathSuffix and PathAdvancePattern, which were introduced in API 31. Cfr: https://developer.android.com/guide/topics/manifest/data-element#path

Steps to Reproduce

Add an IntentFilterAttribute to any activity and you see that those two data element attributes are not exposed.

Did you find any workaround?

You can manually add this to your Android Manifest instead of using an IntentFilterAttribute.

Relevant log output

No response

Activity

  1. added
    Area: Mono.AndroidIssues with the Android API binding (Mono.Android.dll).
    needs-triageIssues that need to be assigned.
    on Aug 3, 2023
  2. jpobst commented on Aug 3, 2023

    @jpobst
    Contributor

    @dellis1972 @jonathanpeppers

    It looks like this is split between Mono.Android and Xamarin.Android.Build.Tasks, is this something you guys normally handle?

    ‎src/Mono.Android/Android.App/IntentFilterAttribute.cs
    src/Xamarin.Android.Build.Tasks/Mono.Android/IntentFilterAttribute.Partial.cs

  3. jonathanpeppers commented on Aug 3, 2023

    @jonathanpeppers
    Member

    I don't think anyone is doing anything for these. The build tasks part is what emits the XML during the build.

    How do we make it part of the binding process for new API levels? /cc @jonpryor

  4. jpobst commented on Aug 3, 2023

    @jpobst
    Contributor

    It looks like we have this:
    https://github.com/xamarin/xamarin-android/tree/main/build-tools/manifest-attribute-codegen

    Perhaps I can look at extending it to generate the code we need.

  5. jpobst commented on Aug 7, 2023

    @jpobst
    Contributor

    Given the timelines for .NET 8, I think I will forgo writing a tool to do this for now, and manually add these requested attributes using this as a guide: #3810

    For .NET 9 we should probably look at developing a tool to automatically pull in new attributes and generate the needed code.

  6. added this to the .NET 8 milestone on Aug 7, 2023
  7. locked and limited conversation to collaborators on Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: Mono.AndroidIssues with the Android API binding (Mono.Android.dll).

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions