I know how to deal with URLs such as: http://example.com/xyz. However, my URL contains question mark as follows: https://example.com/?xyz
So when I do the getIntent().getData().getPath()
I get the output as /
. The question marking is somehow limiting the processing. How do I deal with it?
Here is the intent-filter
in my manifest
:
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="example.com" android:scheme="https"></data>
</intent-filter>
Here is the code from my Activity
:
if (getIntent() != null && data != null && data.getPathSegments().size() >= 1) {
Log.d("tagit", getIntent().getData().getPath().toString());
}
Now, the log shows blank.