1

I implemented Google sign-in in many methods. Why Google is using some deprecated methods?

One Tap sign-in
startIntentSenderForResult() is deprecated
onActivityResult is deprecated

FireBase assistant:
Android Studio FireBase assistant
onActivityResult is deprecated

https://developers.google.com/identity/sign-in/android
onActivityResult is deprecated

Do you know any non-deprecated method for Google sign-in?

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193
Ali Doran
  • 378
  • 1
  • 12

1 Answers1

0

Why Google is using some deprecated methods?

It's because they didn't update the documentation, but most likely they will in the near future.

onActivityResult is deprecated

You're correct onActivityResult is deprecated in favor of registerForActivityResult().

If you want to try using Jetpack Compose, which I personally recommend, then the following resource will definitely help:

Alex Mamo
  • 130,605
  • 17
  • 163
  • 193
  • It's true, but it's not only related to documentation. Their library only doesn't have a method for RegisterForActivityResult form. I faced this problem a lot. Why methods are deprecated before Google corrects them in its self methods? By the way, you're right. Thanks for your helpful medium link. – Ali Doran Aug 07 '22 at 11:04
  • As far as I experienced, when something becomes deprecated, the new approach is released. I didn't see something deprecated without a replacement. – Alex Mamo Aug 07 '22 at 12:02
  • Hey Ali. Can I help you with other information? – Alex Mamo Aug 12 '22 at 07:56
  • 1
    No thank you I think it's the lack of attention by Google. I know what you say, but I discussed the effect of depreciation on other classes and behaviors. For instance, when I create a fragment by wizard on android studio, an ActivityByResult is created automatically. The Firebase problem is a kind of this one. They didn't consider depreciation effects. Anyway, thank you for sharing your information. – Ali Doran Aug 12 '22 at 08:29
  • You're very welcome, Ali. – Alex Mamo Aug 12 '22 at 08:56