Start another activity with intent-filter inside TWA app created by Bubblewrap

155 Views Asked by At

I have an android app built with Bubblewrap and want to open an activity when custom link clicked href="my-app://open-activity" My activity is declared like this:

<activity
        android:name=".TestActivity"
        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:host="open-activity"
                android:scheme="my-app" />
        </intent-filter>
    </activity>

but when I click on that link application terminated and get closed. What's wrong with this code?

0

There are 0 best solutions below