Skip to content Skip to sidebar Skip to footer

Android Deep Linking Not Working On Webview

I'm facing an issue with deep linking and Android filters. This is the manifest's intent part.

Solution 1:

please try below example which will open your application from webview.


    public class HTMLActvity extends AppCompatActivity {

        private WebView mWebView;

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_htmlactvity);
            mWebView = (WebView) findViewById(R.id.webView1);

            //webView.loadUrl("http://www.google.com");
            mWebView.getSettings().setJavaScriptEnabled(true);
            String customHtml = "<a href=\"https://www.example.com\">Open in app</a>";
            mWebView.loadData(customHtml, "text/html", "UTF-8");
        }
    }

    deep link activity register for www.example.com

  <activity android:name=".DeepLinkActivity">
            <intent-filter android:autoVerify="true">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="http" android:host="www.example.com" />
                <data android:scheme="https" android:host="www.example.com" />
            </intent-filter>

        </activity>

please let me know if these doesen't work for you.


Post a Comment for "Android Deep Linking Not Working On Webview"