Class EOS_Metrics_Interface

java.lang.Object
com.sun.jna.PointerType
host.anzo.eossdk.eos.sdk.EOS_Metrics_Interface
All Implemented Interfaces:
com.sun.jna.NativeMapped

public class EOS_Metrics_Interface extends com.sun.jna.PointerType
The Metrics Interface tracks your application's usage and populates the Game Analytics dashboard in the Developer Portal. This data includes active, online instances of the game's client and server, and past sessions played by local players. All Metrics Interface calls take a handle of type EOS_HMetrics as the first parameter. This handle can be retrieved from an EOS_HPlatform handle by using the EOS_Platform_GetMetricsInterface function.
Since:
8/21/2023
See Also:
  • Constructor Details

    • EOS_Metrics_Interface

      public EOS_Metrics_Interface(com.sun.jna.Pointer address)
    • EOS_Metrics_Interface

      public EOS_Metrics_Interface()
  • Method Details

    • beginPlayerSession

      public EOS_EResult beginPlayerSession(EOS_Metrics_BeginPlayerSessionOptions options)
      Logs the start of a new game session for a local player.

      The game client should call this function whenever it joins into a new multiplayer, peer-to-peer or single player game session. Each call to BeginPlayerSession must be matched with a corresponding call to EndPlayerSession.

      Parameters:
      options - Structure containing the local player's game account and the game session information.
      Returns:
      EOS_EResult.EOS_Success on success, or an error code if the input parameters are invalid or an active session for the player already exists.
    • endPlayerSession

      public EOS_EResult endPlayerSession(EOS_Metrics_EndPlayerSessionOptions options)
      Logs the end of a game session for a local player.

      Call once when the game client leaves the active game session. Each call to BeginPlayerSession must be matched with a corresponding call to EndPlayerSession.

      Parameters:
      options - Structure containing the account id of the player whose session to end.
      Returns:
      EOS_EResult.EOS_Success on success, or an error code if the input parameters are invalid or there was no active session for the player.