AutoNotification Work Profile Notifications on Smartwatch (Android Enterprise)

Discussion in 'AutoApps' started by THerOfTime, Feb 10, 2020.

  1. THerOfTime

    THerOfTime New Member

    Joined:
    Feb 10, 2020
    Messages:
    3
    Likes Received:
    0
    First and foremost, awesome job on AutoNotification. I've been looking for something like this for ever, and am kicking myself for not finding this sooner.

    TL;DR


    I wonder if there's a way to filter notifications based on the user identity (Work or Personal Profile). I'm not seeing any obvious ways to do this.

    Details

    I'm using AutoNotification to forward notifications from work apps in the Work Profile to my Galaxy Watch Active 2. I have a Pixel, which does not populate apps from the Work Profile in the Galaxy Wearable notification settings.I've found that AutoNotification will pickup those notifications if i select the personal version of the app. I've setup a Tasker Profile to send notifications from some of my important work apps.

    Instead of replacing the notifications all together, I've actually just created a duplicate that is auto dismissed in 30 seconds. This gives me a chance to check-out the notification on my watch, while not cluttering my notifications too much when i finally get to my phone.

    Android Enterprise is a management framework Google built into the Android OS back around 5.1. It has been slowly adopted by Enterprises to managed Android devices. It has several different forms, with Work Profile being the more widely used. Work profile inflates a "Work Profile" on the device to house corporate data. Management configurations and controls can then be applied to the Work profile without affecting data/apps in the personal profile. It's great for BYOD. I think we'll see more of this in the future since Google is deprecating Device Admin.

    Anyway, via ADB you can see that the Work Profile and its apps all belong to a "Work Profile" users.

    example...
    adb shell pm list users
    UserInfo{0:Jay:13} running
    UserInfo{10:Work profile:30} running

    It would be awesome to be able to filter based on this, or better yet, be able to select apps from either profile.
     
  2. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,457
    Likes Received:
    795
  3. THerOfTime

    THerOfTime New Member

    Joined:
    Feb 10, 2020
    Messages:
    3
    Likes Received:
    0
    Wow, that was fast.

    I played with it a bit and was able to use the %anuserid variable to identify work notifications from those apps. So far i've just set an if statement in the Action, but will mess with it a bit more. I'm still new to Auto apps.

    I didn't see an obvious way to filter by variable in the tasker profile so that only work profile apps are filtered. I'll do some more reading.

    thanks!
     
  4. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,457
    Likes Received:
    795
    Ah yes, there's no way to filter in the profile directly, but in the task you can use the Stop action to stop the task if the user id doesn't match the one you need :)
     
  5. THerOfTime

    THerOfTime New Member

    Joined:
    Feb 10, 2020
    Messages:
    3
    Likes Received:
    0
    Awesome. I'll do that!
     
  6. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,457
    Likes Received:
    795
    Great! :)
     
  7. Stevil

    Stevil New Member

    Joined:
    Apr 25, 2020
    Messages:
    2
    Likes Received:
    0
    If somebody can make a short description on how to set this up for somebody who's never used tasker, I will instantly buy it (and suspect I can get several other work people to do the same). My work set up work profiles and now my Amazfit watch can't see the notifications from outlook making me miss calendar appointments.
     
  8. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,457
    Likes Received:
    795
    Hi Stevil :) What exactly couldn't you get to work?
     
  9. Barbara Kovacs

    Barbara Kovacs New Member

    Joined:
    May 1, 2020
    Messages:
    2
    Likes Received:
    0
    I am experiencing the same issue. The statement made is very simple however the steps to accomplish this are not written out.
    @THerOfTime states
    "I'm using AutoNotification to forward notifications from work apps in the Work Profile to my Galaxy Watch Active 2. I have a Pixel, which does not populate apps from the Work Profile in the Galaxy Wearable notification settings.I've found that AutoNotification will pickup those notifications if i select the personal version of the app. I've setup a Tasker Profile to send notifications from some of my important work apps"
    I've downloaded and paid for Tasker and Autonotification and poked around but cannot seem to figure out what steps are needed to get this to work.
    It would be sincerely appreciated if you can you please supply a Step by Step in how to get Calendar/Email Notifications from Outlook in a work profile to be forwarded to an Android Watch. It is frustrating because you see the notifications come up on the phone in Notification and just cannot get them to alert on the watch.
    Thank you all in advance for your support.
     
  10. joaomgcd

    joaomgcd Administrator Staff Member

    Joined:
    Feb 3, 2015
    Messages:
    9,457
    Likes Received:
    795
    Hi there. Can you please let me know if when you create a notification with AutoNotification if it shows up on your watch?
     
  11. Stevil

    Stevil New Member

    Joined:
    Apr 25, 2020
    Messages:
    2
    Likes Received:
    0
    I can say for my purposes (which sound similar), yes. And after some tweaking I think I got this to work so here goes my version of the how to. Note I do not understand how or where to use the %userid variable.

    Pre-Work
    1. Make sure you have an outlook (or whatever work application) notification active (not dismissed).
    2. Go into your watch app notification settings and choose yes to getting notifications from AutoNotfication.

    Create the Intercept
    1. In tasker go to New Profile -> Event ->Plugin ->AutoNotifciation ->Intercept
    2. Click the pencil on the configuration and choose the first item "Fill from current". Choose the application that you have the active notification on(note outlook came in as "null" followed by a - and the event tittle from outlook calendar).
    3. On the next screen I changed the Action type to created and check "package name" for what to intercept from. And then hit check.
    4. I left all the remaining AutoNotficationIntercept the default and hit check again.
    5. A screen should now show you all the details of the intercept including the specific package you are notifying on. Use the back arrow to get back to the main tasker profile.

    Create the New Notification
    1. Takser will ask you was the task you want to use, in this case "New Task."
    2. Give it name and use the check to save the name.
    3. Click the + to add a new action. Choose plugin -> AutoNotification ->AutoNotfication
    4. Click the pencil next to Configuration.
    5. I am sure you could edit a lot in here but for simplicty I chose Texts.
    6. First edit the title by clicking title. Use the symbol to the right to pull up a list of variables and choose $antitle then ok.
    7. Do the same for Text with %antext.
    8. Back out 1 screen and you could be done (check button), but I didn't want to have 2 items to dismiss. So I went into Updating and Persistency. Here I gave the notification a unique ID and a very short timeout (1 for 1 second). Check to be done.
    9. Finally back arrow 2x to get back to the main tasker screen, where you can use the last check button to be all done.

    Hope this works for you.
     
  12. Barbara Kovacs

    Barbara Kovacs New Member

    Joined:
    May 1, 2020
    Messages:
    2
    Likes Received:
    0
    @Stevil - Thank you for your instructions. I must be doing something wrong. The first time I tried it went crazy and seemed to be in a loop. i just tried again and now not getting any notifications. It doesn't seem to be too straightforward, there is no way I would have been able to get out of the gate without your instructions and even with them no success.

    What is so frustrating is the notification is right there in the notification screen on the phone, not sure why it can't just be sent to the watch.
    My issue might be Step 2 on Create the Intercept... I chose the active email notification.

    Any additional assistance would be greatly appreciated.
     
  13. scae

    scae New Member

    Joined:
    Feb 20, 2017
    Messages:
    30
    Likes Received:
    0
    Hi, outlook has a bug where it doesn't send notifications to the watch.
    To fix it for emails you can install the outlook wear os companion app. But it still won't work for calendar events. Maybe one day they will fix it.

    Edit: Re-reading this thread what Stevil is doing is slightly different that what I wrote below. To be honest their way is simper. It duplicates the Outlook notification as an Autonotification, then the watch can pick that up without more configuration required (you just need to make sure Autonotification notifications are enabled in the Wear OS or Samsung app).

    In the meantime to resolve this use AutoNotification to intercept the outlook notification on your phone then Autowear to create it on your watch.

    So profile context -> AutoNotification intercept. Enter the following into package name
    com.microsoft.office.outlook
    The reason we are using package name is that, for me at least, AutoNotification can't see work apps and can't resolve the app name (it is never set even when the notification is intercepted).
    Then create the task. Add an action for Autowear Notification.
    In the title put
    %anpackage<br>%antitle
    This puts the package name and notification title in the autowear notification on your watch. Again, no app name. I guess if you know it is coming from Outlook you could replace %anpackage with the word Outlook.
    In text put %antext.

    Next set vibration, cancel the helper and type 100,300. This gives a short wait then a 300 millisecond vibration. Increase or decrease the 300 number to increase or decrease the vibration length. The format is gap,vibrate,gap,vibrate and so on. So you can add more vibrates by typing something like 100,300,100,300.

    And that's the basics!

    If you want Outlook notification buttons working in your watch, or dismissing the notification to also dimiss the phone notification then this can be done but it is more complex.
    Also, if you want only calendar notifications and not emails this can be done too.
     
    Last edited: May 12, 2020
  14. Mr-Mauro

    Mr-Mauro New Member

    Joined:
    Jun 4, 2020
    Messages:
    1
    Likes Received:
    0
    Thank you very much, it workwd perfectly!
    The only "issue" I had has been that if I set the timeout at 1s, the notification appears and disappear from the smartwatch in 1s too.
    So I had to keep the double notification :)

     
  15. WilliamVC

    WilliamVC New Member

    Joined:
    Jun 11, 2020
    Messages:
    1
    Likes Received:
    0
    Yes, I noticed the same thing with me.... well, what do I do
     
  16. Satya

    Satya New Member

    Joined:
    Jun 22, 2020
    Messages:
    1
    Likes Received:
    0
    I don't find app named autonotification in my wear is watch... Is it auto wear app?
     

Share This Page