jquery - open android app if installed or redirect to play store -


i'm using intent-filter:

<intent-filter>     <data         android:host="details"         android:scheme="market">     </data>     <action android:name="android.intent.action.view" />     <category android:name="android.intent.category.default" />     <category android:name="android.intent.category.browsable" />     <category android:name="android.intent.category.launcher" /> </intent-filter> 

server side this:

$(document).on("click", "#download", function () {     window.open("market://details?id=com.myapp.android", ''); return false; }); 

so whenever user click on 'download' button, if app installed, ask user open in app. if app not installed, direct user google play store.

my issue is, intent-filter, scheme , host not specific, other apps might use "market://details?...." open download page in google play store, trigger app. want more this:

<intent-filter>     <data         android:host="details?id=com.myapp.android" <!--here want more specific-->         android:scheme="market">     </data>     <action android:name="android.intent.action.view" />     <category android:name="android.intent.category.default" />     <category android:name="android.intent.category.browsable" />     <category android:name="android.intent.category.launcher" /> </intent-filter> 

but found out host contains ?... doesn't work. wondering there way can make intent-filter more specific other app won't trigger it?


Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -