I'm using Navigator in my car on an Acer B1-780 tablet, and it works great, but I'm trying to find a solution to automatically exit (completely) Navigator when the external power is removed (which happens automatically 3 minutes after I turn off my car). If I leave it running, it consumes too much power. I've tried using Tasker, but Tasker can't close it unless I root my device, which I would rather not do.
Of course it can be done via intent. Torque does it. There is an intent you can broadcast that Torque will honour (org.prowl.torque.REQUEST_TORQUE_QUIT). MapFactor could do the same sort of thing (and perhaps it does). It's up to the app to decide if it will close when it sees a particular intent being broadcast.
It is possible without intents nor root. I've just created a simple Tasker profile that will quit MFN if the power gets disconnected. You'll need AutoInput though to confirm at the end, which is a paid app after a 7 days trial.
Here's an example video. At 0:07 I manually start the task, then it opens and gets (completely) closed with no further input from me.
Tasker profile setup:
Condition: State -> Power -> Power -> Any -> Invert
Task:
Launch App -> Navigator (This is not necessarily needed if MFN is always running on foreground and never in the background on your device)
Task -> Wait -> ~2 seconds
Input -> Back Button
Task -> Wait -> ~2 seconds
Plugin -> AutoInput -> Action -> Type: Text -> Value: Yes (or whatever it is in your local) -> Action: Click
Thanks Cageythree, I will try that. The only trick is knowing whether Navigator is on its home screen, since in that case, one doesn't want to press the back button first.
EDIT: Reading this again, I think the task you present just exits to the Android home screen, but doesn't actually exit Navigator (you have to tap the Exit button for that).