-
Notifications
You must be signed in to change notification settings - Fork 528
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
IntentFilterAttribute is missing PathSuffix and PathAdvancePattern #8235
Comments
It looks like this is split between src/Mono.Android/Android.App/IntentFilterAttribute.cs |
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 |
It looks like we have this: Perhaps I can look at extending it to generate the code we need. |
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. |
Fixes: #8235 Context: #8272 Add the following properties to `IntentFilterAttribute` to allow the various `AndroidManifest.xml` [`<data/>`][0] attributes to be generated: - `IntentFilterAttribute.DataPathSuffix` generates [`//intent-filter/data/@pathSuffix`][1]. - `IntentFilterAttribute.DataPathSuffixes` generates [`//intent-filter/data/@pathSuffix`][1]. - `IntentFilterAttribute.DataPathAdvancedPattern` generates [`//intent-filter/data/@pathAdvancedPattern`][1]. - `IntentFilterAttribute.DataPathAdvancedPatterns` generates [`//intent-filter/data/@pathAdvancedPattern`][1]. Note that while we have a script to detect new elements added to `AndroidManifest.xml`, the code must be written manually. TODO: Issue #8272 to automate this code generation. [0]: https://developer.android.com/guide/topics/manifest/data-element [1]: https://developer.android.com/guide/topics/manifest/data-element#path
Fixes: #8235 Context: #8272 Add the following properties to `IntentFilterAttribute` to allow the various `AndroidManifest.xml` [`<data/>`][0] attributes to be generated: - `IntentFilterAttribute.DataPathSuffix` generates [`//intent-filter/data/@pathSuffix`][1]. - `IntentFilterAttribute.DataPathSuffixes` generates [`//intent-filter/data/@pathSuffix`][1]. - `IntentFilterAttribute.DataPathAdvancedPattern` generates [`//intent-filter/data/@pathAdvancedPattern`][1]. - `IntentFilterAttribute.DataPathAdvancedPatterns` generates [`//intent-filter/data/@pathAdvancedPattern`][1]. Note that while we have a script to detect new elements added to `AndroidManifest.xml`, the code must be written manually. TODO: Issue #8272 to automate this code generation. [0]: https://developer.android.com/guide/topics/manifest/data-element [1]: https://developer.android.com/guide/topics/manifest/data-element#path
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
The text was updated successfully, but these errors were encountered: