How to start google maps in background

1,385 views
Skip to first unread message

Rich D

unread,
Feb 17, 2013, 12:17:03 PM2/17/13
to Tasker Google Groups Post

I have been freezing google maps for a while now and it seems to work fine with no performance issues.  If I want to start maps I defrost it and then check every 10 minutes after that to see if it is still in use and if not I will refreeze it.

What I would like to do is --  When i am driving and the device is in the dock under power I do not mind being  a member of the google collective and would like maps to be running in the background so it is updated and ready to go if I need it.

So I need a way to defrost maps and start it in the background so when i put the device in the dock the screen does not flash and I potentially loose the current window I am in. I have found that if I simply defrost it, android will start it sometimes but not all the time.

Unfortunately when searching for this all the info I can find is how to stop maps in the background ...   :(

Any suggestions would be greatly appreciated..... Thanks,  Rich..

Chatten

unread,
Feb 27, 2013, 5:36:40 PM2/27/13
to tas...@googlegroups.com
If I understand you correctly and if you are rooted:
 
Run Shell:
Command:  am force-stop com.google.android.apps.maps
That will kill it and it won't restart...  It also kills Navigation at the same time.
 
When you are docked, start app MAPS then do a "GO HOME" (with options screen #).  This will start MAPS and return you to your home screen.

Rich D

unread,
Feb 27, 2013, 6:21:40 PM2/27/13
to tas...@googlegroups.com


On Feb 27, 2013 5:36 PM, "Chatten" <gregc...@gmail.com> wrote:
>
> If I understand you correctly and if you are rooted:
>  
> Run Shell:
> Command:  am force-stop com.google.android.apps.maps
> That will kill it and it won't restart...  It also kills Navigation at the same time.

Yes, that works..

>  
> When you are docked, start app MAPS then do a "GO HOME" (with options screen #).  This will start MAPS and return you to your home screen.

What I am trying to avoid is any window (screen) changes when I restart the maps app.  So I would like to start it in the background if it is all possible.  

Thanks for the reply.....   Rich..

Chatten

unread,
Feb 27, 2013, 7:11:47 PM2/27/13
to tas...@googlegroups.com
Leave off the "GO HOME" will leave MAPS on the current screen - if that's want you wanted.

Rich D

unread,
Feb 27, 2013, 9:03:25 PM2/27/13
to tas...@googlegroups.com

> Leave off the "GO HOME" will leave MAPS on the current screen - if that's want you wanted.

Hmmmmm..  lets try it this way..  :)

Lets say I have a certain app running with a particular screen being displayed.  I put the device in the car dock and do not want the app to end or the screen to change but i would like to get google maps running in the background.  I have checked around for a possible intent but so far have not found anything that works..

Rich..

Chatten

unread,
Feb 28, 2013, 8:58:48 AM2/28/13
to tas...@googlegroups.com
I'm not sure it's possible - see:
 
 
I wonder if you could start the APP then launch the previous APP?
In my card dock I launch DoubleTwist for music, then launch MAPS, leaving MAPS in the foreground.  I have a scene button that launches DoubleTwist again, brining it in the foreground but MAPS is still running.  I'm probably not using the right terminology but both apps are running, it's just a matter of which one I want displayed on the screen and can toggle back and forth.

TomL

unread,
Feb 28, 2013, 9:23:17 AM2/28/13
to tas...@googlegroups.com
Here's a crazy idea.  Imagine these series of steps:

1. You have phone in hand.  Google Maps is frozen, You have SomeApp running in the foreground.  You get in your car and dock your phone.
2. "MagicTaskerTask" takes note of the current foreground app.  It then takes a screenshot of your current phone screen, opens up a fullscreen blocking overlay scene and shows your screenshot.
3. "MagicTaskerTask" then launches Google Maps.  Since we have a fullscreen blocking overlay begin displayed, you don't see anything on your phone other than your screenshot!
4. "MagicTaskerTask" then relaunches the original foreground app, and destroys the fullscreen blocking overlay.

What do you think?

Tom

Dave Fisher

unread,
Feb 28, 2013, 9:32:26 AM2/28/13
to tas...@googlegroups.com
Wouldn't starting the NetworkLocationServices service using am startservice be easier, and achieve the same thing ? I assume this is to get location services working whist the phone is docked ?

Rich D

unread,
Feb 28, 2013, 9:37:22 AM2/28/13
to tas...@googlegroups.com

> Here's a crazy idea.

OK.....

 Imagine these series of steps:
>
> 1. You have phone in hand.  Google Maps is frozen, You have SomeApp running in the foreground.  You get in your car and dock your phone.
> 2. "MagicTaskerTask" takes note of the current foreground app.  It then takes a screenshot of your current phone screen, opens up a fullscreen blocking overlay scene and shows your screenshot.
> 3. "MagicTaskerTask" then launches Google Maps.  Since we have a fullscreen blocking overlay begin displayed, you don't see anything on your phone other than your screenshot!
> 4. "MagicTaskerTask" then relaunches the original foreground app, and destroys the fullscreen blocking overlay.
>
> What do you think?

Sounds like it would be interesting to see if I could actually get it to work... :)   

But practical...    eehhh..

Thanks Tom.....   :)

Rich D

unread,
Feb 28, 2013, 9:40:00 AM2/28/13
to tas...@googlegroups.com

> Wouldn't starting the NetworkLocationServices service using am startservice be easier, and achieve the same thing ? I assume this is to get location services working whist the phone is docked ?

Ahhhhh... great idea..... thanks Dave..

TomL

unread,
Feb 28, 2013, 9:40:13 AM2/28/13
to tas...@googlegroups.com
Rube Goldberg would be proud.  But what Dave suggests with am start service sounds promising and a lot easier.

Tom

Rich D

unread,
Feb 28, 2013, 8:09:24 PM2/28/13
to tas...@googlegroups.com

> Wouldn't starting the NetworkLocationServices service using am startservice be easier, and achieve the same thing ? I assume this is to get location services working whist the phone is docked ?

Dave, would you know the proper way to make this shell command??

I have tried ..

am startservice com.google.android.apps.maps:NetworkLocationService

am startservice com.google.android.maps:MapsBackgroundService

And a variety of combinations with other names I found on the web but nothing seems to work.

I am trying these in terminal emulator with root..

Thanks for any help you can provide.....   Rich..

Dave Fisher

unread,
Mar 1, 2013, 4:20:02 AM3/1/13
to tas...@googlegroups.com
Unfortunately I have no idea, it just seemed the most logical way to start it (ie. starting an app will always bring it to the foreground as far as I can tell, so I was thinking of another way to do it, and so starting the service seemed the most logical.

Have you tried viewing logcat after unfreezing maps to see whats going on under the hood - that might throw some clues ?

Rich D

unread,
Mar 1, 2013, 6:52:52 AM3/1/13
to tas...@googlegroups.com

> Unfortunately I have no idea, it just seemed the most logical way to start it (ie. starting an app will always bring it to the foreground as far as I can tell, so I was thinking of another way to do it, and so starting the service seemed the most logical.

Ahhh, OK.. thanks for the great idea..


>
> Have you tried viewing logcat after unfreezing maps to see whats going on under the hood -

Not yet, but I will give that a try.  There really does not seem to be much info out there on this.  My thinking is that I would have to catch the log  after android has restarted it because  if Android can start it up in the background I should be able to as well..  I might just be missing the correct flags. I will keep poking around and post back if I get it working..

Thanks again..   Rich....
>

TomL

unread,
Mar 1, 2013, 7:38:04 AM3/1/13
to tas...@googlegroups.com

Rich D

unread,
Mar 1, 2013, 7:33:25 PM3/1/13
to tas...@googlegroups.com

Tom, Thanks for the idea but i am not sure how I would use these to solve my quandary ... 

TomL

unread,
Mar 1, 2013, 9:00:03 PM3/1/13
to tas...@googlegroups.com
One of the apps which claim to be Tasker compatible might be used to start the google latitude service.

Tom

Rich D

unread,
Mar 1, 2013, 11:17:16 PM3/1/13
to tas...@googlegroups.com

>
> One of the apps which claim to be Tasker compatible might be used to start the google latitude service.
>

OK, got it now...

Actually I do not use  latitude and have it shut off. I just want to get google maps running in the background.  The two services that show up as running when it is in the background are

com.google.android.maps:MapsBackgroundService

NetworkInitiatedService

Rich..

Reply all
Reply to author
Forward
0 new messages