How does NotificationManagerCompat.areNotificationsEnabled() work? I have tried to do the following appPushEnabled = String.valueOf(NotificationManagerCompat.areNotificationsEnabled()); however it is giving me an error?
Also it says it only works on some devices do I need a try catch on it?

static, if that's what you mean by "giving me an error". You'd need to call it on an instance, which you can get with thestaticfrom(Context)method. Beyond that, AFAIK, it'll returntrueunconditionally for any API<19, but should work as expected above that.