-
- All Implemented Interfaces:
-
io.getstream.android.push.permissions.NotificationPermissionHandler,io.getstream.video.android.core.notifications.NotificationHandler,io.getstream.video.android.core.notifications.StreamNotificationDispatcher,io.getstream.video.android.core.notifications.handlers.StreamNotificationHandler,io.getstream.video.android.core.notifications.handlers.StreamNotificationHandlerWithPayload,io.getstream.video.android.core.notifications.handlers.StreamNotificationProvider,io.getstream.video.android.core.notifications.handlers.StreamNotificationProviderWithPayload,io.getstream.video.android.core.notifications.handlers.StreamNotificationUpdatesProvider,io.getstream.video.android.core.notifications.handlers.StreamSettingUpCallNotificationProvider,io.getstream.video.android.core.notifications.medianotifications.MediaNotificationHandler
@Stable() public interface StreamVideo implements NotificationHandler
The main interface to control the Video calls. StreamVideoClient implements this interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classStreamVideo.Companion
-
Method Summary
Modifier and Type Method Description abstract Callcall(String type, String id)Create a call with the given type and id. abstract Result<QueriedCalls>queryCalls(Map<String, Object> filters, List<SortField> sort, Integer limit, String prev, String next, Boolean watch)Queries calls with a given filter predicate and pagination. abstract Result<QueriedMembers>queryMembers(String type, String id, Map<String, Object> filter, List<SortField> sort, String prev, String next, Integer limit)Queries calls with a given filter predicate and pagination. abstract EventSubscriptionsubscribeFor(Class<out VideoEvent> eventTypes, VideoEventListener<VideoEvent> listener)Subscribe for a specific list of events abstract EventSubscriptionsubscribe(VideoEventListener<VideoEvent> listener)Subscribe to all events abstract Flow<Device>getDevice()Get a cached device used to receive push notifications. abstract Result<Device>createDevice(PushDevice pushDevice)Create a device that will be used to receive push notifications. abstract UnitupdateDevice(Device device)Update a device used to receive push notifications. abstract Result<Unit>deleteDevice(Device device)Remove a device used to receive push notifications. abstract Result<List<EdgeData>>getEdges()Returns a list of all the edges available on the network. abstract Deferred<Result<Long>>connectAsync()abstract Result<Long>connect()Connects the user abstract UnitlogOut()Clears the locally stored push device token only. abstract Unitcleanup()abstract UnitconnectIfNotAlreadyConnected()abstract ContextgetContext()Represents the default call config when starting a call. abstract UsergetUser()abstract StringgetUserId()abstract ClientStategetState()-
Methods inherited from class io.getstream.video.android.core.StreamVideo
getNotificationUpdates -
Methods inherited from class io.getstream.video.android.core.notifications.NotificationHandler
createMinimalMediaStyleNotification, getIncomingCallNotification, getMediaNotificationConfig, getMissedCallNotification, getOngoingCallNotification, getRingingCallNotification, getSettingUpCallNotification, getSettingUpCallNotification, getStreamNotificationDispatcher, onCallNotificationUpdate, onLiveCall, onMissedCall, onNotification, onPermissionDenied, onPermissionGranted, onPermissionRationale, onPermissionRequested, onRingingCall, updateIncomingCallNotification, updateOngoingCallNotification, updateOutgoingCallNotification -
Methods inherited from class io.getstream.video.android.core.notifications.handlers.StreamNotificationHandler
onLiveCall, onMissedCall, onNotification, onRingingCall -
Methods inherited from class io.getstream.video.android.core.notifications.handlers.StreamNotificationProvider
getIncomingCallNotification, getMissedCallNotification, getOngoingCallNotification, getRingingCallNotification -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
call
abstract Call call(String type, String id)
Create a call with the given type and id. For GetStream Devs: Careful when invoking it during call/service cleanup as it will fill itself in io.getstream.video.android.core.StreamVideoClient.calls map
-
queryCalls
abstract Result<QueriedCalls> queryCalls(Map<String, Object> filters, List<SortField> sort, Integer limit, String prev, String next, Boolean watch)
Queries calls with a given filter predicate and pagination.
- Parameters:
limit-maximum number of items in response
prev-paging support. Set null for first page. Otherwise set the value from last page response.
next-paging support. Set null for first page. Otherwise set the value from last page response.
-
queryMembers
abstract Result<QueriedMembers> queryMembers(String type, String id, Map<String, Object> filter, List<SortField> sort, String prev, String next, Integer limit)
Queries calls with a given filter predicate and pagination.
- Parameters:
prev-paging support. Set null for first page. Otherwise set the value from last page response.
next-paging support. Set null for first page. Otherwise set the value from last page response.
limit-maximum number of items in response
-
subscribeFor
abstract EventSubscription subscribeFor(Class<out VideoEvent> eventTypes, VideoEventListener<VideoEvent> listener)
Subscribe for a specific list of events
-
subscribe
abstract EventSubscription subscribe(VideoEventListener<VideoEvent> listener)
Subscribe to all events
-
getDevice
abstract Flow<Device> getDevice()
Get a cached device used to receive push notifications.
Collecting the returned Flow accesses persistent storage and may throw an IOException if the stored device cannot be read. Consumers that treat device retrieval as a best-effort operation should handle IOException explicitly without swallowing coroutine cancellation.
-
createDevice
abstract Result<Device> createDevice(PushDevice pushDevice)
Create a device that will be used to receive push notifications.
- Parameters:
pushDevice- The PushDevice obtained from the selected push provider.
-
updateDevice
abstract Unit updateDevice(Device device)
Update a device used to receive push notifications.
- Parameters:
device- The Device.
-
deleteDevice
abstract Result<Unit> deleteDevice(Device device)
Remove a device used to receive push notifications.
- Parameters:
device- The Device, previously provided by createDevice.
-
getEdges
abstract Result<List<EdgeData>> getEdges()
Returns a list of all the edges available on the network.
-
connectAsync
abstract Deferred<Result<Long>> connectAsync()
-
logOut
@Deprecated(message = logOut() only clears the local push device cache; it does not log the user out, remove the server-side device row, or disconnect the socket. Use StreamVideo.removeClient() for a full teardown (combine with deleteDevice() first if the server-side device row must be removed)., replaceWith = @ReplaceWith(imports = {io.getstream.video.android.core.StreamVideo}, expression = StreamVideo.removeClient()), level = DeprecationLevel.WARNING) abstract Unit logOut()
Clears the locally stored push device token only. Does not call the server
DELETE /devicesendpoint, disconnect the coordinator socket, or clear any in-memory user / call state. The name and historical KDoc misrepresented this behavior; the method is kept for source compatibility but should not be used.For a full teardown, call deleteDevice (if a server-side device row should be removed) and then StreamVideo.removeClient, which triggers cleanup and uninstalls the singleton.
-
connectIfNotAlreadyConnected
abstract Unit connectIfNotAlreadyConnected()
-
getContext
abstract Context getContext()
Represents the default call config when starting a call.
-
getState
abstract ClientState getState()
-
-
-
-