detect if app is installed

248 views
Skip to first unread message

brillout.com

unread,
Dec 13, 2010, 10:54:03 AM12/13/10
to Chromium Apps
quote
"We will be adding support for client-side detection so that you can
determine whether a page is running in the context of your installed
app.
This will be landing over the next month ... and is one of several
features
that we want to get in before we call Apps ship-ready in Chrome. "

is this feature implemented now?

Aaron Boodman

unread,
Dec 13, 2010, 10:56:53 AM12/13/10
to brillout.com, Chromium Apps
Yes:

if (chrome.app && chrome.app.isInstalled) {
...

brillout.com

unread,
Dec 13, 2010, 11:06:03 AM12/13/10
to Chromium Apps
ty.
you mean if (chrome && chrome.app && ..
^^
do u have any public stats about the chrome web store?
and is there a way to retrieve the number of users of a chrome web app
solely client side?

Aaron Boodman

unread,
Dec 13, 2010, 11:09:08 AM12/13/10
to brillout.com, Chromium Apps
On Mon, Dec 13, 2010 at 8:06 AM, brillout.com <rom...@gmail.com> wrote:
> ty.
> you mean if (chrome && chrome.app && ..

You're right.

> do u have any public stats about the chrome web store?

No I don't.

> and is there a way to retrieve the number of users of a chrome web app
> solely client side?

You can use the technique above to record visitors that are using your
site in Chrome's app mode. You'll still have to send this data to a
server and aggregate it, though.

HTH,

- a

Carl

unread,
Dec 18, 2010, 7:13:27 AM12/18/10
to Chromium Apps
For a packaged app, is there a way for a running app to determine if
it was installed directly from the Web Store as opposed to being
installed from either:

a) the developer interface, via "load unpacked extension," or
b) a CRX file not received from the Web Store

?

TIA

Arne Roomann-Kurrik

unread,
Dec 20, 2010, 4:55:07 PM12/20/10
to Carl, Chromium Apps
It's a bit hacky but you could try reading the extension's own manifest file to check the update URL (see https://github.com/kurrik/chrome-extensions/blob/master/xhr-manifest/background.html for some code that reads its own manifest).  

Apps which have an update URL that points to the chrome web store cannot be installed from any other location, so if you see an url pointing to the Chrome web store, you know it was installed from there.  Presumably you want to prevent folks from modifying and distributing your app?  You'll need to make sure that your code is obfuscated (especially this check) to make it more difficult to bypass.

This doesn't really solve the "load unpacked extension" request though.

~Arne
Reply all
Reply to author
Forward
0 new messages