I'm working on an Android app that handles intents for certain http(s) links. It works in most cases, but not for clicks on links in Chrome, due to this bug/missing feature. In short, Chrome doesn't broadcast an intent for those clicks. :/
That may be fixed eventually, but in the meantime, does anyone know a workaround?
If I controlled the links themselves, I could use my own HTTP scheme, e.g. myapp://..., or I could use JavaScript to fake a button click, both of which send the intent...but I don't control the links.
Specifically, I'd like to handle links like http://github.com/snarfed. My activity's definition in AndroidManifest.xml
is below. It correctly receives intent broadcasts for these kinds of link clicks from other apps, just not from Chrome.
<activity android:name="MyApp" android:exported="true">
<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:scheme="http" />
<data android:scheme="https" />
<data android:host="github.com" />
</intent-filter>
</activity>