Enable/disable receiving of incoming calls via SIP if I am entering/leaving home

311 views
Skip to first unread message

Gregor

unread,
Dec 10, 2016, 5:27:48 PM12/10/16
to Automate
Hi everybody,

I downloaded Automate and I think I understood most of the principles of it. But there one thing I cannot get to work: I added a SIP account in my phone app and in the settings there is a settings "receive incoming calls" (not sure if it translated right). What I want to do is that when I enter my flat (connect to my home wireless network) I want this setting to be enabled. And when I leave my flat (disconnect to my home wireless network) I want this setting to be disabled.

I tried it by using a "app start" block and the package "com.android.phone" and the activity class "com.android.phone.settings.PhoneAccountSettingsActivity". This opens the right activity and I can check/uncheck the checkbox by myself. But is there any way that this will happen automatically?

Regards,
Gregor

Henrik "The Developer" Lindqvist

unread,
Dec 11, 2016, 1:25:35 PM12/11/16
to Automate, gregor...@gmail.com
Use the Interact block to automate the steps to toggle it in the UI. Doing so is likely unreliable, if possible it's much better to change the settings directly. Use the following flow to find the affected setting:
http://llamalab.com/automate/community/flows/7409

Adrien Carlyle

unread,
May 7, 2017, 4:13:45 PM5/7/17
to Automate, gregor...@gmail.com
I toggled this setting using your flow and it comes up as the following

Category: system
Name: "sip_receive_calls"
Value: (1 or 0) 

I tried using the "system settings set" but sip_receive_calls isn't listed there.   Any chance you can expose it please? 

Adrien Carlyle

unread,
May 7, 2017, 4:16:32 PM5/7/17
to Automate, gregor...@gmail.com
I figured it out,  you can use a string literal in the drop down if you change the type and it works beautifully.
Reply all
Reply to author
Forward
0 new messages