The stream service will have a "subscribe" endpoint. Once you make a connection, you will be subscribed and changes will be pushed down from the service. This differs from a standard http feature service, where you need to explicitly send a request and get a response.
Here is some example code in QML, where once active, text messages (JSON) gets pumped through:
import QtQuick 2.6
import QtQuick.Controls 2.2
import Esri.ArcGISRuntime 100.11
import Qt.WebSockets 1.15
ApplicationWindow {
id: appWindow
width: 800
height: 600
title: "MapStressTest"
MapView {
anchors.fill: parent
Map {
BasemapTopographicVector{}
}
GraphicsOverlay {
id: go
SimpleRenderer {
SimpleMarkerSymbol {
color: "red"
size: 12
style: Enums.SimpleMarkerSymbolStyleCircle
}
}
}
}
WebSocket {
active: true
url: "wss://<path_to_stream_service>/StreamServer/subscribe"
onTextMessageReceived: {
const feat = JSON.parse(message);
const geometry = ArcGISRuntimeEnvironment.createObject("Point", {
x: feat["geometry"]["x"],
y: feat["geometry"]["y"],
spatialReference: Factory.SpatialReference.createWgs84()
});
const graphic = ArcGISRuntimeEnvironment.createObject("Graphic", {
geometry: geometry
});
go.graphics.append(graphic)
}
}
}
I'm not certain on your question about Android, but I would be very surprised if the Android SDK (the Google SDK, not Esri's Runtime SDK) did not contain a similar web socket API. This should be a pretty standard networking capability for most frameworks to support whether Qt, .NET, iOS, Android, Java, etc.