EasyPlexVersion 2.4 handbook
← Main documentation

EasyPlex 2.4 · notification delivery

Connect OneSignal.
Keep secrets server-side.

EasyPlex already includes OneSignal Android SDK 5.9.6. Buyers connect Firebase Cloud Messaging to OneSignal, save the OneSignal identifiers in the web panel, and let the mobile app initialize from downloaded settings—without hardcoding credentials in Java.

Prerequisites

Make the identities agree first

Most notification failures are identity mismatches. Decide the final release package name before creating Firebase and OneSignal applications.

01

Final Android package

Use the release applicationId from app/build.gradle. If you rename it, also update Firebase, OAuth, App Links, Facebook, and store configuration.

02

Firebase project

Add an Android app with that exact package name. Download its current google-services.json.

03

Real test device

Use Android with Google Play services and internet access. Android 13+ requires runtime notification permission.

Step 1 · Google

Prepare Firebase and FCM HTTP v1

  1. Add the Android application

    In Firebase Console, create or open the production project. Add Android using the exact release package name, then download google-services.json into the Android source at app/google-services.json.

  2. Enable Firebase Cloud Messaging API v1

    Open the connected Google Cloud project and ensure Firebase Cloud Messaging API v1 is enabled. Do not configure the retired legacy server key workflow for a new installation.

  3. Create the server credential

    Generate a dedicated Firebase service-account JSON for messaging. The credential needs permission to create FCM messages and read the Firebase project. Save it in a private password or secrets manager.

  4. Check the Sender ID

    In Firebase Project Settings → Cloud Messaging, note the Sender ID. It must match the Firebase project shown when the credential is uploaded to OneSignal.

Official OneSignal FCM credential guide ↗

Step 2 · OneSignal

Create the OneSignal application

  1. Create or select an app

    Sign in to OneSignal, create an application for this EasyPlex release, and choose Google Android (FCM) under Settings → Push & In-App.

  2. Upload FCM HTTP v1 credentials

    Upload the private Firebase service-account JSON to the Google Android platform configuration. Confirm that the displayed Firebase project and Sender ID match the Android app.

  3. Copy the App ID

    Open Settings → Keys & IDs and copy the 36-character OneSignal App ID. This is a public identifier used by the Android SDK.

  4. Create an app-level API key

    Create a key scoped to this OneSignal app and store it immediately. This private key allows the EasyPlex server to send notifications. Do not use an Organization API key and do not expose the app key in Android code.

ValueWhere to find itWhere EasyPlex uses itSecret?
OneSignal App IDApp → Settings → Keys & IDsPanel setting returned to the Android SDKNo
App API keyApp → Settings → Keys & IDs → Add KeyEasyPlex backend when sendingYes
Organization ID/keyOrganization settingsNot required for normal EasyPlex sendingOrganization key is secret
FCM service accountFirebase / Google CloudUploaded to OneSignal platform configurationYes
Official OneSignal Keys & IDs guide ↗

Step 3 · Web panel

Save the provider in EasyPlex

AdminSettingsNotifications / FirebaseDefault Notification Service: OneSignal
  1. Select OneSignal. The OneSignal Configuration fields appear only when it is the selected notification service.
  2. OneSignal App ID: paste the public UUID copied from the same OneSignal app connected to your Firebase project.
  3. OneSignal REST API Key: paste the app-level sending key. This value stays on the Laravel backend and must never be copied into Android resources or Gradle properties.
  4. OneSignal Segment: enter the exact audience segment name shown in OneSignal. Current accounts commonly use Subscribed Users; older applications may expose All. Custom segments must already exist in OneSignal.
  5. Save the settings. If the panel uses cached settings, run php artisan optimize:clear, restart the queue worker, and fully restart the Android app.

Step 4 · Android

No OneSignal key belongs in Java

The supplied EasyPlex 2.4 project already contains the required SDK, manifest extension, notification handler, and user login/logout integration.

Included dependency · app/build.gradle
implementation 'com.onesignal:OneSignal:5.9.6'
  • Place the Firebase client file at app/google-services.json.
  • Keep the final package name identical to the Firebase Android app registration.
  • Do not add the OneSignal App ID to Constants.java, strings.xml, or Gradle properties; EasyPlex reads onesignal_app_id from protected panel settings.
  • When the App ID is empty, EasyPlex keeps the OneSignal FCM receiver disabled. After settings download, a non-empty App ID enables the receiver and initializes OneSignal.
  • After an EasyPlex user signs in, the app identifies that user to OneSignal with the EasyPlex user ID. Logout clears the OneSignal external identity.
Build a clean release
gradlew.bat clean
gradlew.bat assembleRelease

Step 5 · Verification

Prove registration before sending

01

Open the app

Install the release-signed build, launch with internet access, and allow notifications when Android prompts.

02

Find the subscription

In OneSignal → Audience → Subscriptions, confirm the device is subscribed under the expected app and FCM platform.

03

Send from EasyPlex

Open Admin → Notifications, compose a small custom message, confirm the audience label, and send it.

  1. Start with a text-only notification to remove image-hosting and deep-link variables.
  2. Confirm receipt with the app in the foreground, background, and fully closed.
  3. Then test a movie or series payload and verify that tapping it opens the correct EasyPlex screen.
  4. Finally test an HTTPS custom link and an image hosted on a publicly reachable HTTPS URL.

Audience

Understand segments and signed-in users

Broadcasts

The panel’s configured segment is used for general notifications. Copy its name exactly from OneSignal, including spaces and capitalization. Use a small test segment before broadcasting to every subscriber.

EasyPlex content notifications can carry a type, TMDB/content identifier, title, message, image, and optional custom URL.

Individual users

EasyPlex associates a signed-in mobile user with OneSignal using the EasyPlex numeric user ID as the external ID. User-targeted backend jobs can therefore address that external identity after the user has opened the configured app and signed in.

If a user reinstalls, changes Firebase project, or has not opened the latest build, allow the app to register again before testing targeted delivery.

Security

Treat the app key like a password

Public

App ID

The App ID identifies the OneSignal application and may be used by the mobile SDK. It cannot authorize message sending by itself.

Private

App API key

Keep it only in the protected backend setting. Never commit, email, screenshot, expose through public settings JSON, or package it in Android.

Private

FCM service account

Store it in OneSignal/Firebase and a secure backup. Never confuse it with Android google-services.json.

  • Create separate OneSignal apps and keys for development and production.
  • Restrict the OneSignal app key to the VPS public IP when a stable IP and your OneSignal plan support allowlisting.
  • Rotate an exposed key immediately, replace it in the panel, clear caches, and send a controlled test.
  • Use individual OneSignal team accounts with least privilege and enable multi-factor authentication.

Diagnostics

When a push does not arrive

SymptomLikely causeCorrective action
Device never appearsMissing/wrong App ID, app has not downloaded settings, no Play services, or notification SDK failed to initializeConfirm the settings API returns the expected public App ID, reinstall the clean release, open it online, and inspect Logcat for OneSignal.
FCM configuration errorService-account JSON belongs to a different Firebase project or FCM v1 is disabledMatch Firebase Sender ID with OneSignal’s Android platform, enable FCM API v1, and upload the correct credential.
401 / unauthorizedWrong, expired, rotated, or mismatched OneSignal app API keyCreate a key under the same OneSignal app as the App ID, replace the panel value, save, and clear Laravel configuration cache.
No subscribed recipientsPermission denied, wrong segment, or device subscription is opted outGrant Android notification permission, confirm subscription state, and copy an existing segment name exactly.
Accepted but not displayedBattery restrictions, disabled notification channel, device offline, or OEM background limitsTest on another physical device, re-enable the app’s notification channel, remove battery restrictions for testing, and inspect OneSignal delivery status.
Correct message, wrong screenInvalid content type, content ID, or custom link payloadSend a text-only notification first, then test one supported content type and identifier at a time.
Only some users receiveUsers did not open the current build, changed FCM project, or are outside the selected segmentAsk users to open/update the app, verify their subscription and external ID, then review segment filters.
Useful Android log filter
adb logcat | findstr /I "OneSignal FirebaseMessaging EasyPlexApp"

Final pass

OneSignal launch checklist

One provider. Four matching identities.

Panel. OneSignal.
Firebase. Android.

Return to the main handbook ↑
Copied to clipboard