简体   繁体   English

将“ Webview”嵌入到“ Chrome应用程序”然后“部署到移动设备”是否有效?

[英]Does embedding a “Webview” into a “Chrome App” then “Deploy To Mobile” work?

I grabbed the mobile chrome apps "Browser Sample" from: 我从以下位置抓取了移动Chrome应用“浏览器示例”:

https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/webview-samples/browser . https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/webview-samples/browser

Works fine on local windows 7 machine, BUT, attempting to test via CADT and CDE, I would get a blank Webview. 在本地Windows 7计算机上运行良好,但是尝试通过CADT和CDE进行测试,我将得到一个空白的Webview。 Attempting via CCA got this output in the terminal: 通过CCA尝试在终端中获得以下输出:

cca v0.4.3
## First-time build. Detecting available SDKs:
Android Development: SDK configured properly.
## Running Cordova Command: platform add android
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: com.your.company.BrowserSample
        Name: Browser Sample
        Android target: android-19
Copying template files...
Project successfully created.
## Updating plugins based on manifest.json
Permission not recognized by cca: webview (ignoring)

The last line (Permissions...) may be the issue or the Android target. 最后一行(Permissions ...)可能是问题或Android目标。 Has anyone had success with getting the Chrome Apps Webview to deploy to mobile (android)? 有没有人成功将Chrome Apps Webview部署到移动设备(android)?

UPDATE: It appears the tag is not yet supported in the Mobile Chrome Apps: 更新:看来Mobile Chrome Apps中尚不支持该标记:

From: https://developer.chrome.com/apps/chrome_apps_on_mobile 来自: https : //developer.chrome.com/apps/chrome_apps_on_mobile

However, not all Chrome JavaScript APIs are implemented. And not all Chrome Desktop features are available on mobile:

no <webview> tag
no IndexedDB
no getUserMedia()
no NaCl
You can track progress from our API Status page.

Is there a work around for bringing third party content into the mobile chrome app? 是否可以解决将第三方内容引入移动chrome应用程序的问题?

Suggestion to Mobile Chrome Apps Team, it seems the apps host browser is called "Webview" (Crosswalk?) and their is at TAG called Webview. 向移动Chrome应用程序团队的建议,看来应用程序宿主浏览器称为“ Webview”(Crosswalk?),而位于TAG的名称为Webview。 Maybe we need new terms to describe each piece of the puzzle. 也许我们需要新的术语来描述每个难题。 How about Crosswalk (host) and ChromeView (tag)? Crosswalk(主机)和ChromeView(标签)怎么样?

Indeed, we do not support the <webview> tag, but Chrome Apps for Mobile do support iframes (unlike on desktop), so you may use that as a fallback perhaps. 实际上,我们不支持<webview>标记,但是Chrome Apps for Mobile确实支持iframe(与台式机不同),因此您可以将其用作备用。

Agree that there is some terminology confusion with Android/iOS WebView component and the chrome apps tag -- but eventually it makes sense. 同意Android / iOS WebView组件和chrome apps标签存在一些术语上的混淆-但最终这是有道理的。 All platforms have a "native" host with privileged api access, and can embed external content in an unprivileged context. 所有平台都有一个具有特权api访问权限的“本机”主机,并且可以在不受特权的上下文中嵌入外部内容。

Also, our list of caveats is kept up to date on github. 另外,我们的警告列表在github上保持最新。 We now support getUserMedia on Android (thanks crosswalk and kitkat webview!), and IndexedDB on Android and iOS8. 现在,我们在Android(感谢crosswalk和kitkat webview!)上支持getUserMedia,并在Android和iOS8上支持IndexedDB。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM