• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How do you return focus to an app?

I have a profile that displays a scene with three icons (Pandora, Spotify and Call Home) when Tasker sees that my phone is connected to my vehicle's Bluetooth. It works great and allows me to start my car and immediately launch Pandora or Spotify. The problem happens if I get a call. After the call completes, the screen does not go back to the music app but stays on the call screen or home screen. How can I automatically switch focus back to Spotify or Pandora?
 
Tasker doesn't exit from the profile when a call comes in because I'm still connected to my car's Bluetooth, which is what triggers the profile. I just want to set the focus back to my audio app after a call ends. Do I need to create a 2nd profile that triggers when a call comes in and then make an exit task to refocus? If so, how do I actually change the focus in a task? Relaunch the app?
 
Upvote 0
Does Tasker on your device have the "Load last app" action available?

I had an idea to solve this problem: add a new profile which would be activated when a call is active AND your scene profile is active. This profile would have no entry task, but would use "Load last app" as the exit task. Then as long as "load last app" understood that you meant the app before the phone it should bring you back to where you were.

Unfortunately I couldn't test the idea because "Load last app" isn't available on my phone. :(

I guess that if you have the same problem you could try instead an exit action which showed the scene. Wouldn't take you straight back to the app, but would at least make it easier to return.
 
Last edited:
Upvote 0
I have a complementary solution to Hadron's one.
The thing is to use a third party app called LastApp Switcher (It is free) and a plugin (Secure Settings)

You then just have to create a shortcut (via the Secure Settings plugin) activating LastApp.

Although it is not a "Load last app" (if the app has been closed, it won't relaunch it) it can be enough for what you are trying to do. :)
 
Upvote 0
Just make a condition of the original profile that no call is active. Then it will exit on call and automatically re activate when call ends.

Tasker doesn't exit from the profile when a call comes in because I'm still connected to my car's Bluetooth, which is what triggers the profile. I just want to set the focus back to my audio app after a call ends. Do I need to create a 2nd profile that triggers when a call comes in and then make an exit task to refocus? If so, how do I actually change the focus in a task? Relaunch the app?
 
  • Like
Reactions: Thom
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones