HoleyLight icon indicating copy to clipboard operation
HoleyLight copied to clipboard

Work profile notifications

Open kennyeni opened this issue 4 years ago • 4 comments

HI,

I have noticed that not all "Work Profile" notifications are shown on the app. I haven't looked at the code, but I suspect this is because HoleyLight:

  1. Lists all installed packages (only on the main profile though)
  2. Subscribes to all notifications

If on 1. HoleyLight listed all installed packages (irrespective of the profile) it would work.

The reason I'm saying this is because when I have an app installed on both profiles (i.e., Whatsapp as user, and work), HoleyLight works for both. When it's installed only on the Work profile it doesn't work.

Furthermore, I did a test and was able to intercept notifications from only work profile apps using Tasker. So I just think this is a matter of HoleyLight subscribing to all apps :)

P.S. Obviously, the work profile has to enable CrossProfileNoitifications for this to work.

kennyeni avatar Nov 16 '21 18:11 kennyeni

I sent a PR with the changes needed to make this work in a very basic way, you can see details on the PR: #98

kennyeni avatar Nov 17 '21 01:11 kennyeni

I remember looking at this some time ago and it didn't work right. Great if you managed to fix it that it does work right. I don't have a work profile in my current setup, how does one enable CrossProfileNotifications? Is it on by default, some setting somewhere? Which version of Android and device did you test this on?

Chainfire avatar Nov 17 '21 22:11 Chainfire

I actually have the same problem, the app can't see any installed apps from the Work Profile, and I'm without notifications for those apps.

Can you share how you managed to intercept the notifications with Tasker? I have it but I couldn't find an efficient way to achieve it.

Also please answer to @Chainfire so he can maybe implement it and we can do it natively. Thanks!

ghost avatar Nov 27 '21 03:11 ghost

I remember looking at this some time ago and it didn't work right. Great if you managed to fix it that it does work right. I don't have a work profile in my current setup, how does one enable CrossProfileNotifications? Is it on by default, some setting somewhere? Which version of Android and device did you test this on?

Hi! Sorry for the delay, I never got a notification!

It's off by default as far as I can tell, and had to be enabled through code, I added this option to "Shelter" here: https://gist.github.com/kennyeni/b1c1f90917a5e49abf51ef747b18c90a

I tested this on my Pixel 6 Pro running Android 12.

kennyeni avatar Jun 18 '22 23:06 kennyeni