# OneSignal Integration

> Use OneSignal instead, for segments, scheduling and delivery reporting.

- **Applies to:** AppMint and Appwright
- **Source:** the Integration Guide shipped inside the app; this page is generated from it.
- **HTML:** https://freewebtoapk.com/docs/onesignal-push

Push Notifications Setup

### 1. Create OneSignal Account

Sign up for a free OneSignal account to get started with push notifications. OneSignal provides unlimited push notifications for free.

[Go to OneSignal.com](https://onesignal.com)

### 2. Create New App

In OneSignal dashboard:

- Click 'New App/Website'
- Enter your app name
- Select 'Google Android (FCM)' as platform
- Click 'Next'

### 3. Create Firebase Project

You need a Firebase project for OneSignal to work. Go to Firebase Console and create a new project or use an existing one.

[Open Firebase Console](https://console.firebase.google.com)

### 4. Add Android App to Firebase _(AppMint only)_

In your Firebase project:

- Click 'Add App' and select Android
- Enter your app's package name (MUST match the package name you set in the generator)
- Download 'google-services.json' file
- ⚠️ IMPORTANT: This is the file you will upload to the Web2APK Generator later.
- Click 'Continue' and finish setup

### 4. Add Android App to Firebase _(Appwright only)_

In your Firebase project:

- Click 'Add App' and select Android
- Enter your app's package name (MUST match the package name you set in the generator)
- Download 'google-services.json' file
- ⚠️ IMPORTANT: This is the file you will upload to Appwright later.
- Click 'Continue' and finish setup

### 5. Create Firebase Service Account Key _(AppMint only)_

OneSignal requires a Firebase Service Account JSON to send notifications from their server.

In Firebase Console:

- Go to Project Settings > Service accounts tab
- Click 'Generate new private key'
- Confirm and download the JSON file

⚠️ WARNING: This file is ONLY for the OneSignal Dashboard. Do NOT upload this file to the Web2APK generator.

[Open Firebase Console](https://console.firebase.google.com)

### 5. Create Firebase Service Account Key _(Appwright only)_

OneSignal requires a Firebase Service Account JSON to send notifications from their server.

In Firebase Console:

- Go to Project Settings > Service accounts tab
- Click 'Generate new private key'
- Confirm and download the JSON file

⚠️ WARNING: This file is ONLY for the OneSignal Dashboard. Do NOT upload this file to Appwright.

[Open Firebase Console](https://console.firebase.google.com)

### 6. Configure OneSignal with Service Account

Back in OneSignal dashboard setup:

- When asked for Firebase credentials, choose 'Upload Service Account File'
- Upload the Service Account JSON you downloaded from Firebase
- Click 'Save & Continue'
- Copy your OneSignal App ID (you'll need this in the generator)

### 7. Setup in Web2APK Generator _(AppMint only)_

In the generator app:

1. Enable 'OneSignal' toggle in Step 3
2. Click 'Upload google-services.json' button
3. Select the 'google-services.json' file (the one from Step 4)

⚠️ DO NOT upload the Service Account key from Step 5 here!

1. Paste your OneSignal App ID
2. Generate your APK

```
OneSignal App ID format:
12345678-1234-1234-1234-123456789012
```

### 7. Setup in Appwright _(Appwright only)_

In the generator app:

1. Enable 'OneSignal' toggle in Step 3
2. Click 'Upload google-services.json' button
3. Select the 'google-services.json' file (the one from Step 4)

⚠️ DO NOT upload the Service Account key from Step 5 here!

1. Paste your OneSignal App ID
2. Generate your APK

```
OneSignal App ID format:
12345678-1234-1234-1234-123456789012
```

### 8. Test Push Notifications

After installing your generated APK:

- Open the app on your device
- Go to OneSignal dashboard
- Navigate to 'Messages' > 'New Push'
- Compose and send a test notification
- You should receive it on your device within seconds

### 9. Important Notes

⚠️ Package Name: The package name in Firebase MUST exactly match your app's package name

⚠️ File Upload: Always upload google-services.json when using OneSignal, otherwise notifications won't work

⚠️ First Launch: Users must open the app at least once to receive notifications

✅ Free Forever: OneSignal is 100% free with unlimited notifications

