Reputation: 4333
Reading the docs on the <data>
element of android manifest, three different path specification rules are shown:
android:path
- corresponding to PATTERN_LITERAL of the PatternMatcher classandroid:pathPrefix
- corresponding to PATTERN_PREFIX of the PatternMatcher classandroid:pathPattern
- corresponding to PATTERN_SIMPLE_GLOB of the PatternMatcher classBut on the docs of the PatternMatcher class there is also a PATTERN_ADVANCED_GLOB, yet the manifest documentation does not seem to mention it anywhere. Is it possible to use PATTERN_ADVANCED_GLOB in the manifest file? What is the syntax?
Upvotes: 3
Views: 1586
Reputation: 7718
Seems that android:pathAdvancedPattern
was introduced in API26 but only documented in late 2022 (between September and December)
Note: R.attr.pathAdvancedPattern
documentation was added early 2021 with the the API 31 (Android S) documentation drop.
H/T https://proandroiddev.com/how-to-handle-deep-link-with-complex-path-like-this-811216a0c802
The pathAdvancedPattern is claimed to work with API 26, but experiments on the Pixel emulator have shown that prior to API 31, the attribute is ignored and intent-filter accepts any path. Perhaps the behaviour will be different when testing on real devices and devices with shells from other vendors. I’ve also tested pathAdvancedPattern on my Samsung, One UI 4.1, Android 12.0 and the behaviour was not different.
Upvotes: 1
Reputation: 12121
No.
Reminder, PATTERN_ADVANCED_GLOB was only introduced in API 26 for the PatternMatcher class.
Intent filters in the manifest have limited matching capability, and any change would have to maintain backward compatibility.
See: How to use PathPattern in order to create DeepLink Apps Android?
Upvotes: 4