Deeplink - not working on Android - clicking a link in chrome browser to launch app

I am testing a deeplink scenario where the app intent url is embedded as a link in another web application. On tapping on the link in the web application from a browser, the app should launch - which is working as expected manually. But, when performed through appium automation, the intent is not launching the app, but the web version of the app is launched. The intent URL will be populating dynamically on selection of values in the web application. Any help is appreciated.

Appium Version - 1.18.3
Browser - Chrome
Platform - Android
Selenium Version - 3.141.59

why you using browser? there is direct command in appium for android app. we use it to test our deep links with zero problem. ->

The parameters that is being passed along with the URL will be generated dynamically based on the values that you select in the web application. The URL is always dynamic.

I have found a solution and able to resolve the issue by changing to NATIVE context before clicking the link and identifying the link as a native element. If not changing the context and continue working with webview, it is not launching the app, but when the linked is clicked as a NATIVE element, it works as expected.

How we change NATIVE context, please!!