Flutter Push Notifications

You will have to create a free Native Notify account to get your App ID and App Token in order for the native_notify package to work. Click the "Sign Up Free" button in the top right corner of this page to create a free account.

Start Here

Start Here Guide:

These instructions show how to add Native Notify push notifications to your Flutter app. After you follow these instructions, you will be able to send mass push notifications to all of your app users.

This video walks you through the Start Here Instructions below:

lib > main.dart file setup:

Step 1:

Paste this commands into your terminal and click return:

flutter pub add native_notify

Step 2:

In your "lib > main.dart" file, make sure these imports are included at the top of the screen:

import 'package:flutter/material.dart';

import 'package:native_notify/native_notify.dart';

Step 3:

In your "lib > main.dart" file, in the "void main()" function, paste this code BEFORE runApp():

void main() {

     WidgetsFlutterBinding.ensureInitialized();

     NativeNotify.initialize(your-app-id, 'your-app-token', null, null);

     runApp(myApp());

}

Do NOT delete the 'null' parameters, or Native Notify push notifications will not initialize properly.

android > app > build.gradle file setup:

Step 1:

In the "android" object, change "compileSdkVersion flutter.compileSdkVersion" to:

compileSdkVersion 31

Step 2:

In the "android > defaultConfig" object, change "minSdkVersion flutter.minSdkVersion" to:

minSdkVersion 21

ios > Podfile file setup:

Step 1:

The "platform :ios" at the top of the sceen needs to be '10.0' or higher. Here is an example:

platform :ios, '10.0'

Test Native Notify Push Notifications:

Step 1:

Open an Android emulator. Push notifications will NOT work in an iOS simulator.

Step 2:

flutter run

Step 3:

Send a push notification from your NativeNotify.com account.

Android

Android Production Setup Guide:

These instructions show how to get Native Notify push notifications working in Android production mode. After you follow these instructions, you will be able to send push notifications to all of your Android app users.

This video walks you through the Android Production setup guide:

iOS

iOS Production Setup Guide:

These instructions show how to get Native Notify push notifications working in iOS production mode. After you follow these instructions, you will be able to send push notifications to all of your iOS app users.

Make sure you follow the 'Start Here' instructions BEFORE you set up iOS production push notifications. iOS production push notifications will not work without first following the 'Start Here' instructions.

This video walks you through the iOS Production setup guide:

Indie Push

Indie Push Notification Setup Guide:

These instructions show how to send customized push notifications to individual users. We call these notifications "Indie" push notifications.

Make sure you follow the 'Start Here' instructions BEFORE you set up Indie Push Notifications. Indie Push Notifications will not work without first following the 'Start Here' instructions.

This video walks you through the Indie Push Notification setup guide:

Update Android Push Icon

Update Android Push Icon Guide:

This guide will show you how to update your Android push notification icon. (Your iOS push notification icon should be your default app icon.)

This video walks you through the Update Android Push Icon guide: