11

I've thought about using Chrome and HTML5 local storage to create a useful app and sell it. The problem I think I would have, however, is the delivery mechanism to get this installed on one's computer. Let's say the app was wikipedia.com (although it isn't). Manually one can go there with Chrome, then choose the wrench icon, Tools, Create Application Shortcuts, and make a desktop and application menu icon for the app.

Okay, fine, but is there a way I can compose a web page link or form button such that it does this for me? In other words, one clicks a button or link and it shows the Create Application Shortcuts form. I am hoping that there's this little-known way on Google Chrome to use either HTML or Javascript to trigger showing that form.

As for those who don't have Chrome, I can detect that and give them a button they click that emails them. In the email, it will give them instructions for installing Chrome and then another link so that they can visit this page in Chrome in order to get the button that shows the Create Application Shortcuts form.

Volomike
  • 23,743
  • 21
  • 113
  • 209
  • BTW, Item 15 from here http://www.google.com/chrome/intl/en/webmasters-faq.html#tools has some tips on how to customize the Chrome app a little. However, the Gears Desktop API no longer works -- it's deprecated. (And I have Linux, which it never worked on.) – Volomike Sep 23 '11 at 18:00
  • BTW, if you visit this page http://www.google.com/support/blogger/bin/answer.py?hl=en&answer=41973 you will see an Install button. It is a simple form that lets you deploy an extension, but it still doesn't make a Chrome shortcut for it. It's a step in a good direction, however. – Volomike Sep 23 '11 at 18:16
  • Using a SendKeys approach (if one has Google Chrome installed), the keystroke path is ALT-F, then L, then S. That shows the dialog to make the shortcut. I wish I could do this via Javascript. – Volomike Sep 23 '11 at 18:28
  • Here is the start of something I found. It's called "Chromium Packaged Apps": http://code.google.com/chrome/extensions/apps.html – Volomike Sep 23 '11 at 18:34

1 Answers1

3

For now, until a better answer can be provided, this is sort of the technique for deploying a desktop app with Chrome, the manual way, and without having to register in the Chrome Store:

  1. After the user purchases a product, email them the serial number for registering their product and a web URL to install this new product.
  2. The web URL is the actual URL of the web app. However, it doesn't display its normal content by default. Instead, the web app is in "installer mode". It does this by looking at a 200 year persistent, encrypted, registration cookie that may not already be installed. (Note if they delete cookies, there's no harm done -- it just asks them to re-register again.)
  3. The first thing the web app does in Installer Mode is detect user agent. If it finds this is not Chrome, it gives them a link to install Chrome and tells them to follow the instruction email again that they have already been sent, but using Chrome to do this. (You might also want to provide a form to resend them the instructions and serial number again.)
  4. The user either installs Chrome and returns back to this page again, or is already a Chrome user. The Installer Mode then shows a message that reads, please press the ALT-F key in Chrome, or press the Wrench icon in your toolbar, and choose Tools > Create Application Shortcuts, check the two checkboxes, click OK, and then click the "Task Performed" button below.
  5. The user follows the instructions and creates their desktop/application shortcut and then clicks "Task Performed".
  6. The user then sees a registration form where they are to type in their serial number they were emailed. The user enters this in and clicks the Register button.
  7. The server validates the registration and then stores a persistent, 200 year encrypted cookie that basically says, "This guy is registered." This keeps the web app from running in Installer Mode.
  8. The Installer Mode is still active, however, and shows them the final prompt: "You may close your browser and run the icon for the new app from your desktop or application shortcut that you created. The icon is named '{insert name here}'."
  9. They close their browser and doubleclick the icon. The application loads, the registration cookie is read, and the web app no longer runs in Installer Mode -- it shows the application content like it normally would. Besides the fact that this is not a 100% truly automated install, the only drawback is that, since the main page is not a local file (cached), the web app can't really work offline completely. Sure, it can use HTML5 offline storage, but doubleclicking the desktop shortcut will always connect to your web app site.
Volomike
  • 23,743
  • 21
  • 113
  • 209
  • This method would allow users to run the app directly by typing the url in chrome's address bar. Is there a method by which an app can detect weather chrome is running in app mode or not and display (or not display) the contents accordingly? – Juzer Ali Apr 10 '12 at 08:09
  • 5
    And you actually expect a typical BFU to be able to follow a 9 point instruction sheet which includes another X point instruction email? LOL – mike nvck Aug 15 '13 at 14:37