API Documentation Integration MsecSdk
Public Member Functions | Properties | List of all members
MsecUnitySdk.Android.MsecSdkClient Class Reference

Android-specific implementation of the Msec SDK client. More...

Inheritance diagram for MsecUnitySdk.Android.MsecSdkClient:
Inheritance graph
[legend]
Collaboration diagram for MsecUnitySdk.Android.MsecSdkClient:
Collaboration graph
[legend]

Public Member Functions

override void Init (IMsecSdkListener listener, MsecSdkConfig config)
 Initializes the Msec SDK client for Android. More...
 
override DomainCertificateVerificationResult VerifyDomainCertificate (string domain, int port)
 Verifies the SSL certificate of a domain on Android. More...
 
override string GetOTPCode (double timestamp)
 Retrieves an OTP code using a timestamp on Android. More...
 
override void RegisterCallbacks ()
 Registers native callbacks for the Msec SDK on Android. More...
 

Properties

static MsecSdkClient Instance [get]
 Gets the singleton instance of the MsecSdkClient. More...
 

Additional Inherited Members

- Protected Member Functions inherited from MsecUnitySdk.BaseMsecSdkClient
void LogDebug (object message)
 Logs a debug message if debug mode is enabled. More...
 
void LogError (object message)
 Logs an error message if debug mode is enabled. More...
 
- Protected Attributes inherited from MsecUnitySdk.BaseMsecSdkClient
IMsecSdkListener listener
 The listener for receiving SDK callbacks. More...
 
MsecSdkConfig config
 The configuration settings for the SDK. More...
 

Detailed Description

Android-specific implementation of the Msec SDK client.

This class extends BaseMsecSdkClient to provide Android-specific functionality for the Msec SDK, including JNI integration, native callback registration, and certificate verification. It uses a singleton pattern to ensure a single instance is used throughout the application.

Member Function Documentation

◆ GetOTPCode()

override string MsecUnitySdk.Android.MsecSdkClient.GetOTPCode ( double  timestamp)
inlinevirtual

Retrieves an OTP code using a timestamp on Android.

Calls a native function via P/Invoke to get the OTP code from the msec library.

Parameters
timestampThe timestamp used to generate the OTP code.
Returns
A string representing the OTP code, or an error message if the call fails.

Implements MsecUnitySdk.BaseMsecSdkClient.

◆ Init()

override void MsecUnitySdk.Android.MsecSdkClient.Init ( IMsecSdkListener  listener,
MsecSdkConfig  config 
)
inlinevirtual

Initializes the Msec SDK client for Android.

Extends the base Init method to perform Android-specific initialization, including JNI calls to the MSecSdk Java class and callback registration.

Parameters
listenerThe listener to receive SDK callbacks.
configThe configuration settings for the SDK.

Reimplemented from MsecUnitySdk.BaseMsecSdkClient.

◆ RegisterCallbacks()

override void MsecUnitySdk.Android.MsecSdkClient.RegisterCallbacks ( )
inlinevirtual

Registers native callbacks for the Msec SDK on Android.

Sets up the violation, performance, and initialization callbacks by registering them with the native msec library.

Implements MsecUnitySdk.BaseMsecSdkClient.

◆ VerifyDomainCertificate()

override DomainCertificateVerificationResult MsecUnitySdk.Android.MsecSdkClient.VerifyDomainCertificate ( string  domain,
int  port 
)
inlinevirtual

Verifies the SSL certificate of a domain on Android.

Calls the Java method verifyDomainSSLCertificate via JNI to perform the verification.

Parameters
domainThe domain name to verify (e.g., "google.com").
portThe port number to check (e.g., 443 for HTTPS).
Returns
A DomainCertificateVerificationResult indicating the verification outcome.

Implements MsecUnitySdk.BaseMsecSdkClient.

Property Documentation

◆ Instance

MsecSdkClient MsecUnitySdk.Android.MsecSdkClient.Instance
staticget

Gets the singleton instance of the MsecSdkClient.

Returns
The singleton instance of MsecSdkClient.

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