手机收到信息看不到为startnet

求高手指点mina客户端接收不到消息
[问题点数:40分]
求高手指点mina客户端接收不到消息
[问题点数:40分]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
相关帖子推荐:
本帖子已过去太久远了,不再提供回复功能。工具导航地图
网站信息查询:-
搜索优化查询:-
域名IP类查询:
加密解密相关:-
编码转换相关:-
HTML相关类: -
Js/Css相关类: -
其他常用测试:-
其他类别查询:-
合作查询网站:-Android中监听Phonegap的webview的start,finish等事件
之前写过一篇捕获Phoengap的webview事件的方法,主要是在实现了CordovaInterface的Activity中,& 在onMessage中根据第一个参数的message name来判断webview的加载事件。不过如果是在Fragment中,一个Activity加载了多个包含了WebView的fragment的话,就无法在onMessage中判断到底是哪个WebView的加载事件。
经过尝试,发现,还是可以使用setWebViewClient的方式来,来重写WebViewClient的对应的onPageStart和onPageFinish等方法来处理加载事件
CordovaWebView webView = (CordovaWebView)findViewById(R.id.webView);&
&CordovaWebView webView = (CordovaWebView)findViewById(R.id.webView);[java] view plaincopyprint?CordovaInterface cordovaInterface = (CordovaInterface)&
&&&&&& CordovaWebViewClient cordovaWebViewClient = new CordovaWebViewClient(cordovaInterface, webView) {&
&&&&&&&&&& @Override&
&&&&&&&&&& public void onPageStarted(WebView view, String url, Bitmap favicon) {&
&&&&&&&&&&&&&& LogUtil.debug(&onPageStarted & + url);&
&&&&&&&&&&&&&& super.onPageStarted(view, url, favicon);&
&&&&&&&&&&&&&& progressBar.setVisibility(View.VISIBLE);&
&&&&&&&&&& }&
&&&&&&&&&& @Override&
&&&&&&&&&& public void onPageFinished(WebView view, String url) {&
&&&&&&&&&&&&&& LogUtil.debug(&onPageFinished & + url);&
&&&&&&&&&&&&&& super.onPageFinished(view, url);&
&&&&&&&&&&&&&& progressBar.setVisibility(View.GONE);&
&&&&&&&&&& }&
&&&&&&&&&& @Override&
&&&&&&&&&& public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {&
&&&&&&&&&&&&&& LogUtil.debug(&onReceivedError & + url);&
&&&&&&&&&&&&&& super.onReceivedError(view, errorCode, description, failingUrl);&
&&&&&&&&&&&&&& progressBar.setVisibility(View.GONE);&
&&&&&&&&&&&&&& errorView.setVisibility(View.VISIBLE);&
&&&&&&&&&& }&
&&&&&& };&
&&&&&& webView.setWebViewClient(cordovaWebViewClient);&
&&&&&& webView.loadUrl(url);&
&CordovaInterface cordovaInterface = (CordovaInterface)
&&&&&&& CordovaWebViewClient cordovaWebViewClient = new CordovaWebViewClient(cordovaInterface, webView) {
&&&&&&&&&&& @Override
&&&&&&&&&&& public void onPageStarted(WebView view, String url, Bitmap favicon) {
&&&&&&&&&&&&&&& LogUtil.debug(&onPageStarted & + url);
&&&&&&&&&&&&&&& super.onPageStarted(view, url, favicon);
&&&&&&&&&&&&&&& progressBar.setVisibility(View.VISIBLE);
&&&&&&&&&&& }
&&&&&&&&&&& @Override
&&&&&&&&&&& public void onPageFinished(WebView view, String url) {
&&&&&&&&&&&&&&& LogUtil.debug(&onPageFinished & + url);
&&&&&&&&&&&&&&& super.onPageFinished(view, url);
&&&&&&&&&&&&&&& progressBar.setVisibility(View.GONE);
&&&&&&&&&&& }
&&&&&&&&&&& @Override
&&&&&&&&&&& public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
&&&&&&&&&&&&&&& LogUtil.debug(&onReceivedError & + url);
&&&&&&&&&&&&&&& super.onReceivedError(view, errorCode, description, failingUrl);
&&&&&&&&&&&&&&& progressBar.setVisibility(View.GONE);
&&&&&&&&&&&&&&& errorView.setVisibility(View.VISIBLE);
&&&&&&&&&&& }
&&&&&&& };
&&&&&&& webView.setWebViewClient(cordovaWebViewClient);
&&&&&&& webView.loadUrl(url);
您对本文章有什么意见或着疑问吗?请到您的关注和建议是我们前行的参考和动力&&
您的浏览器不支持嵌入式框架,或者当前配置为不显示嵌入式框架。service是不是要等onStartCommand()执行完了才能接受到广播啊
[问题点数:40分]
service是不是要等onStartCommand()执行完了才能接受到广播啊
[问题点数:40分]
只显示楼主
取消只显示楼主
匿名用户不能发表回复!|
每天回帖即可获得10分可用分!小技巧:
你还可以输入10000个字符
(Ctrl+Enter)
请遵守CSDN,不得违反国家法律法规。
转载文章请注明出自“CSDN(www.csdn.net)”。如是商业用途请联系原作者。

我要回帖

更多关于 手机停机能收到信息吗 的文章

 

随机推荐