public class ChatManagerMapComponent extends AbstractMapComponent
Modifier and Type | Class and Description |
---|---|
class |
ChatManagerMapComponent.ChatDropDownReceiver |
static interface |
ChatManagerMapComponent.ChatMessageListener |
static class |
ChatManagerMapComponent.MessageDestination |
AbstractMapComponent.OnAllComponentsCreatedCallback
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CHAT_ROOM_DROPDOWN_CLOSED |
static java.lang.String |
NEW_CONTACT_MESSAGE |
static java.lang.String |
PLUGIN_SEND_MESSAGE_ALL_CHAT_ROOMS |
static java.lang.String |
PLUGIN_SEND_MESSAGE_EXTRA |
static java.lang.String |
REMOVE_MESSAGE |
static java.lang.String |
TAG |
Constructor and Description |
---|
ChatManagerMapComponent() |
Modifier and Type | Method and Description |
---|---|
void |
addChatMessageListener(ChatManagerMapComponent.ChatMessageListener cml)
Replacement for the intent currently in use for listenering to all chat messages
incoming to the system.
|
android.os.Bundle |
buildMessage(java.lang.String message,
GroupContact group,
java.lang.String[] destinations) |
static IndividualContact |
getChatBroadcastContact() |
static GeoChatService |
getChatService() |
static ChatManagerMapComponent |
getInstance() |
static java.lang.String |
getRoleName() |
static java.lang.String |
getTeamName() |
static boolean |
isSpecialGroup(java.lang.String id) |
void |
onChatConvoFragCreated(ConversationFragment frag) |
void |
onCreate(android.content.Context context,
android.content.Intent intent,
MapView view)
Called when the component is first created
|
protected void |
onDestroyImpl(android.content.Context context,
MapView view)
This method is invoked as a subset of the onDestroy call as part of the
MapComponent lifecycle.
|
void |
openConversation(IndividualContact contact,
boolean editable)
Given an individual contact, open the chat drop down for that contact.
|
void |
openConversation(java.lang.String uid,
boolean editable) |
void |
openConversation(java.lang.String title,
java.lang.String uid,
Contact[] contacts,
boolean editable)
Provides the ability to open a conversation as a drop down.
|
void |
openConversation(java.lang.String conversationId,
java.lang.String conversationName,
java.lang.String targetUID,
boolean editable,
ChatManagerMapComponent.MessageDestination destination) |
void |
persistMessage(java.lang.String message,
GroupContact group,
java.util.List<java.lang.String> destinations) |
void |
registerChatMessageRenderer(ChatMesssageRenderer renderer)
Set up a custom renderer for the chat line.
|
void |
removeChatMessageListener(ChatManagerMapComponent.ChatMessageListener cml)
Replacement for the intent currently in use for listenering to all chat messages
incoming to the system.
|
boolean |
sendMessage(android.os.Bundle msg,
java.lang.String[] recipients) |
void |
sendMessage(java.lang.String msg)
Given a message, prompt the user for a contact to send it to.
|
android.os.Bundle |
sendMessage(java.lang.String message,
GroupContact group,
java.lang.String[] destinations,
java.lang.String[] recipients) |
void |
sendMessage(java.lang.String msg,
java.util.List<Contact> convos)
Send a message to a list of different conversations
|
addOverlay, onConfigurationChanged, onCreateOptionsMenu, onDestroy, onOptionsItemSelected, onOptionsMenuClosed, onPause, onPrepareOptionsMenu, onResume, onStart, onStop, registerReceiver, removeOverlay, setOnAllComponentsCreatedCallback, unregisterReceiver
public static final java.lang.String TAG
public static java.lang.String REMOVE_MESSAGE
public static java.lang.String NEW_CONTACT_MESSAGE
public static final java.lang.String PLUGIN_SEND_MESSAGE_ALL_CHAT_ROOMS
public static final java.lang.String PLUGIN_SEND_MESSAGE_EXTRA
public static java.lang.String CHAT_ROOM_DROPDOWN_CLOSED
public static IndividualContact getChatBroadcastContact()
public static ChatManagerMapComponent getInstance()
public static java.lang.String getTeamName()
public static java.lang.String getRoleName()
public void sendMessage(java.lang.String msg, java.util.List<Contact> convos)
msg
- Plain-text message to sendconvos
- List of conversations to send the message to
Note: This is not necessarily the list of destination
contacts (i.e. groups -> group members)public void sendMessage(java.lang.String msg)
msg
- the message to sendpublic void openConversation(java.lang.String conversationId, java.lang.String conversationName, java.lang.String targetUID, boolean editable, ChatManagerMapComponent.MessageDestination destination)
public static boolean isSpecialGroup(java.lang.String id)
public void openConversation(IndividualContact contact, boolean editable)
contact
- the individual contacteditable
- boolean if the user can use this drop down to chat or just view the
current chat.public void openConversation(java.lang.String title, java.lang.String uid, Contact[] contacts, boolean editable)
title
- the title to provide the drop downuid
- the uid of the conversationcontacts
- the contaxct list that is used to describe the conversationeditable
- if the user is allowed to send new chat in this opened drop down.public void openConversation(java.lang.String uid, boolean editable)
public void persistMessage(java.lang.String message, GroupContact group, java.util.List<java.lang.String> destinations)
public android.os.Bundle sendMessage(java.lang.String message, GroupContact group, java.lang.String[] destinations, java.lang.String[] recipients)
public boolean sendMessage(android.os.Bundle msg, java.lang.String[] recipients)
public android.os.Bundle buildMessage(java.lang.String message, GroupContact group, java.lang.String[] destinations)
public void onCreate(android.content.Context context, android.content.Intent intent, MapView view)
MapComponent
onCreate
in interface MapComponent
context
- the context of the component (the MapActivity instance)intent
- the intent of the MapActivityview
- the main MapViewpublic static GeoChatService getChatService()
protected void onDestroyImpl(android.content.Context context, MapView view)
AbstractMapComponent
onDestroyImpl
in class AbstractMapComponent
public void onChatConvoFragCreated(ConversationFragment frag)
public void registerChatMessageRenderer(ChatMesssageRenderer renderer)
renderer
- the custom renderer or null if no renderer should be used.public void addChatMessageListener(ChatManagerMapComponent.ChatMessageListener cml)
cml
- the chat message listener that is to be notified.public void removeChatMessageListener(ChatManagerMapComponent.ChatMessageListener cml)
cml
- the chat message listener that is to be notified.