Skip to content

Commit 8c4493a

Browse files
committed
Merge branch 'stable'
# Conflicts: # iterableapi/src/main/java/com/iterable/iterableapi/IterableConstants.java
2 parents a19e05f + f46019d commit 8c4493a

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ The platform will be `GCM` (This also includes FCM since it runs off of the same
2323

2424
![Creating an integration in Iterable](https://support.iterable.com/hc/en-us/article_attachments/211841066/2016-12-08_1442.png)
2525

26+
For more details, see our [setup guide](https://support.iterable.com/hc/en-us/articles/115000331943-Setting-up-Android-Push-Notifications) on Iterable support website.
27+
2628
Congratulations, you've configured your mobile application to receive push notifications! Now, let's set up the Iterable SDK...
2729

2830
# Installing the SDK
@@ -70,13 +72,12 @@ Note that `FirebaseInstanceIdService` is deprecated and replaced with `onNewToke
7072
```
7173

7274
* The `apiKey` should correspond to the API key of your project in Iterable. If you'd like, you can specify a different `apiKey` depending on whether you're building in `DEBUG` or `PRODUCTION`, and point the SDK to the relevant Iterable project.
73-
* It is possible to call this elsewhere but we strongly encourage initializing the SDK in `Application`'s `onCreate`. This will let the SDK automatically track a push open for you if the application was launched from a remote Iterable push notification.
75+
> ⚠ Don't call `IterableApi.initialize` from `Activity#onCreate`; it is necessary for Iterable SDK to be initialized when the application is starting, to make sure everything is set up regardless of whether the app is launched to open an activity or is woken up in background as a result of an incoming push message.
7476
7577
2. Once you know the email *(Preferred)* or userId of the user, call `setEmail` or `setUserId`
7678
* EMAIL: `IterableApi.getInstance().setEmail("[email protected]");`
7779
* USERID: `IterableApi.getInstance().setUserId("userId");`
78-
* If you are setting a userId, an existing user must already exist for that userId
79-
* It is preferred that you use Email since that doesn't require an additional lookup by userId call on the backend.
80+
> ⚠ Don't specify both email and userId in the same session, as they will be treated as different users by the SDK. Only use one type of identifier, email or userId, to identify the user.
8081
8182
3. **Register for remote notifications**
8283
On application launch (or whenever you want to register the token), call `registerForPush`:

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -998,9 +998,9 @@ public void trackInAppOpen(String messageId) {
998998
/**
999999
* Tracks an InApp click.
10001000
* @param messageId
1001-
* @param urlClick
1001+
* @param clickedUrl
10021002
*/
1003-
public void trackInAppClick(String messageId, String urlClick) {
1003+
public void trackInAppClick(String messageId, String clickedUrl) {
10041004
if (!checkSDKInitialization()) {
10051005
return;
10061006
}
@@ -1010,7 +1010,7 @@ public void trackInAppClick(String messageId, String urlClick) {
10101010
try {
10111011
addEmailOrUserIdToJson(requestJSON);
10121012
requestJSON.put(IterableConstants.KEY_MESSAGE_ID, messageId);
1013-
requestJSON.put(IterableConstants.ITERABLE_IN_APP_URL_CLICK, urlClick);
1013+
requestJSON.put(IterableConstants.ITERABLE_IN_APP_CLICKED_URL, clickedUrl);
10141014

10151015
sendPostRequest(IterableConstants.ENDPOINT_TRACK_INAPP_CLICK, requestJSON);
10161016
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public final class IterableConstants {
161161
public static final String ITERABLE_IN_APP_TEXT = "text";
162162
public static final String ITERABLE_IN_APP_TITLE = "title";
163163
public static final String ITERABLE_IN_APP_TYPE = "displayType";
164-
public static final String ITERABLE_IN_APP_URL_CLICK = "urlClick";
164+
public static final String ITERABLE_IN_APP_CLICKED_URL = "clickedUrl";
165165
public static final String ITERABLE_IN_APP_HTML = "html";
166166
public static final String ITERABLE_IN_APP_EXPIRES_AT = "expiresAt";
167167
public static final String ITERABLE_IN_APP_CUSTOM_PAYLOAD = "customPayload";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static boolean isIterableDeeplink(String url) {
4848

4949
private static class RedirectTask extends AsyncTask<String, Void, String> {
5050
static final String TAG = "RedirectTask";
51-
static final int DEFAULT_TIMEOUT_MS = 1000; //1 seconds
51+
static final int DEFAULT_TIMEOUT_MS = 3000; //3 seconds
5252

5353
private IterableHelper.IterableActionHandler callback;
5454

0 commit comments

Comments
 (0)