@@ -401,7 +401,7 @@ public boolean isIterableIntent(@Nullable Intent intent) {
401
401
/**
402
402
* Registers a device token with Iterable.
403
403
* Make sure {@link IterableConfig#pushIntegrationName} is set before calling this.
404
- * @param token Push token obtained from GCM or FCM
404
+ * @param deviceToken Push token obtained from GCM or FCM
405
405
*/
406
406
public void registerDeviceToken (@ NonNull String deviceToken ) {
407
407
registerDeviceToken (_email , _userId , getPushIntegrationName (), deviceToken , deviceAttributes );
@@ -1151,12 +1151,12 @@ protected void disableToken(@Nullable String email, @Nullable String userId, @No
1151
1151
* It disables the device for all users with this device by default. If `email` or `userId` is provided, it will disable the device for the specific user.
1152
1152
* @param email User email for whom to disable the device.
1153
1153
* @param userId User ID for whom to disable the device.
1154
- * @param token The device token
1154
+ * @param deviceToken The device token
1155
1155
*/
1156
- protected void disableToken (@ Nullable String email , @ Nullable String userId , @ NonNull String token , @ Nullable IterableHelper .SuccessHandler onSuccess , @ Nullable IterableHelper .FailureHandler onFailure ) {
1156
+ protected void disableToken (@ Nullable String email , @ Nullable String userId , @ NonNull String deviceToken , @ Nullable IterableHelper .SuccessHandler onSuccess , @ Nullable IterableHelper .FailureHandler onFailure ) {
1157
1157
JSONObject requestJSON = new JSONObject ();
1158
1158
try {
1159
- requestJSON .put (IterableConstants .KEY_TOKEN , token );
1159
+ requestJSON .put (IterableConstants .KEY_TOKEN , deviceToken );
1160
1160
if (email != null ) {
1161
1161
requestJSON .put (IterableConstants .KEY_EMAIL , email );
1162
1162
} else if (userId != null ) {
@@ -1171,16 +1171,17 @@ protected void disableToken(@Nullable String email, @Nullable String userId, @No
1171
1171
1172
1172
/**
1173
1173
* Registers the GCM registration ID with Iterable.
1174
+ *
1174
1175
* @param applicationName
1175
- * @param token
1176
+ * @param deviceToken
1176
1177
* @param dataFields
1177
1178
*/
1178
- protected void registerDeviceToken (@ Nullable String email , @ Nullable String userId , @ NonNull String applicationName , @ NonNull String token , @ Nullable JSONObject dataFields , HashMap <String , String > deviceAttributes ) {
1179
+ protected void registerDeviceToken (@ Nullable String email , @ Nullable String userId , @ NonNull String applicationName , @ NonNull String deviceToken , @ Nullable JSONObject dataFields , HashMap <String , String > deviceAttributes ) {
1179
1180
if (!checkSDKInitialization ()) {
1180
1181
return ;
1181
1182
}
1182
1183
1183
- if (token == null ) {
1184
+ if (deviceToken == null ) {
1184
1185
IterableLogger .e (TAG , "registerDeviceToken: token is null" );
1185
1186
return ;
1186
1187
}
@@ -1219,7 +1220,7 @@ protected void registerDeviceToken(@Nullable String email, @Nullable String user
1219
1220
dataFields .put (IterableConstants .DEVICE_NOTIFICATIONS_ENABLED , NotificationManagerCompat .from (_applicationContext ).areNotificationsEnabled ());
1220
1221
1221
1222
JSONObject device = new JSONObject ();
1222
- device .put (IterableConstants .KEY_TOKEN , token );
1223
+ device .put (IterableConstants .KEY_TOKEN , deviceToken );
1223
1224
device .put (IterableConstants .KEY_PLATFORM , IterableConstants .MESSAGING_PLATFORM_GOOGLE );
1224
1225
device .put (IterableConstants .KEY_APPLICATION_NAME , applicationName );
1225
1226
device .putOpt (IterableConstants .KEY_DATA_FIELDS , dataFields );
0 commit comments