Skip to content

Instantly share code, notes, and snippets.

@bhrott
Created November 16, 2016 11:54
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhrott/0e53b36eef3dafcd8a9e3cfa4e08ac4c to your computer and use it in GitHub Desktop.
Save bhrott/0e53b36eef3dafcd8a9e3cfa4e08ac4c to your computer and use it in GitHub Desktop.
React Native : Android : Check notification is enabled
@ReactMethod
public void areNotificationsEnabled(Promise promise) {
try {
Boolean areEnabled = NotificationManagerCompat.from(getReactApplicationContext()).areNotificationsEnabled();
promise.resolve(areEnabled);
}catch (Exception e) {
promise.reject(e);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment