Integrate Your App with the Samsung CloudDev SDK
Complete the following tasks to integrate the Samsung CloudDev SDK with your app.
- Configure ProGuard.
- Configure GAID permission If your app's target Android SDK Version is higher than 33.
- Add the AAR as a dependency to your project.
- Import the Samsung CloudDev SDK packages.
Configure ProGuard
To exclude the Samsung CloudDev SDK from being shrunk, add the following to your proguard-rules.pro
file:
-keepclassmembers, includecode class
com.samsung.android.game.cloudgame.dev.sdk.* { *;}
Configure GAID permission
If your app's target Android SDK Version is higher than 33, add the following to your AndroidManifest.xml
file for permission to request the user's Google Advertising Identifier (GAID):
<uses-permission android:name="com.google.android.gms.permission.AD_ID" />
Add the AAR as a dependency
Using Android Studio, add the clouddevsdk.aar
library as a dependency:
-
Go to File > Project Structure > Dependencies.
-
In the Declared Dependencies tab, click + and select JAR/AAR Dependency from the menu.
-
In the Add Jar/Aar Dependency dialog, enter the path to the
clouddevsdk.aar
file, then select the configuration to which the dependency applies.If the library should be available to all configurations, select the implementation configuration.
-
Check your app’s
build.gradle
file to confirm that a declaration similar to the following appears:
dependencies {
implementation files ('lib/clouddevsdk.aar)
}
Import the Samsung CloudDev SDK packages
Import the Samsung CloudDev SDK packages into your code:
import com.samsung.android.game.cloudgame.dev.sdk.CloudDevSdk;
import com.samsung.android.game.cloudgame.dev.sdk.CloudDevCallback;