You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's possible to install stable or beta versions of Iterable's Android SDK,
32
+
as described below. You'll also need to handle Firebase push messages and
33
+
tokens.
8
34
9
-
## Setting up a push integration in Iterable
35
+
> ⚠**IMPORTANT**
36
+
>
37
+
> Versions 3.2.0 and higher of Iterable's Android SDK depend on the
38
+
> [AndroidX](https://developer.android.com/jetpack/androidx) support libraries.
39
+
> [Migrate your app to use AndroidX](https://developer.android.com/jetpack/androidx/migrate)
40
+
> before using version 3.2.0 or higher of the SDK.
10
41
11
-
Before you even start with the SDK, you will need to:
42
+
### Stable versions
12
43
13
-
1. Set your application up to receive push notifications
14
-
2. Set up a push integration in Iterable. This allows Iterable to communicate on your behalf with Firebase Cloud Messaging.
44
+
Add the following dependencies to your application's **build.gradle**:
15
45
16
-
For more details, read Iterable's [Setting up Android Push Notifications](https://support.iterable.com/hc/articles/115000331943-Setting-up-Android-Push-Notifications) guide.
46
+
-`compile 'com.iterable:iterableapi:3.2.0'`
47
+
-`compile 'com.google.firebase:firebase-messaging:X.X.X' // Min version 17.4.0`
17
48
18
-
Congratulations, you've configured your Iterable project to send push notifications to your app! Now, let's set up the Iterable SDK.
49
+
See [Bintray](https://bintray.com/davidtruong/maven/Iterable-SDK) for the latest
50
+
version of the SDK.
19
51
20
-
##Installing a beta version of the SDK to use with Iterable's Mobile Inbox beta
52
+
### Beta versions
21
53
22
54
> ⚠**IMPORTANT**
55
+
>
23
56
> Beta versions of this SDK are subject to Iterable's
24
-
[Beta Mobile SDK Terms of Service](https://support.iterable.com/hc/articles/360034753412).
57
+
> [Beta Mobile SDK Terms of Service](https://support.iterable.com/hc/articles/360034753412).
58
+
59
+
Beta versions of Iterable's Android SDK are published to JitPack instead of
60
+
Maven. To find the latest beta version of Iterable's Android SDK, look at
61
+
look at this [JitPack page](https://jitpack.io/#Iterable/iterable-android-sdk).
25
62
26
-
The current beta version of the SDK is `3.2.0-beta1`. Beta releases are not published to Maven; instead, use Jitpack:
63
+
To install a beta version:
27
64
28
-
1. Add the JitPack repository to your build file. Add it in your root build.gradle at the end of repositories:
65
+
1. Add the JitPack repository to your build file. Add it in your root
66
+
**build.gradle** at the end of repositories:
29
67
30
68
```groovy
31
69
allprojects {
@@ -35,8 +73,9 @@ The current beta version of the SDK is `3.2.0-beta1`. Beta releases are not publ
35
73
}
36
74
}
37
75
```
38
-
39
-
2. Add Iterable SDK dependencies:
76
+
77
+
2. Add dependencies for Iterable's Android SDK (this example selects version
@@ -45,9 +84,13 @@ The current beta version of the SDK is `3.2.0-beta1`. Beta releases are not publ
45
84
46
85
### Handling Firebase push messages and tokens
47
86
48
-
The SDK adds a `FirebaseMessagingService` to the app manifest automatically, so you don't have to do any extra setup to handle incoming push messages.
87
+
The SDK adds a `FirebaseMessagingService` to the app manifest automatically, so
88
+
you don't have to do any extra setup to handle incoming push messages.
49
89
50
-
If your application implements its own FirebaseMessagingService, make sure you forward `onMessageReceived` and `onNewToken` calls to `IterableFirebaseMessagingService.handleMessageReceived` and `IterableFirebaseMessagingService.handleTokenRefresh`, respectively:
90
+
If your application implements its own `FirebaseMessagingService`, make sure you
91
+
forward `onMessageReceived` and `onNewToken` calls to
92
+
`IterableFirebaseMessagingService.handleMessageReceived` and
@@ -280,143 +343,13 @@ To customize the time delay between successive in-app messages, set `inAppDispla
280
343
281
344
### Mobile Inbox
282
345
283
-
Apps using version 3.2.0 and later of this SDK can save in-app messages to an inbox. This inbox displays a list of saved in-app messages and allows users to read and interact with them at their convenience. The SDK provides a default user interface for the inbox, and it can be customized to match your brand's styles.
284
-
285
-
To configure an in-app message to use the inbox, marketers should:
286
-
287
-
-Enable the **Show in Inbox** toggle in the in-app message's template
288
-
- Choose whether or not to **Deliver Silently to Inbox** (so that the message does not display prominently when the device receives it, but can be viewed later by the user)
289
-
290
-
#### Mobile Inbox implementation guide
291
-
292
-
Add a new dependency, `iterableapi-ui`, to your `build.gradle` file:
293
-
294
-
```groovy
295
-
compile 'com.iterable:iterableapi-ui:3.2.0-beta1'
296
-
```
297
-
298
-
To open Inbox as a separate activity, launch `IterableInboxActivity`. The SDK also provides `IterableInboxFragment` if you need to embed the Inbox UI within an existing activity.
299
-
300
-
##### Show the inbox inside an existing activity
301
-
302
-
You can embed `IterableInboxFragment` either via a layout .xml file, or by calling `IterableInboxFragment.newInstance()` and inserting it into your activity.
303
-
304
-
##### Display mobile inbox as a result of an user action
305
-
306
-
It's also possible to show the inbox when a user taps a button (or completes some other action).Todothis, respond to the user's action by starting `IterableInboxActivity`. For example:
307
-
308
-
```java
309
-
// Add this in your button handler
310
-
startActivity(this, IterableInboxActivity.class);
311
-
```
312
-
313
-
#### Mobile Inbox customization options
314
-
315
-
The SDK provides various ways to customize the inbox's interfaceto match your brand's styles. For simpler customization needs, specify a custom XML layout ID by calling `setItemLayoutId` on the `IterableInboxFragment`. For more advanced scenarios, define classes that inherit from `IterableInboxFragment` and `InboxRecyclerViewAdapter` and override existing methods as necessary.
316
-
317
-
##### inboxMode
318
-
319
-
`IterableInboxFragment` and `IterableInboxActivity` can display inbox messages in two ways:
346
+
Apps using version 3.2.0 and later of this SDK can allow users to save in-app
347
+
messages to an inbox. This inbox displays a list of saved in-app messages and
348
+
allows users to read them at their convenience. The SDK provides a default user
349
+
interface for the inbox, which can be customized to match your brand's styles.
320
350
321
-
- `POPUP` - (default): Displays the inbox message as a dialog on top of the Inbox UI.
322
-
- `ACTIVITY` - Displays the inbox message in a new activity.
323
-
324
-
##### itemLayoutId
325
-
326
-
To completely change the look of an inbox, copy the contents of `fragment_inbox_item.xml` from `iterableapi-ui` into a new layout XML in your project and modify it. Then call `setItemLayoutId` on the `IterableInboxFragment` in `onCreate` of the parent activity to specify the custom layout XML for Inbox cells.
327
-
328
-
#### Mobile inbox events and the events lifecycle
329
-
330
-
An inbox lists saved in-app messages. Because of this, Iterable events that apply to in-app messages also apply to inbox messages. These events are described below:
331
-
332
-
##### In-App Send
333
-
334
-
This event is triggered when an in-app message is sent to a user.
335
-
336
-
Important event properties:
337
-
338
-
- `eventType` - `inAppSend`
339
-
- `createdAt` - when the in-app message was sent
340
-
- `campaignId`- the in-app message campaign ID
341
-
342
-
##### In-App Delivery
343
-
344
-
This event is triggered when an in-app message is received by a user's device.
345
-
346
-
Important event properties:
347
-
348
-
- `eventType` - `inAppDelivery`
349
-
- `createdAt` - when the in-app message was received by the device
350
-
- `campaignId` - the in-app message campaign ID
351
-
352
-
##### Inbox Message Impression
353
-
354
-
This event tracks the number of unique times a message appeared in the inbox during a single inbox session (period when the user had the inbox open). The total represents the count of unique times the message displayed on-screen in the inbox during an inbox session (not the number of times the user actually opened that message).
355
-
356
-
Important event properties:
357
-
358
-
- `eventType` - `inboxMessageImpression`
359
-
- `createdAt` - when the event was created
360
-
- `campaignId` - the in-app message campaign ID
361
-
- `impressionCount` - how many times the message was visible in the inbox during the inbox session
362
-
- `totalDuration` - the total duration of time (in seconds) the message was visible in the inbox
363
-
364
-
##### In-App Open
365
-
366
-
This event is triggered when the user taps a message in the inbox to view its contents.
367
-
368
-
Important event properties:
369
-
370
-
- `eventType` - `inAppOpen`
371
-
- `createdAt` - when the in-app message was opened
372
-
- `campaignId`- the in-app message campaign ID
373
-
374
-
##### In-App Click
375
-
376
-
This event is triggered when the user taps on a link or button in an in-app message.
377
-
378
-
Important event properties:
379
-
380
-
- `eventType` - `inAppClick`
381
-
- `createdAt` - when the button in the in-app message was tapped
382
-
- `campaignId`- the in-app message campaign ID
383
-
- `clickedUrl` - the URL associated with the tapped link/button
384
-
385
-
##### In-App Close
386
-
387
-
This event is triggered when the user closes an inbox message by tapping a close button or a back button. Close buttons/links should have URL `iterable://dismiss`. Tapping a close button/link also creates an `inAppClick` event.
388
-
389
-
Important event properties:
390
-
391
-
- `eventType` - `inAppClose`
392
-
- `createdAt` - when the in-app message was closed
393
-
- `campaignId`- the in-app message campaign ID
394
-
- `closeAction` - the type of item the user tapped: `link` (for buttons/links), `back` for a back button, or `other`
395
-
396
-
##### In-App Delete
397
-
398
-
This event is triggered when the user deletes an inbox message by swiping left on it and tapping the **Delete** button, or when the user taps a delete button/link in the in-app message, which should have a URL of `iterable://delete`. Tapping a delete button/link also creates an `inAppClick` event and an `inAppClose` event.
399
-
400
-
Important event properties:
401
-
402
-
- `eventType` - `inAppDelete`
403
-
- `createdAt` - when the in-app message was deleted
404
-
- `campaignId`- the in-app campaign ID
405
-
- `deleteAction` - how the message was deleted (`inbox-swipe` if the user swiped left in the inbox and tapped **Delete**, or `delete-button` if the user tapped a button/link with URL `iterable://delete`).
406
-
407
-
##### Inbox Session
408
-
409
-
This event captures information about an inbox session, which starts when a user opens the inbox and ends when they navigate away (or close/minimize the app). Viewing a message in the inbox does not end the session.
410
-
411
-
Important event properties
412
-
413
-
- `eventType` - `inboxSession`
414
-
- `campaignId`- the in-app campaign id
415
-
- `inboxSessionStart` - when the session started
416
-
- `inboxSessionEnd` - when the session ended
417
-
- `uniqueImpressionCount` - no of unique messages visible in the Inbox message list to the user during the inbox session
418
-
- `startTotalMessageCount` - the number of messages in the inbox at the session's start
419
-
- `endTotalMessageCount` - the number of messages in the inbox at the session's end (messages can be added or removed during a session)
351
+
To learn more about MobileInbox, how to customize it, and events related to
352
+
its usage, read Iterable's [Mobile Developer Guides](https://support.iterable.com/hc/categories/360002288712).
420
353
421
354
### Deep linking
422
355
@@ -516,11 +449,7 @@ If you're using a different project for FCM and have existing devices on a GCM p
0 commit comments