1. Are you ready for the Galaxy S20? Here is everything we know so far!

Triggering when Receiving Sound From an App? (Auto-switch to Maps during Turn-by-Turn Directions)

Discussion in 'Android Apps & Games' started by ConanOBrien, Oct 20, 2014.

  1. ConanOBrien

    ConanOBrien Lurker
    Thread Starter

    As the title says. I can't find a trigger for an app sending a short audio focus change.

    Example:
    I am running google maps navigation and listening to music, the music player is open, navigation running in background. When I reach a waypoint, Google Maps will speak the directions, but the music player stays open. I want to write a task to automatically switch over to google maps when that happens. Problem is, I can't find a trigger for this action.

    I found the "notification" trigger, problem with that is, google maps doesn't send a new notification during each turn-by-turn instruction, so that's not working either.

    Any help/insight would be appreciated, thanks in advance
     



    1. Download the Forums for Android™ app!


      Download

       
  2. WarriusZero

    WarriusZero Guest

    According to the help, "if the notification is a duplicate of one still in the status bar, it will still trigger the event."

    Since the notification is updated for every waypoint, there's a chance that the event will be triggered for every waypoint as well.

    I can't test it myself at the minute but you should give it a chance (unless you've done it already).

    An alternative is to switch your music player. I could be wrong but I think the Google Play Music app is paused (or the volume is lowered) when you get audio directions.


    Sorry for the series of assumptions... :)
     
  3. ConanOBrien

    ConanOBrien Lurker
    Thread Starter

    Thanks for the suggestion, it did not work though. I tried it with other apps (sent myself a text message and it triggered just fine), but it seems like google maps notification is a bit different.

    Right, Pandora and Google Play Music will already do that. I'm not trying to accomplish lowering the volume. I want tasker to switch to Google Maps (the display) so I can visually see the actual next waypoint (not just hear it) if I originally had the music player open.

    Hope that makes sense!
     
  4. WarriusZero

    WarriusZero Guest

    I tested something driving back from work.
    I set up Tasker so the Maps notifications wound launch Maps, sending it to the foreground.

    But the updated notification would not trigger the event.

    Now I don't think you're going to be able to do what you want... :(
     
  5. ConanOBrien

    ConanOBrien Lurker
    Thread Starter

    Yup I tried it as well, did not work. I believe I have to figure out how to use the "intent received" trigger, but I've tried and failed. It's a pretty advanced trigger and I'm not sure how to use it correctly
     
  6. Try clearing the previous maps notification a second after it comes up and see if the next alert will then trigger action.
     

Tasker

Tasker Forum

net.dinglisch.android.taskerm

⚙No repetitive tasks for you, let your Android device handle it!⚙
Total Automation, From Settings to SMS. Here are only some
of the things you could do with Tasker. Its real power is the flexibility to combine contexts and tasks however you wish: https://tasker.joaoapps.com/exampleuses.htmlAutomations
Make your phone a true smart
phone! Why remember to change the volume every day when you leave home when your phone can do it for you? Automate stuff based on the app you're in
, the time of day
, your location
, your Wi-Fi network
, Received SMS or Calls
, the currently playing song
and many other (130+) states and events! Check out how easy it is to create an automation: https://www.youtube.com/watch?v=s6EAbLW5WSkActions
350+ actions allow you to truly customize your phone like never before! Send SMS, create notifications, change almost any system setting like Wifi Tether, Dark Mode, Always On Display, change any volume, control Do Not Disturb, open apps, file manipulation, control music playback, get your location... you get the idea. If you can think of it, Tasker can probably do it for you! Note: root is NOT (I repeat NOT) required for majority of the functions.
However, a few of the actions (like the Airplane Mode action and the Mobile Data action on some devices) require root. Regarding those few actions that do require root, this is because of Android security policies that developers cannot work around. ☑ Other Triggers
Manually trigger your actions via launcher shortcuts, quick setting tiles, widgets, long-pressing volume buttons, media buttons (like the ones on your BT headsets or headphones), Bixby button, Navigation Bar, Notificaitons and more! ☑ Join - Remote Tasker
Adding Join (https://play.google.com/store/apps/details?id=com.joaomgcd.join) to the mix will even allow you to trigger tasks from another Android device or PC! ☑ Scenes
Design your own UI and use it to display any info you want or trigger any task! ☑ App Creation
Create your own standalone apps to share or sell with the Tasker App Factory (https://play.google.com/store/apps/details?id=net.dinglisch.android.appfactory)! ☑ Developer Friendly
A lot of 3rd party developers already allow you to perform actions in their apps and listen to their events/states through Tasker! Check out a list of plugins https://tasker.joaoapps.com/pluginlist.html. You can also call most of the Web APIs from Tasker with the powerful HTTP Auth and HTTP Request actions! Check out an example https://youtu.be/yAt2D1XmgUI. ☑ 7 day trial - one time payment to unlock
Get it here: https://tasker.joaoapps.com/download.htmlUseful Links
Starter Guides: https://tasker.joaoapps.com/guides.html Pre-made projects: https://forum.joaoapps.com/index.php?resources/ Official Support Forumhttps://groups.google.com/forum/#!forum/tasker Community full of people willing to help: https://www.reddit.com/r/tasker/ It's not possible to fix problems reported via Play Store Comments so please use the "Report Issue To Developer" option in the app > Menu to do so. Note
: Tasker uses the BIND_DEVICE_ADMIN permission in order to provide the System Lock functionality

READ MORE
February 15, 2020
Last Updated
4.4
Rating
1M+
Installs
Loading...

Share This Page

Loading...