Skip to content

Commit 95c33e2

Browse files
authored
Merge pull request #255 from Iterable/MOB-1889-Release-SDK-3.2.5
Prepare for 3.2.5 updating broken parameter names
2 parents 42f2ee9 + 254bb15 commit 95c33e2

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

iterableapi/src/main/java/com/iterable/iterableapi/IterableApi.java

+9-8
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ public boolean isIterableIntent(@Nullable Intent intent) {
401401
/**
402402
* Registers a device token with Iterable.
403403
* 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
405405
*/
406406
public void registerDeviceToken(@NonNull String deviceToken) {
407407
registerDeviceToken(_email, _userId, getPushIntegrationName(), deviceToken, deviceAttributes);
@@ -1151,12 +1151,12 @@ protected void disableToken(@Nullable String email, @Nullable String userId, @No
11511151
* 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.
11521152
* @param email User email for whom to disable the device.
11531153
* @param userId User ID for whom to disable the device.
1154-
* @param token The device token
1154+
* @param deviceToken The device token
11551155
*/
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) {
11571157
JSONObject requestJSON = new JSONObject();
11581158
try {
1159-
requestJSON.put(IterableConstants.KEY_TOKEN, token);
1159+
requestJSON.put(IterableConstants.KEY_TOKEN, deviceToken);
11601160
if (email != null) {
11611161
requestJSON.put(IterableConstants.KEY_EMAIL, email);
11621162
} else if (userId != null) {
@@ -1171,16 +1171,17 @@ protected void disableToken(@Nullable String email, @Nullable String userId, @No
11711171

11721172
/**
11731173
* Registers the GCM registration ID with Iterable.
1174+
*
11741175
* @param applicationName
1175-
* @param token
1176+
* @param deviceToken
11761177
* @param dataFields
11771178
*/
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) {
11791180
if (!checkSDKInitialization()) {
11801181
return;
11811182
}
11821183

1183-
if (token == null) {
1184+
if (deviceToken == null) {
11841185
IterableLogger.e(TAG, "registerDeviceToken: token is null");
11851186
return;
11861187
}
@@ -1219,7 +1220,7 @@ protected void registerDeviceToken(@Nullable String email, @Nullable String user
12191220
dataFields.put(IterableConstants.DEVICE_NOTIFICATIONS_ENABLED, NotificationManagerCompat.from(_applicationContext).areNotificationsEnabled());
12201221

12211222
JSONObject device = new JSONObject();
1222-
device.put(IterableConstants.KEY_TOKEN, token);
1223+
device.put(IterableConstants.KEY_TOKEN, deviceToken);
12231224
device.put(IterableConstants.KEY_PLATFORM, IterableConstants.MESSAGING_PLATFORM_GOOGLE);
12241225
device.put(IterableConstants.KEY_APPLICATION_NAME, applicationName);
12251226
device.putOpt(IterableConstants.KEY_DATA_FIELDS, dataFields);

0 commit comments

Comments
 (0)