feedify 0.0.2 copy "feedify: ^0.0.2" to clipboard
feedify: ^0.0.2 copied to clipboard

outdated

Send Push Notifications - Speak to customers one on one with personalized, targeted & result oriented tools

Speak directly to your subscribers one on one with personalized, targeted and result oriented Push Notifications.

Features #

Choose #

  • Create something interesting and actionable with Feedify. Add images, icons, emojis, action buttons and an interesting crisp text that pops and shines on the subscriber’s device. Read more at Feedify.net.

Campaign #

  • Initiate a Drip Notifications Campaign and automate an engagement for every new visitor that comes to your site. Pour in a pre-defined stream of Notification at regular intervals and kick-start real time engagement. Read more at Feedify.net.

Count #

  • Keep a track of your performance with rich analytics that measure user interaction. Read more at Feedify.net.

Getting started (Android) #

Installation is very straightforward, you need to add app in your firebase console. You can follow this guide Firebase Setup. Just download google-services.json.

Now copy this google-services.json into your root of app assets directory this is important step.

Now in order to enable Firebase services in our Android app, we need to add the google-services plugin to our Gradle files.

First in our root-level (project-level) Gradle file (android/build.gradle), we need to add rules to include the Google Services Gradle plugin. We need to check if the following configurations are available or not:

    buildscript {
        ext.kotlin_version = '1.5.21'
        repositories {
            google()
            mavenCentral()
        }

        dependencies {
            classpath 'com.android.tools.build:gradle:4.1.0'
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
            classpath 'com.google.gms:google-services:4.3.10'
        }
    }

    allprojects {
        repositories {
            google()
            mavenCentral()
        }
    }

    rootProject.buildDir = '../build'
    subprojects {
        project.buildDir = "${rootProject.buildDir}/${project.name}"
    }
    subprojects {
        project.evaluationDependsOn(':app')
    }

    task clean(type: Delete) {
        delete rootProject.buildDir
    }

Now in our module (app-level) Gradle file (android/app/build.gradle), we need to apply the Google Services Gradle plugin. For that, we need to add the piece of code highlighted in the following code snippet to the ./android/app/build.gradle file of our project:

    apply plugin: 'com.google.gms.google-services'

    dependencies {
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        implementation platform('com.google.firebase:firebase-bom:29.0.0')
        implementation 'com.google.firebase:firebase-analytics-ktx'
    }

Now, we need to run the following command so that some automatic configurations can be made:

    flutter pub get

Using Feedify you can also send http/ https URLs into the notifications hence to support them android has now introduced to add query parameters into your AndroidManifest.xml like below:

    <queries>
            <!-- If your app opens https URLs -->
            <intent>
                <action android:name="android.intent.action.VIEW" />
                <data android:scheme="https" />
            </intent>
            <intent>
                <action android:name="android.intent.action.VIEW" />
                <data android:scheme="http" />
            </intent>
        </queries>

You can read more at android developer's site

Usage (common for Android and iOS) #

    void main() async {
      initFeedSDK();
      runApp(const MyApp());
    }

    void initFeedSDK() async {
      WidgetsFlutterBinding.ensureInitialized();
      var sdk = FeedSDK.getInstance(
          feedifyKey: 'key',
          feedifyDomain: 'domain',
          feedifyUser: 'userKey');
      // if you want to show your own custom icon instead of Feedify's own icon
      FeedSDK.setNotificationIcon('resource://drawable/ic_notification');
      // If FeedSDK.startScreen is set then all the notification payload data is passed to the startScreen
      FeedSDK.startScreen = 'test';
      Logs.setEnabled(true);
      await sdk.init(
          appName: 'your app name',
          projectId: 'firebase project Id',
          firebaseCurrentApiKey: 'firebase api key',
          firebaseMobileSdkAppId: 'firebase mobile app sdk id',
          firebaseStorageBucket: 'firebase storage key url',
          firebaseUrl: '',
          firebaseProjectNumber: 'firebase project number');
    }
  • Note: All the above information can be found in google-services.json and info.plist file that has been already downloaded from Google firebase console.

If you have set FeedSDK.startScreen and want to override the SDK's default behaviour by receiving all the data payload to the main app class, then you need to do add the below package into your pubspec.yaml file (don't forget to call - 'flutter pub get')

    get: ^4.3.7

then add the GetMaterialApp widget as below sample:

    class MyApp extends StatelessWidget {
      const MyApp({Key? key}) : super(key: key);

      // This widget is the root of your application.
      @override
      Widget build(BuildContext context) {
        return GetMaterialApp(
          onGenerateRoute: (settings) {
            if (settings.name == FeedSDK.startScreen) {
              final args = settings.arguments;
              Logs.d('onGenerateRoute $args');
            }
          },
          title: 'Flutter Demo',
          theme: ThemeData(
            primarySwatch: Colors.blue,
          ),
          home: const MyHomePage(title: 'Flutter Demo Home Page'),
        );
      }
    }

You can read the data based on the keys available inside Constants class.

Getting started (iOS) #

Integrating the Cloud Messaging plugin on iOS & macOS devices requires additional setup before your devices receive messages. There are also a number of prerequisites which are required to be able to enable messaging:

For configuring FCM on iOS devices, follow the steps mentioned in here

The most important part in order to make this library work is

0
likes
0
pub points
43%
popularity

Publisher

unverified uploader

Send Push Notifications - Speak to customers one on one with personalized, targeted & result oriented tools

Homepage

License

unknown (LICENSE)

Dependencies

awesome_notifications, device_info_plus, firebase_core, firebase_messaging, flutter, get, http, shared_preferences, url_launcher

More

Packages that depend on feedify