codeliter/expo-notification-pusher 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

codeliter/expo-notification-pusher

Composer 安装命令:

composer require codeliter/expo-notification-pusher

包简介

Send push notifications from your backend to an expo app

README 文档

README

This is a utility library that makes sending push notifications from your server to your expo app easily.

Features

  • Send notifications to specific channels (Android only).
  • Smart sending of push notifications to different expo projects.
  • Auto batching of push notification if receivers are more than the recommended 100.

Requirements

Installation

Using Composer

To install expo-notification-pusher with Composer, add the following to your composer.json file:

{
    "require": {
        "codeliter/expo-notification-pusher": "1.*"
    }
}

or by running the following command:

composer require codeliter/expo-notification-pusher
  • Install from source Clone the repository by running the following command:
git clone https://github.com/codeliter/expo-notification-pusher.git

At the top of your code add:

require_once '/path/to/expo-notification-pusher/src/Expo/PushNotification.php';

Usage

Sending a basic Push

$send = PushNotification::send(['ExponentPushToken[oj4iK4CRA7Ry8gDCrtawef]'], 'Test','Test body');
  • The first argument must be an array of valid expo tokens. E.g ['ExponentPushToken[oj4iK4CRA7Ry8gDCrtawef]']

  • The Second argument is the title of the push. This is required.

  • The Third argument is the body of the push. This is required.

Sending a standard push

// The channel we want this notification to be pushed to (Android Only). This allows for grouping of notifications.
// The channel must have been initialized inside the expo app already.
$channel = "notifications";

// This contains data we need inside the app to move the user to a specific screen or handle some other things.
$data  = [
    "intent"=>'notification',
    'type'=>'chat',
    'message'=>'Hello'
];

$send = PushNotification::send(['ExponentPushToken[oj4iK4CRA7Ry8gDCrtawef]'], 'Test','Test body', $channel, $data);

Made with ♥ from Codeliter

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-06-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固