Class: Firebase

Simplicite.UI.Firebase

new Firebase

Firebase controller

Parameters:
Name Type Description
app Simplicite.Ajax Ajax service
engine Simplicite.UI.Engine Main controller
Source:
  • firebase.js, line 13

Methods

init

Init firebase connection

Parameters:
Name Type Description
data.config object to init plugin (see FIREBASE_CONFIG)
data.vapidKey string needed for firebase authent
Source:
  • firebase.js, line 68

refreshToken

Refresh a device token on server-side

Parameters:
Name Type Description
token string new token for the user
Source:
  • firebase.js, line 145

requestPermission

Request user permission to be notified

Source:
  • firebase.js, line 169

service

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 cordova 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
Source:
  • firebase.js, line 37

showMessage

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
Source:
  • firebase.js, line 135