| mobisocial.omlib.api.OmletMessagingApi |
APIs for sending messages and data to feeds. Access as messaging().
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract boolean |
delete(long objectId, boolean localOnly)
Deletes an object from the
OmletModel.Objects database
with the given object id, optionally requesting the object be deleted from remote devices. | ||||||||||
| abstract SyncStateListener.SyncState | getCurrentSyncState() | ||||||||||
| abstract void |
like(long objectId)
Adds a 'like' to the given object from the
OmletModel.Objects database
with the given object id. | ||||||||||
| abstract void |
onMessagingActivityPaused()
Deprecated in favor of
disconnect()
| ||||||||||
| abstract void |
onMessagingActivityResumed()
Deprecated in favor of
connect()
| ||||||||||
| abstract void |
registerDeliveryListener(MessageDeliveryListener listener)
Registers a callback for message delivery events for all outbound objects
and their attachments.
| ||||||||||
| abstract void |
registerSyncStateListener(SyncStateListener listener)
Registers a callback for all sync state event updates.
| ||||||||||
| abstract void |
resetLikes(long objectId)
Resets the number of likes to zero for the given object.
| ||||||||||
| abstract void |
send(Uri feedUri, Sendable obj, MessageDeliveryListener listener)
Sends an object to a feed with the provided feedUri. | ||||||||||
| abstract void |
send(Uri feedUri, Sendable obj)
Sends an object to a feed with the provided feedUri.
| ||||||||||
| abstract void |
unregisterDeliveryListener(MessageDeliveryListener listener)
Removes a previously registered message delivery listener.
| ||||||||||
| abstract void |
unregisterSyncStateListener(SyncStateListener listener)
Unregisters a previously registered sync listener.
| ||||||||||
Deletes an object from the OmletModel.Objects database
with the given object id, optionally requesting the object be deleted from remote devices.
Adds a 'like' to the given object from the OmletModel.Objects database
with the given object id.
Registers a callback for message delivery events for all outbound objects and their attachments.
| listener | The callback to register. |
|---|
Registers a callback for all sync state event updates. Will initially fire with current state and also fire with future updates, unless unregistered
Resets the number of likes to zero for the given object.
Sends an object to a feed with the provided feedUri. See SendUtils
to create a data object for sending.
Pass a MessageDeliveryListener to receive notifications for this object and its attachments.
Alternatively, use registerDeliveryListener(MessageDeliveryListener) to receive
notifications for all outbound objects and attachments.
| feedUri | e.g. content://mobisocial.omlib.provider/feeds/xx |
|---|---|
| obj | The data to send |
| listener | An optional callback listener for delivery status updates |
Sends an object to a feed with the provided feedUri. See SendUtils
to create a data object for sending.
| feedUri | e.g. content://mobisocial.omlib.provider/feeds/xx |
|---|---|
| obj | The data to send |
Removes a previously registered message delivery listener.
Unregisters a previously registered sync listener.