在HTML5的Andr​​oid应用程序谷歌导航 [英] Google navigation on a html5 Android app

查看:167
本文介绍了在HTML5的Andr​​oid应用程序谷歌导航的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是想知道,如果有人可以解释这是为什么发生在我身上。

I just wanted to know if someone can explain why is this happening to me.

我使用的PhoneGap和jquerymobile和应用程序的功能之一是使用导航工具,引导用户开发移动应用程序。

I am developing a mobile app using phonegap and jquerymobile and one of the features of the app is to guide the user using a navigation tool.

有关iOS的,我们有选择Waze的。这是很容易添加:

For iOS we have choose Waze. It is really easy to add it:

<a href=" waze://q=Adress">

和它的作品!它的工作原理,如果我们使用Safari浏览器上运行的应用程序或即使我们使用的PhoneGap构建本机应用程序。

and it works! It works if we run the app using safari or even if we build a native app using phonegap.

这个问题在使用Android自带。对于Android,我们正在使用谷歌导航。我们使用的code是:

The problem comes when using Android. For android we are using Google Navigation. The code we are using is:

<a href="google.navigation:q=Adress">

这是工作确定,但只有当我们建立我们的HTLM code本机应用程序使用PhoneGap的,但它不是,如果我们运行在Android网页浏览器应用程序的工作。

It is working ok, but only if we build a native app with our htlm code using phonegap but it is not working if we run the app on Android Web Browser.

我们不希望用户安装应用程序来使用这个功能... 现在的问题是:为什么?为什么HTML code的工作确定一个web视图内的本机应用程序,但它不工作在Android浏览器?

We dont want the user to install the app to use this feature... The question is: Why? Why the html code is working ok inside a webview on a native app but it is not working on Android Browser?

推荐答案

我有同样的问题和所使用的地缘URI并且工作:

I just had the same issue and used the geo URI and it is working:

<a href="geo:37.786971,-122.399677;u=35">Wikimedia Headquarters</a>

有关更详细的说明,请参见此链接:<一href="http://en.wikipedia.org/wiki/Geo_URI#Example">http://en.wikipedia.org/wiki/Geo_URI#Example

for a more detailed explanation see this link: http://en.wikipedia.org/wiki/Geo_URI#Example

在href上面将打开导航应用程序,如Waze的在Android(只是测试它在Galaxy S4与Waze的,这是工作 - 它也打开了谷歌地图/导航应用程序,现在是一个综合的应用程序)。

The href above will open navigation apps, such as waze on Android (just tested it on the Galaxy S4 with Waze and it is working - it also opens up the Google Maps/Navigation app, which is now a combined app).

希望这有助于! :)

这篇关于在HTML5的Andr​​oid应用程序谷歌导航的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆