문제

My app calls an Intent to open the Google Maps App like so

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. 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.

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.

this would be very hacky and I dont even know if it would work but its an idea i guess

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top