On Wed, Mar 14, 2012 at 10:54 AM, Mark Murphy <[email protected]>wrote:
> On Wed, Mar 14, 2012 at 1:46 PM, David Karr <[email protected]> > wrote: > > I know that an Android app can get the phone model and phone number, but > > what has to be in place for Javascript in a webapp, running in the > Android > > browser, to get the same information. I know that I could have an Android > > app that creates a WebView, but is it possible for a webapp running in > the > > stock browser to have access to that info? > > First, there is no "the Android browser". There are probably as many > browsers for Android as there are for Windows. I assume you mean the > stock AOSP browser, which will exist on most but not all devices. > > Second, unless there is some W3C standard for privacy leaks, I hope a > Web browser never has the ability to get the device's phone number, or > at least it is disabled by default. Heck, we can't even get that > reliably from *Java*. > I would also assume it is disabled by default, and I'm fine with that. I'm considering this for a situation where the user is at least cooperative, and is willing to have the phone provide this information, if there's any way to do that. It's starting to look like my only option is an android app with a WebView, with Java classes tied to the Javascript. > > Model information may be included as part of the User-agent HTTP > header, so navigator.userAgent or navigator.appVersion in theory > should be able to provide that to you. Whether any given browser > provides model information, of course, is up to that browser maker. > Acknowledged. We'll consider that. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

