I have implemented deep linking in my app. I added this intent filter in my manifest file, and the deep linking is working.
the accepted answer didn't work for me, here is what did:
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
finish();
from the official doc:
If set, and the activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent.