Developing a Chrome Desktop App - google-chrome

I would like to get a good tutorial on building a chrome desktop app.
I found some good ones for Chrome Extensions, Chrome Apps that don't do anything but redirecting to a website - What I want is an app like Any.do, like Google Keep, like Sunrise Calendar:
Apps that work without chrome and in a different window, but I hope I can make one with HTML-CSS-JS.
Do you know where I can find any documentation for that?
Thanks!!

This was previously called a "packaged app", and now is simply called "Chrome App", as opposed to what's called "hosted app" (link to a website).
The main documentation is here.
Note that Chrome Apps have, in some regards, more power, but they don't integrate much with the browser as Extensions do. They are intended to behave as self-contained. They don't work completely without Chrome, but they do have independent windows.

Related

Open Chrome app within Chrome's main window

I'm fairly new to Chrome app development and was wondering if it's possible to run an app within Chrome's main window, like the TweetDeck app.
Thanks!
No. Chrome Apps' current goal is to provide a native-like app experience outside the Chrome browser. Today, with the exception of certain privileged APIs, putting an app in Chrome would be... well, it would be a website.
If you want an app in one of Chrome's tabs, why not just build a website? What does the open web lack for your project?
Note that we have been thinking about what it would mean for an app to be a component inside a webpage. You could imagine a Facebook Like button or a Google+ +1 button implemented as an app in a webpage in the same way that those buttons today are usually implemented as iframes. There are some interesting security properties that this approach would bring over iframes. But again, this doesn't seem to be what you had in mind. What you had in mind appears to be a regular website.

Google Cast capabilities on Chrome Mobile

The goal is to start casting a content (video or other), from chrome mobile. Just like it is possible on standard Chrome for youtube or netflix videos, through the dedicated extension. I'm not talking about displaying the content of the mobile tab on the TV but just launching a cloud or LAN video on the big screen.
I know extensions are not available on chrome mobile (yet) but I was just wondering if there were any plans on making that possible in Chrome Mobile (with or without extensions).
It would be cool to be able to write a webapp that could launch videos on the big screen. The same webapp could be used on a smartphone, on a tablet or a on desktop computer.
Update:
I was thinking it could be easy to write a simple standalone js library for Google Cast device discovery. This could also be used to control the playback of cloud/LAN files within a webapp.
By looking at the chrome extension code, it looks like the discovery of Google Cast devices is done through the chrome.dial.* API. This API is not public yet. The extension asks for the following permissions:
"permissions": [
"tabs",
"tabCapture",
"dial",
"storage",
"networkingPrivate",
"https://*/*",
"http://*/*"
],
At this point, there is probably no hope of writing a standalone js library that would do the device discovery through chrome.dial.* as its access is restricted to extensions having asked for the specific permission.
Conclusion: To leverage the chrome.dial.* API, an extension is needed. And there are no public plans for extensions in Chrome Mobile.
Interesting links:
http://www.dial-multiscreen.org/dial-protocol-specification
http://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol
It is a little unclear what you're asking, but it seems like you're asking if there is any hope of getting a native extension on the mobile version of Chrome.
From https://developers.google.com/chrome/mobile/docs/faq
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.
I wouldn't plan on having extensions anytime soon. You could always write a native application to the operating system and broadcast from there.

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.

How to promote to install Chrome Extensions from your own website?

When I visit some websites, on top of the browser it promotes me to install Chrome Extension by saying "This website now has Google Chrome Extension... Install".
Anyone knows how to do this? Does Google already provide scripts to do this?
Example: Visit the following site using Chrome:
http://www.independent.co.uk
Now, it's possible to do what you need. Just follow this link, that explains how to use "inline" installation once you've published your app or extension at Chrome Webstore.
PS. Inline installation only works in Chrome 15+
Paul Kinlan's Badgemator is a good resource for this sort of thing. It creates a JavaScript snippet that you can put on your site in order to direct users to the webstore entry.
It doesn't attempt to mimic Chrome's infobar in the same way that The Independent does, but I personally think that's a good thing. Pretending to be part of the browser is a good way to confuse users, and isn't something I'd recommend (especially now that the infobar extends outside the browser window into Chrome's own UI).
What you're seeing is not built into Chrome, and not provided by Google.
The site will have some code that detects your browser agent (either via Javascript or a server-side script), sees that it's Chrome, and then adds some extra HTML/CSS/Javascript to make a mock UI element to grab your attention. Inspect the element to see what's really happening.
Another example is http://page2rss.com/page?url=www.stackoverflow.com/
Also, see Alerting website visitors that a chrome extension is available - how?
I wrote a jQuery extension that does just that: http://blog.dreasgrech.com/2012/01/promoting-your-chrome-extension-with.html
The simplest way to use it is to simply pass the ID of your Chrome extension:
$.fn.extInfobar({
id: 'nbilgjjflfiiijecdjpnbganoiafneph'
});
That generates the following:
From Chrome 15 there is API for this.
Just ask Chrome if your extension is installed.
You need to publish your extension in Google Chrome Extensions site, then you'll be able to publish it in your site.
You'll need to pay a one-time fee ($5) in order to get registered as a developer.
As of 06/12/2018, inline installation is deprecated. For more information, read our Chromium Blog post and Migration FAQ.
From: https://developer.chrome.com/webstore/inline_installation

Difference between Chrome Apps and Extensions

What is the difference between Chrome Apps and Extensions?
What can you do with apps that you can't do with extensions or vice versa?
Quoting from https://developer.chrome.com/webstore/apps_vs_extensions:
We’ve already had the concept of “web apps” in the browser for a few years, as something more rich and interactive than a website, but less cumbersome and monolithic than a desktop application. Examples include games, photo editors, and video players; all of these categories are viable as tightly focused apps running inside the browser. Google Chrome is just formalizing the web app concept in a way that will be familiar to anyone who’s used apps on a smartphone.
Extensions ... extend the functionality of Google Chrome and the websites being viewed in it. For example, they can extend Google Chrome by adding a new button to the address bar, such as an ever-present currency converter. Buttons like this can also apply to the current website being viewed—for example, click the currency converter button to convert all prices on the website you’re viewing. Similarly, you can introduce new items to the context menu, change the behavior of the omnibox (the input field on the address bar), access the user’s browsing history (with consent), and much more. You can alter web pages too—for example, embed a “mail this” button next to every link in every page, or customize the layout of your favorite website.
Compared to apps, extensions cut across websites and web apps; they are usually in effect across all websites (though some are site-specific). Apps don’t combine with other apps in this way; they run standalone, like any regular website.
(emphasis added)
From what I can tell, Chrome apps are just web applications that are registered with Chrome's Web Store (Gmail, e.g.). They're basically just glorified bookmarks. Google seems to have introduced them in order to make their browser more "operating system"-like, in preparation for tablets running Chrome OS. Since Chrome OS won't have any native applications apart from Chrome, they need some way for you to be able to "install" applications... even if those applications are just websites.
Extensions can actually affect the way that the browser behaves (ad blocking, e.g.). They can add buttons to Chrome's toolbars, intercept web requests, change the DOM, etc.
Here is an excellent resource from the Google Chrome team explaining the differences in detail.
It also contains a decision tree flow chart shown below.
Please refer to the following link:
(chrome app vs extension).
It basically says that there are two kinds of apps: hosted and packaged. Hosted apps are glorified bookmarks. But packaged apps provide you with a somewhat best of both worlds features- of both extensions and apps.
Extensions of course extend the core browser functionality providing little or no additional UI apart from what is already provided by chrome.
There are three Chrome distribution channels for developers.
In order of increasing functionality they are:
Chrome extensions — little to no UI
Chrome hosted apps
Chrome packaged apps
More information and fuller discussion is contained in this video.
quoting from http://www.chromeplugins.org/extensions/chrome-web-apps-extensions-spot-the-difference/
(as the explanation is very good)
Major Differences Between Chrome Extension and Chrome Web Apps
One of the major differences between Chrome extensions and web
applications is their location. Majority of the Chrome extensions can
be downloaded from Chrome Extensions Gallery whereas Chrome Web Apps
can be installed from Chrome Web Store.
Another major difference between Chrome extensions and web apps is the
fact that while extensions are used to enhance the functionality of
the Chrome Browser, web apps run within the browser having a different
user interface. Unlike web applications, extensions have little or
sometimes no UI component.
From a technical perspective the major difference between Chrome Apps
and extensions is the presence of “launch” parameter in apps which
indicates Chrome to show when user starts an application installed by
him/her.