-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability for branded APKs to deep link/register intents to wildcard domains #310
Comments
@mrjones-plip @kennsippell I am slightly concerned that wildcards in the intent might be more trouble than it is worth in the long term (e.g. when we go to fix #308). Auto-verifying a wildcard intent in Android 12+ is going to require the The Android docs I linked note that registering multiple links for the intent works different from a wildcard intent. When multiple links are registered, the Also, for what it is worth, additional custom links can already be registered by specific brands just by creating a custom <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="org.medicmobile.webapp.mobile">
<application>
<activity android:name="AppUrlIntentActivity"
android:launchMode="singleInstance"
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="@string/scheme" android:host="not.app_host.com" android:pathPattern=".*"/>
</intent-filter>
</activity>
</application>
</manifest> When the brand gets built, this AndroidManifest gets merged with the |
Thanks for the update @jkuester ! tl;dr - feel free to make this work at scale using the best means possible. I think using multiple links might be more scalable than a wildcard per you above concerns. My detailed thoughts below. cc @kennsippell and @dianabarsan and @Hareet I think it is fair to make this somewhat difficult, but possible, for a national scale deployment with multiple CHT instances, but easy for a single CHT instance.
I believe this means we can fix #308, again presuming CHT Core/ <application>
<activity android:name="MainActivity">
<intent-filter android:autoVerify="true">
<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="www.example.com" />
</intent-filter>
</activity>
<activity android:name="SecondActivity">
<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="https" />
<data android:host="www.example.net" />
</intent-filter>
</activity>
</application> On the server side of the equation it's a huge benefit to use a single APK, like in #309, as it means there's just a single |
I've updated #311 to implement this via 47 unique intents in AndroidManifest.xml. |
What feature do you want to improve?
Right now we tightly bind the APKs intent to the
app_host
(see step 3 in "New Brand"). This does not enable a way to link to something like*.cht.domain.com
.Describe the improvement you'd like
Enable an extensible way to add a wildcard domain for all intents.
Describe alternatives you've considered
NA
Additional context
This will work well when we deliver on #309. We also already have a deployment that needs this.
The text was updated successfully, but these errors were encountered: