You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Quickstart in Pub/Sub using Java](https://ably.com/docs/getting-started/quickstart?lang=java)
23
+
*[SDK Setup for Java.](https://ably.com/docs/getting-started/setup?lang=java)
24
24
25
25
---
26
26
@@ -33,14 +33,77 @@ The following platforms are supported:
33
33
| Platform | Support |
34
34
|----------|---------|
35
35
| Java | >= 1.8 (JRE 8 or later) |
36
-
| Kotlin | All versions (>= 0.0.1 supported), but we recommend >= 1.8 for best compatibilit. |
36
+
| Kotlin | All versions (>= 1.0 supported), but we recommend >= 1.8 for best compatibility. |
37
37
| Android | >=4.4 (API level 19) |
38
38
39
39
> [!IMPORTANT]
40
40
> SDK versions < 1.2.35 will be [deprecated](https://ably.com/docs/platform/deprecate/protocol-v1) from November 1, 2025.
41
41
42
42
---
43
43
44
+
## Installation
45
+
46
+
The Java SDK is available as a [Maven dependency](https://mvnrepository.com/artifact/io.ably/ably-java). To get started with your project, install the package:
47
+
48
+
### Install for Maven:
49
+
50
+
```xml
51
+
<dependency>
52
+
<groupId>io.ably</groupId>
53
+
<artifactId>ably-java</artifactId>
54
+
<version>1.2.22</version>
55
+
</dependency>
56
+
```
57
+
58
+
### Install for Gradle:
59
+
60
+
```gradle
61
+
implementation 'io.ably:ably-java:1.2.22'
62
+
implementation 'org.slf4j:slf4j-simple:2.0.7'
63
+
```
64
+
65
+
Run the following to instantiate a client:
66
+
67
+
```java
68
+
importio.ably.lib.realtime.AblyRealtime;
69
+
importio.ably.lib.types.ClientOptions;
70
+
71
+
ClientOptions options =newClientOptions(apiKey);
72
+
AblyRealtime realtime =newAblyRealtime(options);
73
+
```
74
+
75
+
---
76
+
77
+
## Usage
78
+
79
+
The following code connects to Ably's realtime messaging service, subscribes to a channel to receive messages, and publishes a test message to that same channel.
You can add proxy support to the Ably Java SDK by configuring `ProxyOptions` in your client setup, enabling connectivity through corporate firewalls and secured networks.
@@ -111,10 +174,10 @@ Read the [CONTRIBUTING.md](./CONTRIBUTING.md) guidelines to contribute to Ably.
111
174
112
175
## Releases
113
176
114
-
The [CHANGELOG.md](/ably/ably-js/blob/main/CHANGELOG.md) contains details of the latest releases for this SDK. You can also view all Ably releases on [changelog.ably.com](https://changelog.ably.com).
177
+
The [CHANGELOG.md](/ably/ably-java/blob/main/CHANGELOG.md) contains details of the latest releases for this SDK. You can also view all Ably releases on [changelog.ably.com](https://changelog.ably.com).
115
178
116
179
---
117
180
118
-
## Support, Feedback, and Troubleshooting
181
+
## Support, feedback, and troubleshooting
119
182
120
183
For help or technical support, visit Ably's [support page](https://ably.com/support) or [GitHub Issues](https://github.com/ably/ably-java/issues) for community-reported bugs and discussions.
0 commit comments