microsoft / WSA

Developer-related issues and feature requests for Windows Subsystem for Android
MIT License
1.46k stars 798 forks source link

Deep linking of apps not working on WSA #465

Closed n-kumari closed 4 months ago

n-kumari commented 8 months ago

Steps to reproduce

Create an Android app with activity TestActivity which has an intent filter of BROWSABLE.

    <activity android:name=".ui.TestActivity"
              android:exported="true"
              android:label="@string/app_name">
      <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="test" />
        <data android:host="*" />
      </intent-filter>
    </activity>

Create a link in browser using href as follows:

<a href="test://simple">TestApp</a>

✔️ Expected Behavior

Clicking on the link should open the app regardless of it is running or not.

❌ Actual Behavior

Clicking on the link only opens the app is it is not already running. If the app is in background, the app is not opened when link is clicked.

NOTE: The same sample app works as expected when running outside of WSA environment (i.e., on Android physical device or simulator)

Other Software

No response

Please specify the version of Windows Subsystem for Android

2309.40000.10.0

Windows OS build: 22000.2538

n-kumari commented 7 months ago

For my use case, the user leaves the app to perform authentication via browser. After successful authentication, the user is redirected back to the app using deep links. The redirection, however, is not happening when the app runs on WSA. When the app runs on regular Android device/simulator, the redirection after authentication works as expected.

parveen-bhatia commented 6 months ago

Any update on this @microsoftopensource ?

n-kumari commented 4 months ago

We don’t see this issue on a different profile on the same laptop and are no longer able to reproduce this. Closing the issue