How to open a web page inside a chrome packaged app? - google-chrome

Just like Android has a webview inside which a webpage can be opened, is it possible to do the same using chrome packaged app?
To give an example, how about opening a youtube link inside a chrome packaged app and then playing around with its DOM elements and adding more functionality to it using the app?

You have to use webviews (like with Android) and then play with executeScript and insertCSS.
If you want a full example, I made a Chrome Packaged App for Google Play Music in 2013 (it could be deprecated) and the code is available on GitHub.

Related

Chrome webview application to load extension

Is it possible to have a webview application for a web page and load extensions in the application?
I have created a frameless wrapper for one of our web pages, so we can hide the chrome header. I am also using the stylebot extension to alter some elements in the page. It works fine inside chrome, but when I run the application the stylebot extension is not loaded.
Any idea how can I add the extension to the application?
Greatly appreciate your help on this
Thanks, Laszlo
A Google chrome extension have to be load in Google Chrome (or Chromium based browsers). The Google chrome extension API is not included in the webview engine.
You can open a frameless window with create method of the Google window API. You should add an handler to browser action click and create a window of with "popup" type and the url you want. It's not exactly what you are looking for but I don't know a better way to do it on Mac. Perhaps some one more familliar with that environement could help you.
An other far more complicated solution is to fork the Crhomium project and do what you want. But it demand a large developpement I think.

Chrome Package App - Webview for Mobile

I developed a chrome packaged app and was successful running it on a computer (Windows, Mac, Linux). Basically what the app does is it refers to another web application that I created as well with Google Maps Javascript API in it that displays the location using pushpins and I am displaying it using webview.
However, we need this app to be ported to a mobile device as well but when I tested on my Samsung Tablet with android version 4.4.2, the webview does NOT seem to work even if I enabled the "webview":"system" in the Manifest.mobile.json. Is there a way for me to achieve this in porting the chrome app to mobile using webview?
Any help is appreciated. Thanks in advance.
Nevermind, I have already read from the API and Libraries page of mobile chrome app under "APIs Coming in the Long Term" section in where webview is listed and so tag is not supported "yet".
https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/docs/APIsAndLibraries.md

How to start Chrome Hosted App in window?

So I know that 'Chrome Packaged App' will run in a window, I have tried to run the website I want in a <webiview> tag but it gets stuck at the beginning and I can't find a way to debug what's happenning inside that <webview> tag.
I now have tried to change the manifest to work as a 'Chrome Hosted App' but it keeps opening in a tab.
How do I start my app in a window, either by having it as a chrome hosted app?
Or by <webview> (if I find a way to debug it)?
As pointed here, a Chrome Hosted app can be open in a specific window if you enable this flag:
Enables the web app style frame for hosted apps
in chrome://flags.
Chrome's built-in developer tools can be used to debug packaged apps, extensions and webview as well as web pages (Right-click on any page element in webview and select Inspect Element).

Embedding a Google Chrome App into a web page for us in another browser

We have an test app in the Google Chrome Web Store to try and combat the upcoming demise of Java.
We had to go via the Google Web Store as our app required sockets. However, we need to embed this in our product, which uses the browser.
Is there a way to embed a Google Web App in another web page?
Use the appview tag to embed other Chrome Apps within your Chrome App. No other ways to embed the Chrome Apps.
Read about Chrome Apps Architecture.
Also read about Native Client. Maybe that is your way.

Does mobile Google Chrome support browser extensions?

Can I create a plugin or an extension for Google Chrome MOBILE (Android Google Chrome)?
If not, can I create an extension for Google Chrome (desktop), which will add a button in Google Chrome bar. This button will open the page in another web browser (in my own web browser), so, this button should launch my own web browser.
Extensions are not supported, see: https://developers.google.com/chrome/mobile/docs/faq .
Specifically:
Does Chrome for Android now support the embedded WebView for a hybrid native/web app?
A Chrome-based WebView is included in Android 4.4 (KitKat) and later. See the WebView overview for details.
Does Chrome for Android support apps and extensions?
Chrome apps and extensions are currently not supported on Chrome for
Android. We have no plans to announce at this time.
Can I write and deploy web apps on Chrome for Android?
Though Chrome apps are not currently supported, we would love to see great interactive web sites accessible by URL.
You can use bookmarklets (javascript code in a bookmark) - this also means they sync across devices.
I have loads - I prefix the name with zzz, so they are eazy to type in to the address bar and show in drop down predictions.
To get them to operate on a page you need to go to the page and then in the address bar type the bookmarklet name - this will cause the bookmarklet to execute in the context of the page.
edit
Just to highlight - for this to work, the bookmarklet name must be typed into the address bar while the page you want to operate in is being displayed - if you go off to select the bookmarklet in some other way the page context gets lost, and the bookmarklet operates on a new empty page.
I use
zzzpocket - send to pocket.
zzztwitter tweet this page
zzzmail email this page
zzzpressthis send this page to wordpress
zzztrello send this page to trello
and more...
and it works in chrome whatever platform I am currently logged on to.
Some extensions like blocksite use the accessibility service API to deploy extension like features to Chrome on Android. Might be worth a look through the play store. Otherwise, Firefox is your best bet, though many extensions don't work on mobile for some reason.
https://play.google.com/store/apps/details?id=co.blocksite&hl=en_US
Just use a different browser.
Follow the steps given below to install Chrome extensions on your Android device.
Step 1: Open Google Play Store and download Yandex Browser. Install the browser on your phone.
Step 2: In the URL box of your new browser, open 'chrome.google.com/webstore’ by entering the same in the URL address.
Step 3: Look for the Chrome extension that you want and once you have it, tap on 'Add to Chrome.’
The added Chrome extension will now be automatically added to the Yandex browser.
I imagine that there are not many browsers supporting extension. Indeed, I have been interested in this question for the last year and I only found Dolphin supporting add-ons and other cool features announced few days ago. I want to test it soon.