0

I am developing mobile web page. I want send from this page request to my native mobile app (for example android app, and android app should send me current location of user.

Thanks in advance !

hyperN
  • 2,674
  • 9
  • 54
  • 92
  • So you want to call, from your browser's web page, an Android app that should returns you the user's location ? – Zakaria May 26 '12 at 13:16
  • See this question http://stackoverflow.com/questions/1043339/javascript-for-detecting-browser-language-preference – rekire May 26 '12 at 13:23

3 Answers3

0

It looks like you'll want to use the geolocation API.

user2428118
  • 7,935
  • 4
  • 45
  • 72
  • Thanks for the answer but I don't want to use method because geolocation obtained this way isn't accurate enough – hyperN May 26 '12 at 13:48
0

Look for the accepted language header on the server side. Or via js:

navigator.language

See this question: JavaScript for detecting browser language preference

Community
  • 1
  • 1
rekire
  • 47,260
  • 30
  • 167
  • 264
0

The geolocation API will work on phone browsers that support that API. It may be worth checking the compatibility of the handsets you are targeting.

Also, just bringing these alternatives to your attention, however, they are restricted to certain operators and regions.

BlueVia location API available on O2 and Telefonica networks using their REST API https://bluevia.com/en/page/tech.APIs.LocationAPI

AT&T location API available using their REST API http://developer.att.com/developer/apiDetailPage.jsp?passedItemId=10100355

Just so you know about these, the geolocation API is most likely the best option for you though.

Rod Burns
  • 2,104
  • 13
  • 24