reCAPTCHA Enterprise - Key Type Invalid on HarmonyOS 3.0.0

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:

johnson2_0-1685003590776.png

johnson2_1-1685003617699.png

The "About" page of the Huawei device:

johnson2_2-1685003727001.png

Any ideas? Thanks so much

0 1 599
1 REPLY 1