
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
cordova-plugin-x5-tbs-gaubee
Advanced tools
Use Tencent Browser Service(TBS) instead of System WebView for Cordova App
把Cordova
的WebView
替换为腾讯的X5。使用腾讯TBS完整版SDK。
Crosswalk
比较,X5
内核仅增加不到300KB左右的apk
大小。WebView
造成的兼容性问题。cordova plugin add cordova-plugin-x5-tbs
为确保App启动后即启动X5内核,需要在项目的MainActivity
的onCreate
方法内,增加以下代码:
QbSdk.initX5Environment(this, null);
另出于某些玄学原因,如应用出现Crash,请手动将以下权限复制入AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!-- 硬件加速对X5视频播放非常重要,建议开启 -->
<uses-permission android:name="android.permission.GET_TASKS" />
X5:tbs_sdk_thirdapp_v4.3.0.1148_43697_sharewithdownloadwithfile_withoutGame_obfs_20190805_175505.jar
你当然可以手动升级到X5内核最新版,或者替换成精简版内核。你只需要删除platforms/android/libs/tbs_sdk_*.jar
,替换为你需要使用的版本即可。这会使此插件无法通过cordova plugin remove
等指令被完全删除,还请注意。
此项目继承自项目:https://github.com/offbye/cordova-plugin-x5engine-webview
与本项目有关的问题,如加载后无法正常启动,在本项目Issue区内提交新Issue即可。
X5相关问题,请参阅:X5技术指南
先测试是否是64位程序的问题。修改platforms/android/build.gradle,在productFlavors
之下,armv7
之上,加入ndk{abiFilters "armeabi"}
,再看看是否有问题。该条问题见:https://x5.tencent.com/tbs/technical.html#/detail/sdk/1/34cf1488-7dc2-41ca-a77f-0014112bcab7
请使用官方TBS Studio测试,如其安装的TBS Demo左上角仍显示Sys core
,证明X5内核可能无法被第三方App调用。请参阅X5技术指南或反馈到X5官方。
FAQs
Use Tencent Browser Service(TBS) instead of System WebView for Cordova App
We found that cordova-plugin-x5-tbs-gaubee demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.