简体   繁体   中英

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

I grabbed the mobile chrome apps "Browser Sample" from:

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. Attempting via CCA got this output in the terminal:

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. Has anyone had success with getting the Chrome Apps Webview to deploy to mobile (android)?

UPDATE: It appears the tag is not yet supported in the Mobile Chrome Apps:

From: 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?

Suggestion to Mobile Chrome Apps Team, it seems the apps host browser is called "Webview" (Crosswalk?) and their is at TAG called Webview. Maybe we need new terms to describe each piece of the puzzle. How about Crosswalk (host) and ChromeView (tag)?

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.

Agree that there is some terminology confusion with Android/iOS WebView component and the chrome apps tag -- but eventually it makes sense. All platforms have a "native" host with privileged api access, and can embed external content in an unprivileged context.

Also, our list of caveats is kept up to date on github. We now support getUserMedia on Android (thanks crosswalk and kitkat webview!), and IndexedDB on Android and iOS8.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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