Skip to content
JPush's officially supported Flutter plugin (Android & iOS). 极光推送官方支持的 Flutter 插件(Android & iOS)。
Dart Objective-C Java Ruby
Branch: master
Clone or download
Latest commit 9c2973c Jul 26, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android V0.0.13 Jul 26, 2019
documents update demo Dec 18, 2018
example V0.0.13 Jul 26, 2019
ios update fix demo to link native plugin Jan 29, 2019
lib V 0.0.12 Jul 22, 2019
test update to 0.0.5 Oct 8, 2018
.gitignore update gitignore Sep 7, 2018
.packages V0.0.13 Jul 26, 2019
CHANGELOG.md V0.0.13 Jul 26, 2019
LICENSE create flutter project Sep 7, 2018
README.md V0.0.13 Jul 26, 2019
pubspec.lock V0.0.13 Jul 26, 2019
pubspec.yaml V0.0.13 Jul 26, 2019

README.md

QQ Group

JPush Flutter Plugin

安装

在工程 pubspec.yaml 中加入 dependencies

dependencies:
  jpush_flutter: 0.0.13

配置

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 来初始化插件,才能保证其他功能正常工作。

参考

You can’t perform that action at this time.