Tag: 深层链接

深入链接webview中的正确页面

我为我们的网站做了一个android webview应用程序。 现在,我想添加深层链接到应用程序,就像有人点击我们网站的链接时,您可以使用webview应用程序而不是Chrome浏览器打开它。 我将这些添加到我的清单中: <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="www.example.com" /> 现在,当我点击一个与我们相关的链接时,它会打开webview应用程序,但是它没有打开正确的页面,它只是再次启动应用程序。 但是我想直接打开webview应用程序中的正确页面。 编辑: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //added Intent intent = getIntent(); String action = intent.getAction(); Uri data = intent.getData(); 但似乎没有使用变量操作和数据。 我加载这样的webview(三种语言)。 //loads the main website //sets the matching language web2.clearCache(true); String loc […]