Clone this repo:

Branches

  1. aba2f7e fix CONTRIBUTING by Matt Perry · 1 year, 2 months ago master
  2. 9342ddb fix links by Matt Perry · 1 year, 2 months ago
  3. 5170bbb better DOCS by Matt Perry · 1 year, 2 months ago
  4. dff33fc paths by Matt Perry · 1 year, 2 months ago
  5. 575f120 fix.paths by Matt Perry · 1 year, 2 months ago

flutter_gcm

A Flutter service for Cloud Messaging.

Running the sample app.

  1. The package assumes you have this directory structure (each bullet is a sibling):
  1. Ensure your environment is set up for building Flutter apps as described here.
  2. Follow these steps:
cd engine/src/third_party/gcm/examples/simple
flutter start

Using GCM in your own Flutter app.

  1. Add the following snippet to your app's pubspec.yaml:
dependencies:
  gcm:
    path: path/to/flutter_gcm/packages/gcm
  1. Add the following snippet to your app's flutter.yaml:
services:
  - gcm
  1. Register GCM in your .dart code using the sender ID provided here:
  String token = await gcm.registerGcmService(SENDER_ID, onMessageReceived);
  gcm.subscribeTopics(token, ['global']);

See gcm.mojom for the full API.

Building new .jar or .dylib files

See CONTRIBUTING.md.