jpush_flutter 0.1.0

  • Readme
  • Changelog
  • Example
  • Installing
  • 93

QQ Group

JPush Flutter Plugin #

安装 #

在工程 pubspec.yaml 中加入 dependencies

  jpush_flutter: 0.1.0

配置 #

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


0.1.0 #

  • 修复:调用 sendLocalNotification 接口 crash 问题;
  • 修复:iOS 启动 APP 角标自动消失问题;
  • 修复执行 flutter build apk 打包错误问题;
  • 更新配置

0.0.13 #

featurn: 适配flutter 1.7.8 升级 jpush sdk 版本为3.3.4

0.0.12 #

featurn: 修改LocalNotification的属性名为"extra"

0.0.11 #

iOS: 修复 getLaunchAppNotification 返回 null 的情况。 featurn: APNS 推送字段将 extras 字段移动到 notification.extras 中和 android 保持一致。

0.0.9 #

android: 修复 JPushReceiver 类型转换的错误。

0.0.8 #

更新 setup 方法,android 端现在支持 channel 字段,用于动态设置 channel,和 iOS 保持一致。 注意通过 setup 设置 的 channel 会覆盖 manifestPlaceholders 中的 JPUSH_CHANNEL 字段。

0.0.7 #

修改 setup 方法,添加 boolean debug 参数,如果 debug 为 true 这打印日志,如果为 false 则不打印日志。

0.0.6 #

增加 swift 工程支持。

0.0.3 #

添加 localnotification api。

0.0.2 #

修复 android 类名文件名不匹配问题。

0.0.1 #



jpush_example #

Demonstrates how to use the jpush plugin.

Getting Started #

For help getting started with Flutter, view our online documentation.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  jpush_flutter: ^0.1.0

2. Install it

You can install packages from the command line:

with Flutter:

$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:jpush_flutter/jpush_flutter.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Dec 7, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.6


Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Format lib/jpush_flutter.dart.

Run flutter format to format lib/jpush_flutter.dart.

Maintenance suggestions

The package description is too short. (-19 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
platform ^2.0.0 2.2.1
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
mockito ^3.0.0
test ^1.3.0