Project

notify_fcm

0.01
No commit activity in last 3 years
No release in over 3 years
Simple FCM Gem for sending Push Notifications to iOS as well as Android devices
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies
 Project Readme

Notify-fcm

Simple FCM (Firebase Cloud Messaging) Gem for sending Push Notifications to iOS as well as Android devices

Installation

$ gem install notify_fcm

or in your Gemfile just include it:

gem 'notify_fcm'

Requirements

  • One of the following, tested Ruby versions:
2.0.0
2.1.9
2.2.5
2.3.1

Usage

  • Example sending notifications:
require 'notify_fcm'

fcm = NOTIFY_FCM.new("API-KEY")

device_token= ["xxxxxxxx", "xxxxxxx"] # an array of one or more client device tokens

fcm.title="My Title"                  # Set Title

fcm.body ="My Body"                   # Set Body

fcm.color = "#000000"                 # Set Colour Code

fcm.sound = "default"                 # Set your Notification sound

response = fcm.send(device_token)     # Send Notification

MIT License

  • Copyright (c) 2017 Vipin Kumar. See LICENSE.txt for details.

Thanks and Support us