-
-
Notifications
You must be signed in to change notification settings - Fork 30
Usage
Itgel G edited this page Jun 14, 2021
·
14 revisions
- brandCode - generated unique code of your brand
- erxesApiUrl - erxes-api url // for opensource version
- companyName - Your registered company name // for saas version
public class CustomActivity extends AppCompatActivity {
Config config;
@Override
protected void onCreate(Bundle savedInstanceState) {
JSONObject jsonObject = new JSONObject();
try {
jsonObject.put("email","[email protected]");
jsonObject.put("phone","99887766");
jsonObject.put("name","itgel");
} catch (JSONException e) {
e.printStackTrace();
}
String customData = String.valueOf(jsonObject);
config = new Config
.Builder(brandCode)
.setApiHost(apiHost) // for opensource
.setOrganizationName(companyName) // for saas
.setEmail("[email protected]")
.setPhone("12345678")
.setCompanyData(customData)
.setData(customData)
.build(this);
}
}
Call a chat with login form
public void onClick(View view) {
config.Start();
}