There are several ways you can make RevTwo support experience more personal.  This is achieved through various customization methods provided in the library.

Setting User

If your application implements user Sign In method, you may want to take advantage of setting the active user using the following method:

public static void SetUser(string name, string email, Context context);

Usage example:

RevTwoXamarin.RevTwo.SetUser(“John Doe”, “”, this);

After setting a user, you may invoke ListUserTickets and GetUnreadMessages methods to retrieve Tickets and Messages for the logged in user.  Otherwise, Tickets and Messages will be retrieved for a device.

Customizing Incoming Call Screen

The following methods can be used to customize the Message appearing on the Incoming Call screen, as well as Message Color and Logo.  By default, Incoming Call message will say: “Incoming call from RevTwo Support” in white.

// Customize Incoming Call Message
public static void CustomizeIncomingCallText(string text, Context context);

// Customize Incoming Call Message Color
public static void CustomizeIncomingCallTextColor(string colorHexCode, Context context);

// Customize Incoming Call Logo
public static void CustomizeIncomingCallImage(int imgResource, Context context);

Usage example:

RevTwoXamarin.RevTwo.CustomizeIncomingCallText(“Incoming call”, this);

Customizing Chat Screen

If you would like to customize the Chat Screen to better fit your application layout, you may use the following parameters:

  • PARAM_TITLE_VIEW_LAYOUT — Integer.  Override chat navigation layout at the top of Chat Screen.
  • PARAM_BACK_BUTTON_ICON_RES — Integer.  Drawable resource that will be used instead of default Back button.
  • PARAM_ENABLE_AVATAR — Boolean.  Default: false.  Enable / disable avatars in chats.  If true — user avatars will be displayed next to chat bubbles.  If false — each user’s chat bubbles will have their own color.
  • PARAM_DISABLE_CLOSE_TICKET_BUTTON — Boolean.  Default: false.  Hides the Close button used to close user owned tickets.
  • PARAM_DISABLE_SENDING_MESSAGES — Boolean.  Default: false.  Hides the input text field and Send button for adding new Chat Messages.
  • PARAM_ENABLE_REPORTING — Boolean.  Default: false.  If enabled — user will be able to report abusive or inappropriate chats for moderation by clicking on chat bubbles.

Here is how you can set above parameters:

// Open Chat Activity
var activity = new Intent (this, typeof(ChatActivity));

// Provide Title Layout for Chat Activity
activity.PutExtra(ChatActivity.PARAM_TITLE_VIEW_LAYOUT, R.layout.your_title_layout);

// Customize other parameters here...

StartActivity (activity);