Popularity
1.6
Growing
Activity
0.0
Stable
37
3
5

Description

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.

Programming language: Kotlin
Tags: Kotlin     Messaging     Notifications     Android-library     Firebase     FCM     Coroutines    

FirePush alternatives and similar packages

Based on the "Notifications" category.
Alternatively, view FirePush alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of FirePush or a related project?

Add another 'Notifications' Package

README

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.

Dependencies

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

allprojects {
  repositories {
      ...
      maven { url 'https://jitpack.io' }
  }
}

Step 2. Add the dependency

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

Usage

Server Key

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

 override fun onCreate(savedInstanceState: Bundle?) {  
    super.onCreate(savedInstanceState)
    Fire.init("YOUR_SERVER_KEY_HERE")
 }

Step 2. Use Below to send Push Notification.

Fire.create()  
    .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")
    .push()

There are many other functions :

    Fire.create()  
        .setTitle("")  
        .setBody("")  
        .setBadgeCount(2)  
        .setClickAction("")  
        .setAndroidChannelId("")  
        .setColor("")  
        .setIcon("")  
        .setSound("")  
        .setTag("")  
        .setPriority(FirePushPriority.HIGH)  
        .addData("key","value")  
        .addData(HashMap())  
        .toTopic("")// or toIds or toCondition  
        .push()

There is detailed Documentation regarding FCM keys are given here.

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

Karandeep Atwal