Closed Art114 closed 3 months ago
Вам следует изменить в модуле:
import com.jivosite.sdk.support.builders.ClientInfo;
на
import com.jivosite.sdk.support.builders.ContactInfo;
(+ добавить import android.os.Handler;
)
и изменить
@ReactMethod
public void setClientInfo(String phone, String description) {
Jivo.setClientInfo(
new ClientInfo.Builder()
.setPhone(phone)
.setDescription(description)
.build());
}
на
@ReactMethod
public void setClientInfo(String name, String email, String phone, String description) {
ReactApplicationContext context = getReactApplicationContext();
ContactInfo info = new ContactInfo(name, email, phone, description);
Handler handler = new Handler(context.getMainLooper());
handler.post(new Runnable() {
public void run() {
Jivo.setContactInfo(info);
}
});
}
также следует добавить в .../android/app/build.gradle
android {
// ...
buildFeatures {
dataBinding = true
}
// ....
}
Нету документации для React Native на вызав метод Jivo.setClientInfo() и Jivo.setContactInfo()