java - Opening Android application from website not working -


i want implement such functionality in simple android app: when user visits link (www.example.org let's say) in web browser - android os should open android application if installed.

i tried play intent-filters this:

<activity         android:name=".mainactivity"         android:label="@string/app_name"         android:theme="@style/apptheme.noactionbar">          <intent-filter>             <action android:name="android.intent.action.view" />              <category android:name="android.intent.category.default" />             <category android:name="android.intent.category.browsable" />              <data                 android:host="example.org"                 android:pathpattern="/.*"                 android:scheme="http" />              <data                 android:host="www.example.org"                 android:pathpattern="/.*"                 android:scheme="http"/>         </intent-filter>          <intent-filter>             <action android:name="android.intent.action.main" />              <category android:name="android.intent.category.launcher" />         </intent-filter>     </activity> 

but it's not working @ in google chrome mobile browser. in firefox, when visit link such android icon on right side of search bar:

enter image description here

when press icon - app opens. still not want achieve.

any idea why code above doesn't work? tried many variations of intent-filter declarations found on internet nothing seem work. have nexus 5 device android 6 installed.

try this, removing path pattern:

<intent-filter>     <data android:scheme="http" android:host="twitter.com"/>     <action android:name="android.intent.action.view" /> </intent-filter> 

more info: launch custom android application android browser


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -