public abstract class

SCRichMediaResultHandler

extends SCBaseResultHandler
java.lang.Object
   ↳ com.c2call.sdk.pub.activities.resulthandlers.SCBaseResultHandler
     ↳ com.c2call.sdk.pub.activities.resulthandlers.SCRichMediaResultHandler
Known Direct Subclasses

Class Overview

This Result handler handles the Activity results needed for uploading rich media messages. Typically every Activity/Fragment that calls IDialogFactory#createRichMessageDialog(com.c2call.sdk.sdk.gui.core.controller.IController, boolean) should pass the Activity results to an instance of this handler.

Summary

Nested Classes
interface SCRichMediaResultHandler.OnFinishListener An instance of this listener should be passed to onActivityResult(...) in order to catch the specific SCBaseRichMessageSendObject when it's ready to be sent. 
Public Constructors
SCRichMediaResultHandler()
Public Methods
synchronized void onActivityResult(Activity activity, Fragment fragment, int requestCode, int resultCode, Intent data, String userid, String publicKey, SCRichMediaResultHandler.OnFinishListener finishListener)
Call this within your Activity's onActivityResult() method in order to automatically handle the picking, taking, cropping, etc.
synchronized void onActivityResult(Activity activity, Fragment fragment, int requestCode, int resultCode, Intent data, String userid, SCRichMediaResultHandler.OnFinishListener finishListener)
Protected Methods
abstract void onActionAudio(Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String path, String publicKey)
Called if an audio file is ready to be sent.
abstract void onActionFriend(Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String[] friendMessages, String publicKey)
Called if a friend is ready to be sent.
abstract void onActionImage(Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String path, String publicKey)
Called if an image is ready to be sent.
abstract void onActionLocation(Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, Location location, Address address, String publicKey)
Called if a Location is ready to be sent.
abstract void onActionPlace(Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, SimplePlace place, String publicKey)
Called if a SimplePlace is ready to be sent.
abstract void onActionVCard(Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String path, String publicKey)
Called if a vCard is ready to be sent.
abstract void onActionVideo(Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String path, String publicKey)
Called if a video is ready to be sent.
[Expand]
Inherited Methods
From class com.c2call.sdk.pub.activities.resulthandlers.SCBaseResultHandler
From class java.lang.Object

Public Constructors

public SCRichMediaResultHandler ()

Public Methods

public synchronized void onActivityResult (Activity activity, Fragment fragment, int requestCode, int resultCode, Intent data, String userid, String publicKey, SCRichMediaResultHandler.OnFinishListener finishListener)

Call this within your Activity's onActivityResult() method in order to automatically handle the picking, taking, cropping, etc. of rich messages

Parameters
activity the activity where the result was caught. This should be null if the result comes from a Fragment
fragment the fragment where the result was caught, This should be null if the result comes from an Activity
requestCode the request code that was passed into onActivityResult()
resultCode the result code that was passed into onActivityResult()
data the data intent that was passed into onActivityResult()
userid the recipient of the message
finishListener a listener to catch the specific instance of SCBaseRichMessageSendObject when it's ready to be sent.

public synchronized void onActivityResult (Activity activity, Fragment fragment, int requestCode, int resultCode, Intent data, String userid, SCRichMediaResultHandler.OnFinishListener finishListener)

Protected Methods

protected abstract void onActionAudio (Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String path, String publicKey)

Called if an audio file is ready to be sent.

Parameters
activity the Activity this Handler was called from. May be null
fragment the Frgament this Handler was called from. May be null
finishListener a listener to catch the specific instance of SCBaseRichMessageSendObject when it's ready to be sent.
userid the recipient of the message
path the absolute path of the file file to be sent.
publicKey optional public key to encrypt the message

protected abstract void onActionFriend (Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String[] friendMessages, String publicKey)

Called if a friend is ready to be sent.

Parameters
activity the Activity this Handler was called from. May be null
fragment the Frgament this Handler was called from. May be null
finishListener a listener to catch the specific instance of SCBaseRichMessageSendObject when it's ready to be sent.
userid the recipient of the message
friendMessages an array of user IDs to be sent
publicKey optional public key to encrypt the message

protected abstract void onActionImage (Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String path, String publicKey)

Called if an image is ready to be sent.

Parameters
activity the Activity this Handler was called from. May be null
fragment the Frgament this Handler was called from. May be null
finishListener a listener to catch the specific instance of SCBaseRichMessageSendObject when it's ready to be sent.
userid the recipient of the message
path the absolute path of the file file to be sent.
publicKey optional public key to encrypt the message

protected abstract void onActionLocation (Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, Location location, Address address, String publicKey)

Called if a Location is ready to be sent.

Parameters
activity the Activity this Handler was called from. May be null
fragment the Frgament this Handler was called from. May be null
finishListener a listener to catch the specific instance of SCBaseRichMessageSendObject when it's ready to be sent.
userid the recipient of the message
location the Location to be sent
address and optional Address to be sent
publicKey optional public key to encrypt the message

protected abstract void onActionPlace (Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, SimplePlace place, String publicKey)

Called if a SimplePlace is ready to be sent.

Parameters
activity the Activity this Handler was called from. May be null
fragment the Frgament this Handler was called from. May be null
finishListener a listener to catch the specific instance of SCBaseRichMessageSendObject when it's ready to be sent.
userid the recipient of the message
place the Place to be sent
publicKey optional public key to encrypt the message

protected abstract void onActionVCard (Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String path, String publicKey)

Called if a vCard is ready to be sent.

Parameters
activity the Activity this Handler was called from. May be null
fragment the Frgament this Handler was called from. May be null
finishListener a listener to catch the specific instance of SCBaseRichMessageSendObject when it's ready to be sent.
userid the recipient of the message
path the absolute path of the file file to be sent.
publicKey optional public key to encrypt the message

protected abstract void onActionVideo (Activity activity, Fragment fragment, SCRichMediaResultHandler.OnFinishListener finishListener, String userid, String path, String publicKey)

Called if a video is ready to be sent.

Parameters
activity the Activity this Handler was called from. May be null
fragment the Frgament this Handler was called from. May be null
finishListener a listener to catch the specific instance of SCBaseRichMessageSendObject when it's ready to be sent.
userid the recipient of the message
path the absolute path of the file file to be sent.
publicKey optional public key to encrypt the message