File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Adjust/sdk-core/src/main/java/com/adjust/sdk Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ class DeviceInfo {
9292 int uiMode ;
9393 String appSetId ;
9494 boolean isGooglePlayGamesForPC ;
95+ Boolean isSamsungCloudEnvironment ;
9596
9697 Map <String , String > imeiParameters ;
9798 Map <String , String > oaidParameters ;
@@ -134,12 +135,21 @@ class DeviceInfo {
134135 appInstallTime = getAppInstallTime (packageInfo );
135136 appUpdateTime = getAppUpdateTime (packageInfo );
136137 uiMode = getDeviceUiMode (configuration );
138+ if (Reflection .isAppRunningInSamsungCloudEnvironment (context , adjustConfig .logger )) {
139+ isSamsungCloudEnvironment = true ;
140+ playAdId = Reflection .getSamsungCloudDevGoogleAdId (context , adjustConfig .logger );
141+ playAdIdSource = "samsung_cloud_sdk" ;
142+ }
137143 if (Util .canReadPlayIds (adjustConfig )) {
138144 appSetId = Reflection .getAppSetId (context );
139145 }
140146 }
141147
142148 void reloadPlayIds (final AdjustConfig adjustConfig ) {
149+ if (isSamsungCloudEnvironment != null && isSamsungCloudEnvironment ) {
150+ return ;
151+ }
152+
143153 if (!Util .canReadPlayIds (adjustConfig )) {
144154 return ;
145155 }
Original file line number Diff line number Diff line change @@ -123,6 +123,32 @@ public static String getAppSetId(Context context) {
123123 }
124124 }
125125
126+ public static String getSamsungCloudDevGoogleAdId (Context context , ILogger logger ) {
127+ String googleAdId = null ;
128+ try {
129+ googleAdId = (String ) invokeStaticMethod ("com.adjust.sdk.samsung.clouddev.Util" ,
130+ "getGoogleAdId" ,
131+ new Class []{Context .class , ILogger .class },
132+ context , logger );
133+ } catch (Exception e ) {
134+ logger .info ("invoke getGoogleAdId : " + e .getMessage ());
135+ }
136+ return googleAdId ;
137+ }
138+
139+ public static boolean isAppRunningInSamsungCloudEnvironment (Context context , ILogger logger ) {
140+ boolean isCloudEnvironment = false ;
141+ try {
142+ isCloudEnvironment = (boolean ) invokeStaticMethod ("com.adjust.sdk.samsung.clouddev.Util" ,
143+ "isAppRunningInCloudEnvironment" ,
144+ new Class []{Context .class , ILogger .class },
145+ context , logger );
146+ } catch (Exception e ) {
147+ logger .info ("invoke isAppRunningInCloudEnvironment : " + e .getMessage ());
148+ }
149+ return isCloudEnvironment ;
150+ }
151+
126152 public static Class forName (String className ) {
127153 try {
128154 Class classObject = Class .forName (className );
You can’t perform that action at this time.
0 commit comments