ServiceAccess module
This module retrieves, from the Hive Axyl server, the information needed to restrict access to the app or display notice screens. It provides server maintenance retrieval, client update checks, and service country restriction checks.
Module information
- Package:
com.com2usplatform.hiveaxyl.serviceaccess - Namespace:
Hive.Axyl.ServiceAccess - Supported platforms: All (server API)
- Minimum requirements: Unity 6000.0+
Provided interfaces
| Interface | Registration method | Description |
|---|---|---|
| IServiceAccessService | AddServiceAccess() | Server maintenance retrieval, client update check, service country restriction check |
For the feature structure and what the app handles, see Service access control. For how to register items in the console, see Service access control items.
Registration and retrieval
Register the module with AddServiceAccess() in the registration step of HiveBootstrap.Initialize, and then retrieve it with HiveCore.Resolve<T>().
using Hive.Axyl.Core;
using Hive.Axyl.Core.Unity; // HiveBootstrap
using Hive.Axyl.ServiceAccess;
var config = CoreConfig.CreateBuilder("{appId}").Build();
HiveBootstrap.Initialize(config, builder =>
{
builder.AddServiceAccess();
});
IServiceAccessService serviceAccess = HiveCore.Resolve<IServiceAccessService>();
No method of IServiceAccessService requires a login session, so you can call them right after the app starts, even before login. For the installation procedure and how to initialize the module, see Install and initialize the module.