Text message authentication FAQ

更新时间:
复制 MD 格式

This topic answers frequently asked questions about text message authentication.

Android client

Is the callback for the sendVerifyCode interface synchronous or asynchronous?

It is an asynchronous callback.

The Android client works if obfuscation is disabled. What are the required obfuscation rules?

Add the following obfuscation rules:

keepattributes 
Exceptions,InnerClasses,Signature,Deprecated,*Annotation*,EnclosingMethod
-keep @com.nirvana.tools.core.annotations.AuthInterface class * {*;}
-keepclassmembers class * {
 @com.nirvana.tools.core.annotations.AuthInterface <fields>;
 @com.nirvana.tools.core.annotations.AuthInterface <methods>;
}
-keep class com.nirvana.prd.sms.auth.utils.PackageUtils{*;}
-keep class com.nirvana.prd.sms.auth.SmsManager{*;}
#-keep class com.nirvana.prd.sms.auth.BuildConfig{*;}
-keep class com.nirvana.prd.sms.auth.net.PopRequest{*;}
-keep class ** extends com.nirvana.prd.sms.auth.net.PopRequest{*;}
-keep class a.a.a.a.a.**{*;}

H5 client

Why can't I get a token to verify the local phone number on a China Unicom 4G network?

This can happen for several reasons:

  • You are using an Internet of Things (IoT) card. An IoT card connects objects to a wireless network using components such as SIM cards, sensors, or QR codes. This connection enables communication between people and objects, or between objects.

  • China Unicom does not support number retrieval if the access point is set to wap.

  • Enabling data-saving mode in UC Browser or QQ Browser can cause number retrieval to fail.

Can I get a token for local number verification and one-click logon if both Wi-Fi and mobile data are enabled?

No, you cannot. The feature works only with a mobile data connection. It is not supported on Wi-Fi networks.