我已实施SinchVerification
,这是我的代码
Config config = SinchVerification.config().applicationKey(getResources().getString(R.string.sinch_app_key)).context(getApplicationContext()).build();
final Verification verification = SinchVerification.createSmsVerification(config, phone, listener);
verification.initiate();
它适用于印度和美国但不知何故它不与英国合作,它使用以下logcat调用onVerificationFailed(Exception e)
方法。
电话号码类似于+44 **********
com.sinch.verification.CodeInterceptionException: Did not receive sms.
at com.sinch.verification.internal.sms.SmsInterceptor.onError(SmsInterceptor.java:135)
at com.sinch.verification.internal.sms.SmsInterceptor.access$100(SmsInterceptor.java:19)
at com.sinch.verification.internal.sms.SmsInterceptor$1.run(SmsInterceptor.java:78)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
我还检查过sinch的官方文档,了解有关国家/地区的可用运算符,我的运算符为Telefonica O2 UK
,并且sinch
支持。
答案 0 :(得分:0)
我有同样的例外。你需要做的是: