Waze Deep Links

馋奶兔 提交于 2019-12-05 09:38:10

The direct app link on Android does not respect the link properties/options (Waze iOS does), so use the web base url (https://waze.com) to properly open Waze with the deep link options.

Example:

const string wazeAppURL = "waze://";
var wazeURL = $"https://waze.com/ul?ll={loc[0]},{loc[1]}&navigate=yes";
var intent = new Intent(Intent.ActionView, Android.Net.Uri.Parse(wazeAppURL));
var resolveInfo = PackageManager.ResolveActivity(intent, 0);
var wazeUri = resolveInfo != null ? Android.Net.Uri.Parse(wazeURL) : Android.Net.Uri.Parse("market://details?id=com.waze");
intent.SetData(wazeUri);
StartActivity(intent);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!