I would like to have my application respond to the market link for my application. So the link is market://details?id=my.package.name. Now the reason I want this is so I can send out a link that will open the app if it is installed and open the market page if the application is not installed. The problem I am running into is that my application will respond to all market links and not just my applications link. The reason is the package name is defined in the query part of the Uri. Is there a way to filter an intent based on the query part of the Uri?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How can I create this custom Bottom Navigation on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
From Android API 19, you can do it, using
ssp
,sspPrefix
orsspPattern
. Example:With such filter, the OS will offer your app only for URLs with
id=com.example.test
parameter, and won't offer it when there is no such parameter. But this works only on Android 4.4+, older versions will ignoresspPrefix
.See also this article: https://chris.orr.me.uk/android-ssp-data-intent-filter/.
No, sorry, you cannot. You can constrain a filter based on everything to the left of the
?
, but that's it.