Document

Install

vn-native-2-notification --action=install

Params Description
action add | remove | reinstall

Alert Default

VnNativeCore.device.notification.alert(message, alertCallback, [title], [buttonName])

Params Description
message Dialog message
alertCallback Callback to invoke when alert dialog is dismissed. (Function)
title Dialog title. (String) (Optional, defaults to Alert)
buttonName Button name. (String) (Optional, defaults to OK)

Alert has confirm

VnNativeCore.device.notification.confirm(message, confirmCallback, [title], [buttonLabels])

Params Description
message Dialog message
confirmCallback Callback to invoke with index of button pressed (1, 2, or 3) or when the dialog is dismissed without a button press (0). (Function)
title Dialog title. (String) (Optional, defaults to Alert)
buttonLabels Array of strings specifying button labels (Array) (Optional, defaults to ["OK","Cancel"])

Alert with prompt

VnNativeCore.device.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])

Params Description
message Dialog message
promptCallback Callback to invoke with index of button pressed (1, 2, or 3) or when the dialog is dismissed without a button press (0). (Function)
title Dialog title. (String) (Optional, defaults to Alert)
buttonLabels Array of strings specifying button labels (Array) (Optional, defaults to ["OK","Cancel"])
defaultText Default textbox input value (String) (Optional, Default: empty string)