Activity Feeds V3 is in closed alpha — do not use it in production (just yet).

Installation

Maven

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.getstream</groupId>
    <artifactId>stream-sdk-java</artifactId>
    <version>3.0.3-feeds</version>
</dependency>

Gradle

Add the following to your build.gradle:

implementation 'io.getstream:stream-sdk-java:3.0.3-feeds'

GitHub repository: https://github.com/GetStream/stream-sdk-java. Feel free to submit bug reports and feature requests.

The package is tested against these environments:

  • Java 8+
  • Java 11+
  • Java 17+
  • Java 21+

To create a client, you’ll need your API key and secret. Both of them can be found in your Stream Dashboard.

You can optionally pass a timeout for the API requests, the default timeout is 6000ms.

import io.getstream.core.StreamClient;
import io.getstream.core.models.FeedID;
import io.getstream.core.models.Activity;

public class StreamExample {
    public static void main(String[] args) {
        String apiKey = "";
        String secret = "";

        // Create client with default timeout (6000ms)
        StreamClient client = StreamClient.builder(apiKey, secret).build();

        // Or create client with custom timeout
        StreamClient clientWithTimeout = StreamClient.builder(apiKey, secret)
            .timeout(3000) // 3 seconds
            .build();

        // Get the feeds client
        FeedsClient feedsClient = client.feeds();

        // Your feeds operations here...
    }
}
© Getstream.io, Inc. All Rights Reserved.