Android Applink in multiple applications with the same host

42 views Asked by At

I am using same host for mobile applications.

I can complete an applink for a single application and single host, it works.

 <activity
        android:name=".ui.applink.ApplinkActivity"
        android:launchMode="singleTask"
        android:exported="true">

        <tools:validation testUrl="www.website.com" />
        <meta-data
            android:name="android.app.lib_name"
            android:value="" />

        <!-- App link -->
        <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="https" />
            <data android:host="website.com" />
        </intent-filter>
        <!-- end: App link -->
    </activity>

But I want to open different applications according to different data coming from the links on a single host.

I want to open application according to appName.

The link structure is as follows:

www.website.com/#!/erp?token=xxx&appName=app1

www.website.com/#!/erp?token=xxx&appName=app2

www.website.com/#!/erp?token=xxx&appName=app3

I did some research on this. But there are only single host single application examples. Does anyone have any ideas on this subject? How can I make the necessary configurations for this?

Maybe, this link helps https://developer.android.com/guide/topics/manifest/data-element

0

There are 0 answers