My app handles deep links. And when I try to retrieve my deep link URL, I do get not the full URL (without query params).
My AndroidManifest:
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="www.test.com"
android:scheme="testlink" />
</intent-filter>
For example, there is a deep link which I need to handle: testlink://www.test.com/strategy?year=2021
And inside activity I'm trying to get data:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String url = getIntent().getData().toString();
}
And I get a URL like this: testlink://www.test.com/strategy? but expected testlink://www.test.com/strategy?year=2021 . Query params are clipped.
Why might this be happening? Please, help me.
NOTE: with HTTPS or HTTP scheme I get the URL from intent as expected, but when I use custom scheme query params are lost