@@ -49,14 +49,6 @@ static int convertVersionStringToInt(String versionString) {
49
49
return instance .convertVersionStringToInt (versionString );
50
50
}
51
51
52
- /**
53
- * Gets the advertisingId if available
54
- * @return
55
- */
56
- static String getAdvertisingId (Context context ) {
57
- return instance .getAdvertisingId (context );
58
- }
59
-
60
52
static void saveExpirableJsonObject (SharedPreferences preferences , String key , JSONObject object , long expirationInterval ) {
61
53
instance .saveExpirableJsonObject (preferences , key , object , expirationInterval );
62
54
}
@@ -145,25 +137,6 @@ int convertVersionStringToInt(String versionString) {
145
137
return version ;
146
138
}
147
139
148
- String getAdvertisingId (Context context ) {
149
- String advertisingId = null ;
150
- try {
151
- Class adClass = Class .forName ("com.google.android.gms.ads.identifier.AdvertisingIdClient" );
152
- if (adClass != null ) {
153
- Object advertisingIdInfo = adClass .getMethod ("getAdvertisingIdInfo" , Context .class ).invoke (null , context );
154
- if (advertisingIdInfo != null ) {
155
- advertisingId = (String ) advertisingIdInfo .getClass ().getMethod ("getId" ).invoke (advertisingIdInfo );
156
- }
157
- }
158
- } catch (ClassNotFoundException e ) {
159
- IterableLogger .d (TAG , "ClassNotFoundException: Can't track ADID. " +
160
- "Check that play-services-ads is added to the dependencies." , e );
161
- } catch (Exception e ) {
162
- IterableLogger .w (TAG , "Error while fetching advertising ID" , e );
163
- }
164
- return advertisingId ;
165
- }
166
-
167
140
void saveExpirableJsonObject (SharedPreferences preferences , String key , JSONObject object , long expirationInterval ) {
168
141
saveExpirableValue (preferences , key , object .toString (), expirationInterval );
169
142
}
0 commit comments