Client API Sample

Index
Download

Describes how to develop a Sample Application using ChatON Client API.

Overview

1. Prerequisites

ChatON application must be installed on the same device where the sample application is being tested. The test environment is described below :

- Detail
Android SDK Version 9 or above
Resolution all
ChatON Version v1.10.0 or above

2. Important classes and methods used

Classes Methods Related API
SendTextMessageActivity void clickHandler( View v ) sendTextMessage(context, text)
SendTextMessageWithURLActivity void clickHandler( View v ) sendTextMessageWithURL(context, text, url)
SendMultiMediaMessageActivity void onActivityResult( int requestCode, int resultCode, Intent data ) sendMultiMediaMessage(context, uri, mime)
SendMultiMediaMessageWithTextActivity void onActivityResult( int requestCode, int resultCode, Intent data ) sendMultiMediaMessageWithText(context, uri, mime, text)
SendAppLinkMessageActivity void clickHandler( View v ) sendAppLinkMessage(context, text, appId, appName, appVersion, appParamInfo)

Message

Message menu is a collection of features that sends messages from the sample application. Message API related sub menu will appear when selected.

1. Send Text Message

A feature to send a message to selected buddies.

1. Related API
MessageAPI.sendTextMessage(context, text)
2. Test steps

Below steps describes how to send a text message to ChatON buddies:

  • Select SendTextMessage
  • Type in a Message
  • Click “Send Text Message” button.
  • Buddy list screen appears to allow you to select target buddies or a chat room
  • The typed in message will be delivered when the selection is completed.

2. Send Text Message With URL

A feature to send a message and an URL together to selected buddies.

1. Related API
MessageAPI.sendTextMessageWithURL(context, text, url)
2. Test steps

Below steps describes how to send a message and an URL to ChatON buddies:

  • Select SendTextMessageWithURL
  • Type in a message and an URL
  • Click “Send Text Message With URL” button
  • Buddy list screen appears to allow you to select target buddies or a chat room
  • The typed in message will be delivered when the selection is completed

3. Send Multi Media Message

A feature to send an image or a video to selected buddies.

1. Related API
MessageAPI.sendMultiMediaMessage(context, uri, mimeType)
2. Test steps

Below steps describes how to send an image or a video to ChatON buddies:

  • Select SendMultiMediaMessage
  • Click “Send Image” or “Send Video” button
  • Select an image or video from Gallery screen
  • Buddy list screen appears to allow you to select target buddies or a chat room
  • The selected media will be delivered when the selection is completed

4. Send Multi Media Message With Text

A feature to send an image or a video together with a text to selected buddies.

1. Related API
MessageAPI.sendMultiMediaMessageWithText(context, uri, mimeType, text)
2. Test steps

Below steps describes how to send an image or a video along with a text message to ChatON buddies:

  • Select SendMultiMediaMessageWithText
  • Type in a text message
  • Click “Send Image” or “Send Video” button
  • Select an image or video from Gallary screen
  • Buddy list screen appears to allow you to select target buddies or a chat room
  • The selected media with typed text will be delivered when the selection is completed.

5. Send AppLink Message

From a 3rd party application, the 3rd party application specific information can be shared using ChatON AppLink.

1. Related API
MessageAPI.sendAppLinkMessage(context, text, appName, appVersion, appParamInfo)
2. Test steps

Below steps describes how to send an application message to ChatON buddies:

  • Select SendAppLinkMessage
  • Fill in application information and a message
  • Click “Send App Link Message” button
  • Buddy list screen appears to allow you to select target buddies or a chat room
  • The Applink message will be delivered when the selection is completed.
  • Click the received AppLink and it will launch the 3rd party application

Utility

Utility menu is a collection of features implemented using Utility API in the Sample Application. Utility API related sub menu will appear when selected.

1. Is ChatON Installed

A feature to check if ChatON is installed on the phone.

1. Related API
UtilityAPI.isChatONInstalled(context)
2. Test steps

Below steps describe how you can check whether ChatON is installed on the phone or not.

  • Select IsChatONInstalled
  • Click “Is chaton installed?” button
  • A popup about whether ChatON is installed or not shows up
go to top