Work profile?

650 views
Skip to first unread message

Ben Olson

unread,
Mar 30, 2017, 2:53:41 PM3/30/17
to Tasker
Is there a way to detect when a work profile is enabled? I'd love to be able to auto disable my work profile when I get home, and turn it back on when I leave home.

Thanks!

J.

unread,
Mar 31, 2017, 11:18:10 AM3/31/17
to Tasker
The built in variable %PENABLED returns an array of the profiles that are enabled. Just check that array like this:

If %PENABLED ~ *,Work,*

the asterisks and commas syntax are important to include...

Ben Olson

unread,
Mar 31, 2017, 11:26:01 AM3/31/17
to tas...@googlegroups.com
Wouldn't that list Tasker profiles that are enabled? That's how I read it in the docs.

I'm looking at the work profile, which is an android feature (linked above).

Thanks!

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Rich D

unread,
Mar 31, 2017, 12:20:07 PM3/31/17
to Tasker Google Groups Post

>
> Wouldn't that list Tasker profiles that are enabled? That's how I read it in the docs.

Correct..

>
> I'm looking at the work profile, which is an android feature (linked above).
>

Tasker is capable of listening for many different types of triggers. You have to give some more details on what this profile does that might signal when it it active IE..

- notification
- app in the background
- service running

Or anything that is noticeably different on your device when it is enabled. 

Ben Olson

unread,
Mar 31, 2017, 1:18:07 PM3/31/17
to tas...@googlegroups.com
At this point I feel like I'm being trolled.

I'm not trying to do anything with a profile in task. I'm asking if there is a way to detect the state of the android work profile. It's unfortunate that the word "profile" is in the name of "work profile", and people are on this list are confusing that with a "tasker profile".


What is a work profile?
Enabling a work profile allows organizations to manage the business data and applications they care about, but leave everything else on a device under the user’s control. Administrators control work profiles, which are kept separate from personal accounts, apps, and data. By default, work profile notifications and app icons have a red briefcase so they’re easy to distinguish from personal apps. Work profiles allow an IT department to securely manage a work environment without restricting users from using their device for personal apps and data.

--

Rich D

unread,
Mar 31, 2017, 2:03:44 PM3/31/17
to Tasker Google Groups Post


> At this point I feel like I'm being trolled.

Why?

>
> I'm not trying to do anything with a profile in task.

Yup, got that.

I'm asking if there is a way to detect the state of the android work profile.

You might want to re-read my post.

It's unfortunate that the word "profile" is in the name of "work profile", and people are on this list are confusing that with a "tasker profile".

Nope.

>> What is a work profile?

Yup, that's the description in the link.

But neither the link or your description give any clues on how to detect the "Android"  profile is enabled

Ben Olson

unread,
May 4, 2017, 11:31:27 AM5/4/17
to tas...@googlegroups.com

On Fri, Mar 31, 2017 at 2:03 PM, Rich D <ricp...@gmail.com> wrote:
But neither the link or your description give any clues on how to detect the "Android"  profile is enabled

Hi Rich,

I'm not sure what you are asking me. If you're asking how I would detect it, I would love for there to be a variable that I could check against to see if the android work profile was enabled.

If you're asking how I know the profile is active or not, when you disable the work profile, a status icon (on the right side, near wifi, clock, etc) appears letting the user know that the android work profile is disabled.

Thanks,
Ben

Robert Ryan

unread,
May 4, 2017, 3:07:48 PM5/4/17
to Tasker
The work profile and the personal profile use completely separate areas to store files. You should be able to use this fact to determine which profile you are currently using.

Store a small file in the root directory of the work profile. Then to check which profile you are currently using simply check for the existence of this file. If it exists, then you are using the work profile.

Reply all
Reply to author
Forward
0 new messages