My app uses Firebase authentication and, so far, has been using the old API for Google Sign In, based on BeginSignInRequest. This API is deprecated and will be removed from the SDK later this year and it's recommended to use the Credential Manager API instead. The first page of the guide implies that it should support Sign In With Google on Android versions all the way down to API level 19, but the code example on the page for Sign In With Google and the Firebase guide, using GetGoogleIdOption
, can't be used unless I set the minSDK to 34. According to statcounter, older versions still account for more than 1/3 of devices in use. I don't want to lose such a big proportion of potential users, but if I hold back the library to a version that predates the API's removal it might have a negative impact on other parts of my app. What can I do?
"Sign in with Google" through the jetpack Credential Manager APIs (androidx.credentials) supports the same range of Android versions as before. On Android versions U (SDK version=34) and above, it relies on the support from the Android framework and on lower versions, it automatically falls back to the older One Tap APIs. So you should be good to switch to the jetpack Credential Manager APIs without losing any coverage.