Skip to content
New issue

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

[Android] Split setup into registerPhoneAccount and registerAndroidEvents #242

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

manuquentin
Copy link
Contributor

@manuquentin manuquentin commented Jul 16, 2020

After reading #221, it seems really interesting to have separate method to register the phone account on Android.

I've splited the setup() method on Android into registerPhoneAccount() and registerAndroidEvents().
We've the case when the user has disable the phone account, but calling setup() always prompt the user to enable it...

By using registerPhoneAccount() instead of setup() we can now bind the events without prompting the user when the phone account is disabled.

I don't have backported the checkPhoneAccountEnabled method from #221 because it's already the job of hasPhoneAccount.

@manuquentin manuquentin merged commit db4b2e4 into master Jul 21, 2020
@manuquentin manuquentin deleted the split_setup branch July 21, 2020 13:48
@jdegger
Copy link

jdegger commented Jul 23, 2020

@manuquentin Thanks for this PR. We were looking for something like this!

It seems like this PR doesn't take the following into account:

  • when not calling setup, you can not supply options anymore
  • setAvailable is also not called anymore by default and needs to be called separately

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.

2 participants