0
我正在开发一个应用程序,用户需要去一些地方,所以,我的客户想使用WAZE应用程序,但我不能让它在Android中工作。用钛应用程序打开WAZE
Acording到位智我必须这样做:
try
{
String url = "waze://?q=Hawaii";
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);
}
catch (ActivityNotFoundException ex )
{
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.waze"));
startActivity(intent);
}
于是,我将是钛这样的代码:
try{
var intent = Ti.Android.createIntent({
action: Ti.Android.ACTION_VIEW,
data: waze
});
Titanium.Android.startService(intent);
}
catch(e){
Titanium.Platform.openURL("market://details?id=com.waze");
}
(“位智”是一个字符串变种在那里我有url)
但总是去“Catch”广告带我去商店。 (Waze已安装在我的设备上)
这是链接,您可以在waze主页中找到该信息。 https://www.waze.com/es-419/about/dev
在此先感谢。
宾果!非常感谢你! –