android webview onloadresource,如何从Android中的Chrome Tabs获取回调,如web视图提供了shouldOverrideUrlLoading,onLoadR...

我正在尝试使用项目中的Chrome自定义标签替换网络视图.要替换webview,我需要在Android标签提供的Chrome标签中进行回调.所以在那里有任何可用的回调,如果可用,那么它们是什么?请提前帮助我.

解决方法:

您只能在Chrome自定义标签中提供以下回调:

/**

* Sent when the tab has started loading a page.

*/

public static final int NAVIGATION_STARTED = 1;

/**

* Sent when the tab has finished loading a page.

*/

public static final int NAVIGATION_FINISHED = 2;

/**

* Sent when the tab couldn't finish loading due to a failure.

*/

public static final int NAVIGATION_FAILED = 3;

/**

* Sent when loading was aborted by a user action before it finishes like clicking on a link

* or refreshing the page.

*/

public static final int NAVIGATION_ABORTED = 4;

/**

* Sent when the tab becomes visible.

*/

public static final int TAB_SHOWN = 5;

/**

* Sent when the tab becomes hidden.

*/

public static final int TAB_HIDDEN = 6;

要附加回调,请正常绑定到自定义选项卡服务,并在调用newSession()时传递回调.

标签:android,google-chrome,webview,chrome-custom-tabs

来源: https://codeday.me/bug/20190611/1217590.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值