Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
53b8ffd
Test
marcin-cebo Sep 17, 2025
f5d4c6a
Test
marcin-cebo Sep 17, 2025
82bd6e6
Initial changes
marcin-cebo Sep 25, 2025
da02d30
Added integration tests
marcin-cebo Oct 3, 2025
ba34ae8
Renamed nextStartFrom to nextOffset
marcin-cebo Oct 6, 2025
49864fc
Renamed startFrom to offset
marcin-cebo Oct 6, 2025
0baebf7
Updated snippets
marcin-cebo Oct 6, 2025
dc78bd8
Added log statement for case when limit is out of allowed range.
marcin-cebo Oct 6, 2025
49c6b3d
Added test for Global HereNow
marcin-cebo Oct 6, 2025
e3d916d
Added integration tests for java
marcin-cebo Oct 6, 2025
4994a7e
Rename variables
marcin-cebo Oct 6, 2025
99a1f77
Fix lint
marcin-cebo Oct 7, 2025
38a97a4
Fix JS
marcin-cebo Oct 7, 2025
83a5dc3
Improved paging in snippets.
marcin-cebo Oct 7, 2025
eb4d1b7
Allowed limit to be 0
marcin-cebo Oct 8, 2025
00be4a9
Channel data are returned for one channel when includeUUIDs=false to …
marcin-cebo Oct 11, 2025
4454939
Removed nextOffset
marcin-cebo Oct 14, 2025
8d3c6c3
Updated kDoc
marcin-cebo Oct 14, 2025
9d33842
Fix
marcin-cebo Oct 15, 2025
f871170
Removed MPSN as available push type.
marcin-cebo Oct 15, 2025
943f078
Fixed tests
marcin-cebo Oct 16, 2025
9a9eb70
Remove validations since server does that.
marcin-cebo Oct 17, 2025
0bf7c10
Improved kDoc and Java doc
marcin-cebo Oct 17, 2025
e77f620
Added limit and offset to HereNow API.
marcin-cebo Oct 20, 2025
7430c36
Test
marcin-cebo Sep 17, 2025
dd2b226
Test
marcin-cebo Sep 17, 2025
76409fd
Initial changes
marcin-cebo Sep 25, 2025
2b99088
Added integration tests
marcin-cebo Oct 3, 2025
5f849b8
Renamed nextStartFrom to nextOffset
marcin-cebo Oct 6, 2025
a0da819
Renamed startFrom to offset
marcin-cebo Oct 6, 2025
5dedb1c
Updated snippets
marcin-cebo Oct 6, 2025
63f2f04
Added log statement for case when limit is out of allowed range.
marcin-cebo Oct 6, 2025
ef89448
Added test for Global HereNow
marcin-cebo Oct 6, 2025
6f525d0
Added integration tests for java
marcin-cebo Oct 6, 2025
c7d517f
Rename variables
marcin-cebo Oct 6, 2025
e02c62f
Fix lint
marcin-cebo Oct 7, 2025
b918d82
Improved paging in snippets.
marcin-cebo Oct 7, 2025
c3458dd
Allowed limit to be 0
marcin-cebo Oct 8, 2025
bb5bbd5
Channel data are returned for one channel when includeUUIDs=false to …
marcin-cebo Oct 11, 2025
b47f358
Removed nextOffset
marcin-cebo Oct 14, 2025
398cd11
Updated kDoc
marcin-cebo Oct 14, 2025
7fbd2bd
Fix
marcin-cebo Oct 15, 2025
fe97173
Removed MPSN as available push type.
marcin-cebo Oct 15, 2025
7ba8ce9
Fixed tests
marcin-cebo Oct 16, 2025
04bed28
Remove validations since server does that.
marcin-cebo Oct 17, 2025
21741a1
Improved kDoc and Java doc
marcin-cebo Oct 17, 2025
c879fc7
Merge remote-tracking branch 'origin/mc/gcm-byebye' into mc/gcm-byebye
marcin-cebo Oct 20, 2025
50e2167
Fixed case when limit is 0
marcin-cebo Oct 20, 2025
d986e9a
Removed unneeded tests
marcin-cebo Oct 20, 2025
90b5bb3
Fixed case for limit = 0
marcin-cebo Oct 20, 2025
ebf9aef
Fixed comments
marcin-cebo Oct 20, 2025
e2568d5
PubNub SDK v11.0.0 release.
pubnub-release-bot Oct 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .pubnub.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: kotlin
version: 10.6.0
version: 11.0.0
schema: 1
scm: github.com/pubnub/kotlin
files:
- build/libs/pubnub-kotlin-10.6.0-all.jar
- build/libs/pubnub-kotlin-11.0.0-all.jar
sdks:
-
type: library
Expand All @@ -23,8 +23,8 @@ sdks:
-
distribution-type: library
distribution-repository: maven
package-name: pubnub-kotlin-10.6.0
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/10.6.0/pubnub-kotlin-10.6.0.jar
package-name: pubnub-kotlin-11.0.0
location: https://repo.maven.apache.org/maven2/com/pubnub/pubnub-kotlin/11.0.0/pubnub-kotlin-11.0.0.jar
supported-platforms:
supported-operating-systems:
Android:
Expand Down Expand Up @@ -121,6 +121,19 @@ sdks:
license-url: https://www.apache.org/licenses/LICENSE-2.0.txt
is-required: Required
changelog:
- date: 2025-10-21
version: v11.0.0
changes:
- type: feature
text: "Added limit and offset parameters for hereNow. Number of returned users per channel by default is limited to 1000. Breaking change."
- type: bug
text: "Single-channel hereNow with includeUUIDs=false now returns channel data in the channels map for consistency with multi-channel behaviour. Previously, the channels map was empty in this scenario, forcing reliance on totalOccupancy field only. Breaking change."
- type: bug
text: "Removed possibility to use deprecated MPNS -Microsoft Push Notification Service. Breaking change."
- type: bug
text: "Added deprecation warning for GCP and old APNS PushType. ."
- type: bug
text: "In case FCM is chosen as PushType type REST query param gets fcm value instead of gcm."
- date: 2025-09-11
version: v10.6.0
changes:
Expand Down
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v11.0.0
October 21 2025

#### Added
- Added limit and offset parameters for hereNow. Number of returned users per channel by default is limited to 1000. Breaking change.

#### Fixed
- Single-channel hereNow with includeUUIDs=false now returns channel data in the channels map for consistency with multi-channel behaviour. Previously, the channels map was empty in this scenario, forcing reliance on totalOccupancy field only. Breaking change.
- Removed possibility to use deprecated MPNS -Microsoft Push Notification Service. Breaking change.
- Added deprecation warning for GCP and old APNS PushType. .
- In case FCM is chosen as PushType type REST query param gets fcm value instead of gcm.

## v10.6.0
September 11 2025

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You will need the publish and subscribe keys to authenticate your app. Get your
<dependency>
<groupId>com.pubnub</groupId>
<artifactId>pubnub-kotlin</artifactId>
<version>10.6.0</version>
<version>11.0.0</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RELEASE_SIGNING_ENABLED=true
SONATYPE_HOST=DEFAULT
SONATYPE_AUTOMATIC_RELEASE=false
GROUP=com.pubnub
VERSION_NAME=10.6.0
VERSION_NAME=11.0.0
POM_PACKAGING=jar

POM_NAME=PubNub SDK
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ ktlint = "12.1.0"
dokka = "2.0.0"
kotlinx_datetime = "0.6.2"
kotlinx_coroutines = "1.10.2"
pubnub_js = "9.8.1"
pubnub_swift = "9.3.2"
pubnub_js = "10.1.0"
pubnub_swift = "9.3.5"

[libraries]
retrofit2 = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit2" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,79 @@
import com.pubnub.api.java.endpoints.Endpoint;
import com.pubnub.api.models.consumer.presence.PNHereNowResult;

/**
* Obtain information about the current state of channels including a list of unique user IDs
* currently subscribed and the total occupancy count.
* <p>
*
* @see com.pubnub.api.models.consumer.presence.PNHereNowResult
*/
public interface HereNow extends Endpoint<PNHereNowResult> {
/**
* Set the channels to query for presence information.
*
* @param channels List of channel names to query.
* @return {@code this} for method chaining
* @see #channelGroups(java.util.List)
*/
HereNow channels(java.util.List<String> channels);

/**
* Set the channel groups to query for presence information.
*
* @param channelGroups List of channel group names to query.
* @return {@code this} for method chaining
* @see #channels(java.util.List)
*/
HereNow channelGroups(java.util.List<String> channelGroups);

/**
* Whether the response should include presence state information, if available.
*
* @param includeState {@code true} to include state information, {@code false} to exclude. Default: {@code false}
* @return {@code this} for method chaining
* @see #includeUUIDs(boolean)
*/
HereNow includeState(boolean includeState);

/**
* Include the list of UUIDs currently present in each channel.
*
* @param includeUUIDs {@code true} to include UUID list, {@code false} for occupancy count only. Default: {@code true}
* @return {@code this} for method chaining
* @see #includeState(boolean)
* @see #limit(int)
*/
HereNow includeUUIDs(boolean includeUUIDs);

/**
* Set the maximum number of occupants to return per channel.
* <p>
* The server enforces a maximum limit of 1000. Values outside this range will be rejected by the server.
* <p>
* Special behavior:
* <ul>
* <li>Use {@code limit = 0} to retrieve only occupancy counts without individual occupant UUIDs</li>
* </ul>
*
* @param limit Maximum number of occupants to return (0-1000). Default: 1000
* @return {@code this} for method chaining
* @see #offset(Integer) for pagination support
*/
HereNow limit(int limit);

/**
* Set the zero-based starting index for pagination through occupants.
* <p>
* Server-side validation applies:
* <ul>
* <li>Must be >= 0 (negative values will be rejected)</li>
* </ul>
* <p>
*
* @param offset Zero-based starting position (must be >= 0). Default: null (no offset)
* @return {@code this} for method chaining
* @see #limit(int) for controlling result size
*/
HereNow offset(Integer offset);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.pubnub.api.PubNubException;
import com.pubnub.api.UserId;
import com.pubnub.api.enums.PNLogVerbosity;
import com.pubnub.api.java.PubNub;
import com.pubnub.api.java.v2.PNConfiguration;
import com.pubnub.api.models.consumer.presence.PNHereNowChannelData;
Expand All @@ -17,6 +18,7 @@ public static void main(String[] args) throws PubNubException {
// Configure PubNub instance
PNConfiguration.Builder configBuilder = PNConfiguration.builder(new UserId("demoUserId"), "demo");
configBuilder.publishKey("demo");
configBuilder.logVerbosity(PNLogVerbosity.BODY);
configBuilder.secure(true);

PubNub pubnub = PubNub.create(configBuilder.build());
Expand All @@ -25,6 +27,8 @@ public static void main(String[] args) throws PubNubException {
pubnub.hereNow()
.channels(Arrays.asList("coolChannel", "coolChannel2"))
.includeUUIDs(true)
.limit(100)
.offset(10)
.async(result -> {
result.onSuccess((PNHereNowResult res) -> {

Expand Down
Loading
Loading