Skip to content

Example of integration PPG flutter sdk with Flutter application

Notifications You must be signed in to change notification settings

ppgco/flutter-example-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

flutter-example-integration

Example of integration PPG flutter sdk with Flutter application

Description

This is a test app that you can test integration with PPG sdk on. To do so, follow instructions provided below. Note: Test app supports integration on platforms: iOS / Android

Requirements

  • PPG project
  • Access to Firebase Console
  • Access to Apple Developers console

Approximate time of installation to run test app - 30 min

Installation

  1. Clone repo
  2. Login into your PPG project
  3. Collect your project ID and API KEY (to generate API KEY navigate to https://next.pushpushgo.com/organization/yourOrganizationID/access-manager/api-keys)
  4. Open repo in Android Studio
  5. Open lib/main.dart file and provide project id and api key in code:
        final pushpushgo = PushpushgoSdk({
          "apiToken": "YOUR API KEY",
          "projectId": "YOUR PROJECT ID",
        });

Android

  1. Install Firebase CLI - open terminal and run command:

    $ curl -sL https://firebase.tools | bash
  2. Install FlutterFire CLI - open terminal and run command:

    $ dart pub global activate flutterfire_cli
  3. In terminal login to firebase:

    $ firebase login
  4. Navigate to root of your Flutter project and run:

    $ flutterfire configure --project=your-firebase-project-id

    Follow instructions provided in terminal.

    Note: If you cant use flutterfire command, add export PATH="$PATH":"$HOME/.pub-cache/bin" to your .zshrc file.

  5. Open Android folder in your Flutter project and synchronize files

  6. Generate FCM v1 credentials and upload it in PPG APP:

iOS

Generate certificate and upload it - https://docs.pushpushgo.company/application/providers/mobile-push/apns IMPORTANT - While generating certificate, you should provide the same bundle ID as it is provided in Xcode. In case of this test app, unless changed your cert should match bundle ID - com.example.flutterTestApp

Common

Navigate to root of your Flutter project and run:

$ flutter pub get

To run ios part - in Xcode open ios/Runner.xcworkspace and press CMD + R (make sure Runner is active scheme).

To run android - in Android studio open android/ then build and run app.

Functionalities

Inside application /lib/ folder you can see example implementation of PushPushGo sdk methods:

  • Subscribe
  • Unsubscribe
  • Show subscriber ID
  • Send test beacon

About

Example of integration PPG flutter sdk with Flutter application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published