braze_plugin 0.2.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 68

Braze Flutter SDK #

Effective marketing automation is an essential part of successfully scaling and managing your business.

This project contains the Braze plug-in package, a specialized package that allows integrators to use certain Braze APIs from Flutter app code written in Dart.

Getting Started #

  1. Follow the directions in the Install Tab to import Braze into your project.

  2. Instantiate an instance of the Braze plugin by calling new BrazePlugin()

Android #

  1. In your res/values directory, create a file called appboy.xml and add your API key and set your custom endpoint as specified in our public documentation.

  2. Add required permissions to your AndroidManifest, as specified in our public documentation.

  3. To integrate push, follow the directions in our [public documentation(https://www.braze.com/docs/developer_guide/platform_integration_guides/android/push_notifications/integration/). Note that only registration using our "automatic FCM registration" is currently supported from Flutter apps.

iOS #

  1. Call Appboy.startWithApiKey() in your AppDelegate's didFinishLaunchingWithOptions delegate method as specified in our [public documentation])(https://www.braze.com/docs/developer_guide/platform_integration_guides/ios/initial_sdk_setup/initial_sdk_setup/#step-4-updating-your-app-delegate).

  2. Set your custom endpoint as specified in our public documentation. We recommend the Info.plist approach.

In-app messages #

Disabling automatic display #

Native in-app messages display automatically out of the box on Android and iOS.

To disable automatic in-app message display for Android, create a boolean element named com_appboy_inapp_show_inapp_messages_automatically in your appboy.xml and set it to false.

To disable automatic in-app message display for iOS, implement the ABKInAppMessageControllerDelegate delegate as described in our public documentation. Your beforeInAppMessageDisplayed delegate implementation should return ABKInAppMessageDisplayChoice.discardInAppMessage. For an example, see AppDelegate.swift in our example app.

In-app message data callback #

You may set a callback in Dart to receive Braze in-app message data in the Flutter host app. Note that analytics are not currently supported on messages displayed through the callback.

To set the callback, call BrazePlugin.setBrazeInAppMessageCallback() from your Flutter app with a function that takes a BrazeInAppMessage instance. The BrazeInAppMessage object supports a subset of fields available in the native model objects, including uri, message, header, buttons, and extras.

The callback should begin to function on Android immediately after being set.

On iOS, you will additionally need to implement the ABKInAppMessageControllerDelegate delegate as described in our public documentation. Your beforeInAppMessageDisplayed delegate implementation must call BrazePlugin.process(inAppMessage). For an example, see AppDelegate.swift in our example app.

0.2.0 #

Breaking #
Added #
  • Adds addAlias() to the public API interface.
  • Adds requestLocationInitialization() to the public API interface.
  • Adds getInstallTrackingId() to the public API interface.
  • Adds support for disabling native in-app message display on Android.
    • To disable automatic in-app message display, create a boolean element named com_appboy_inapp_show_inapp_messages_automatically in your Android app's appboy.xml and set it to false.
    • Note: Disabling automatic in-app message display was already possible for iOS. For instructions, see README.md.
  • Adds a Dart callback for receiving Braze in-app message data in the Flutter host app.
    • Analytics are not currently supported on messages displayed through the callback.
    • To set the callback, call BrazePlugin.setBrazeInAppMessageCallback() from your Flutter app with a function that takes a BrazeInAppMessage instance.
      • The BrazeInAppMessage object supports a subset of fields available in the native model objects, including uri, message, header, buttons, and extras.
    • The callback should begin to function on Android immediately after being set.
    • On iOS, you will additionally need to implement the ABKInAppMessageControllerDelegate delegate as described in our public documentation. Your beforeInAppMessageDisplayed delegate implementation must call BrazePlugin.process(inAppMessage). For an example, see AppDelegate.swift in our example app.

0.1.1 #

  • Formatted braze_plugin.dart.

0.1.0 #

  • Removes the unused dart:async import in braze_plugin.dart.
  • Makes _callStringMethod private in braze_plugin.dart.
  • Adds basic dartdoc to the public API interface.

0.0.2 #

  • Updates the version of Kotlin used by the Android plugin from 1.2.71 to 1.3.11.

0.0.1 #

example/README.md

braze_plugin_example #

Demonstrates how to use the braze_plugin plugin.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

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


dependencies:
  braze_plugin: ^0.2.0

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:braze_plugin/braze_plugin.dart';
  
Version Uploaded Documentation Archive
0.2.0 Apr 19, 2019 Go to the documentation of braze_plugin 0.2.0 Download braze_plugin 0.2.0 archive
0.1.1 Feb 26, 2019 Go to the documentation of braze_plugin 0.1.1 Download braze_plugin 0.1.1 archive
0.1.0 Feb 26, 2019 Go to the documentation of braze_plugin 0.1.0 Download braze_plugin 0.1.0 archive
0.0.2 Feb 21, 2019 Go to the documentation of braze_plugin 0.0.2 Download braze_plugin 0.0.2 archive
0.0.1 Feb 13, 2019 Go to the documentation of braze_plugin 0.0.1 Download braze_plugin 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
37
Health:
Code health derived from static analysis. [more]
98
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

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

  • Dart: 2.2.0
  • pana: 0.12.14
  • Flutter: 1.4.7

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/braze_plugin.dart. (-1.99 points)

Analysis of lib/braze_plugin.dart reported 4 hints:

line 24 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 289 col 3: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 299 col 20: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 302 col 20: The class 'Future' was not exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8