Awesome Open Source
Awesome Open Source

FirePush - A Lightweight Kotlin Library for sending FCM push notification

Android Arsenal

Hi, I made this Library for a Chat based project I was working on. So I decided to make it publicly available. It is light weight Library. I have used Java's HttpURLConnection for network requests along with Kotlin Coroutines.


Step 1. Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
	  maven { url '' }

Step 2. Add the dependency

dependencies {
	  implementation 'com.github.karanatwal:FirePush:1.0.0'


Server Key

Step 1. Get Server Key and add below in your Application's/Activity's onCreate :

 override fun onCreate(savedInstanceState: Bundle?) {  

Step 2. Use Below to send Push Notification.

    .setTitle("TITLE HERE")  
    .setBody("BODY HERE")  
    .setCallback { pushCallback, exception ->  
         //get response here
    .toIds("TOKEN ID 1","TOKEN ID 2",...)  //toTopic("FOR TOPIC") or toCondition("CONDITION HERE")

There are many other functions :

        .toTopic("")// or toIds or toCondition  

There is detailed Documentation regarding FCM keys are given here.

Please mark Star, if you find this library useful, Thanks!!

Karandeep Atwal

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Kotlin (59,678
Android (40,977
Ios (19,249
Firebase (9,357
Android Library (3,303
Kotlin Android (3,090
Coroutines (1,354
Kotlin Library (764
Push Notifications (738
Kotlin Coroutines (481
Push (374
Firebase Cloud Messaging (292
Fcm (236
Related Projects