We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems that method register here performs a registerForActivityResult call for foreground activity: https://github.com/NativeScript/firebase/blob/main/packages/firebase-messaging-core/index.android.ts#L62
registerForActivityResult
There are cases that foreground activity is one that does not implement method registerForActivityResult. For instance, there was a recent report for payments plugin that had an issue because of this. That is because payments plugin uses an activity that extends android.app.Activity (found an example from fork of billing library): https://github.com/DimaDake/billing/blob/master/library/src/main/java/com/android/billingclient/api/ProxyBillingActivity.java
payments
As a result, that activity became foregroundActivity resulting in error described in issue NativeScript/payments#19. Foreground activity is used for register() call here: https://github.com/NativeScript/firebase/blob/main/packages/firebase-messaging-core/index.android.ts#L274
foregroundActivity
register()
I can see that register() call was commented out in latest firebase version but we should be careful if we are going to use it again or already use it elsewhere: https://github.com/NativeScript/firebase/blob/main/packages/firebase-messaging-core/index.android.ts#L288
We probably have to use startActivity specifically for this one, just to be sure we use an activity that supports registerForActivityResult.
startActivity
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
It seems that method register here performs a
registerForActivityResult
call for foreground activity: https://github.com/NativeScript/firebase/blob/main/packages/firebase-messaging-core/index.android.ts#L62There are cases that foreground activity is one that does not implement method
registerForActivityResult
.For instance, there was a recent report for
payments
plugin that had an issue because of this.That is because payments plugin uses an activity that extends android.app.Activity (found an example from fork of billing library): https://github.com/DimaDake/billing/blob/master/library/src/main/java/com/android/billingclient/api/ProxyBillingActivity.java
As a result, that activity became
foregroundActivity
resulting in error described in issue NativeScript/payments#19. Foreground activity is used forregister()
call here: https://github.com/NativeScript/firebase/blob/main/packages/firebase-messaging-core/index.android.ts#L274I can see that
register()
call was commented out in latest firebase version but we should be careful if we are going to use it again or already use it elsewhere: https://github.com/NativeScript/firebase/blob/main/packages/firebase-messaging-core/index.android.ts#L288We probably have to use
startActivity
specifically for this one, just to be sure we use an activity that supportsregisterForActivityResult
.The text was updated successfully, but these errors were encountered: