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
Post a Comment