OneSignal Setup
All the oneSignal setup you all need!
Step-by-Step Guide to integrate OneSignal
Step 1 Download the Firebase Secret Key
1. Access Firebase Console:
- Go to the Firebase Console.
- Select your project from the list.
2. Navigate to Project Settings:
- Click on the Settings gear icon next to Project Overview in the sidebar.
- Select
Project settings
.
3. Download the Service Account Key:
- Go to the Service accounts tab.
- Click on
Generate new private key
. This will download a JSON file containing your Firebase secret key to your device. - Keep this file secure, as it contains sensitive information.
Step 2 Create a OneSignal Account
1. Sign Up for OneSignal:
- Visit the OneSignal website.
- Click on Sign Up and create a new account or log in if you already have an account.
2. Create a New App:
- After logging in, click on Add App.
- Enter a name for your app and click Next.
3. Select Your Platform:
- Choose
Flutter
from the platform options. - Click Next to proceed.
4. Configure App Settings:
- Follow the prompts to set up your app. You may need to provide details such as your Firebase project settings.
- Make sure to configure notifications according to your app requirements.
3. Set Up OneSignal in Your Flutter App
1. Access Your OneSignal App ID:
- Once your app is created, navigate to the app's settings dashboard.
- Copy the
OneSignal App ID
displayed on the dashboard.
2. Add OneSignal App ID to Project Constants:
- Navigate to your Flutter project directory:vbnet
Project > lib > core > constants > app_secrets.dart
- Open the app_secrets.dart file.
- Locate the line for OnesignalAppId and replace it with your copied
OneSignal App ID
.
4. Conclusion
-You have now successfully set up OneSignal in your Flutter app! Your app is ready to send push notifications to users..
Follow the video to enable oneSignl notifications