You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
yukirin000 8092d8d8cb
Merge pull request #179 from jpush/dev
4 years ago
.dart_tool 修复通知栏缺少extras字段 5 years ago
android v0.5.5版本,适配iOS本地通知 5 years ago
documents update demo 6 years ago
example 修复通知栏缺少extras字段 5 years ago
ios Bug fixed 4 years ago
lib v0.5.0适配新版本 SDK 5 years ago
test update to 0.0.5 6 years ago
.gitignore update gitignore 6 years ago
.packages 修复通知栏缺少extras字段 5 years ago
CHANGELOG.md 修复通知栏缺少extras字段 5 years ago
LICENSE create flutter project 6 years ago
README.md 修复通知栏缺少extras字段 5 years ago
pubspec.lock v0.5.0适配新版本 SDK 5 years ago
pubspec.yaml 修复通知栏缺少extras字段 5 years ago

README.md

QQ Group

JPush Flutter Plugin

安装

在工程 pubspec.yaml 中加入 dependencies

  
//github  集成
dependencies:
  jpush_flutter:
    git:
      url: git://github.com/jpush/jpush-flutter-plugin.git
      ref: master
      
// pub 集成
dependencies:
  jpush_flutter: 0.5.6

配置

Android:

/android/app/build.gradle 中添加下列代码:

android: {
  ....
  defaultConfig {
    applicationId "替换成自己应用 ID"
    ...
    ndk {
	//选择要添加的对应 cpu 类型的 .so 库。
	abiFilters 'armeabi', 'armeabi-v7a', 'x86', 'x86_64', 'mips', 'mips64', 'arm64-v8a',        
    }

    manifestPlaceholders = [
        JPUSH_PKGNAME : applicationId,
        JPUSH_APPKEY : "appkey", // NOTE: JPush 上注册的包名对应的 Appkey.
        JPUSH_CHANNEL : "developer-default", //暂时填写默认值即可.
    ]
  }    
}
iOS:
  • 在 xcode8 之后需要点开推送选项: TARGETS -> Capabilities -> Push Notification 设为 on 状态

使用

import 'package:jpush_flutter/jpush_flutter.dart';

APIs

注意 : 需要先调用 JPush.setup 来初始化插件,才能保证其他功能正常工作。

参考