public class IPMessagingClient
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
IPMessagingClient.Properties
Properties for client initialization configuration
|
static class |
IPMessagingClient.SynchronizationStatus
Enum representing client initialization status
|
static class |
IPMessagingClient.SynchronizationStrategy
Enum representing client synchronization strategies
|
Modifier and Type | Field and Description |
---|---|
java.util.Map<java.lang.String,java.util.Map<ChannelListener,android.os.Handler>> |
channelListenerMap |
java.util.Map<java.lang.String,Channel> |
channelMap |
Modifier and Type | Method and Description |
---|---|
static IPMessagingClient |
create(android.content.Context context,
AccessManager accessManager,
IPMessagingClient.Properties properties,
Constants.CallbackListener<IPMessagingClient> listener)
Creates a new IP Messaging client instance with a token manager and client properties.
|
Channels |
getChannels()
List of channels available to the IPMessagingClient.
|
android.content.Context |
getContext() |
IPMessagingClientListener |
getListener()
Method to retrieve listener for this IPMessagingClient.
|
UserInfo |
getMyUserInfo()
Get user info object for current user
|
IPMessagingClient.Properties |
getProperties()
Get properties for current client
|
static java.lang.String |
getSdkVersion()
Returns the version of the IP Messaging SDK.
|
void |
handleChannelAddEvent(Channel channel) |
void |
handleChannelChanged(Channel channel) |
void |
handleChannelCreate(Channel channel) |
void |
handleChannelDeleted(Channel channel) |
void |
handleIncomingInvite(Channel channel) |
void |
handleNotification(java.util.Map<java.lang.String,java.lang.String> notification)
Queue the incoming notification with the messaging library for processing.
|
void |
handleOnChannelSync(Channel channel) |
void |
handleOnError(ErrorInfo errorInfo) |
boolean |
isReachabilityEnabled()
Get reachability service status.
|
void |
registerGCMToken(java.lang.String token,
Constants.StatusListener listener)
Register GCM token for push notification updates.
|
void |
removeListener()
Method to remove listener for this IPMessagingClient.
|
void |
setIncomingIntent(android.app.PendingIntent intent)
Sets a
PendingIntent that will be sent when an incoming channel invite is received. |
void |
setListener(IPMessagingClientListener listener)
Method to set listener for this IPMessagingClient.
|
static void |
setLogLevel(int level) |
void |
shutdown()
Cleanly shuts down the messaging client when you are done with it.
|
void |
unregisterGCMToken(java.lang.String token,
Constants.StatusListener listener)
Unregister from push notification updates.
|
void |
updateToken(java.lang.String accessToken,
Constants.StatusListener listener)
Method to update the authentication token for this client.
|
public final java.util.Map<java.lang.String,Channel> channelMap
public final java.util.Map<java.lang.String,java.util.Map<ChannelListener,android.os.Handler>> channelListenerMap
public static java.lang.String getSdkVersion()
public static IPMessagingClient create(android.content.Context context, AccessManager accessManager, IPMessagingClient.Properties properties, Constants.CallbackListener<IPMessagingClient> listener)
context
- The Application Context from your Android application. Make
sure you don't pass an Activity Context. You can retrieve the
Application Context by calling getApplicationContext() on your
Activity. Cannot be null.accessManager
- AccessManager for IPMessagingClientproperties
- Client initialization propertieslistener
- Callback listener with reference to IPMessagingClientpublic IPMessagingClientListener getListener()
public void setListener(IPMessagingClientListener listener)
listener
- the listener for this IPMessagingClient.public void removeListener()
public void updateToken(java.lang.String accessToken, Constants.StatusListener listener)
accessToken
- an AccessToken for this Client.listener
- Listener that will receive callback with the result.public Channels getChannels()
public void setIncomingIntent(android.app.PendingIntent intent)
PendingIntent
that will be sent when an incoming channel invite is received.intent
- intent to send.public void registerGCMToken(java.lang.String token, Constants.StatusListener listener)
token
- The registration token an Android application needs to register with GCM
connection servers before it can receive messages.listener
- Listener that will receive callback with the result.public void unregisterGCMToken(java.lang.String token, Constants.StatusListener listener)
token
- The registration token provided for GCM push notification registration.listener
- Listener that will receive callback with the result.public void handleNotification(java.util.Map<java.lang.String,java.lang.String> notification)
notification
- Notification received from GCMpublic IPMessagingClient.Properties getProperties()
public void shutdown()
public UserInfo getMyUserInfo()
public boolean isReachabilityEnabled()
public android.content.Context getContext()
public void handleIncomingInvite(Channel channel)
public void handleChannelAddEvent(Channel channel)
public void handleChannelCreate(Channel channel)
public void handleChannelChanged(Channel channel)
public void handleChannelDeleted(Channel channel)
public void handleOnChannelSync(Channel channel)
public void handleOnError(ErrorInfo errorInfo)
public static void setLogLevel(int level)