Skip to content

[Question]: How to change OneSignal App ID at runtime on Android? #2518

@murattarslan

Description

@murattarslan

How can we help?

We have an Android app where the active OneSignal App ID needs to change at runtime (based on user selection).
Calling:
OneSignal.initWithContext(context)
does not switch the subscription to the new App ID unless the app process is fully restarted.
Question:
Why is it not possible to change the OneSignal App ID at runtime, and what is the correct supported way to do this on Android?
Is a full process restart required, or is there an SDK-level method to properly re-initialize OneSignal with a new App ID?

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions