Live Chat
Add a chat container
- Create your
VFArticleMetadata
object.
VFArticleMetadata articleMetadata = new VFArticleMetadata("https://test.com", "STORY TITLE", "STORY_DESC", "https://test.com");
val articleMetadata = VFArticleMetadata(URL(""), "STORY TITLE", "STORY_DESC", new URL("STORY_PICTURE_URL"));
- Create your
VFSettings
object.
VFColors colors = new VFColors(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary), ContextCompat.getColor(getApplicationContext(), R.color.colorPrimaryLight), Color.WHITE);
VFSettings vfSettings = new VFSettings(colors);
val colors = VFColors(ContextCompat.getColor(getApplicationContext(), R.color.colorPrimary), ContextCompat.getColor(getApplicationContext(), R.color.colorPrimaryLight), Color.WHITE);
val vfSettings = VFSettings(colors);
- Implement the
VFLoginInterface
interface.
@Override
public void startLogin() {
Intent intent = new Intent(getApplicationContext(), LoginActivity.class);
startActivity(intent);
}
override fun startLogin() {
val intent = Intent(applicationContext, LoginActivity::class.java)
startActivity(intent)
}
- Add the
VFLiveChatFragment
into your content .
VFLiveChatFragment liveChatFragment = VFLiveChatFragment.newInstance("Container", metadata, this, vfSettings);
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
ft.replace(R.id.live_chat_container, liveChatFragment);
ft.commit();
Updated 10 months ago
What’s Next