Skip to content

Conversation

AnastasiaKubova
Copy link
Contributor

@AnastasiaKubova AnastasiaKubova commented Mar 4, 2022

Please have a look at our guidelines for contributions and consider the following before you submit the PR:

  • Has CHANGELOG.md been updated?
  • Are tests passing locally?
  • Are the files formatted correctly?
  • Did you add unit tests?
  • Did you test your change with either the sample apps that are included in the repository or with a blank app that uses your change?
  • Did you check UI tests on the sample app? They are not executed on CI.

Related PRs or issues

AB#91443
#1603

@AnastasiaKubova AnastasiaKubova force-pushed the fix/register-receiver branch from 6147338 to 5daaddc Compare March 5, 2022 06:36
@Override
public void onActivityStarted(Activity activity) {
super.onActivityStarted(activity);
registerReceiver(activity);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we register receiver in "onStart" callback, Do we need unregister it in "onStop" so that it comes in pairs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it doesn’t depend on lifecycle of application. Receiver is registered only when distribute is enabled and is unregistered when distribute is disabled. This call need in this method to avoid issue when distribute was enabled, but activity has not started yet. If receiver was already registered so this call will be ignored.

@DmitriyKirakosyan DmitriyKirakosyan merged commit 8059233 into develop Mar 10, 2022
@DmitriyKirakosyan DmitriyKirakosyan deleted the fix/register-receiver branch March 10, 2022 09:51
@MatkovIvan MatkovIvan mentioned this pull request May 9, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants