Firebase

Simplicite.UI. Firebase

new Firebase(app, ui)

Description:
  • Firebase controller

Parameters:
Name Type Description
app Simplicite.Ajax

Ajax service

ui Simplicite.UI.Engine

Main UI controller

Methods

init()

Description:
  • Init firebase connection

Parameters:
Name Type Description
data.config Object

to init plugin (see FIREBASE_CONFIG)

data.vapidKey string

needed for firebase authent

refreshToken(token)

Description:
  • Refresh a device token on server-side

Parameters:
Name Type Description
token string

new token for the user

requestPermission()

Description:
  • Request user permission to be notified

service(data)

Description:
  • Firebase service wrapper

Parameters:
Name Type Description
data Object

service data

Properties
Name Type Description
config Object

to init plugin (see FIREBASE_CONFIG)

vapidKey string

needed for firebase authent

token string

to refresh the device token of user

body string

incoming message from app

title string

optional title

priority string

optional priority 'high' | 'normal' | 'low'

icon string

optional icon

message string

to send a message

to Object

message recipients {users, groups} or 'all'

Properties
Name Type Description
users Object

optional array of logins

groups Object

optional array of groups

showMessage(m)

Description:
  • Display a message

Parameters:
Name Type Description
m Object

message or notification

Properties
Name Type Description
notification string

optional embedded message

body string

message body

title string

optional title

priority string

optional priority 'high' | 'normal' | 'low'

data Object

optional pairs of key-value

Properties
Name Type Description
object string

optional object name

rowId string

optional object rowId