All Projects â†’ franmontiel â†’ FcmNotificationHandler

franmontiel / FcmNotificationHandler

Licence: Apache-2.0 license
Android library that helps to construct and launch system tray notifications from FCM Notification messages received when the app is in foreground mimicking the default format and behavior applied when the app is background.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to FcmNotificationHandler

Onesignal Android Sdk
OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native Android or Amazon app with OneSignal. https://onesignal.com
Stars: ✭ 503 (+2694.44%)
Mutual labels:  push-notifications, fcm
React Native Firebase
🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
Stars: ✭ 9,674 (+53644.44%)
Mutual labels:  push-notifications, fcm
Easynotifylibproject
Send firebase notifications to your users very easily: A new Android Lib
Stars: ✭ 31 (+72.22%)
Mutual labels:  push-notifications, fcm
Aerogear Unifiedpush Server
🚀 AeroGear UnifiedPush Server
Stars: ✭ 432 (+2300%)
Mutual labels:  push-notifications, fcm
Django Push Notifications
Send push notifications to mobile devices through GCM or APNS in Django.
Stars: ✭ 1,881 (+10350%)
Mutual labels:  push-notifications, fcm
Node Pushnotifications
Push notifications for GCM, APNS, MPNS, AMZ (automatic detection from device token)
Stars: ✭ 432 (+2300%)
Mutual labels:  push-notifications, fcm
fcm
Golang client library for Firebase Cloud Messaging.
Stars: ✭ 22 (+22.22%)
Mutual labels:  push-notifications, fcm
andpush
Android Push Notification in Ruby: The fastest client for FCM (Firebase Cloud Messaging)
Stars: ✭ 83 (+361.11%)
Mutual labels:  push-notifications, fcm
Push Receiver
A library to subscribe to GCM/FCM and receive notifications within a node process.
Stars: ✭ 125 (+594.44%)
Mutual labels:  push-notifications, fcm
Net Core Push Notifications
Lightweight .NET Core Push Notifications for Android and iOS
Stars: ✭ 105 (+483.33%)
Mutual labels:  push-notifications, fcm
Pushnotification
PHP and Laravel Package to send push notifications to Android and IOS devices.
Stars: ✭ 395 (+2094.44%)
Mutual labels:  push-notifications, fcm
Pushnotificationplugin
Push Notification Plugin for Xamarin iOS and Android
Stars: ✭ 177 (+883.33%)
Mutual labels:  push-notifications, fcm
azure-notificationhubs-java-backend
Azure Notification Hubs SDK for Java
Stars: ✭ 31 (+72.22%)
Mutual labels:  push-notifications, fcm
Fcm Django
FCM Django: Send push notifications via django to websites, iOS & android mobile devices through FCM (Firebase Cloud Messaging)
Stars: ✭ 495 (+2650%)
Mutual labels:  push-notifications, fcm
mod push appserver
Simple and extendable appserver for XMPP pushes (aka. XEP-0357)
Stars: ✭ 24 (+33.33%)
Mutual labels:  push-notifications, fcm
Uniqush Push
Uniqush is a free and open source software system which provides a unified push service for server side notification to apps on mobile devices.
Stars: ✭ 1,238 (+6777.78%)
Mutual labels:  push-notifications, fcm
OneSignal-Ionic-Sample
No description or website provided.
Stars: ✭ 85 (+372.22%)
Mutual labels:  push-notifications, fcm
fcmpush
Firebase Cloud Messaging API wrapper for Ruby, suppot HTTP v1 API including access_token auto refresh feature.
Stars: ✭ 44 (+144.44%)
Mutual labels:  push-notifications, fcm
Onesignal Ionic Example
Stars: ✭ 89 (+394.44%)
Mutual labels:  push-notifications, fcm
Electron Push Receiver
A module to bring Web Push support to Electron allowing it to receive notifications from Firebase Cloud Messaging (FCM).
Stars: ✭ 158 (+777.78%)
Mutual labels:  push-notifications, fcm

FCMNotificationHandler

Android library that helps to construct and launch system tray notifications from FCM Notification messages received when the app is in foreground mimicking the default format and behavior applied when the app is background.

Download

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

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

Step 2. Add the dependency

dependencies {
        compile 'com.github.franmontiel:FcmNotificationHandler:1.0.2'
}

Usage

Just add the following line in the onMessageReceived method of your FirebaseMessagingService and a system notification will be shown as if the FCM message were received when the app was in background:

new RemoteMessageNotifier(getApplicationContext()).notify(remoteMessage);

You can also just map the FCM Notification to a system notification with:

new RemoteMessageToNotificationMapper(getApplicationContext()).map(remoteMessage);

or map it to a notification builder with:

new RemoteMessageToNotificationMapper(getApplicationContext()).mapToNotificationBuilder(remoteMessage);

Take into account that if your FCM message does not have any notification information (is a Data only message) an IllegalArgumentException will be thrown when calling any of the previously described methods.

License

Copyright (C) 2017 Francisco José Montiel Navarro

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].