简体   繁体   English

我可以检测用户是否从Google Maps App取消了导航

[英]Can i detect if a user canceled navigation from Google Maps App

My app calls an Intent to open the Google Maps App like so 我的应用程序这样调用Intent以打开Goog​​le Maps App

Intent navigation = new Intent(Intent.ACTION_VIEW, Uri.parse("google.navigation:q="+trueFriend.lat+","+trueFriend.lon));
startActivity(navigation);

When i do that i would like to set a ProximityListener to detect if the user has arrived to there location, then let the other user know that they have arrived. 当我这样做时,我想设置一个ProximityListener来检测用户是否已到达该位置,然后让其他用户知道他们已到达。 That much i can do, however in order to prevent a few issues i need to detect if a user has canceled there navigation, or stopped, or possibly even resumed. 我可以做很多事情,但是为了防止出现一些问题,我需要检测用户是否已取消导航,停止,甚至恢复导航。 Is there any documentation to this? 是否有任何文档?

No you are in another app so there is no way of knowing if the user has canceled the navigation from the google maps app. 不,您在另一个应用程序中,因此无法知道用户是否已从google maps应用程序取消了导航。

Edit 编辑

something you could possibly do but would only work on 4.3 would be to set a notification listener and check to see if the navigation notification still exists, if it doesnt then they quit it. 您可能可以做但只能在4.3上使用的方法是设置一个notification listener并检查导航通知是否仍然存在,如果不存在则退出。

this would be very hacky and I dont even know if it would work but its an idea i guess 这将是非常hacky,我什至不知道它是否会工作,但我想这是一个主意

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何在 android 应用程序中集成谷歌地图 AR 导航? - How I can integrate google maps AR navigation within the android app? 我们可以从本地Google地图数据中获取导航数据到另一个应用程序吗? - Can we get navigation data from native google maps data into another app? 如何检测 Google 应用内结算的取消或退款订单? - How to detect canceled or refunded order for Google in-app billing? 是否可以从您的应用关闭Google地图导航? - Is it possible to close Google Maps navigation from your app? Android:我可以在不将用户重定向到“谷歌地图”应用程序中的设置屏幕的情况下启用 GPS - Android: Can I enable the GPS without redirecting the user to the settings screen like in "google maps" app 带有Google Maps Navigation和文本叠加层的Android应用 - Android app with Google Maps Navigation and a text overlay 如何在Google地图上从用户位置到用户选择的项目叠加层进行路线/导航? - how to make a route/navigation on google-maps from where user location to an itemoverlay that user pick? 如何绘制从我的android应用发送到tomcat服务器的经度和纬度,并在该处的Google地图上进行绘制? - How can i plot the longitudes and latitudes sent from my android app to tomcat server and plot on the google maps there? 我如何绘制从我的 android 应用程序发送到 tomcat 服务器的 lat ,lng 并在那里的谷歌地图上绘制? - How can i plot the lat ,lng sent from my android app to tomcat server and plot on the google maps there? 如何在iOS和Android上的PhoneGap中搜索原生Google Maps应用中的一串文字? - How can I search for a string of text in the native Google Maps app from PhoneGap on iOS AND Android?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM