关于js跳转原生activity的问题

不使用webview 能否在html页面里通过js访问到安卓原生activity界面

html 里面有一个a链接 我想这个点击这个a链接跳转到我写好的activity

通过添加schema是否可以实现?

能不能再具体一些,说详细点。

你这是做H5混合开发吗?去官网好好看看例子吧!

https://blog.csdn.net/wangkai0681080/article/details/50178507 去看一下能能解决您的问题。

https://blog.csdn.net/viewgroup/article/details/53606838

你这是混合开发,你可以看看这个安卓与html混合开发之原生与js相互调用

js应该不能直接调用activity吧

可以,比如你的连接是这个启动应用程序 ,然后在你的清单文件中相应的activity添加intent-filter










可以,比如你的连接是这个

```启动应用程序

然后在你的清单文件的响应的acitvity的添加intent-filter











最好用默认的浏览器先试一下,一般思路就是这样


可以,比如你的连接是这个【a href="myapp://jp.app/openwith?name=zhangsan&age=26">启动应用程序</a】然后在你的清单文件的响应的acitvity的添加intent-filter
【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="myapp" android:host="jp.app" android:pathPrefix="/openwith"/】
</intent-filter】

1.接入h5和本地接入jsbridge第三方框架,很好用https://github.com/lzyzsd/JsBridge。
2.使用cordova,这个比较好接入