You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On iOS everything is fine but on Android, this action is not being fired.
On iOS,
private void OnPushSubscriptionStateChanged(PushSubscriptionState current, PushSubscriptionState previous) {
if (current.isSubscribed) {
Debug.Log(current.userId); // <--- I am able to get users' id here
}
}
Why isn't this event being fired on Android?
If I do the following (wait for 5 seconds), I am able to get userId
1. Initialize OneSignal with `OneSignal.Default.Initialize(OneSignalAppId);`2. Register for PushSubscriptionStateChanged event with `OneSignal.Default.PushSubscriptionStateChanged += OnPushSubscriptionStateChanged;`3.`OnPushSubscriptionStateChanged` handler is not being called on Android (works on iOS)
What did you expect to happen?
I expected the app to work on the same way like it works on iOS.
Unity version
2022.3.1f1
OneSignal Unity SDK version
3.0.9
Platform
Android
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
What happened?
I am trying to get subscribed users' userId from the PushSubscriptionStateChanged action.
On iOS everything is fine but on Android, this action is not being fired.
On iOS,
Why isn't this event being fired on Android?
If I do the following (wait for 5 seconds), I am able to get userId
Steps to reproduce?
What did you expect to happen?
I expected the app to work on the same way like it works on iOS.
Unity version
2022.3.1f1
OneSignal Unity SDK version
3.0.9
Platform
Android
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: