{"_id":"5b720760c44b7600034b79b7","__v":28,"category":{"_id":"5b720760c44b7600034b79a8","__v":35,"pages":["5b720760c44b7600034b79b1","5b720760c44b7600034b79b3","5b720760c44b7600034b79b4","5b720760c44b7600034b79b5","55e682b7de6fef23009480dc","5b720760c44b7600034b79b6","5b720760c44b7600034b79b7","5b720760c44b7600034b79b8","5b720760c44b7600034b79b9","5b720760c44b7600034b79ba","5b720760c44b7600034b79bb","5b720760c44b7600034b79bc","5b720760c44b7600034b79bd","5b720760c44b7600034b79d1","5b720760c44b7600034b79d2","5b720760c44b7600034b79d3","5b720760c44b7600034b79d4","5b720760c44b7600034b79d5","5b720760c44b7600034b79d8","5b720760c44b7600034b79d9","5b720760c44b7600034b79db","561c6ca0be5fb20d00077754","5b720760c44b7600034b79e0","5b720760c44b7600034b79e1","5b720760c44b7600034b79e2","5b720760c44b7600034b79e3","5b720760c44b7600034b79e4","5b720760c44b7600034b79e5","5b720760c44b7600034b79e6","56cfa5386c5d7a13005eec0f","56e73d86555c030e00a52a73","56e7460c9000b120000ffe2e","56e8c19e99c6400e003820cf","56e8c53fc88bf80e00f8bed8","56f06ff4d386ce0e008e9b21"],"project":"55e67aaa9cc7c62b00c4a1ea","version":"5b720760c44b7600034b7a08","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-02T04:30:13.305Z","from_sync":false,"order":1,"slug":"install-in-your-app","title":"Install in your app"},"project":"55e67aaa9cc7c62b00c4a1ea","user":"55d2bd8e2463351700f67dd7","githubsync":"","parentDoc":null,"version":{"_id":"5b720760c44b7600034b7a08","project":"55e67aaa9cc7c62b00c4a1ea","__v":0,"forked_from":"5b1f2cbdfd653400031d8d9f","createdAt":"2015-09-02T04:27:23.612Z","releaseDate":"2015-09-02T04:27:23.612Z","categories":["5b720760c44b7600034b79a7","5b720760c44b7600034b79a8","5b720760c44b7600034b79a9","5b720760c44b7600034b79aa","5b720760c44b7600034b79ab","561c61b4ad272c0d00a892df","586c014c0abf1d0f000d04d4","58991d2ad207df0f0002186b","5b720760c44b7600034b79ac","5b720760c44b7600034b79ad","5af0fe494ca2730003cbc98a","5af0fe55ec80af0003804ca2"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"API V6","version_clean":"1.4.0","version":"1.4"},"updates":["58e301bee6dcd60f00b507bb","5a32acc47747bb001eab4e02","5a32af2dc8b4d4003e4534f8"],"next":{"pages":[],"description":""},"createdAt":"2015-09-07T00:13:57.274Z","link_external":false,"link_url":"","sync_unique":"","hidden":true,"api":{"settings":"","results":{"codes":[]},"apiSetting":null,"auth":"required","params":[],"url":""},"isReference":false,"order":8,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Older SDK versions\",\n  \"body\": \"For versions of the SDK before version 6.0.0, please see the legacy guide [here](legacy-android-integration). From version 6.0.0 onwards the SDK uses the Firebase Messaging library, resulting in some important changes to the setup process.\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"The following steps assume you have access to the Sailthru Mobile Platform, the latest version of either Android Studio or Eclipse with ADT installed, and are targeting at least Android _API level 14_ (Ice Cream Sandwich-4.0) – The Carnival SDK will not work on earlier versions of Android.\",\n  \"title\": \"Note\"\n}\n[/block]\n# Android Studio\n\nEdit the `build.gradle` file for your application (Module: app) and add the following repositories, dependencies and plugins:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"repositories {\\n\\tmaven {\\n\\t\\turl \\\"https://github.com/carnivalmobile/maven-repository/raw/master/\\\"\\n  }\\n}\\n\\ndependencies {\\n  // Append this line to the dependencies section\\n\\timplementation 'com.carnival.sdk:carnival:6.+'\\n}\\n// This should be at the bottom of the file\\napply plugin: 'com.google.gms.google-services'\",\n      \"language\": \"groovy\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Multidex\",\n  \"body\": \"When integrating any 3rd party library with Android, you may run into issues of exceeding 65,000 methods. It's best to enable Multidex to support this limitation. Read more [here](http://developer.android.com/tools/building/multidex.html)\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"Using `6.+` for the version part of the dependencies will always get the latest minor version of the Carnival 6.x SDK. This will keep you up to date with minor upgrades to the SDK. Alternatively, you can specify this explicitly to stay on a certain version.\"\n}\n[/block]\nThe google services plugin must be applied at the *bottom* of the app level `build.gradle` file. The Google Services dependency must also be added to the project level `build.gradle` file:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"buildscript {\\n    dependencies {\\n        classpath 'com.google.gms:google-services:4.0.1'\\n    }\\n}\",\n      \"language\": \"groovy\"\n    }\n  ]\n}\n[/block]\nYou will also need to ensure that the `google-services.json` file for your project has been added to the root directory of your project. If you have not yet created a Firebase Console project for your application, you should do so now [here](https://console.firebase.google.com/ \"https://console.firebase.google.com/\"). The `google-services.json' file will be provided during the setup process. If you have already setup a project, the file can be downloaded from the Firebase Console from the project settings page:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/5c3b703-Screen_Shot_2018-07-31_at_12.37.29_PM.png\",\n        \"Screen Shot 2018-07-31 at 12.37.29 PM.png\",\n        469,\n        160,\n        \"#f0f0ee\"\n      ]\n    }\n  ]\n}\n[/block]\nIn the General tab you should be able to find your app in the 'Your apps' section. You should then be able to download the JSON file from the 'Download the latest config file' section:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/aa40a21-Screen_Shot_2018-08-01_at_11.16.02_AM.png\",\n        \"Screen Shot 2018-08-01 at 11.16.02 AM.png\",\n        639,\n        128,\n        \"#cfd1d2\"\n      ]\n    }\n  ]\n}\n[/block]\nMore information about adding the the google-services.json file to your app can be found in Google's developer documentation  [here](https://developers.google.com/android/guides/google-services-plugin#adding_the_json_file \"https://developers.google.com/android/guides/google-services-plugin#adding_the_json_file\").\n\n### Gradle Dependencies\n\nThe Android SDK utilises the Firebase Messaging library for push notifications. Since the library version is greater than version 15.0.0, there is a requirement that all Play Services and Firebase libraries included in your app also be at least version 15.0.0. This requirement was put in place by Google when they moved to semantic versioning from release 15.0.0 onwards. Further details can be found [here](https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html?m=1 \"https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html?m=1\").\n\nThe Firebase Messaging library and Play Services GCM library cannot be present in the same application, so you should ensure the Play Services GCM library is not present in your app dependencies.\n\nIf you do not include the Firebase Core library in your app dependencies you may receive a Java Compiler warning: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Warning: The app gradle file must have a dependency on com.google.firebase:firebase-core for Firebase services to work as intended.\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nFirebase Messaging notifications will still be received without adding the core library, so it is not required for the Sailthru Mobile SDK to work correctly, however some of the additional functionality Firebase offers in the console may not work without it.\n\n## Connecting to Sailthru Mobile\nCollect your SDK Key from [Sailthru Mobile](https://mobile.sailthru.com). Navigate to **Settings** -> **Developer** to find this.\n\nThere is only one line of code that needs to go into your [Application onCreate()](http://developer.android.com/reference/android/app/Application.html#onCreate%28%29) method.\nThe Context that gets passed to Sailthru Mobile should usually be `this` or `getApplicationContext()`.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"// Remember to add your import\\nimport com.carnival.sdk.Carnival;\\n\\nCarnival.startEngine(getApplicationContext(), \\\"SDK_KEY\\\");\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nSet your application to use your Application class in the manifest if you haven't already:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<application\\n        android:name=\\\".MyApplication\\\"\\n        ... >\\n  \\t...\\n</application>\",\n      \"language\": \"xml\"\n    }\n  ]\n}\n[/block]\n### FirebaseMessagingService Implementation\n\nFirebase sends tokens and notifications to the app through an implementation of the FirebaseMessagingService class. The SDK implements this class internally so your app can work with Firebase without having to create its own implementation. If, however, your app does have an implementation of the FirebaseMessagingService class then it will override the one that is implemented in the SDK. In this case in order for the SDK to function correctly you must pass the token and any received notifications to the SDK manually through the Carnival.setDeviceToken() and Carnival.handleNotification() methods:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"import com.carnival.sdk.Carnival;\\nimport com.google.firebase.messaging.FirebaseMessagingService;\\nimport com.google.firebase.messaging.RemoteMessage;\\n\\n/**\\n * Your app's implementation of FirebaseMessagingService.\\n */\\npublic final class AppFirebaseService extends FirebaseMessagingService {\\n\\n    :::at:::Override\\n    public void onMessageReceived(RemoteMessage remoteMessage) {\\n      \\n      \\t// Your code for handling notification\\n      \\n      \\t// Pass notification through to Carnival\\n        Carnival.handleNotification(remoteMessage);\\n    }\\n\\n    @Override\\n    public void onNewToken(String token) {\\n      \\t\\n      \\t// Your code for handling token\\n      \\n      \\t// Pass token through to Carnival\\n        Carnival.setDeviceToken(token);\\n    }\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n### Notification Styling\n\nOne other optional small task you might want to do while integrating is to set the notification icon. Android notifications use a custom icon for your application that appears in the status bar. The [Android documentation](http://developer.android.com/design/style/iconography.html#notification) has a detailed explanation on how to create and style an icon for this use, but if you are using Android Studio the easiest way is to go **File** -> **New** -> **Image Asset** and select **Notification Icons** from the **Icon Type** drop-down. Change the **Name** to any value, for example `ic_stat_notification`.\n\nOnce you have your icon in your application, tell Sailthru Mobile about it by creating a `NotificationConfig` object and calling `setSmallIcon` with the icon's drawable resource.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"NotificationConfig config = new NotificationConfig();\\nconfig.setSmallIcon(R.drawable.ic_stat_notification);\\n\\nCarnival.setNotificationConfig(config);\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"NotificationConfig\",\n  \"body\": \"[`NotificationConfig`](http://carnivalmobile.github.io/carnival-android-sdk/javadoc/latest/reference/com/carnival/sdk/NotificationConfig.html) has many features to customize the behavior and style of push notifications. Check the [javadoc](http://carnivalmobile.github.io/carnival-android-sdk/javadoc/latest/reference/com/carnival/sdk/NotificationConfig.html) for the full list of options.\"\n}\n[/block]\n### Notification Channels\n\nWhen targeting Android 8.0 (Oreo) and later, apps are required to define a [NotificationChannel](https://developer.android.com/guide/topics/ui/notifiers/notifications.html#ManageChannels) and send their notifications through that. Notification channels make it easier for users to define how notifications behave on their devices.\n\nThe Sailthru Mobile SDK, on versions >= v5.0.0 will define a default notification channel called `Notifications` with a default priority. If you'd like to define your own default channel, however, you can define your own like so:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"NotificationConfig config = new NotificationConfig();\\nNotificationChannel channel = new NotificationChannel(\\\"notifications_default\\\", \\\"Carnival Notifications\\\", NotificationManager.IMPORTANCE_HIGH);\\nconfig.setDefaultNotificationChannel(channel);\\n\\nCarnival.setNotificationConfig(config);\\nCarnival.startEngine(getApplicationContext(), \\\"SDK_KEY\\\");\\n\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nIf you use SDK 5.0.0 and above, default notification channel creation will occur even if your app does not target Android Oreo. If you would like to avoid default channel creation until your app targets Oreo, do not upgrade to this version.\n\nInformation on advanced usage of Notification Channels on Sailthru Mobile can be found [here](doc:android-notification-channels-1).\n\n### Launch the App!\n\nFinally, launch your application on your Android device or in the emulator.\n\nLogin to [Sailthru Mobile](https://mobile.sailthru.com/), Navigate to **Settings->Logs->Device** and you should see your device listed.\n\n### Troubleshooting\n\nYour device should appear in the Device Log. This is located in **Settings** -> **Logs**. If you can't see your device in the Device Log, try these steps: \n\n *  Confirm that when you launch your Application that there are no \"Carnival authentication failure\" warnings in the log output. If you have warnings then this means you have supplied the wrong SDK key or you have not set up the Bundle Identifier correctly. Go back through the above steps.\n * Make sure you have an active internet connection.\n * Make sure that the device has Google Play Store installed.\n * If running on the Android emulator make sure that the AVD runs the Google APIs platform based on Android 4.2.2 or higher.\n * If you get this far and still have problems, re-trace over the steps above.\n\n*You have now completed this section and your Application should be correctly registering with Sailthru Mobile.*\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Next Steps\"\n}\n[/block]\n1.  [Setup Push Notifications for Android](doc:enable-push-notifications-for-android) to ensure your users can receive push notifications.\n2. [Setup in-app messages](doc:setting-up-in-app-messaging) to enable Carnivals rich In-App Messages.\n3. [Collect user data](doc:collecting-user-data) to help in segmenting and targeting your users based on their activity.","excerpt":"Integration instructions for Android Apps using Java","slug":"android-integration","type":"basic","title":"Android Integration"}

Android Integration

Integration instructions for Android Apps using Java

[block:callout] { "type": "info", "title": "Older SDK versions", "body": "For versions of the SDK before version 6.0.0, please see the legacy guide [here](legacy-android-integration). From version 6.0.0 onwards the SDK uses the Firebase Messaging library, resulting in some important changes to the setup process." } [/block] [block:callout] { "type": "info", "body": "The following steps assume you have access to the Sailthru Mobile Platform, the latest version of either Android Studio or Eclipse with ADT installed, and are targeting at least Android _API level 14_ (Ice Cream Sandwich-4.0) – The Carnival SDK will not work on earlier versions of Android.", "title": "Note" } [/block] # Android Studio Edit the `build.gradle` file for your application (Module: app) and add the following repositories, dependencies and plugins: [block:code] { "codes": [ { "code": "repositories {\n\tmaven {\n\t\turl \"https://github.com/carnivalmobile/maven-repository/raw/master/\"\n }\n}\n\ndependencies {\n // Append this line to the dependencies section\n\timplementation 'com.carnival.sdk:carnival:6.+'\n}\n// This should be at the bottom of the file\napply plugin: 'com.google.gms.google-services'", "language": "groovy" } ] } [/block] [block:callout] { "type": "info", "title": "Multidex", "body": "When integrating any 3rd party library with Android, you may run into issues of exceeding 65,000 methods. It's best to enable Multidex to support this limitation. Read more [here](http://developer.android.com/tools/building/multidex.html)" } [/block] [block:callout] { "type": "info", "title": "Note", "body": "Using `6.+` for the version part of the dependencies will always get the latest minor version of the Carnival 6.x SDK. This will keep you up to date with minor upgrades to the SDK. Alternatively, you can specify this explicitly to stay on a certain version." } [/block] The google services plugin must be applied at the *bottom* of the app level `build.gradle` file. The Google Services dependency must also be added to the project level `build.gradle` file: [block:code] { "codes": [ { "code": "buildscript {\n dependencies {\n classpath 'com.google.gms:google-services:4.0.1'\n }\n}", "language": "groovy" } ] } [/block] You will also need to ensure that the `google-services.json` file for your project has been added to the root directory of your project. If you have not yet created a Firebase Console project for your application, you should do so now [here](https://console.firebase.google.com/ "https://console.firebase.google.com/"). The `google-services.json' file will be provided during the setup process. If you have already setup a project, the file can be downloaded from the Firebase Console from the project settings page: [block:image] { "images": [ { "image": [ "https://files.readme.io/5c3b703-Screen_Shot_2018-07-31_at_12.37.29_PM.png", "Screen Shot 2018-07-31 at 12.37.29 PM.png", 469, 160, "#f0f0ee" ] } ] } [/block] In the General tab you should be able to find your app in the 'Your apps' section. You should then be able to download the JSON file from the 'Download the latest config file' section: [block:image] { "images": [ { "image": [ "https://files.readme.io/aa40a21-Screen_Shot_2018-08-01_at_11.16.02_AM.png", "Screen Shot 2018-08-01 at 11.16.02 AM.png", 639, 128, "#cfd1d2" ] } ] } [/block] More information about adding the the google-services.json file to your app can be found in Google's developer documentation [here](https://developers.google.com/android/guides/google-services-plugin#adding_the_json_file "https://developers.google.com/android/guides/google-services-plugin#adding_the_json_file"). ### Gradle Dependencies The Android SDK utilises the Firebase Messaging library for push notifications. Since the library version is greater than version 15.0.0, there is a requirement that all Play Services and Firebase libraries included in your app also be at least version 15.0.0. This requirement was put in place by Google when they moved to semantic versioning from release 15.0.0 onwards. Further details can be found [here](https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html?m=1 "https://android-developers.googleblog.com/2018/05/announcing-new-sdk-versioning.html?m=1"). The Firebase Messaging library and Play Services GCM library cannot be present in the same application, so you should ensure the Play Services GCM library is not present in your app dependencies. If you do not include the Firebase Core library in your app dependencies you may receive a Java Compiler warning: [block:code] { "codes": [ { "code": "Warning: The app gradle file must have a dependency on com.google.firebase:firebase-core for Firebase services to work as intended.", "language": "text" } ] } [/block] Firebase Messaging notifications will still be received without adding the core library, so it is not required for the Sailthru Mobile SDK to work correctly, however some of the additional functionality Firebase offers in the console may not work without it. ## Connecting to Sailthru Mobile Collect your SDK Key from [Sailthru Mobile](https://mobile.sailthru.com). Navigate to **Settings** -> **Developer** to find this. There is only one line of code that needs to go into your [Application onCreate()](http://developer.android.com/reference/android/app/Application.html#onCreate%28%29) method. The Context that gets passed to Sailthru Mobile should usually be `this` or `getApplicationContext()`. [block:code] { "codes": [ { "code": "// Remember to add your import\nimport com.carnival.sdk.Carnival;\n\nCarnival.startEngine(getApplicationContext(), \"SDK_KEY\");", "language": "java" } ] } [/block] Set your application to use your Application class in the manifest if you haven't already: [block:code] { "codes": [ { "code": "<application\n android:name=\".MyApplication\"\n ... >\n \t...\n</application>", "language": "xml" } ] } [/block] ### FirebaseMessagingService Implementation Firebase sends tokens and notifications to the app through an implementation of the FirebaseMessagingService class. The SDK implements this class internally so your app can work with Firebase without having to create its own implementation. If, however, your app does have an implementation of the FirebaseMessagingService class then it will override the one that is implemented in the SDK. In this case in order for the SDK to function correctly you must pass the token and any received notifications to the SDK manually through the Carnival.setDeviceToken() and Carnival.handleNotification() methods: [block:code] { "codes": [ { "code": "import com.carnival.sdk.Carnival;\nimport com.google.firebase.messaging.FirebaseMessagingService;\nimport com.google.firebase.messaging.RemoteMessage;\n\n/**\n * Your app's implementation of FirebaseMessagingService.\n */\npublic final class AppFirebaseService extends FirebaseMessagingService {\n\n @Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n \n \t// Your code for handling notification\n \n \t// Pass notification through to Carnival\n Carnival.handleNotification(remoteMessage);\n }\n\n @Override\n public void onNewToken(String token) {\n \t\n \t// Your code for handling token\n \n \t// Pass token through to Carnival\n Carnival.setDeviceToken(token);\n }\n}", "language": "java" } ] } [/block] ### Notification Styling One other optional small task you might want to do while integrating is to set the notification icon. Android notifications use a custom icon for your application that appears in the status bar. The [Android documentation](http://developer.android.com/design/style/iconography.html#notification) has a detailed explanation on how to create and style an icon for this use, but if you are using Android Studio the easiest way is to go **File** -> **New** -> **Image Asset** and select **Notification Icons** from the **Icon Type** drop-down. Change the **Name** to any value, for example `ic_stat_notification`. Once you have your icon in your application, tell Sailthru Mobile about it by creating a `NotificationConfig` object and calling `setSmallIcon` with the icon's drawable resource. [block:code] { "codes": [ { "code": "NotificationConfig config = new NotificationConfig();\nconfig.setSmallIcon(R.drawable.ic_stat_notification);\n\nCarnival.setNotificationConfig(config);", "language": "java" } ] } [/block] [block:callout] { "type": "info", "title": "NotificationConfig", "body": "[`NotificationConfig`](http://carnivalmobile.github.io/carnival-android-sdk/javadoc/latest/reference/com/carnival/sdk/NotificationConfig.html) has many features to customize the behavior and style of push notifications. Check the [javadoc](http://carnivalmobile.github.io/carnival-android-sdk/javadoc/latest/reference/com/carnival/sdk/NotificationConfig.html) for the full list of options." } [/block] ### Notification Channels When targeting Android 8.0 (Oreo) and later, apps are required to define a [NotificationChannel](https://developer.android.com/guide/topics/ui/notifiers/notifications.html#ManageChannels) and send their notifications through that. Notification channels make it easier for users to define how notifications behave on their devices. The Sailthru Mobile SDK, on versions >= v5.0.0 will define a default notification channel called `Notifications` with a default priority. If you'd like to define your own default channel, however, you can define your own like so: [block:code] { "codes": [ { "code": "NotificationConfig config = new NotificationConfig();\nNotificationChannel channel = new NotificationChannel(\"notifications_default\", \"Carnival Notifications\", NotificationManager.IMPORTANCE_HIGH);\nconfig.setDefaultNotificationChannel(channel);\n\nCarnival.setNotificationConfig(config);\nCarnival.startEngine(getApplicationContext(), \"SDK_KEY\");\n", "language": "java" } ] } [/block] If you use SDK 5.0.0 and above, default notification channel creation will occur even if your app does not target Android Oreo. If you would like to avoid default channel creation until your app targets Oreo, do not upgrade to this version. Information on advanced usage of Notification Channels on Sailthru Mobile can be found [here](doc:android-notification-channels-1). ### Launch the App! Finally, launch your application on your Android device or in the emulator. Login to [Sailthru Mobile](https://mobile.sailthru.com/), Navigate to **Settings->Logs->Device** and you should see your device listed. ### Troubleshooting Your device should appear in the Device Log. This is located in **Settings** -> **Logs**. If you can't see your device in the Device Log, try these steps: * Confirm that when you launch your Application that there are no "Carnival authentication failure" warnings in the log output. If you have warnings then this means you have supplied the wrong SDK key or you have not set up the Bundle Identifier correctly. Go back through the above steps. * Make sure you have an active internet connection. * Make sure that the device has Google Play Store installed. * If running on the Android emulator make sure that the AVD runs the Google APIs platform based on Android 4.2.2 or higher. * If you get this far and still have problems, re-trace over the steps above. *You have now completed this section and your Application should be correctly registering with Sailthru Mobile.* [block:api-header] { "type": "basic", "title": "Next Steps" } [/block] 1. [Setup Push Notifications for Android](doc:enable-push-notifications-for-android) to ensure your users can receive push notifications. 2. [Setup in-app messages](doc:setting-up-in-app-messaging) to enable Carnivals rich In-App Messages. 3. [Collect user data](doc:collecting-user-data) to help in segmenting and targeting your users based on their activity.