| mobisocial.omlib.api.OmletFeedApi |
APIs for creating and managing feeds. A feed is a group of one
or more people sharing data across one or more devices. See OmletMessagingApi to
send/receive data in a feed.
| Nested Classes | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| enum | OmletFeedApi.FeedKind | A feed's "kind" defines different properties for the data streams usage. | |||||||||
| enum | OmletFeedApi.StatusIndicator | ||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract Uri |
acceptInvitationForFeed(String feedIdentifier, String pin)
Joins the feed associated with the given invitation and returns the local
Uri for the feed.
| ||||||||||
| abstract void |
addAccountsToFeed(Uri localUri, String... accounts)
Adds a list of accounts to the given feed.
| ||||||||||
| abstract Uri |
createFeed(OmletFeedApi.FeedKind kind)
Creates an empty feed
| ||||||||||
| abstract void |
enablePushNotifications(Uri feedUri, boolean showPushNotifications)
Toggles push notifications for the particular feed.
| ||||||||||
| abstract Uri |
getFeedInvitationLink(Uri feedUri)
Returns a link that can be shared out-of-band to allow remote parties
to join the given feed.
| ||||||||||
| abstract Uri | getFixedMembershipFeed(List<String> accounts) | ||||||||||
| abstract Uri |
getOrCreateFeedWithAccounts(List<String> accounts)
Gets a feed with the given accounts as members. | ||||||||||
| abstract Uri |
getPublicChat(String name, Integer slice)
Fetches a public chat by name. | ||||||||||
| abstract void |
markFeedActive(Uri feedUri, RealtimeFeedEventListener realtimeFeedEventListener)
Flags a feed as being 'active', eg the user is engaged with this feed presently.
| ||||||||||
| abstract void |
markFeedInactive(Uri feedUri)
Removes a feed from the list of 'active' feeds.
| ||||||||||
| abstract void |
markFeedRead(Uri feedUri)
If
feed.renderableTime is greater than the unread time of the feed,
then mark all messages as read and set the feed.lastReadTime to
timestamp. | ||||||||||
| abstract void | removeMemberFromFeed(Uri feedUri, String accountInFeed) | ||||||||||
| abstract void |
sendActiveStatusIndicator(Uri feedUri, OmletFeedApi.StatusIndicator action)
Send a realtime status update like typing, taking a picture, recording audio.
| ||||||||||
| abstract Uri |
setFeedImage(Uri feedUri, InputStream image)
Sets an image that represents the given feed.
| ||||||||||
| abstract void |
setFeedName(Uri feedUri, String name)
Sets the name that represents the given feed.
| ||||||||||
| abstract Uri | setFeedVideo(Uri feedUri, InputStream video, InputStream thumbnail) | ||||||||||
Joins the feed associated with the given invitation and returns the local Uri for the feed.
| NetworkException |
|---|
Adds a list of accounts to the given feed.
Creates an empty feed
Toggles push notifications for the particular feed.
Returns a link that can be shared out-of-band to allow remote parties to join the given feed. A network call may be required to generate the sharing link.
| NetworkException |
|---|
Gets a feed with the given accounts as members. If one already exists, it is reused, otherwise a new feed is created. The feed's membership, name, and thumbnail may be modified by any member.
The feed will have kind Chat.
Fetches a public chat by name. A public chat may be joined by any user of your app. Unlike a standard feed, data in a public chat is only retrieved when the client is connected to the messaging service and has joined the chat.
Public chats are "realtime-only", messages are only received
when interest in the feed has been registered. Use #markFeedActive(Uri) to register
for interest and markFeedInactive(Uri) to unregister. #subscribeForRealtime(Uri, RealtimeFeedEventListener)
provides callbacks for events such as joining/leaving the chat.
| name | an identifier for the chat room. An app may have a single public chat, and could use any name, such as "lobby". Other apps may host multiple public chats such as "realm-desert" and "realm-forest". |
|---|---|
| slice | When a chat room exceeds capacity, members are put into different slices.
Leaving slice as null will automatically choose an available slice.
|
| NetworkException |
|---|
Flags a feed as being 'active', eg the user is engaged with this feed presently. This is used, for example, to not increment the unread counts of the feed. Also subscribes for real time activity updates for a given feed with a given callback to handle the changes.
Removes a feed from the list of 'active' feeds. TODO: needs to be able to unsubscribe a specific listener
If feed.renderableTime is greater than the unread time of the feed,
then mark all messages as read and set the feed.lastReadTime to
timestamp. Also sends a LastReadObj to the feed as a 'read receipt'.
Send a realtime status update like typing, taking a picture, recording audio.
| feedUri | feed id to send action to |
|---|---|
| action | pass null for when you are done with all actions |
Sets an image that represents the given feed. It is shared across devices and feed members.
| IOException |
|---|
Sets the name that represents the given feed. It is shared across devices and feed members. If the name is empty or null, one will be auto-generated based on the feed's membership.
| IOException |
|---|