The iOS and Android SDKs can show your Userorbit announcements as a native "What's new" feed inside your app. People see the list of updates, open one to read the full post, follow its call to action and react to it. You can also show an unread count on the button that opens the feed.

Before you begin

  • Install the SDK: iOS or Android. On Android, the built-in feed needs userorbit-android-ui.
  • Publish at least one announcement in Userorbit. The feed shows the same announcements as your widget.

Open the feed

Call the method from a button, a menu item or a settings row:

// iOS: opens a native sheet
Userorbit.shared.showAnnouncements()
swift
// Android: opens a full-screen activity
UserorbitUI.showAnnouncements(context)
kotlin
Android announcement detail with a cover image, formatted text, a 'See how it works' link and five reaction buttons
An announcement opened from the feed on Android, with its cover image, call to action and reactions.

The feed lists announcements newest first. Opening one shows its cover image, formatted body, call-to-action link and, when reactions are enabled for that announcement, a row of reactions. Opening an announcement records a view, so the announcement's analytics in Userorbit include mobile readers.

Show an unread count

// iOS
Userorbit.shared.fetchUnreadAnnouncementCount { count in
    unreadUpdates = count
}
swift
// Android: the callback runs off the main thread
Userorbit.shared.fetchUnreadAnnouncementCount { count ->
    runOnUiThread { badge.text = count.toString() }
}
kotlin

The count includes announcements published since the person last opened the feed. Opening the feed marks everything as seen, so refresh the badge after the feed closes. If you build your own feed, call markAnnouncementsSeen when the person views it.

Build your own feed

To match your app's design, fetch the data and draw it yourself:

  • fetchAnnouncements returns published announcements, 20 at a time by default.
  • recordAnnouncementView records that the person opened an announcement.
  • react sends a reaction (react(toAnnouncement:reaction:) on iOS).
  • markAnnouncementsSeen resets the unread count.

On iOS you can also embed the built-in AnnouncementsFeed() view in your own navigation.

Good to know

  • Announcements come from your workspace, so a new post appears in installed apps without an app release.
  • Rich formatting such as bold text, lists and links is kept in the detail view. The list preview shows plain text.
  • The unread count is stored on the device. A person who uses two devices sees a separate count on each.

To write and publish announcements, see the Announcements section of this help center.

Was this helpful?