Skip to content

Get launch parameter

Overview

The execution parameters retrieval is a Hive SDK feature that obtains the execution parameter values added to the game execution URI from the game client. You can check the execution parameters that were passed to the game when the app was launched with the crossplay launcher.

Query method

Receives the execution parameter values that were passed in the original string format.

Example code

The example code is as follows.

using hive;

PlatformHelper.getLaunchParameters((ResultAPI result, String parameters) => 
{
    if (result.success)
    {
        // API call successful
        // parameters: returned parameter value
    }
});
#include "HivePlatformHelper.h"

FHivePlatformHelper::GetLaunchParameters(FHivePlatformHelperOnGetLaunchParametersDelegate::CreateLambda([this](const FHiveResultAPI& Result, const FString& Parameters) {
    if (Result.IsSuccess()) {
        // API call succeeded
        // Parameters: returned parameter value
    }
}));
#include <HIVE_SDK_Plugin/HIVE_CPP.h>
using namespace std;
using namespace hive;

PlatformHelper::getLaunchParameters([=](ResultAPI const & result, string parameters) {
    if (result.isSuccess()) {
        // API call succeeded
        // parameters: returned parameter values
    }
});

Overview

The launch parameter query is a Hive SDK feature that allows the game client to retrieve launch parameter values added to the game launch URI. You can check the launch parameters that were passed to the game when the app was launched via the Crossplay Launcher.

Return method

The launch parameter values are received in their original string format.

Example code

Example code is as follows.

using hive;

PlatformHelper.getLaunchParameters((ResultAPI result, String parameters) => 
{
    if (result.success)
    {
        // API call succeeded
        // parameters: returned parameter value
    }
});
#include "HivePlatformHelper.h"

FHivePlatformHelper::getLaunchParameters(FHivePlatformHelperOnGetLaunchParametersDelegate::CreateLambda([this](const FHiveResultAPI& Result, const FString& Parameters) {
    if (Result.IsSuccess()) {
        // API call succeeded
        // Parameters: returned parameter value
    }
}));
#include <HIVE_SDK_Plugin/HIVE_CPP.h>
using namespace std;
using namespace hive;

PlatformHelper::getLaunchParameters([=](ResultAPI const & result, string parameters) {
    if (result.isSuccess()) {
        // API call succeeded
        // parameters: returned parameter value
    }
});