真呼叫者安卓 sdk 错误代码 3
我正在尝试在我的一个个人应用程序上实现用于登录/注册的Truecaller android-SDK。我从truecaller收到了合作伙伴密钥,以便在我的应用程序中实现它。按“使用 truecaller 自动填充”时发生错误,在 “public void onFailureProfileShared()” 中返回 “trueError.getErrorType( )” 上的 “错误代码 3”。我似乎找不到描述错误的方法。有没有人碰巧知道修复此错误?
我的实现:
public class auth extends AppCompatActivity implements ITrueCallback{
private TrueButton truebutton = null;
private TrueClient trueClient = null;
private String mTruecallerRequestNonce = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_auth);
truebutton = (TrueButton) findViewById(R.id.com_truecaller_android_sdk_truebutton);
boolean isUsable = truebutton.isUsable();
if(isUsable) {
trueClient = new TrueClient(auth.this, auth.this);
truebutton.setTrueClient(trueClient);
}
else {
truebutton.setVisibility(View.GONE);
}
truebutton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
trueClient.getTruecallerUserProfile(auth.this);
}
});
}
@Override
protected void onResume() {
mTruecallerRequestNonce = trueClient.generateRequestNonce();
super.onResume();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if(trueClient!=null && trueClient.onActivityResult(requestCode, resultCode, data)) {
return;
}
super.onActivityResult(requestCode, resultCode, data);
}
@Override
public void onSuccesProfileShared(@NonNull TrueProfile trueProfile) {
Toast.makeText(auth.this, trueProfile.firstName + " " + trueProfile.lastName, Toast.LENGTH_LONG).show();
}
@Override
public void onFailureProfileShared(@NonNull TrueError trueError) {
Log.e("error code", trueError.getErrorType() + " ");
}
}