在Ionic中打开Android应用程序 [英] Open Apps for Android in Ionic

查看:74
本文介绍了在Ionic中打开Android应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用Ionic Framework开发适用于iOS和Android的移动应用程序,我有自己的Map API,但缺少导航功能...

I'm currently developing a mobile app for iOS and Android using Ionic Framework, I have my own Map API but lacking navigation function...

当用户单击在POI上,然后我的应用程序可以打开其他Map App,例如Google Map或Waze以立即导航到该地方。

When user click on the POI then my app can open other Map App for example Google Map or Waze to straight away navigate to that place.

对于iOS,我的应用程序可以立即打开Waze没问题,但是对于Android来说,它要么无法打开,要么只是在浏览器中打开链接。

For iOS, my app can straight away open Waze without any problem, but for Android either it can't be open or it just open the link in browser.

那么使用URI在android中打开位智的方法是什么?还是必须使用某些插件?

So what is the way for opening Waze in android using URI? Or it must be using some plugin?

if(ionic.Platform.isIOS()) {
    window.open('waze://?ll=' + location + '&navigate=yes');
} else if (ionic.Platform.isAndroid()) {   
    window.open('geo:' + location + '?&q=' + location);
}

谢谢。

推荐答案

我知道这个问题已有4岁了。以防万一有人遇到这个问题,并希望找到答案。请在 ionic github

I know this question is 4 years old. Just in case anyone come across to this question, and hoping for an answer. Please refer to official documentation at ionic and github

这篇关于在Ionic中打开Android应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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