android - Start new navigation without exiting from previous navigation in Google Map -


i'm starting google map application navigate user location.

here code.

intent intent = new intent(android.content.intent.action_view,                 uri.parse("google.navigation:q=" + ridedetailsmodel.getendlatitude() + "," + ridedetailsmodel.getendlongtitude()));         startactivity(intent); 

i'm using chat head uber driver app take application google map. that's working fine. problem is, while i'm invoking same code above, google map asks me exit previous navigation. because previous navigation not cleared.

how force google map create new navigation without asking close previous one.

two methods can solve problem.

method 1

if can close google map application application, problem solved. searched lot, non-rooted phone can't kill other applications.

method 2

clear previous navigation , create new navigation. google map won't ask user exit previous navigation before start new navigation.

method 3 : (make clearing intent flags)

intent.addflags(intent.flag_activity_clear_task | intent.flag_activity_new_task); startactivity(intent); 

Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -