android


Update Google Maps Navigation, on Location Change within the app


I am working on an application that has to do with location change notifications. Scenario is stated in steps:
User gets a location notification in app.
To get best route, Presses a button that starts intent for Google Maps app.
Now, since user is outside of my app, it gets a notification for new location, from notification goes into app again meanwhile previous route is set in Maps app.
Now, user have a new location, again presses the button for best route and this time when Maps app start, it asks about Exit the current navigation.
User has to cancel the already running navigation first and then it starts again with new best route. It makes things longer and complex for user.
I want is it as that whenever Maps app start form my app, it starts with new route automatically instead of asking for previous navigation. As user presses the maps button and Google Map app starts it starts with route to new location.
I am using following script in order to open up Google Maps app so that user can find best route.
String muri="google.navigation:q="+apntLat+","+apntLong;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(muri));
intent.setClassName("com.google.android.apps.maps","com.google.android.maps.MapsActivity");
startActivity(intent);
Is there any possibility to achieve this and skip this step of exiting the previous navigation first and then starting a new one? so that every time the Google Maps intent is called, it starts with finding route to New Location, regardless of the fact it had any previous navigation running. Please update. Any suggestions or feedback is welcomed.

Related Links

Compatible in lenovo a369i
Android and SQLite - select datetime error
Data Transfer Rate
Do works in background indefinitely
How to Scroll GridView in Full Screen
Lolipop toolbar drawer toggle not clickable
Error by using Gson class [STACKOVERFLOW ERROR]
Passing URL string to AsyncTask
Phonegap instalation - 'phonegap is not recognized as an internal or'
How to set background color for dropdown arrow spinner programatically
Google IAP verification has failed for many purchases
No resource found after update my project API to 21 and AppCompat to 21.02
Separate TouchPhase.Began and TouchPhase.Moved
Datastore Entities not showing
get rid of ContentProvider per database table
Can't Install Apache ant on Mac OS X 10.10

Categories

HOME
google-app-engine
eclipse
hyperlink
delphi-7
awk
android-studio-2.2
jmx
pascal
simulink
google-apps
cq5
ado.net
maxscript
echo
special-characters
recordrtc
discrete-mathematics
spin
categorical-data
gson
mod-security
frequency-distribution
coin3d
android-7.0-nougat
google-data-studio
nodemcu
r-mice
exit
mongoid6
beta
expressionengine3
winexe
event-flow
powershell-ise
instantiation
joomla2.5
servicestack-text
playframework-2.1
ods
google-data-api
c9.io
setup.py
apache-stanbol
xv6
glm-math
httr
trojan
tinkerpop
appdomain
arules
monkey
chromium-os
mta
udpclient
android-wake-lock
nss
html-to-pdf
libvlc
canalyzer
git-ftp
rrule
xmltype
procedural-programming
android-cookiemanager
sip-server
metatrader5
teaspoon
universal-image-loader
mobility
personalization
xml-dsig
buffering
menubar
hibernate-entitymanager
oocss
unit-of-work
stacky
cardreader
nokia-s40
mapping-by-code
user-tracking
webdev.webserver
pylucene
w3c-geolocation
collectionviewsource
hbm2java
feasibility
fdf
soappy
pbcopy
image-capture

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App