Beamable SDK
Public Member Functions | Properties | List of all members
Beamable.Api.Sessions.SessionService Class Reference

This type defines the Client main entry point for the Session feature. More...

Inheritance diagram for Beamable.Api.Sessions.SessionService:
Inheritance graph
[legend]
Collaboration diagram for Beamable.Api.Sessions.SessionService:
Collaboration graph
[legend]

Public Member Functions

 SessionService (IBeamableRequester requester, IDependencyProvider provider, SessionParameterProvider parameterProvider, SessionDeviceOptions deviceOptions)
 
Promise< EmptyResponseStartSession (User user, string advertisingId, string locale)
 Starts a new Beamable user session. A session will record user analytics and track the user's play times. This method is automatically called by the Beamable SDK anytime the user changes and when Beamable SDK is initialized. More...
 
Promise< EmptyResponseSendHeartbeat ()
 Notifies the Beamable platform that the session is still active. This method is automatically called at a standard interval by the Beamable SDK itself. More...
 
Promise< SessionGetHeartbeat (long gamerTag)
 Get the current Session of a player by their gamertag. More...
 

Properties

float SessionStartedAt [get]
 
float TimeSinceLastSessionStart [get]
 
- Properties inherited from Beamable.Api.Sessions.ISessionService
float SessionStartedAt [get]
 The number of seconds after the game startup that the session was begun.
 
float TimeSinceLastSessionStart [get]
 The number of seconds ago that the most recent session was started.
 

Detailed Description

This type defines the Client main entry point for the Session feature.

Related Links

img beamable-logo

Member Function Documentation

◆ GetHeartbeat()

Promise< Session > Beamable.Api.Sessions.SessionService.GetHeartbeat ( long  gamerTag)
inline

Get the current Session of a player by their gamertag.

Parameters
gamerTagThe gamertag of the player to find the Session for.
Returns
A Promise<T> containing the player's Session

Implements Beamable.Api.Sessions.ISessionService.

◆ SendHeartbeat()

Promise< EmptyResponse > Beamable.Api.Sessions.SessionService.SendHeartbeat ( )
inline

Notifies the Beamable platform that the session is still active. This method is automatically called at a standard interval by the Beamable SDK itself.

Returns

Implements Beamable.Api.Sessions.ISessionService.

◆ StartSession()

Promise< EmptyResponse > Beamable.Api.Sessions.SessionService.StartSession ( User  user,
string  advertisingId,
string  locale 
)
inline

Starts a new Beamable user session. A session will record user analytics and track the user's play times. This method is automatically called by the Beamable SDK anytime the user changes and when Beamable SDK is initialized.

Parameters
advertisingId
locale
Returns

Implements Beamable.Api.Sessions.ISessionService.


The documentation for this class was generated from the following file: