Accessing Games
To help you quickly develop cloud mobile gaming services, Huawei launches the Software Development Kit (SDK) for cloud mobile gaming. SDK encapsulates APIs provided for the cloud mobile gaming services to simplify user development. You can directly call API functions provided by the cloud mobile gaming SDK to access cloud games.
The Android SDK provides the following access methods:
- AAR package access: Based on the JAR package access, the SDK integrates the activities required for running cloud games. The Activity lifecycle is maintained in the SDK.
- JAR package access: The SDK provides the capability of cloud game access. The customer provides the activity or fragmentation component. When the game is started, the viewgroup component for image rendering is transferred to the SDK.
Complete the lifecycle management of a game, such as initializing the game, starting the game, configuring the game image, and exiting the game by referring to the AAR or JAR API examples.
Importing the SDK
Import the .aar package compiled by the SDK to the app/libs directory.
Import the .jar package compiled by the SDK to the app/libs directory and the .so file to the app/jniLibs directory.
Using the AAR SDK
Import the following information to the class file that invokes the SDK APIs:
import com.huawei.cloudappsdk.manager.CloudAppManager;
Set ApplicationContext before invoking the APIs.
CloudAppManager.defaultManager().setApplicationContext(getApplicationContext());
Using the JAR SDK
Import the following information to the class file that invokes the SDK APIs:
import com.huawei.cloudgame.api.CloudGameManager;
import com.huawei.cloudgame.api.ICloudGame;
Last Article: Updating the Version of an Application
Next Article: Scheduling Cloud Phones
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.