Lock access to certain apps and settings - Tasker Tips & Tricks

Dear Tasker-Masters,
My goal:
I want to limit the use of certain apps on my son's phone (running CM12.1) using tasker. Some apps (basically games) are time-limited, others shall not be accessible at all.
What I did (apart from deactivating the guest account):
I've defined a profile "No access" that activates when certain apps start (including play store and settings). This profile starts a task calling for a lock screen asking for a code. Locking settings is especially needed to deactivate the option to developer options and root access, access to other appstores, or the device admin section.
What my son did:
He found out, that the locked app appears in the app history. Clicking the locked app in the history immediatly brings up the lockscreen. However, there's a tiny time frame of maybe 0.1 seconds, where the locked app reacts to strokes on the display. This way, it's possible to scroll down the "setting" app until you get to the "security" and "device admin" section, and then to disable tasker from there. Now, profiles cannot read or react to whatever appears in the foreground of the display.
My question:
1. Can you think about a secure way to lock access to android settings? How would that be?
2. is it possible to deactivate the appearence of (only!) the android settings in the app history?

1. Create a profile -> Application -> Settings. This will trigger when someone goes into the settings app (yes even settings its an app).
In the task itself you can just "Go Home".
The task will trigger even if he goes to the settings from the recent app screen.
2. If your phone is rooted then just kill the settings app from running.
If not use AutoInput to press that "kill all" button (unfortunately).
Make sure also that tasker is a device administrator. You don't want your son to "accidentally" uninstall it.
You can't uninstall device admin apps without turning off that setting and he cant go into settings.
I hope these guidelines will help you.

Related

Turn Equalizer On When Headset Plugged In

I downloaded Tasker with the intent of doing one single action - turning my equalizer on whenever I plug in my earphones, as the topic title might suggest.
Is this possible? The app I use has an option to put a shortcut on my home screen that turns it on without actually opening the app. Is there a way that I can set Tasker to perform this same fucntion?
(Additionally: is there a way to set it to ignore the function if the equalizer is already on? And is it possible to set it to turn the equalizer off in the same way (there's a home screen shortcut provided for that too) when I unplug my earphones?)
You can do that, but you need to have "autoShortcut"
Sorry, I can't link to it, but search for it on google play
Or actually, you don't need it, you can do it by running scripts that emulate screen touches, but option one is the easiest by far
(EDIT: You need root to emulate screen touches)
You can launch shortcuts within Tasker by selecting "All" in the launch application task (to show all applications installed) then simply long-press on the app you installed and it will bring up relevant activities that you can directly launch.

Enable GPS and Android Auto with BT connection

Hello,
I'm new with Tasker.
I'm searching a way to enable GPS and run Android Auto when specific Bluetooth is connected.
And disable GPS and Android Auto when a specific Bluetooth is disconnected.
Thanks for your help.
This is a very common configuration. Plenty of posts for different variations.
Basically, you use a BT connected context to trigger the profile. Then the entry task has a location -> location mode action usually set too high accuracy. A second action, app -> launch app action to open android auto.
Tasker profiles, as a general rule (unless you uncheck the "restore settings" option in the profile settings), restore the conditions prior to the entry task running. You can add an exit task to change the location mode to battery saving or whatever when the profile's no longer active (BT disconnect). Killing an app is harder, but there are methods that include backing out of the app with automated back presses (input -> back button) or automated home press (app -> go home).
There is almost too much info here on xda and across the web to start with and configure various tasks with tasker. If you are so new that the above information doesn't really help you, then it will make your life easier to start with some beginner tutorials and just practice even if you don't need/want that particular team.
Tasker Quick Start
XDA thread - TASKER GUIDE (all video tutorials will updated in this thread )
XDA thread - [TUT] The Ultimate Noob/Beginners Guide

Game mode profile

So I think just about every game on my oneplus 7 pro triggers a built in thing called gaming mode. Is it possible to create a profile that begins when that gaming mode starts and ends when that gaming mode ends. In this way I adjust things like volume levels and screen on time along with what the gaming mode does. And once for all of them instead of a profile for every game.
My guess is there is a custom setting that defines the status of the gaming mode. That's only a guess since I don't have a One plus.
You could use the native tasker settings -> custom setting action to see if you can identify what changes when the game mode turns on. Tapping the magnifying icon [emoji361] will bring up an assistant. Once you identify the setting, it can be used in a profile context (system -> custom setting).
From some online reading, I also think that the games that trigger game mode are entered in a list by a user. You could use an app context with each of those games selected so your profile activates whenever the game is in the foreground.
Hitting the gear/cog icon when the profile is selected will bring up settings for the profile. One of those settings is a toggle for restoring settings when the profile exits. In the case of an app trigger, when a different app is in the foreground, the settings made in your entry task will revert.
ktmom said:
My guess is there is a custom setting that defines the status of the gaming mode. That's only a guess since I don't have a One plus.
You could use the native tasker settings -> custom setting action to see if you can identify what changes when the game mode turns on. Tapping the magnifying icon [emoji361] will bring up an assistant. Once you identify the setting, it can be used in a profile context (system -> custom setting).
Click to expand...
Click to collapse
Upon starting a game that starts game mode the only thing that this method finds is a screen brightness change. when used from state. And nothing when used from event. Strange because if a game is triggering a system setting or something there should be something for tasker to see get triggered so a profile could tie into running while it is active. Much like a profile that would trigger upon phone charging for example and end when not plugged in to charge any more. Any other idea how i can identify what is triggered (for game mode on/off) to set a profile to run along with it?
ktmom said:
From some online reading, I also think that the games that trigger game mode are entered in a list by a user. You could use an app context with each of those games selected so your profile activates whenever the game is in the foreground.
Hitting the gear/cog icon when the profile is selected will bring up settings for the profile. One of those settings is a toggle for restoring settings when the profile exits. In the case of an app trigger, when a different app is in the foreground, the settings made in your entry task will revert.
Click to expand...
Click to collapse
Yes in game mode you add whatever games you want to trigger the mode. On my LG G4 I had a profile for each game but the profiles were problematic. Some of them would turn on and off while the game was still running. If I can have a profile that runs when game mode is active and ends when game mode is not then I would completely avoid having a new profile for every game.
I was suggesting using the custom setting action in a task to determine the setting. Then use that information in a profile to monitor it.
You can attempt to manually identify the custom setting (if that's what is controlling game mode). See here.
I'm thinking the mode reverts as soon as you leave the game to return to Tasker, so the built in assistant may not catch the change. Grabbing the settings via ADB and running a diff on the before and after may be the only way to go.
Otherwise, someone in the device forums might have insight how this mode is monitored.
As far as the app trigger approach, sometimes you can stabilize the task by putting a wait action at the start of an exit task and then stop the exit task of the calling profile is active (%PACTIVE).
Thanks for the reply with a method to identify the setting. Assuming that it is a setting. Using the custom setting action is a task when tapping on the icon it says to toggle the setting and return to tasker to find out what it is the results ended the same as attempting to use it by the other ways. It returned nothing or brightness found. I'll have to give the method in the link a try and see what happens. Will report back, might be a couple days.
I finally was able to identify the setting for making the profile, thanks much for the help.

Question [Origin OS Ocean] How to get push notification from various apps (like social and messaging)

Like the title say, I'm in trouble getting the notification of any app I install : I disabled vivo.pem as suggested in one other thread and allow notofication per single app (that were turned off before) and last disabled the background battery optimization for those apps.
No luck after all, as nothing show up when I send whatsapp mess e.g.
Any ideas?
(Latest Origin firmware)
PassingComplexion said:
Like the title say, I'm in trouble getting the notification of any app I install : I disabled vivo.pem as suggested in one other thread and allow notofication per single app (that were turned off before) and last disabled the background battery optimization for those apps.
No luck after all, as nothing show up when I send whatsapp mess e.g.
Any ideas?
(Latest Origin firmware)
Click to expand...
Click to collapse
I had to use the uninstall command on vivo.pem to get my notifications to work, disable didn't help me on the latest firmware.
Also, check the app permissions, hold down app, info, app permissions.
Turn off (remove permissions if app isn't used)
Single permission settings (turn all on the switches), you can also review permissions
Go back 2 screens and select notifications, select all sliders and then check your desired app notification is going out via priority display.
Finally go to settings, battery, background power consumption management, and change the setting for the app you want to not sleep by choosing high background power usage.
So annoying, I know, too many settings and easy to forget one
Good luck!
DJorgio said:
I had to use the uninstall command on vivo.pem to get my notifications to work, disable didn't help me on the latest firmware.
Also, check the app permissions, hold down app, info, app permissions.
Turn off (remove permissions if app isn't used)
Single permission settings (turn all on the switches), you can also review permissions
Go back 2 screens and select notifications, select all sliders and then check your desired app notification is going out via priority display.
Finally go to settings, battery, background power consumption management, and change the setting for the app you want to not sleep by choosing high background power usage.
So annoying, I know, too many settings and easy to forget one
Good luck!
Click to expand...
Click to collapse
Thanks for the time spent in the long answer; however still no notifications on the tested app (whatsaap) with all the reccomended settings.
Is since 2015 I think that I don't have a chinese firmware phone and the things have changed, in fact, before, was enough to install play store and all the notification were received without further settings.
DJorgio said:
I had to use the uninstall command on vivo.pem to get my notifications to work, disable didn't help me on the latest firmware.
Also, check the app permissions, hold down app, info, app permissions.
Turn off (remove permissions if app isn't used)
Single permission settings (turn all on the switches), you can also review permissions
Go back 2 screens and select notifications, select all sliders and then check your desired app notification is going out via priority display.
Finally go to settings, battery, background power consumption management, and change the setting for the app you want to not sleep by choosing high background power usage.
So annoying, I know, too many settings and easy to forget one
Good luck!
Click to expand...
Click to collapse
Hey Guys,
i also did every setting as told and my Notification for especially WhatsApp isn't working at all.
Sometimes it does, but then all of a sudden it just refreshes when I open the App itself.
I even put it down in the Bar with the 5 Main Apps, in hope those would be refreshed or kept alive in the Background.
Not sure anyway what you mean with uninstalling vivo.pem.
Suckz kind of, because apart from that it really is a great Phone... aside from Android Auto not working.
F4ISR said:
Hey Guys,
i also did every setting as told and my Notification for especially WhatsApp isn't working at all.
Sometimes it does, but then all of a sudden it just refreshes when I open the App itself.
I even put it down in the Bar with the 5 Main Apps, in hope those would be refreshed or kept alive in the Background.
Not sure anyway what you mean with uninstalling vivo.pem.
Suckz kind of, because apart from that it really is a great Phone... aside from Android Auto not working.
Click to expand...
Click to collapse
You have to plug in phone on computerand run ADB command to uninstall vivo.pem.
Vivo.pem is a system that aggressively shut down apps to save battery power, to much shut downs and notifications stop working.
Check the thread "Origin Os initail review" on here and you will find out how to do it. Takes only 10 minutes
Robsjo said:
You have to plug in phone on computerand run ADB command to uninstall vivo.pem.
Vivo.pem is a system that aggressively shut down apps to save battery power, to much shut downs and notifications stop working.
Check the thread "Origin Os initail review" on here and you will find out how to do it. Takes only 10 minutes
Click to expand...
Click to collapse
Just did that, thanks for the advice, much appreciated
F4ISR said:
Just did that, thanks for the advice, much appreciated
Click to expand...
Click to collapse
After doing the uninstalling did it stop the issue?
I uninstalled, rather than disabled, their power saving vivo.pem, ensured all my apps had priority permissions for notifications, disabled battery saving, and added them to 'autostart' in their respective permissions, and I get proper notifications for all the social media and messaging apps. The only small glitch come with Google Messages which won't display notifications in system wide dark mode. You can get around that by enabling the 'chat bubbles' option in Google Messages settings as they do work in dark mode.
Notifications are not the only issue , i cannot select Mock gps location app in Developer Mode ...
I press on the app i want to use ,but nothing happend , the app is not selected .
Anyone noticed that too ?
Thanks
There is no need to uninstall vivo.pem, I think. Just some few steps:
1. Go to recent apps and lock it.
2. Settings -> Apps & permissions -> App manager -> WhatsApp -> Permissions -> Single permission settings -> Autostart and Startup enabled.
3. Settings -> Battery -> Background power consumption management -> WhatsApp -> Select high background power usage.
4. Settings -> Battery -> More settings -> Disable Sleep mode.
Works fine for me.
Do you use Whatssup? after the latest OS update it cannot connect to linked devices

Tasker keep screen on Android 12 issue

Hi,
I have set up the display timeout option with the settings below but it doesn't seem to work. I am using an oppo phone on Android 12.
Create a new task. Select the “+” button. Select “Display” followed by “Display timeout” Select the time span you want to set and then save. Now select “Profile” and click “+” and then “Applications” Mark the applications for which you want to activate this Tasker profile.
Then I open the app but after 15 seconds the screen turns off which is the default device screen timeout.
Is there no way to override this? Maybe get tasker to somehow keep interacting with the screen to keep it on?
I've tried this on a few apps and have got two different messages..
One says screen will stay on for 15 seconds which is the system screen time out.
Other says tasker will keep screen on but still times out after 15 seconds.
Really want this to work as some apps like games I don't want timing out after 15 seconds and I don't want to increase the system time to couple of mins for every app.
Hi,
I have the same problem on my OPPO A74 with Android 11 ((ColorOS Version V11.1). It seems impossible to create a task to change the screen time out; not in connection with a profile, shortcut or widget. The amazing thing, though - when you test the task in Tasker it works perfectly fine.
Media Volume, I think, also doesn't work. Other app connected profiles like autorotate or display brightness work well. I wanted to test more but I can't find the time.
I really miss the screen timeout though. It drains the battery too much to set it constantly to 15 minutes or so, but for some apps less simply is annoying.
The developer created some apk to help with some OPPO related problems, unfortunately, it didn't help with this one (sorry, I can't remember exactly what it was).
A kind of workaround: Once you've activated the Developer Options an your phone you can enable "Keep screen on while charging". When you need longer screen time, just plug into a charger.
But using a Tasker Profile would be much nicer.
Hope somebody knows a better trick.
Not sure if following could help your situation ( only for your gaming situation )
Create a new Profile, choose > apps > add your game apps in it. click left top arrow when finisning add gaming apps.
Tasker will pops-up task list > creat new task > Screen > Turn on.
** when above profile is complete , click the task when you are still in Profile list. Hold the task, it should pops-up with option exit task. Choose this as exit task.
Play around to see if this profile is working when gaming apps in foreground, screen never turn off.
EDIT: Try first not move the task as exit task. ( make the task as normal entry task )
eeeemc said:
Not sure if following could help your situation ( only for your gaming situation )
Create a new Profile, choose > apps > add your game apps in it. click left top arrow when finisning add gaming apps.
Tasker will pops-up task list > creat new task > Screen > Turn on.
** when above profile is complete , click the task when you are still in Profile list. Hold the task, it should pops-up with option exit task. Choose this as exit task.
Play around to see if this profile is working when gaming apps in foreground, screen never turn off.
Click to expand...
Click to collapse
Thanks for your reply.
Creating the profile is not the problem. It just seems that Tasker cannot change the system's setting. As mentioned, there is no problem when you create a profile allowing the screen to rotate using a speciffic app (and others as well ) I have no idea, why it does not work for the screen timeout.
Dreamcatcher0664 said:
Thanks for your reply.
Creating the profile is not the problem. It just seems that Tasker cannot change the system's setting. As mentioned, there is no problem when you create a profile allowing the screen to rotate using a speciffic app (and others as well ) I have no idea, why it does not work for the screen timeout.
Click to expand...
Click to collapse
I use no screen timeout, I use "screen turn on" in your situation as my op., enough I've not tried it on my Samsung A71.
eeeemc said:
I use no screen timeout, I use "screen turn on" in your situation as my op., enough I've not tried it on my Samsung A71.
Click to expand...
Click to collapse
"Display / turn on" works fine when I want the screen to turn on with a notification. But the screen turns dark after the system timeout has passed. I've also tried "Display / Stay On / with Wireless, AC or USB Power" and with the AutoInput Plugin "Screen Off Or On: Turn On / Timeout Never" but the screen always turns dark.
Those Profiles always worked on my other Smartphones (LG -D405, LG-K10 and Moto G6). I believe, it's the ColorOs that's causing the trouble.
Dreamcatcher0664 said:
"Display / turn on" works fine when I want the screen to turn on with a notification. But the screen turns dark after the system timeout has passed. I've also tried "Display / Stay On / with Wireless, AC or USB Power" and with the AutoInput Plugin "Screen Off Or On: Turn On / Timeout Never" but the screen always turns dark.
Those Profiles always worked on my other Smartphones (LG -D405, LG-K10 and Moto G6). I believe, it's the ColorOs that's causing the trouble.
Click to expand...
Click to collapse
below is a task ONLY FOR ROOTED DEVICE., no harm to try even if your's not root.
New task , run shell command , in the command input
there is a button 'use root' , check that button also.
settings put system screen_off_timeout 200000
** 200000 I'm not sure sure equals to how many second., just give it a try and if you get a longer screen on time from your issue it means it is working.
also, make another separate task, search for 'custom setting'. look up from there I thingk it is in system something about screen timeout.
EDIT: run shell command task suggest you run it manually., than see if it works. if not, restart device to check if it requires a restart in order to accept new timeout settings.
eeeemc said:
below is a task ONLY FOR ROOTED DEVICE., no harm to try even if your's not root.
New task , run shell command , in the command input
there is a button 'use root' , check that button also.
settings put system screen_off_timeout 200000
** 200000 I'm not sure sure equals to how many second., just give it a try and if you get a longer screen on time from your issue it means it is working.
also, make another separate task, search for 'custom setting'. look up from there I thingk it is in system something about screen timeout.
EDIT: run shell command task suggest you run it manually., than see if it works. if not, restart device to check if it requires a restart in order to accept new timeout settings.
Click to expand...
Click to collapse
I feel like I'm in Star Trek - "To boldly go, where no one has gone before" XD
When I try your suggestion, I only receive the message that my device isn't rooted.
Btw, for some tasks it is necessary to enable the Write Secure Setting Permission (f.e. Set Assistant), where xou have to setup ADB on your PC. Would such a procedure be registered by the phone as rooting? Anyway, I don't think I would dare to do something I know so little of.
Another solution I was thinking of, is it possible to create a tasker quick tile/ quick setting to change the system screen timeout.
So instead of having it change for certain apps which isn't working at the moment.
Maybe if we can change it from the system so will be for all apps. You can create two separate quick tiles to toggle between different screen timeout settings.
The newest version of Tasker (6.0.9) comes with Tasky.
Tasky offers the possibility to activate premade profiles. One of them is "Keep Display Awake For Apps". And that one works with my OPPO Phone.
I also tried "Auto-Mute Apps", another profile I couldn't get working. It also works fine.
To switch between Tasker and Tasky you just have to click on the "Three-Dots-Button" in the right top corner. It's not like switching apps but using different user interfaces.
Good luck!
- Sorry to say, but this seems to work for some apps and not for others. But at least sometimes it does work.
Thanks for replying back to this thread to inform me. I tried it and it works for the app I was trying to make it work for which is good! Makes it so much easier now.

Categories

Resources