The code in my pull request does just that - it sets the UA for that web view by simply appending cordova/phone gap to the end (keeping everything else in tact). Its a simple yet very useful change. On Mar 3, 2012 2:06 AM, "Brion Vibber" <[email protected]> wrote:
> On Fri, Mar 2, 2012 at 11:00 AM, Filip Maj <[email protected]> wrote: > > > I like the idea of adding cordova/phonegap to the end of the user agent > > string. If purely for analytics it makes sense to me. Not entirely > > clobbering that string, just adding a "Cordova Web View" or something > like > > that to the end of the UA string. > > > > What I would find useful as an application developer is a reliable way to > tell that I'm being loaded in a Cordova view as opposed to a web browser, > so I know if I should load up the relevant phonegap.js/cordova.js etc. > (Having an app that works as-is in a browser is *hugely* helpful for > debugging when possible!) > > What our Wikipedia app does now is to check the user-agent, and assumes > that Android or iPhone user-agents are running in PhoneGap, while other > things initialize without PhoneGap. > > -- brion vibber (brion @ pobox.com / brion @ wikimedia.org) >
