Can you create an intent filter based on query?

I would like to have my application respond to the market link for my application. So the link is market://details? 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?


No, sorry, you cannot. You can constrain a filter based on everything to the left of the ?, but that's it.

From Android API 19, you can do it, using ssp, sspPrefix or sspPattern. Example:

    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />

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 ignore sspPrefix.

See also this article:

Need Your Help

Show Selected Value in Dropdown

c# sql sql-server-2008 drop-down-menu

I have a form where a record can be viewed and updated. The data is being populated from a stored procedure. Everything populates fine except for my dropdown list. This is my code behind:

Retrofit doesn't trigger onError when using custom ErrorHandler

android retrofit rx-java

I'm using Retrofit 1.9.0, RxJava 1.0.10, RxAndroid 0.24.0 and OkHttp 2.4.0. When I'm setting custom ErrorHandler RxJava Subscriber methods aren't triggered. Why? Is it possible to change this behav...