Navigation with Waze and Google Maps using Intent.createChooser shows Waze icon twice

时间秒杀一切 提交于 2019-12-01 17:48:51

After some time I used the solution found here, and there was only one icon that was working properly. As I wrote in the question, I could not use this solution because it lacks the flexibility I needed, so after looking at the code I saw that what was missing was this:

intentWaze.setPackage("com.waze");
// and more importantly, this:
intentGoogleNav.setPackage("com.google.android.apps.maps");

It seems that Waze is listening to the Google Maps intent (and does not work well with it), and that's why there were two icons.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!