Firebase Integration

Configuration

Add the following key to your odoo.conf file:

[options]
firebase_private_key_path = /home/documents/cre.json

Usage

Import and call the function anywhere within your backend Odoo modules:

from odoo.addons.firebase_integration.tools.firebase import send_firebase_notifications

msg = [
    {'token': 'DEVICE_TOKEN_1', 'body': 'Notification Body', 'title': 'Notification Title'},
    {'token': 'DEVICE_TOKEN_2', 'body': 'Another Body', 'title': 'Another Title'}
]

success_sent_message_count = send_firebase_notifications(msg)