8 messages in com.googlegroups.google-gearsRe: Version determination without a w...
FromSent OnAttachments
Steven Saviano30 Aug 2007 18:42 
Chris Prince30 Aug 2007 19:05 
Chris Prince30 Aug 2007 19:08 
Steven Saviano30 Aug 2007 19:42 
Aaron Boodman31 Aug 2007 04:21 
Scott Hess31 Aug 2007 10:45 
Steven Saviano01 Sep 2007 15:40 
Scott Hess03 Sep 2007 11:09 
Subject:Re: Version determination without a warning dialog
From:Steven Saviano (ssav@gmail.com)
Date:08/30/2007 07:42:20 PM
List:com.googlegroups.google-gears

I think now that there actually are different versions of the APIs this is going to become a more common issue

I was hesitant on touching getBuildInfo() due to the warning in the docs that state not to rely upon it. Seems like I might just have to temporarily. :( -- Steven

On Aug 30, 10:09 pm, "Chris Prince" <cpri@google.com> wrote:

Apologies, that technique solves a slightly different problem than you were asking about. The security dialog is still an issue.

A hacky solution would be to check the result of factory.getBuildInfo(). That doesn't trigger the permission dialog. However, parsing the value is going to be very fragile.

It sounds like we may need to address global version numbering sooner than later.

--Chris

On 8/30/07, Chris Prince <cpri@google.com> wrote:

You can do this today. Huge caveat: I think this model puts too much burden on developers and should be fixed, but that's 20/20 hindsight...

Assume you need WorkerPool 1.1 and Database 1.0. Here is the method as it was originally envisioned: * Check if google.gears exists; this tells you whether Gears is installed. * Inside a try/catch block: - See if you can create the objects with the versions you need. * If an exception is thrown, the user has an older version of Gears.

As I said, most of us feel a better model is to check one global Gears version number, and then freely use any APIs that were available as of that version. This is being tracked in issue 215: http://code.google.com/p/google-gears/issues/detail?id=215

On 8/30/07, Steven Saviano <ssav@gmail.com> wrote:

Hi again Gears team :),

How do you detect a version of the API available without having the Gears security dialog popup. For instance, I am building an app that will require v.2 of Gears. Also, depending on the state of the user's Gears install , I am going to show various install flows. The three install flows I see are:

1) Dont have gears - install flow 2) Has Gears but wrong version - upgrade flow 3) Has Gears and correct version - enable flow

However, I don't see anyway to detect the version of Gears without actually instantiating the factory, causing the warning dialog for Gears to popup which I prefer not to.

Any way to do this? Or am I going to have to assume they have the right version and only check once they try to enable? (because then the user is expecting the dialog)

Thanks for all the help! -- Steven