chrome extension auto-update strategy - google-chrome-extension

I want to update my chrome extensions automatically or via command line. These could be archived using Autoupdating, but only for hosted extension. Autoupdating is not supported for extension hosted in Chrome Web Store. Manual updating through web portal is very tiring.
It is possible to use directly linking js file to external web site, but it will not work for offline use case. We could add appcache to background page, but will that work?
An desperate approach is store js files in indexedDB and inject it.
Is there any better solution?

Related

Is it possible to autoupdate a chrome extension published outside the market?

I have a chrome extension that i built for my company employees,
we have our own instance of google apps #ourcompany.com
I have a gae app that tells the extension that it needs to be updated but the actual update process has to be done manually.
is there a way where i can do this update automatically once it's available?
You should publish your app to Chrome Web Store, and enjoy the auto-update process it offers, unless it's impossible due to CWS policies or packaging complications like Native Hosts/NPAPI.
When you do, you have an option to restrict installs to users of your Google Apps domain.
There are legitimate cases when you don't want to migrate over to CWS.
If you have a way to force install of your extension (ideally via Group Policy) and not concerned by tightening of security for Windows, you can just use update_url field in the manifest.

Do I need to create both an extension & packaged app if I want chrome.socket and Context Menus?

I am developing a chrome extension/app that requires
communicate with Intranet services in UDP binary protocol using chrome.socket APIs
need to extract DOM content from non-app web pages. This could be done using bookmarklet, Browser Actions, page actions, or chrome context menus.
There are two chrome.contextMenus APIs
http://developer.chrome.com/apps/contextMenus.html
http://developer.chrome.com/extensions/contextMenus.html
One for Packaged App, another for Extensions. The former only insert contextMenus to Packages Apps, not normal web pages.
If I need both chrome.socket & invoking from normal webpage capability, do I need to create both an extension as well as an app? That would be very confusing to end users.
Yes, you need both the app and the extension. Apps are intentionally devoid of APIs that modify web pages. That's where extensions come in.
I ran into the same problem and had to make two separate apps for exactly the same reasons. (JSTorrent contextmenu extension && JSTorrent).
I believe there are ways to trigger the install dialog from one to the other, but I have not tried to do this yet. If somebody had examples for how to do this, that would be great to add here!
Consider using <webview> in an app. You'll be able to display web content there, and you can more easily communicate between the app and the content. It will result in a single installable item.

How integrate chrome application with extension?

I'm writing an extension.
A part of this extension contains an html page.
I'd call that page, also as a Google Apps,
inserting an icon between applications of chrome.
It's possible create a manifest file to integrate the chrome app with chrome extension?
No. You'd create both an app an an extension, then encourage the user to install both if you detected that one wasn't installed.
There is an outstanding feature request to allow bundled installations of multiple apps/extensions.

automate chrome extension installation when user access my website

i need my chrome extension to be downloaded and installed automatically, when user access my website from Google chrome.
my extension is stored in my web-server, should i need to store the extension in google web store for the above purpose.
is it possible to provide a shortcut to my extension in desktop also.
i am able to manually install the extension, but need to installed automatically using java-script or any other method
i have found some similar post using registry editing etc, but this will not meet my requirement.
Security restrictions prevent an extension from being installed from a web site other than the Chrome Web Store. You cannot bypass this restriction without control of the end-user machine.
The Web Store does not provide any mechanism for automatic extension installation. (This is a very good thing.)
On a standard Chrome installation, the only way to install an extension outside of the Web Store is by dragging a crx file onto the Extensions preferences page (chrome://extensions).
If you have administrative control of the target computers that the extension is to be instaled on, you can write a script that installs the extension.

Use Autoupdating in Google Chrome Web Store

I'm making an extension for Google Chrome and I use code for autoupdating. This is because the extension isn't yet in Google Chrome webstore. But in a few days I will upload it to the Webstore and Google says you can use the Webstores autoupdating. But if I don't want to use that, will my app still update by my own server, like the way it does now?
Thanks in advance!!
I agree that docs are not very clear about this:
If you publish your extension using the Chrome Developer Dashboard,
you can ignore this page. You can use the dashboard to release updated
versions of your extension to users, as well as to the Chrome Web
Store.
But, I've tested it myself and your update_url setting in manifest.json will be overridden when you publish your extension via Chrome Web Store (CWS). In other words, publishing to CWS means that you can't use self hosted autoupdating anymore.
The reasons for that, that I could think of, may be as follows:
CWS wants to keep track of each extension stats (i.e. number of users using each extension)
privacy concerns (people don't want you to track them when they update extension)
security concerns (each extension update must go through CWS verification process)
If you want to track people (please don't) use Google Analytics on i.e. background page of your extension.

Resources