Back to all

Android OneSignal Legacy Mode not initializing – SDK method mismatch (onOSSubscriptionChanged)

Hi Median team,

We’re running into a blocking issue with OneSignal on Android only when using Legacy Mode, and after extensive debugging on a real Android device, this appears to be an Android wrapper / SDK compatibility issue, not a configuration problem.



Environment

  • OneSignal plugin enabled
  • Legacy Mode enabled (required – device-centric model)
  • OneSignal App ID populated and verified
  • Same App ID works correctly on iOS
  • App rebuilt multiple times (including toggling OneSignal off/on)
  • JavaScript bridge authorization issues resolved
  • Issue reproduces on real Android devices (verified via adb logcat, not just Appetize)


Observed behavior

  • iOS works correctly
  • Android never completes OneSignal initialization
  • Push registration never succeeds
  • onesignalInfo() never returns usable data
  • Device registration in our backend never completes


Android real-device logs (key lines)

From adb logcat on a physical Android device:

W/OneSignal: appContext set, but please call setAppId(appId) with a valid appId to complete OneSignal init

Immediately followed by:

java.lang.NoSuchMethodException:  
P0.b.onOSSubscriptionChanged [class com.onesignal.p1]  
    at co.median.android.MainActivity.onCreate(...)

This occurs during app startup and prevents OneSignal from completing initialization on Android.



Why this looks like a platform issue

  • Median documentation states that Legacy Mode should fall back to:
    • OneSignal iOS v3 SDK
    • OneSignal Android v4 SDK (device-centric model)
  • The Android wrapper appears to reference a legacy subscription observer (onOSSubscriptionChanged)
  • The bundled OneSignal Android SDK in the built APK does not contain this method
  • This results in a runtime method mismatch and broken OneSignal initialization

This does not appear to be a JS timing issue or misconfiguration — it is a native runtime incompatibility.



Questions for the Median team

  1. What OneSignal Android SDK version is bundled when Legacy Mode is enabled?
  2. Is Legacy Mode currently supported on the latest Android template / build pipeline?
  3. Is this a known regression related to recent Android template or dependency updates?
  4. Is there a way to pin Android builds to a legacy-compatible OneSignal SDK (v4.x)?

We’re happy to provide full adb logcat output or test a patched/custom build if needed.
This issue is currently blocking Android push notifications for us.

Thanks in advance for any guidance.