0

How can I disable heads-up (Pop on screen) notifications per app or globally using AirWatch to push custom XML to managed Android devices?

Here are the logs off the phone when toggling heads-up notifications for a single app:

Enabling "Pop on screen" (heads up):

sysui_multi_action: [757,856,758,6,759,1,806,com.cisco.webapi,857,slnk_webapi_service_channel_1663791852359,858,4]
sysui_multi_action: [757,853,758,4,854,notification.ChannelNotificationSettings/high_importance,1089,1]
commit_sys_config_file: [notification-policy,22]

Disabling "Pop on screen" (heads up):

sysui_multi_action: [757,856,758,6,759,1,806,com.cisco.webapi,857,slnk_webapi_service_channel_1663791852359,858,3]
sysui_multi_action: [757,853,758,4,854,notification.ChannelNotificationSettings/high_importance,1089,0]
commit_sys_config_file: [notification-policy,33]

Other logs before toggling:

com.android.settings.applications.appinfo.AppNotificationPreferenceController
com.android.settings.notification.AppNotificationSettings
sysui_multi_action: [324,1,757,1090,758,12,806,com.android.settings,871,com.android.settings.SubSettings,1091,254]
sysui_multi_action: [319,514,322,511,325,440,757,761,758,8,759,2,806,com.android.settings,871,com.android.settings.SubSettings,904,com.android.settings,905,0,1320,9,1321,5]
com.android.settings.notification.ChannelNotificationSettings
sysui_multi_action: [324,1,757,1090,758,12,806,com.android.settings,871,com.android.settings.SubSettings,1091,201]

With root access I know it's possible with adb tool using this:

adb shell settings put global heads_up_notifications_enabled 1

This isn't feasible for our environment due to security restrictions and number of devices managed.

Not sure where to start with this but looking at Android's source code it appears these are the global flags for these type of notifications:

@UnsupportedAppUsage
public static final String HEADS_UP_NOTIFICATIONS_ENABLED = "heads_up_notifications_enabled";

/** @hide */
@UnsupportedAppUsage
public static final int HEADS_UP_OFF = 0;
/** @hide */
@UnsupportedAppUsage
public static final int HEADS_UP_ON = 1;

Ideally, I'd like to disable these per app but I'd be okay with disabling globally too. If anyone has samples of custom attribute XML or anything else that modify notifications per app through AirWatch, please share your examples.

0 Answers0