Skip to content

Added documentation for new areNotificationsEnabled function. #181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
27 changes: 27 additions & 0 deletions markdown/plugin/notifications-v2/areNotificationsEnabled.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# notifications.areNotificationsEnabled()

> --------------------- ------------------------------------------------------------------------------------------
> __Type__ [Function][api.type.Function]
> __Return value__ none
> __Revision__ [REVISION_LABEL](REVISION_URL)
> __Keywords__ notification, notifications, areNotificationsEnabled
> __See also__ [notifications.*][plugin.notifications-v2]
> --------------------- ------------------------------------------------------------------------------------------


## Overview

Checks whether push notifications are enabled for the app on the device. Works for iOS and Android.
Returns true if notifications are enabled, false otherwise.

## Syntax

notifications.areNotificationsEnabled()

## Example

``````lua
local notifications = require( "plugin.notifications.v2" )

local enabled = notifications.areNotificationsEnabled()
``````
2 changes: 2 additions & 0 deletions markdown/plugin/notifications-v2/index.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ To use Firebase notifications on iOS make sure to include `plugin.notifications.

#### [notifications.registerForPushNotifications()][plugin.notifications-v2.registerForPushNotifications]

#### [notifications.areNotificationsEnabled()][plugin.notifications-v2.areNotificationsEnabled]


## Project Settings

Expand Down