I am starting Google Navigation through an Intent:
private static final int GOOGLE_NAV = 5;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("google.navigation:q= some + address"));
startActivityForResult(intent,GOOGLE_NAV);
I then check if the user has reached his destination via a LocationListener. If the user has arrived, I want to close the Google Navigation activity.
if(hasArrived())
{
finishActivity(GOOGLE_NAV);
}
However, my code doesn开发者_JAVA百科't seem to work.
精彩评论