All Projects → malliina → mobile-push

malliina / mobile-push

Licence: other
A push notification library

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to mobile-push

Onesignal Ionic Example
Stars: ✭ 89 (+323.81%)
Mutual labels:  push-notifications, apns
Onesignal Cordova Sdk
OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your Ionic, PhoneGap CLI, PhoneGap Build, Cordova, or Sencha Touch app with OneSignal. Supports Android, iOS, and Amazon's Fire OS platforms. https://onesignal.com
Stars: ✭ 214 (+919.05%)
Mutual labels:  push-notifications, apns
Pushy
A Java library for sending APNs (iOS/macOS/Safari) push notifications
Stars: ✭ 1,353 (+6342.86%)
Mutual labels:  push-notifications, apns
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 (+5795.24%)
Mutual labels:  push-notifications, apns
fcm
Golang client library for Firebase Cloud Messaging.
Stars: ✭ 22 (+4.76%)
Mutual labels:  push-notifications, firebase-cloud-messaging
Ionic Pwa
🚀 Build a Progressive Web App with Ionic and Angular. Push Notifications. Deployed to Firebase Hosting. The Complete guide to build your PWA. Service Workers. Lighthouse. Web Manifest
Stars: ✭ 87 (+314.29%)
Mutual labels:  push-notifications, firebase-cloud-messaging
Push Plugin
Contains the source code for the Push Plugin.
Stars: ✭ 122 (+480.95%)
Mutual labels:  push-notifications, firebase-cloud-messaging
Socket.io Push
整合了小米,华为,友盟,谷歌,苹果推送的统一解决方案
Stars: ✭ 605 (+2780.95%)
Mutual labels:  push-notifications, apns
Django Push Notifications
Send push notifications to mobile devices through GCM or APNS in Django.
Stars: ✭ 1,881 (+8857.14%)
Mutual labels:  push-notifications, apns
Pu.sh
A bash script to send iOS push notifications with the Apple Push Notification service (APNs)
Stars: ✭ 125 (+495.24%)
Mutual labels:  push-notifications, apns
Notificationpusher
Standalone PHP library for easy devices notifications push.
Stars: ✭ 1,143 (+5342.86%)
Mutual labels:  push-notifications, apns
Electron Push Receiver
A module to bring Web Push support to Electron allowing it to receive notifications from Firebase Cloud Messaging (FCM).
Stars: ✭ 158 (+652.38%)
Mutual labels:  push-notifications, firebase-cloud-messaging
Thenetwork Open
TheNetwork is a blog cum chat app. It's completely built using firebase. Users can post, comment, like and bookmark the blogs, also users can send follow requests to connect with people. Users can create events and also prepare an event roadmap. Pagination for realtime data is also included in chats, blogs and events.
Stars: ✭ 17 (-19.05%)
Mutual labels:  push-notifications, firebase-cloud-messaging
Node Gcm
A NodeJS wrapper library port to send data to Android devices via Google Cloud Messaging
Stars: ✭ 1,286 (+6023.81%)
Mutual labels:  push-notifications, firebase-cloud-messaging
Gaurun
General push notification server in Go
Stars: ✭ 804 (+3728.57%)
Mutual labels:  push-notifications, apns
Net Core Push Notifications
Lightweight .NET Core Push Notifications for Android and iOS
Stars: ✭ 105 (+400%)
Mutual labels:  push-notifications, apns
Node Pushnotifications
Push notifications for GCM, APNS, MPNS, AMZ (automatic detection from device token)
Stars: ✭ 432 (+1957.14%)
Mutual labels:  push-notifications, apns
Fcm Django
FCM Django: Send push notifications via django to websites, iOS & android mobile devices through FCM (Firebase Cloud Messaging)
Stars: ✭ 495 (+2257.14%)
Mutual labels:  push-notifications, firebase-cloud-messaging
Push Receiver
A library to subscribe to GCM/FCM and receive notifications within a node process.
Stars: ✭ 125 (+495.24%)
Mutual labels:  push-notifications, firebase-cloud-messaging
Swift Apns
Swift Framework for sending Apple Push Notification over HTTP/2 API
Stars: ✭ 147 (+600%)
Mutual labels:  push-notifications, apns

Build Status Sponsored Maven Central

mobile-push

Send push notifications to mobile devices. Supports:

  • Apple Push Notification service (APNs) using HTTP/2
  • Apple Push Notification service using the legacy binary protocol
  • Firebase Cloud Messaging (FCM) using the legacy HTTP API
  • Google Cloud Messaging (GCM)
  • Amazon Device Messaging (ADM)
  • Windows Push Notification Services (WNS)
  • Microsoft Push Notification Service (MPNS)

Installation

libraryDependencies += "com.malliina" %% "mobile-push" % "3.7.1"

Usage

To push notifications to iOS devices, you need to obtain a certificate for your app. To push notifications to Android devices, you must first obtain API keys from the provider (Google or Amazon).

To receive notifications, mobile devices must first register with your notification server. Setting this up is beyond the scope of this library; let's assume you already have all this.

Apple Push Notification service, using token authentication

val conf = APNSTokenConf(
  Paths.get("path/to/downloaded-priv-key.p8"),
  KeyId("key_id_here"),
  TeamId("team_id_here")
)
val client = APNSTokenClient(conf, OkClient.default, isSandbox = true)
val topic = APNSTopic("org.company.MyApp")
val deviceToken: APNSToken = APNSToken.build("my_hex_device_token_here").toOption.get
val message = APNSMessage.simple("Hey, sexy token!")
val request = APNSRequest.withTopic(topic, message)
val result: Future[Either[APNSError, APNSIdentifier]] = client.push(deviceToken, request)

The above sample sends a simple message without any customizations. Explore the properties of APNSMessage for more advanced messages. Here's a message with a text body and separate title:

val conf: APNSTokenConf = ???
val client = APNSTokenClient(conf, OkClient.default, isSandbox = true)
val topic = APNSTopic("org.company.MyApp")
val deviceToken = APNSToken.build("my_hex_device_token_here").toOption.get
val payload = APSPayload.full(AlertPayload("The Body", title = Option("Attention")))
val message = APNSMessage(payload)
val request = APNSRequest.withTopic(topic, message)
val result: Future[Either[APNSError, APNSIdentifier]] = client.push(deviceToken, request)

Apple Push Notification service, using certificate authentication

val certKeyStore: KeyStore = ???
val certPass: String = ???
val topic = APNSTopic("org.company.MyApp")
val deviceToken: APNSToken = APNSToken.build("my_hex_device_token_here").toOption.get
val message = APNSMessage.simple("Hey, sexy!")
val request = APNSRequest.withTopic(topic, message)
val client = APNSHttpClient(certKeyStore, certPass, isSandbox = true)
val result: Future[Either[APNSError, APNSIdentifier]] = client.push(deviceToken, request)

Firebase Cloud Messaging, legacy HTTP API

val gcmApiKey: String = ???
val deviceRegistrationId: GCMToken = GCMToken("registration_id_here")
val client = FCMLegacyClient(gcmApiKey, OkClient.default, executionContext)
val message = GCMMessage(Map("key" -> "value"))
val response: Future[MappedGCMResponse] = client.push(deviceRegistrationId, message)

Amazon Device Messaging

val clientId: String = ???
val clientSecret: String = ???
val deviceID: ADMToken = ADMToken("adm_token_here")
val client = ADMClient(clientId, clientSecret, OkClient.default, executionContext)
val message = AndroidMessage(Map("key" -> "value"), expiresAfter = 20.seconds)
val response: Future[HttpResponse] = client.push(deviceID, message)

Windows Push Notification Services

val packageSid: String = ???
val clientSecret: String = ???
val credentials = WNSCredentials(packageSid, clientSecret)
val client = new WNSClient(credentials, OkClient.default)
val payload = ToastElement.text("Hello, world!")
val message = WNSMessage(payload)
val token = WNSToken.build("https://db5.notify.windows.com/?token=AwYAAABq7aWo").toOption.get
val response: Future[WNSResponse] = client.push(token, message)

Microsoft Push Notification Service

val deviceURL: MPNSToken = MPNSToken.build("my_device_url_here").toOption.get
val client = new MPNSClient(OkClient.default, executionContext)
val message = ToastMessage("text1", "text2", deepLink = "/App/Xaml/DeepLinkPage.xaml?param=value", silent = true)
val response: Future[HttpResponse] = client.push(deviceURL, message)

Releases

To publish a new version to Maven Central:

sbt release
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].