The issue is that we can see the token is available in the app through debugging, and we can even use collectPII to send that token to a test field in ACS and this works fine, however the setPushIdentifier function doesn't populate the field in the Registration Token in Adobe Campaign Standard.
If we kill the application and relaunch it then the registration token is correctly sent.
It appears that there is some delay in the SDK registering the token and making available for all SDK functions.
Invoking the setPushIdentifier API will send the push token to the Adobe Visitor ID service which then forwards the token to your ACS instance. It is possible that there is an issue in the backend which is why sending the push token with collectPii is able to populate the app subscriber table while the setPushIdentifier call isn't able to. We do have some troubleshooting steps available at https://aep-sdks.gitbook.io/docs/resources/troubleshooting-guides/push_notification_troubleshooting. Could you take look and see if it helps resolve your issue? If that doesn't help, I think the next step to take would be to open a customer care ticket so the appropriate team could investigate the issue.
After more investigation it appears that the setPushIdentifier function is simply setting the SDK pushIdentifier string rather than pushing this to Adobe Campaign. For that an Mobile Core > Action or collectPII is required, correct?
There seems to be some delay in this setPushIdentifier function setting the string, so when we call collectPII immediately after it isn't available for Launch to send to Adobe Campaign, despite being available generally.
How are other developers mitigating this? Or is everyone ignoring the setPushIdentifier method and manually configuring via collectPII and contextData in Launch?