par*_*kod 5 android webview cordova cordova-plugins openhab
我正在使用来自Ajax" https:// username:password@home.myopenhab.org/rest/events?topics = smarthome / "的URL来使用Cordova从服务器获取客户端应用程序中的SSE(服务器发送事件).
注意:两个URL(" https://开头的用户名:password@home.myopenhab.org/rest/events主题=智能家居/ "和" http://192.168.0.1/rest/events?topics=smarthome/ "),与"cordova-crosswalk-plugin"工作正常,但我不想使用crosswalk插件,因为要求从谷歌播放下载一些依赖应用程序.
var eventSource = new EventSource(" +“url”+ /rest/events?topics=smarthome/*");
eventSource.addEventListener(‘message’, function (eventPayload){
//not entering here.
}
Run Code Online (Sandbox Code Playgroud)
我在这里找到了答案,我会在这里说:
原因是您的 URL 使用https
您可以尝试删除onReceivedSslError
方法\cordova\platforms\android\CordovaLib\src\org\apache\cordova\ CordovaWebViewClient.java
然后加handler.proceed()
归档时间: |
|
查看次数: |
276 次 |
最近记录: |