-
Notifications
You must be signed in to change notification settings - Fork 62
Closed
Description
What happened?
after making the basic settings, the PushSubscriptionStateChanged method is called when the application is first launched, but does not pass the userid.
Steps to reproduce?
1. Install OneSignal
2. Add the line OneSignal.Default.Initialize(osconf.OneSignalKey);
3. Add the line OneSignal.Default.PushSubscriptionStateChanged += (current, previous) => {Debug.Log("Start User " + OneSignal.Default.PushSubscriptionState.userId); };What did you expect to happen?
At the moment I have created a method that every 4 seconds calls the initialization of a new one and after 3 calls the system starts
IEnumerator WaitOS()
{
yield return new WaitForSeconds(4);
if (!notreload)
{
OneSignal.Default.Initialize(osconf.OneSignalKey);
StartCoroutine(WaitOS());
}
}
example code how it works now
Unity version
2021.3.16 (latest)
OneSignal Unity SDK version
3.0.10
Platform
Android
Relevant log output
when displaying the full log, I see the following moment
2023/06/01 17:48:10.099 8687 8857 Info OneSignal Device registered, UserId = ххххххх
UserId removed for security purposes
but PushSubscriptionStateChanged method is not calledCode of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels