I have set up recaptcha verification in my android app. It runs smoothly on all android devices except for HarmonyOS 3.0.0 (should be a fork from Android 12 by Huawei).
I am using the package com.google.android.recaptcha. In HarmonyOS, it returns an exception RecaptchaException: Key type invalid. I have confirmed from the google cloud console that the key is a valid android site key, and this key works perfectly on other android devices except for HarmonyOS.
My users who use a Huawei device face this problem since Huawei installs HarmonyOS on all of its smartphones.
The code and the error:
The "About" page of the Huawei device:
Any ideas? Thanks so much