Block incoming calls when a certain app is active

106 views
Skip to first unread message

Richard Åsberg

unread,
Aug 7, 2014, 6:36:14 AM8/7/14
to tas...@googlegroups.com
I'm trying to find a simple way to block incoming calls when I have a certain app running but I can't get it to work.

I created a profile based on the app in question and I've then created tasks both trying to use the Divert calls and Block Calls features but my phone keeps accepting incoming calls and ringing despite a have the app running in the foreground.

I guess the problem is whenever there's an incoming call the mobile phone will switch to the incoming call making the app end up in the background and that makes Tasker think the app is no longer running and my profile becomes inactive.

Any smart tips how to make all incoming calls being redirected/diverted to my voice mail whenever app X is running?

Jacob Klein

unread,
Aug 7, 2014, 9:11:37 AM8/7/14
to tas...@googlegroups.com
Let it become inactive, on your exit task begin it with a wait. Then if it's still not active have it continue with the exit task, otherwise have it do nothing. This will give you time to decline the call.

Weird the call feature isn't working properly, or it isn't setup properly.

Richard Åsberg

unread,
Aug 7, 2014, 9:53:46 AM8/7/14
to tas...@googlegroups.com
Thanks but the thing is I don't want the call to even pop up on the screen but instead be diverted immediately to my voice mail.

Maybe I should look at the possibility to configure the setting under mobile network to have all incoming calls automatically forwarded/diverted to my voice mail.

Have to look more into this, just thought this would be a simple thing to accomplish with Tasker.

Marta Hintz

unread,
Aug 7, 2014, 10:16:18 AM8/7/14
to tas...@googlegroups.com
Or you can find a way to have tasker see your app running in the background. It is a bit more complicated but others have found ways to do it with different levels of success. Search the forum for ideas of how.

Richard Åsberg

unread,
Aug 7, 2014, 12:24:53 PM8/7/14
to tas...@googlegroups.com
Thanks, I'll do that.

Jacob Klein

unread,
Aug 7, 2014, 1:15:41 PM8/7/14
to tas...@googlegroups.com
I can confirm it is not working for me either. Maybe Pent can confirm and fix if it is a bug.

I set a task to call block with info, then a 1 min wait and call revert with info. Placed task on home screen, upon press it said it was blocking all.

Called from another phone 15 seconds in and my phone rang.

Another option would be airplane mode. Although idk if you want all radios shut down or if you need data/wifi.

Matt R

unread,
Aug 7, 2014, 1:29:22 PM8/7/14
to tas...@googlegroups.com
Press the question mark icon in call divert or call block.  It should become clear ...

Matt

Jacob Klein

unread,
Aug 7, 2014, 2:55:38 PM8/7/14
to tas...@googlegroups.com
I read that but didn't realize it was outgoing only. I assumed it was for incoming too.

Richard Åsberg

unread,
Aug 7, 2014, 3:19:13 PM8/7/14
to tas...@googlegroups.com
I found this out the hard way when I all of a sudden was not able to place any calls ;)

I checked manually in my mobile and if I go to Settings-Call Settings-Call Blocking (not 100% if I'm using the correct wording since I have my mobile set to Swedish) I have two options where I can choose to block both all outgoing and incoming calls. If I could get to this setting using Tasker I guess I would be good as for the Task.

What would still be a problem though I guess is how to define a profile that will trigger when app x is running regardless if the app is running in the foreground or background.

Maybe I'll just give up on this. Don't really have the time nor the patience to fiddle around too much with this, thought there would be a very simple way doing this with Tasker but apparently not...

Richard Åsberg

unread,
Aug 7, 2014, 3:20:11 PM8/7/14
to tas...@googlegroups.com
I was thinking about the airplane mode too but I do need the wifi/data connection so that won't work just as you say.

Jeremy Harris

unread,
Aug 7, 2014, 4:14:56 PM8/7/14
to tas...@googlegroups.com
I have two options where I can choose to block both all outgoing and incoming calls. If I could get to this setting using Tasker I guess I would be good as for the Task.

A1: Secure Settings > Configure > Launch Activity > Settings App > Blocking Mode

This launches directly to the correct settings page. Then a simple tap simulation to toggle on/off.

A2: Run Shell [Command: input tap xx yy]

Jeremy Harris

unread,
Aug 7, 2014, 4:16:42 PM8/7/14
to tas...@googlegroups.com
Screenshot_2014-08-07-16-15-28.png

Jeremy Harris

unread,
Aug 7, 2014, 4:19:19 PM8/7/14
to tas...@googlegroups.com
This was using a Samsung Galaxy S4... Your device will probably vary, but I bet you can do something similar with the secure settings plugin. Root is required for tap simulation.

Richard Åsberg

unread,
Aug 7, 2014, 5:36:00 PM8/7/14
to tas...@googlegroups.com
Many thanks Jeremy but I don't have my Sony Xperia Z2 rooted and want to keep it that way so won't be able to use this method.

Not a big deal, guess I'll just have to finish any incoming calls quickly because I wanted to use this when I'm using my mobile as a 'first-person-view' monitor flying a quadcopter :)

Matt R

unread,
Aug 7, 2014, 6:02:12 PM8/7/14
to tas...@googlegroups.com
There's an action to turn off the mobile radio (essentially the same as putting it in airplane mode).

Matt

easiuser

unread,
Aug 7, 2014, 6:06:20 PM8/7/14
to tas...@googlegroups.com
Have you tried turning on airplane mode and then turning wifi back on.  I can do this on my S4.

Richard Åsberg

unread,
Aug 7, 2014, 7:02:38 PM8/7/14
to tas...@googlegroups.com
Haven't tried that but I think I'll need data to be active as well and I'm pretty sure that won't be available in flight mode.

Jeremy Harris

unread,
Aug 7, 2014, 7:05:08 PM8/7/14
to tas...@googlegroups.com

Not a big deal, guess I'll just have to finish any incoming calls quickly because I wanted to use this when I'm using my mobile as a 'first-person-view' monitor flying a quadcopter

That sounds pretty cool. I can see how an incoming call notification might be disruptive, lol..

--
You received this message because you are subscribed to a topic in the Google Groups "Tasker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tasker/6mRuS9wwheE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tasker+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Richard Åsberg

unread,
Aug 7, 2014, 7:15:19 PM8/7/14
to tas...@googlegroups.com
Yeah, it's an amazing "toy"!

Here it is

http://www.dji.com/product/phantom-2-vision-plus

Andy

unread,
Aug 7, 2014, 7:29:28 PM8/7/14
to tas...@googlegroups.com
I'm not sure how your phone or the app will react to this but a simple solution may be to create a Profile will one context being the app running and another the event 'phone ringing'. Then your task can be simply the End Call action. I tried it with a game of mine and I did get a pop up when I called my phone but it was for a split second and the game was never exited but it did pause, but it might work for you if it doesn't interrupt your feed save for a split second pop up. You could even go further in the task and auto send a text to the last person who called saying something along the lines of "I'm flying my sweet drone Ill call you later"

Matt R

unread,
Aug 7, 2014, 7:47:49 PM8/7/14
to tas...@googlegroups.com
That website seems to indicate that you only need to connect to the copter WiFi.  Just turning the mobile radio off with the action I mentioned should leave the WiFi on...

Matt

Richard Åsberg

unread,
Aug 7, 2014, 8:01:04 PM8/7/14
to tas...@googlegroups.com
Doesn't look like I'm allowed to enable flight mode or switch the radio OFF without being rooted.

Matt R

unread,
Aug 8, 2014, 12:59:37 AM8/8/14
to tas...@googlegroups.com
Action phone > radio shouldn't require root.

Matt

Richard Åsberg

unread,
Aug 8, 2014, 6:04:47 AM8/8/14
to tas...@googlegroups.com
Thanks Matt, tried this out and you're right - I can set this without having root access and it seems to work really good!

Only bad thing is this will also stop the data connection and although I don't necessarily need a data connection to fly the drone I won't be able to share photos in real-time while airborne with no data connection active with Internet access.

A good compromise though when I know I won't be sharing any media while airborne.
Reply all
Reply to author
Forward
0 new messages