Customize "Automagic Premium" notification

Post your feature requets for new triggers, conditions, actions and other improvements.

Moderator: Martin

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Customize "Automagic Premium" notification

Post by heilong » 09 Nov 2016 20:22

If I understand correctly, the "Automagic Premium" ongoing notification is necessary to display to make sure Automagic service keeps in memory and auto-restarts in low memory conditions, right? I wonder if it could be active but hidden in the notification drawer (root etc.)?

Anyway, if the notification is there to stay, it would be nice if it was possible to do something useful with it. E.g. update it's text to display some custom useful information. Maybe it could have custom actions added to it. Basically same features as a custom notification in status bar can do.
Would that be possible?

User avatar
kintrupf
Posts: 257
Joined: 10 Sep 2013 08:59

Re: Customize "Automagic Premium" notification

Post by kintrupf » 10 Nov 2016 08:51

If you have a rooted phone you can use the attached flow to remove the Automagic notification without side effects 8-) The flow is triggered on Automagic startup.

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Customize "Automagic Premium" notification

Post by heilong » 10 Nov 2016 09:54

It works. If I understand correctly, it disables notifications for automagic first, which removes all notifications, then it reenables them and re-adds SmartUnlock's notification. Automagic's notification is not re-added automatically.
Is there any benefit between using this flow vs. just unchecking "Show status icon" in Automagic Preferences? I wonder if "show status icon" does something more setup than just posting an ongoing notification? Actually SmartUnlock's notification is also an ongoing one, so perhaps it already serves the same function of preventing Automagic getting killed?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Customize "Automagic Premium" notification

Post by Martin » 10 Nov 2016 20:56

The wand-notification posted by Automagic is required to increase the priority of Automagic to 'foreground' priority. It signals Android that killing the app has a noticeable effect to the user, like stopping a music player or video player would have so Android will usually not kill such apps except when running under extreme memory pressure (opening many Chrome tabs or huge pages can lead to this situation). Disabling 'Show status icon' lowers the priority of Automagic so Android will kill it quite often.
Temporarily blocking Automagic notifications removes the notification but does not lower the priority of Automagic on the ROMs I've tested so far. Just posting a regular ongoing notification does not affect the priority.
Enabling the accessibility service of Automagic can also have a positively affect the priority since Android avoids killing apps hosting a running accessibility service (usually resolves trouble when using Chrome).

Regards,
Martin

P-chu
Posts: 32
Joined: 05 Nov 2016 19:12

Re: Customize "Automagic Premium" notification

Post by P-chu » 10 Nov 2016 21:41

The only problem I have with Automagic's priority-securing wand-notification is that it clutters the notification screen, and it is not like I need to know it is running like some other apps (such as a antimalware app). What I think would be helpful is if there is a way that the wand-notification can be shrunk/expanded by preference and manual as I believe that may be the only possible from Automagic and not from the Android OS. While the new extension, Good-Lock, to the Android OS (since 5?) allows me to store notifications such as Automagic's wand-notification away in minimal folder bar (that I can open and view anytime), any other notifications generated by Automatic such as the ones generated by the flows are classified as being from Automagic, and Good-Lock would place them all in the little folder I made instead of the main notification screen.
P-chu

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Customize "Automagic Premium" notification

Post by heilong » 10 Nov 2016 22:57

Martin, so you're saying it's safe to use kintrupf's flow. I have reservations about enabling the accessibility service because of issue with encryption. I didn't test if this is reproducible on my ROM (my encryption password is separate from lock screen PIN so it might not be an issue).

Would it be possible to customize the wand notification? E.g. if I could reuse it for SmartUnlock's ongoing notification, there wouldn't be any need for kintrupf's flow. Or is this notification somehow special, presenting a difficulty to add such customizations to it?

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Customize "Automagic Premium" notification

Post by Martin » 11 Nov 2016 20:52

The two actions that block notifications of Automagic and enable the notifications again uses root but not the accessibility service. You can also block/unblock the notification manually if you don't have root or don't want to use the flow for some reason: System settings->Apps->Automagic->Notifications: enable Block all and disable again.

It's not possible to customize the wand notification yet. It's on my list of requested features but I did not yet have the time to implement it. The notification is mostly the same as other notifications so it should be possible to provide the feature. Maybe there are unexpected side effects so I can not guarantee that the feature really becomes available.

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Customize "Automagic Premium" notification

Post by heilong » 11 Nov 2016 23:29

All right, I've enabled the accessibility service and my device encryption appears to be unaffected. Probably because I've changed my encryption password to be separate from the lockscreen PIN.
So I'm turning off "Automagic status icon" in the settings and will see how it goes.

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: Customize "Automagic Premium" notification

Post by MURTUMA » 12 Nov 2016 08:39

Although Martin said that hiding the notification through AM settings could affect the app stability, so far I have not encountered any problems that could be traced to that setting. I have seen only two times AM is killed by system due to memory issues. Both of the times one app had serious memory leak which rendered whole system unstable, but during regular heavy usage there's been no problems. AM seem to be exeptionally stable even without the notification. My device is Galaxy J5 (2016) which is a cheap budget version of SGS5-generation so more powerful devices probably should behave equally well.

User avatar
heilong
Posts: 77
Joined: 18 Oct 2016 15:20

Re: Customize "Automagic Premium" notification

Post by heilong » 12 Nov 2016 11:12

MURTUMA, good to hear that. I got a 2 GB RAM version of Motorola Moto G3 and I rarely use memory-heavy apps (if I ever use the browser, it's usually one or two tabs). So I really doubt I'll have the "memory full" situation often. And then I'm sure the accessibility service of Automagic will do a reasonable job to prevent it from being killed.

Locked