Users.Device.Chrome Class
Device adapter class for Chrome browser
Constructor
Users.Device.Chrome
-
fields
Parameters:
-
fields
ObjectThe fields values to initialize table row as an associative array of
{column: value}
pairs
Item Index
Methods
handlePushNotification
-
notification
-
[options]
-
[callback]
Parameters:
-
notification
Object-
[alert]
String | Object optionalEither the text of an alert to show, or an object with the following fields:
-
[alert]
String | Array optionalEither the text of an alert to show, or an object with the following fields:
-
[title]
String optionalThe title of the notification -
[body]
String optionalThe body of the notification -
[titleLocKey]
String optionalApple-only -
[titleLocArgs]
String optionalApple-only -
[actionLocKey]
String optionalApple-only -
[locKey]
String optionalApple-only -
[locArgs]
String optionalApple-only -
[launchImage]
String optionalApple-only
-
-
[url]
String optionalThe url of the notification
-
[badge]
String optionalThe badge
-
[sound]
String optionalThe name of the sound file in the app bundle or Library/Sounds folder
-
[icon]
String optionalThe icon
-
[actions]
Array optionalArray of up to two arrays with keys 'action' and 'title'.
-
[category]
String optionalApple-only. The name of the category for actions registered on the client side.
-
[payload]
Object optionalPut all your custom notification fields here
-
-
[options]
Object optional-
[view]
String optionalOptionally set a view to render for the alert body
-
[isSource]
Boolean optionalIf true, uses Q.Handlebars.renderSource instead of render
-
[expiry]
Timestamp optionalA UNIX timestamp for when the notification expires
-
[priority="high"]
String optionalCan be set to "normal" to make it lower priority
-
[collapseId]
String optionalA string under 64 bytes for collapsing notifications
-
[id]
String optionalYou can provide your own uuid for the notification
-
[silent=false]
Boolean optionalDeliver a silent notification, may throw an exception
-
[update]
Boolean optionalForce update web service worker via push notification
-
-
[callback]
Function optionalThis is called after the notification was sent. The first parameter might contain any errors. The "this" object is the Users.Device
pushNotification
-
notification
-
[options]
-
[callback]
Parameters:
-
notification
Object-
[alert]
String | Object optionalEither the text of an alert to show, or an object with the following fields:
-
[alert]
String | Array optionalEither the text of an alert to show, or an object with the following fields:
-
[title]
String optionalThe title of the notification -
[body]
String optionalThe body of the notification -
[titleLocKey]
String optionalApple-only -
[titleLocArgs]
String optionalApple-only -
[actionLocKey]
String optionalApple-only -
[locKey]
String optionalApple-only -
[locArgs]
String optionalApple-only -
[launchImage]
String optionalApple-only
-
-
[badge]
String optionalThe badge
-
[sound]
String optionalThe name of the sound file in the app bundle or Library/Sounds folder
-
[icon]
String optionalUrl of icon, can be png any square size
-
[url]
String optionalUrl to which the notifiation will be linked
-
[actions]
Array optionalArray of up to two arrays with keys 'action' and 'title'.
-
[category]
String optionalApple-only. The name of the category for actions registered on the client side.
-
[payload]
Object optionalPut all your custom notification fields here
-
-
[options]
Object optional-
[view]
String optionalOptionally set a view to render for the alert body
-
[isSource]
Boolean optionalIf true, uses Q.Handlebars.renderSource instead of render
-
[expiry]
Timestamp optionalA UNIX timestamp for when the notification expires
-
[priority="high"]
String optionalCan be set to "normal" to make it lower priority
-
[collapseId]
String optionalA string under 64 bytes for collapsing notifications
-
[id]
String optionalYou can provide your own uuid for the notification
-
[silent=false]
Boolean optionalDeliver a silent notification, may throw an exception
-
-
[callback]
Function optionalThis is called after the notification was sent. The first parameter might contain any errors. The "this" object is the Users.Device
setUp
()
The setUp() method is called the first time an object of this class is constructed.