Hello,
I used tasker long long ago, but today i have a mission for it ! But seems there is no option for it.
The situation :
I have a oneplus 3 with lineage os (last nightly version) on it.
I have two simcard with data plan, one haven't network when i'm at work.
Actually i have to switch in network/simcard default data simcard from sim1 to sim2 when i harrive at work and reverse when i quit.
Is there a way to toggle this on tasker ? Or better switch simcard when signal is too poor on the active one.
Thanks for any suggestion
Kenny
I don't have a dual sim phone so I can't test this.
I think you can use the secure setting value system switch_dual_card_slots. I would monitor that value when you manually switch sims and determine if that is the correct value.
You can do the monitoring either using AutoTools secure settings or via adb using the command "adb shell settings list system" before switching and after switching.
In a terminal with root, or using a Tasker root shell, you can return only switch_dual_card_slots using grep:
settings list system | grep switch_dual_card_slots
If that setting doesn't exist in your device, you need to figure out which setting is toggled when you switch sims.
Once you get the right setting, you will probably have to force some sort of refresh to get it recognized. There simplest way to achieve that might just be to automate a reboot. Force stopping phone or some other system app might possibly work.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Just checked but no trace of switch_dual_cards_slot in setting list system.
Moreover nothing change in system when i switch data sim.
I searched more and in global i have 2 lines witch change on toggle :
multi_sim_data_call=3
to
multi_sim_data_call=2
and
user_preferred_data_sub=3
to
user_preferred_data_sub=2
I don't really know why sim card 1 is number 3 but seems to be that.
And if you manually change those values, are you able to switch the preferred sim?
If not, does it switch after changing and then a reboot? If this happens, there probably is a broadcast intent needed to tell the system that the value had been updated.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Related
I would like to refresh my ip every 3 hours.
can Tasker turn off/on airplane mode at the specified time intervals?
Yes it can
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
Yes it can
Click to expand...
Click to collapse
Not with Oreo if the unit is not rooted.
rigattoni said:
Not with Oreo if the unit is not rooted.
Click to expand...
Click to collapse
Actually auto tools plug in -> secure settings can do this without root. Just need adb to authorize auto tools.
My previous answer was not expanded reflecting the bare bones question.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Your answer completes the question now...
Regular, without root or ADB it is not possible... at least in Oreo because of security rules.
taskerbaby said:
I would like to refresh my ip every 3 hours.
can Tasker turn off/on airplane mode at the specified time intervals?
Click to expand...
Click to collapse
Yes, you can with rooted device. With tasker, run shell :
Enable :
settings put global airplane_mode_on 1; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state true
Disable :
settings put global airplane_mode_on 0; am broadcast -a android.intent.action.AIRPLANE_MODE --ez state false
Hello guys, im new with tasker and i have one problem.
I want tasker do something whenever "one APP is not in the background", there is some way to do that?
What do you mean by in the background? Is there a service actively running? If so, then you should be able to monitor that using an App Context
and checking the Services button.
There is also a plug-in called Tasker Process Running.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Thx for your answer, i mean "do something when a service is not running". Just open the app again when he is not running in the process.
I've downloaded Tasker Process Running, and i can see you can target %APPRunning. How can i target if not running, just tipe in IF: %apprunning ~ False?
PD: Can you tell me how to do it, if it is able?
As I suggested before, use an App Context but make sure to tap (enable) the Services button on the screen where you choose the app.
Link the task you want to run as though you wanted it to run on the launch of the app.
Long press the task name and move it to an exit task.
Now when that app's services exit, the exit task should run.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
How to disable at night that telegram won't access to Internet data or WiFi and it the morning turn back on access
No idea what OS you are running. There should be a app level permission to allow/disallow internet access to telegram. Then set a time context covering the window you want to disallow access for telegram. The entry task would change the permission, either through a custom settings action or using AutoInput to mimic the touches. Revert the process in the exit task.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
I have android 5.1. Can you give me direction how to do this with tasker? I don't fully understand rhus tasker
I really spent very little time 4 years ago on lollipop. I have no memory of how app permissions worked on that OS.
Before you can automate a task, you need to understand how you would manually achieve the same result. Can you disabled internet access to telegram yourself?
Being new to Tasker can feel intimidating, but I suggest you start with a few beginner guides to get the feel of it. There are some videos linked on the developer's website: https://tasker.joaoapps.com/guides.html. You'll want the "4.0+ UI" videos.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Ok thanks
@bsports666
You can achieve this in case you have AFWall+ installed on your device (root required). You can set up different firewall rule profiles, where you can specify which apps are allowed to access the internet. AFWall+ also has a Tasker plugin which lets you set different profiles according to your needs.
So basically you would need two profiles: one profile where Telegram has been granted network access and one profile where it doesn't have network access. Then you can trigger each profile according to your needs, for example at 10pm for night mode (no network access for Telegram) and 6am (network access for Telegram).
Portgas D. Ace said:
@bsports666
You can achieve this in case you have AFWall+ installed on your device (root required). You can set up different firewall rule profiles, where you can specify which apps are allowed to access the internet. AFWall+ also has a Tasker plugin which lets you set different profiles according to your needs.
So basically you would need two profiles: one profile where Telegram has been granted network access and one profile where it doesn't have network access. Then you can trigger each profile according to your needs, for example at 10pm for night mode (no network access for Telegram) and 6am (network access for Telegram).
Click to expand...
Click to collapse
Thanks, but I allready have adguard installed so I Cant have two firewalls
bsports666 said:
Thanks, but I allready have adguard installed so I Cant have two firewalls
Click to expand...
Click to collapse
Ok, then automate adguard with Tasker. See this Adguard knowledge base page.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
Ok, then automate adguard with Tasker. See this Adguard knowledge base page.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
Thanks, you are best!!!! I was not know that this is possible with adguard api.have adguard more tam 2 years and didn't know for this api.
Thanks best regards
Is there a way to send via Tasker a "Sync now" command for a specific Google account? Maybe with the "Send intent" action? I'm not yet very good in using complex intent actions. This is what I would like to "hit".
These types of questions are very Android OS version dependant. It's possible that the old (not updated in years) synker app will give you want. I doubt it will work on Oreo+ but no loss to try.
A quick search doesn't bring up a viable intent. On older Android versions there was apparently an intent however it appears to be just a placeholder.
That leaves using the AutoInput plug-in to mimic touches for you. In the task, I would open the app then use an AutoInput UI query to verify the proper page is open before (each) touch action. That prevents the mis-touch issue that can occur if a delay opening the app occurs.
There are many tutorials describing the use of AutoInput to interact with apps.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
I've written two tasks which turn on and off AOD using Secure Settings, specifically by changing "aod_mode" under Device Settings to 1 or 0 respectively. To test this, I simply bound them both to widgets and placed them on a home screen. The issue is that they are not working; neither task actually changes the AOD setting. When I first made them, they both worked, and nothing new has been installed between then and now. They have not worked since I initially tested them. I'm wondering if there's something interfering with Secure Settings or Tasker from firing?
When you run the task, does it show up as running in the Tasker run log?
Have you tried running the command within a terminal?
What secure settings are you using? AutoTools, a different plug-in?
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
When you run the task, does it show up as running in the Tasker run log?
Click to expand...
Click to collapse
Yes, the tasks show up in the run log.
ktmom said:
Have you tried running the command within a terminal?
Click to expand...
Click to collapse
If you mean by using Tasker's "Run an Action" option, then yes, I did try that with no different results. If there's an actual terminal that you can enter commands into, I haven't tried that.
ktmom said:
What secure settings are you using? AutoTools, a different plug-in?
Click to expand...
Click to collapse
Not sure what you're asking here, do you mean what app am I using? The only thing I'm using for this task is Tasker itself and the Secure Settings app. Secure Settings has an option under "Actions" called "Device Settings" which contains the AOD mode.
If you are talking about the Secure Settings by intangibleObject plug-in, that one is seriously out of date [emoji6]
You should be able to use the inbuilt Tasker custom setting action:
<Disable AOD>
A1: Custom Setting
Type: System
Name: aod_mode
Value: 0
Use Root: Off
<Enable AOD>
A2: Custom Setting
Type: System
Name: aod_mode
Value: 1
Use Root: Off
If that doesn't work for some reason, there is the SecureTask plug-in. This plug-in will have to be added as a device administrator.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
ktmom said:
If you are talking about the Secure Settings by intangibleObject plug-in, that one is seriously out of date [emoji6]
You should be able to use the inbuilt Tasker custom setting action:
<Disable AOD>
A1: Custom Setting
Type: System
Name: aod_mode
Value: 0
Use Root: Off
<Enable AOD>
A2: Custom Setting
Type: System
Name: aod_mode
Value: 1
Use Root: Off
If that doesn't work for some reason, there is the SecureTask plug-in. This plug-in will have to be added as a device administrator.
"find somebody that you think is undeserving of your compassion and give it to them" - Christian Picciolini
Click to expand...
Click to collapse
Thanks, I didn't know Secure Settings was out of date. I've been using it for years and I have a lot of tasks that rely on it for various things, none of them have stopped working until now. I'll keep that in mind and start trying to phase it out of my tasks. Using Tasker's built in custom setting action did the trick though.