{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Installing the Android Pulsate SDK","type":"basic","slug":"installing-sdk-android-studio","excerpt":"","body":"Pulsate Android SDK is a static library. It's a bridge between your customers' mobile devices and the Pulsate server. **The SDK Supports Android API 16 - 29**.\nIt's very easy to use, and takes about 5 minutes to install.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 1: Setup Android Studio\"\n}\n[/block]\n**Make sure you are using latest version of Android Studio.**\n\n1. Make sure your project uses *\"jcenter\"* and  *\"maven commonsware\"*  as a dependency repository (default on latest version of the Android Gradle plugin). \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"buildscript {\\n    repositories {\\n        jcenter()\\n        maven { url \\\"https://s3.amazonaws.com/repo.commonsware.com\\\" }\\n    }\\n}\\n\\nallprojects {\\n    repositories {\\n        jcenter()\\n        maven { url \\\"https://s3.amazonaws.com/repo.commonsware.com\\\" }\\n    }\\n}\",\n      \"language\": \"text\",\n      \"name\": \"build.gradle\"\n    }\n  ]\n}\n[/block]\n2. Add *compile 'com.pulsatehq.sdk:PulsateSdk:version'* to the dependencies of your project. Change version to the actual version of the SDK that you want to use. All versions can be found here -  https://pulsate.readme.io/docs/android-release-notes\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"dependencies {\\n\\timplementation 'com.pulsatehq.sdk:PulsateSdk:3.0.0'\\n}\\n\",\n      \"language\": \"text\",\n      \"name\": \"build.gradle\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Updating the SDK\",\n  \"body\": \"The newest version of the SDK can be found here - https://pulsate.readme.io/docs/android-release-notes\\n\\nTo update to the newest version of the SDK all you need to do is update the version tag in \\\"*implementation 'com.pulsatehq.sdk:PulsateSdk:version'*\\\" to the newest version found in the link above. Example -  \\\"*implementation 'com.pulsatehq.sdk:PulsateSdk:3.0.0'*\\\"\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 2: Configure Gradle\"\n}\n[/block]\nSet *compileSdkVersion* to *29*, *minSdkVersion* to *16* and *targetSdkVersion* to *29*. The SDK also uses Java 8 and Data Binding in it's layouts so Data Binding must be enabled.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"android {\\n\\t\\t\\t\\tcompileSdkVersion 29\\n\\n        defaultConfig {\\n                minSdkVersion 16\\n                targetSdkVersion 29\\n        }\\n        dataBinding {\\n        \\t\\t\\t\\tenabled true\\n    \\t\\t}\\n        compileOptions {\\n        \\t\\t\\t\\tsourceCompatibility JavaVersion.VERSION_1_8\\n        \\t\\t\\t\\ttargetCompatibility JavaVersion.VERSION_1_8\\n    \\t\\t}\\n        ...\\n}\",\n      \"language\": \"text\",\n      \"name\": \"build.gradle\"\n    }\n  ]\n}\n[/block]\nAlso please make sure to use one of the newer versions of the Android Gradle Plugin. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"buildscript {\\n    dependencies {\\n        classpath 'com.android.tools.build:gradle:3.5.3'\\n    }\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"body\": \"If you use *play-services*  you must use the *17.0.0* version of the library.\\nPlease note that end users must have version 17.0.0 of Google Play Services or above on their Android Device for Pulsate to operate.\\n\\nFirebase versions - firebase-core:17.2.0 and firebase-messaging:20.0.0. Please use the same versions to prevent any bugs caused by version mismatches.\",\n  \"title\": \"Google Play Services and Firebase\"\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Android Support Libraries\",\n  \"body\": \"With the release of version 3.0.0 Pulsate now uses AndroidX. Please make sure that your App also uses AndroidX.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Step 3: Configure AndroidManifest.xml\"\n}\n[/block]\nWith the 2.12.0 release you no longer need to configure the AndroidManifest.xml file if you do not change the Android Manifest Merger. If you do change the Android Manifest Merger, you must then follow this step.\n\nThe Pulsate SDK requires that you add these permissions to your application manifest:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<uses-permission android:name=\\\"android.permission.RECEIVE_BOOT_COMPLETED\\\" />\\n<uses-permission android:name=\\\"android.permission.INTERNET\\\" />\\n<uses-permission android:name=\\\"android.permission.ACCESS_NETWORK_STATE\\\" />\\n<uses-permission android:name=\\\"android.permission.ACCESS_FINE_LOCATION\\\" />\\n<uses-permission android:name=\\\"android.permission.ACCESS_COARSE_LOCATION\\\" />\\n<uses-permission android:name=\\\"android.permission.ACCESS_BACKGROUND_LOCATION\\\" />\\n<uses-permission android:name=\\\"android.permission.WAKE_LOCK\\\" />\\n<uses-permission android:name=\\\"android.permission.VIBRATE\\\" />\\n<uses-permission android:name=\\\"android.permission.BLUETOOTH\\\" />\\n<uses-permission android:name=\\\"android.permission.BLUETOOTH_ADMIN\\\" />\\n\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n**All of these permissions are required by the Pulsate SDK.**\n\n**android.permission.RECEIVE_BOOT_COMPLETED** - required for Pulsate to properly start after a device reboot.\n\n**android.permission.INTERNET and android.permission.ACCESS_NETWORK_STATE** - are used to communicate with our server and show in app messages when there is no internet conenction.\n\n**android.permission.ACCESS_FINE_LOCATION and android.permission.ACCESS_COARSE_LOCATION** - are used for geofencing and geolocation.\n\n**android.permission.ACCESS_BACKGROUND_LOCATION** - is a new permission introduced in AndroidQ, this permission is required to be able to geofence and beacon scan in the background.\n\n**android.permission.WAKE_LOCK** - is used to partially wake up the device when push notifications are received.\n\n**android.permission.VIBRATE** - is used to allow access to the phone vibration pattern.\n\n**android.permission.BLUETOOTH and\nandroid.permission.BLUETOOTH_ADMIN** - is used to scan for iBeacons\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<manifest xmlns:android=\\\"http://schemas.android.com/apk/res/android\\\"\\n    xmlns:tools=\\\"http://schemas.android.com/tools\\\"\\n    package=\\\"com.my.package\\\">\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"Android Manifest Merger\",\n  \"body\": \"If for any reason you need to use *tools:node=\\\"replace\\\"* please read the section below.\"\n}\n[/block]\nIf you use *tools:node=\"replace\"* or any other mode that might cause the manifests to not merge, you must add the code below to your AndroidManifest.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" <activity\\n     android:name=\\\".internal.messaging.inbox.PulsateInboxActivity\\\"\\n     android:exported=\\\"true\\\"\\n     android:label=\\\"Feed\\\"\\n     android:screenOrientation=\\\"portrait\\\"\\n     android:theme=\\\":::at:::style/PulsateInboxTheme\\\" />\\n\\n<activity\\n     android:name=\\\".internal.util.PulsateCallToActionActivity\\\"\\n     android:enabled=\\\"true\\\"\\n     android:exported=\\\"false\\\"\\n     android:screenOrientation=\\\"portrait\\\"\\n     android:theme=\\\"@style/PulsateInboxTheme\\\" />\\n\\n<provider\\n     android:name=\\\".internal.Pulsate\\\"\\n     android:authorities=\\\"${applicationId}.pulsate\\\"\\n     android:enabled=\\\"true\\\"\\n     android:exported=\\\"false\\\" />\\n\\n<receiver\\n     android:name=\\\".internal.PulsateBootReceiver\\\"\\n     android:enabled=\\\"true\\\"\\n     android:exported=\\\"true\\\">\\n     <intent-filter>\\n       <category android:name=\\\"android.intent.category.DEFAULT\\\"/>\\n       <action android:name=\\\"android.intent.action.BOOT_COMPLETED\\\" />\\n       <action android:name=\\\"android.intent.action.QUICKBOOT_POWERON\\\"/>\\n       <!--For HTC devices-->\\n       <action android:name=\\\"com.htc.intent.action.QUICKBOOT_POWERON\\\"/>\\n     </intent-filter>\\n</receiver>\\n\\n<receiver\\n          android:name=\\\"com.pulsatehq.internal.location.geofence.PulsateGeofenceTransitionsReceiver\\\"\\n    android:enabled=\\\"true\\\"\\n    android:exported=\\\"false\\\"\\n    android:permission=\\\"pulsate.permission.GEOFENCE_TRANSITION\\\" />\\n\\n<service\\n    android:name=\\\".internal.messaging.fcm.PulsateNotificationQuickReplyService\\\"\\n    android:enabled=\\\"true\\\"\\n    android:exported=\\\"false\\\" />\\n\\n<service\\n    android:name=\\\"com.evernote.android.job.gcm.PlatformGcmService\\\"\\n    tools:node=\\\"remove\\\" />\\n\\n<service\\n    android:name=\\\".internal.messaging.fcm.PulsateFirebaseMessagingService\\\"\\n    android:stopWithTask=\\\"false\\\">\\n    <intent-filter>\\n      <action android:name=\\\"com.google.firebase.MESSAGING_EVENT\\\" />\\n    </intent-filter>\\n</service>\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"4. Set Authorization Data - App ID, App Key\"\n}\n[/block]\nThere are two ways to setup Authorization Data - App ID, App Key.\nThe first way is to set them up in your Android Manifest as meta-data. The second way is by calling the \"*setAuthorizationData*\" method directly from the Pulsate Manager class in Java. \n\nTo setup the Authorization Data in your Android Manifest as meta-data you need to add the following code:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<application>\\n...\\n<!-- You can either set the needed data here or you can use pulsateManager.setAuthorizationData to set it later-->\\n<meta-data \\n    android:name=\\\"PulsateAppId\\\"\\n    android:value=\\\"xxxxxxxxxxxxxxxxxxxxxxxx\\\"/>\\n<meta-data \\n    android:name=\\\"PulsateAppKey\\\"\\n    android:value=\\\"xxxxxxxxxxxxxxxxxxxxxxxx\\\"/>\\n</application>\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml\"\n    }\n  ]\n}\n[/block]\n*PulsateAppId* and *PulsateAppKey* are used to associate the Pulsate SDK with your Pulsate Web Application which you have created using our Pulsate Web Console. *PulsateAppId* and *PulsateAppKey* can be found in your application configuration panel.\n\nIf you do not want to set these keys in your Android Manifest, you can pass these keys using the Pulsate Manager in Java code instead.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"5. MultiDex\"\n}\n[/block]\nAs the Android platform has continued to grow, so has the size of Android apps. When your application and the libraries it references reach a certain size, you encounter build errors that indicate your app has reached a limit of the Android app build architecture.\n\nWe recommend all our users to add the following code in their projects to fix this problem.\nIn your gradle file under \"*defaultConfig*\" add the following line:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"defaultConfig {\\n    multiDexEnabled = true\\n    //Your defaultConfig code\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nAlso in your gradle file under \"*dependencies*\" add:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"dependencies {\\n    //Your dependencies\\n    implementation 'androidx.multidex:multidex:2.0.1'\\n}\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\nThe last thing to do is open your App class and add the following method:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \" @Override\\nprotected void attachBaseContext(Context base) {\\n    super.attachBaseContext(base);\\n    MultiDex.install(base);\\n}\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nYour app will now support MultiDexing.","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5e5019b49e8f240011cc6a56","category":{"sync":{"isSync":false,"url":""},"pages":["5e5019b49e8f240011cc6a55","5e5019b49e8f240011cc6a56","5e5019b49e8f240011cc6a57","5e5019b49e8f240011cc6a58","5e5019b49e8f240011cc6a59","5e5019b49e8f240011cc6a5a","5e5019b49e8f240011cc6a5b","5e5019b49e8f240011cc6a5c","5e5019b49e8f240011cc6a5d","5e5019b49e8f240011cc6a5e","5e5019b49e8f240011cc6a68","5e5019b49e8f240011cc6a6b","5e5019b49e8f240011cc6a71","5e5019b49e8f240011cc6a73","5e5019b49e8f240011cc6a7e","5e5019b49e8f240011cc6a80","5e5019b49e8f240011cc6a81","5e5019b49e8f240011cc6a82","5e5019b49e8f240011cc6a84"],"title":"Android SDK","slug":"android-sdk","order":1,"from_sync":false,"reference":false,"_id":"5e5019b49e8f240011cc6a49","version":"5e5019b49e8f240011cc6ade","__v":10,"project":"54aa7f773b56130b0056c86e","createdAt":"2015-01-05T12:44:00.338Z"},"createdAt":"2015-01-05T12:56:01.793Z","user":"54aa7f3f9bb00c0b00cb899b","project":"54aa7f773b56130b0056c86e","version":{"version":"2.8","version_clean":"2.8.0","codename":"Android SDK","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e5019b49e8f240011cc6a47","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e5019b49e8f240011cc6a48","5e5019b49e8f240011cc6a49","5e5019b49e8f240011cc6a4a","5e5019b49e8f240011cc6a4b","5e5019b49e8f240011cc6a4c","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e5019b49e8f240011cc6a4d","5e5019b49e8f240011cc6a4e","5c73dd27e8fdc000572a206a","5e5019b49e8f240011cc6a4f","5e501b7e7c8bdc00450ea66a","5e53daa9884b750025b5cad4"],"_id":"5e5019b49e8f240011cc6ade","project":"54aa7f773b56130b0056c86e","forked_from":"5e4fbbbda8fb41028f1861fe","__v":2,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"},"__v":61,"githubsync":"","parentDoc":null}

Installing the Android Pulsate SDK


Pulsate Android SDK is a static library. It's a bridge between your customers' mobile devices and the Pulsate server. **The SDK Supports Android API 16 - 29**. It's very easy to use, and takes about 5 minutes to install. [block:api-header] { "type": "basic", "title": "Step 1: Setup Android Studio" } [/block] **Make sure you are using latest version of Android Studio.** 1. Make sure your project uses *"jcenter"* and *"maven commonsware"* as a dependency repository (default on latest version of the Android Gradle plugin). [block:code] { "codes": [ { "code": "buildscript {\n repositories {\n jcenter()\n maven { url \"https://s3.amazonaws.com/repo.commonsware.com\" }\n }\n}\n\nallprojects {\n repositories {\n jcenter()\n maven { url \"https://s3.amazonaws.com/repo.commonsware.com\" }\n }\n}", "language": "text", "name": "build.gradle" } ] } [/block] 2. Add *compile 'com.pulsatehq.sdk:PulsateSdk:version'* to the dependencies of your project. Change version to the actual version of the SDK that you want to use. All versions can be found here - https://pulsate.readme.io/docs/android-release-notes [block:code] { "codes": [ { "code": "dependencies {\n\timplementation 'com.pulsatehq.sdk:PulsateSdk:3.0.0'\n}\n", "language": "text", "name": "build.gradle" } ] } [/block] [block:callout] { "type": "info", "title": "Updating the SDK", "body": "The newest version of the SDK can be found here - https://pulsate.readme.io/docs/android-release-notes\n\nTo update to the newest version of the SDK all you need to do is update the version tag in \"*implementation 'com.pulsatehq.sdk:PulsateSdk:version'*\" to the newest version found in the link above. Example - \"*implementation 'com.pulsatehq.sdk:PulsateSdk:3.0.0'*\"" } [/block] [block:api-header] { "type": "basic", "title": "Step 2: Configure Gradle" } [/block] Set *compileSdkVersion* to *29*, *minSdkVersion* to *16* and *targetSdkVersion* to *29*. The SDK also uses Java 8 and Data Binding in it's layouts so Data Binding must be enabled. [block:code] { "codes": [ { "code": "android {\n\t\t\t\tcompileSdkVersion 29\n\n defaultConfig {\n minSdkVersion 16\n targetSdkVersion 29\n }\n dataBinding {\n \t\t\t\tenabled true\n \t\t}\n compileOptions {\n \t\t\t\tsourceCompatibility JavaVersion.VERSION_1_8\n \t\t\t\ttargetCompatibility JavaVersion.VERSION_1_8\n \t\t}\n ...\n}", "language": "text", "name": "build.gradle" } ] } [/block] Also please make sure to use one of the newer versions of the Android Gradle Plugin. [block:code] { "codes": [ { "code": "buildscript {\n dependencies {\n classpath 'com.android.tools.build:gradle:3.5.3'\n }\n}", "language": "text" } ] } [/block] [block:callout] { "type": "danger", "body": "If you use *play-services* you must use the *17.0.0* version of the library.\nPlease note that end users must have version 17.0.0 of Google Play Services or above on their Android Device for Pulsate to operate.\n\nFirebase versions - firebase-core:17.2.0 and firebase-messaging:20.0.0. Please use the same versions to prevent any bugs caused by version mismatches.", "title": "Google Play Services and Firebase" } [/block] [block:callout] { "type": "danger", "title": "Android Support Libraries", "body": "With the release of version 3.0.0 Pulsate now uses AndroidX. Please make sure that your App also uses AndroidX." } [/block] [block:api-header] { "type": "basic", "title": "Step 3: Configure AndroidManifest.xml" } [/block] With the 2.12.0 release you no longer need to configure the AndroidManifest.xml file if you do not change the Android Manifest Merger. If you do change the Android Manifest Merger, you must then follow this step. The Pulsate SDK requires that you add these permissions to your application manifest: [block:code] { "codes": [ { "code": "<uses-permission android:name=\"android.permission.RECEIVE_BOOT_COMPLETED\" />\n<uses-permission android:name=\"android.permission.INTERNET\" />\n<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\n<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />\n<uses-permission android:name=\"android.permission.ACCESS_BACKGROUND_LOCATION\" />\n<uses-permission android:name=\"android.permission.WAKE_LOCK\" />\n<uses-permission android:name=\"android.permission.VIBRATE\" />\n<uses-permission android:name=\"android.permission.BLUETOOTH\" />\n<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\" />\n", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] **All of these permissions are required by the Pulsate SDK.** **android.permission.RECEIVE_BOOT_COMPLETED** - required for Pulsate to properly start after a device reboot. **android.permission.INTERNET and android.permission.ACCESS_NETWORK_STATE** - are used to communicate with our server and show in app messages when there is no internet conenction. **android.permission.ACCESS_FINE_LOCATION and android.permission.ACCESS_COARSE_LOCATION** - are used for geofencing and geolocation. **android.permission.ACCESS_BACKGROUND_LOCATION** - is a new permission introduced in AndroidQ, this permission is required to be able to geofence and beacon scan in the background. **android.permission.WAKE_LOCK** - is used to partially wake up the device when push notifications are received. **android.permission.VIBRATE** - is used to allow access to the phone vibration pattern. **android.permission.BLUETOOTH and android.permission.BLUETOOTH_ADMIN** - is used to scan for iBeacons [block:code] { "codes": [ { "code": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n xmlns:tools=\"http://schemas.android.com/tools\"\n package=\"com.my.package\">", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] [block:callout] { "type": "danger", "title": "Android Manifest Merger", "body": "If for any reason you need to use *tools:node=\"replace\"* please read the section below." } [/block] If you use *tools:node="replace"* or any other mode that might cause the manifests to not merge, you must add the code below to your AndroidManifest. [block:code] { "codes": [ { "code": " <activity\n android:name=\".internal.messaging.inbox.PulsateInboxActivity\"\n android:exported=\"true\"\n android:label=\"Feed\"\n android:screenOrientation=\"portrait\"\n android:theme=\"@style/PulsateInboxTheme\" />\n\n<activity\n android:name=\".internal.util.PulsateCallToActionActivity\"\n android:enabled=\"true\"\n android:exported=\"false\"\n android:screenOrientation=\"portrait\"\n android:theme=\"@style/PulsateInboxTheme\" />\n\n<provider\n android:name=\".internal.Pulsate\"\n android:authorities=\"${applicationId}.pulsate\"\n android:enabled=\"true\"\n android:exported=\"false\" />\n\n<receiver\n android:name=\".internal.PulsateBootReceiver\"\n android:enabled=\"true\"\n android:exported=\"true\">\n <intent-filter>\n <category android:name=\"android.intent.category.DEFAULT\"/>\n <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n <action android:name=\"android.intent.action.QUICKBOOT_POWERON\"/>\n <!--For HTC devices-->\n <action android:name=\"com.htc.intent.action.QUICKBOOT_POWERON\"/>\n </intent-filter>\n</receiver>\n\n<receiver\n android:name=\"com.pulsatehq.internal.location.geofence.PulsateGeofenceTransitionsReceiver\"\n android:enabled=\"true\"\n android:exported=\"false\"\n android:permission=\"pulsate.permission.GEOFENCE_TRANSITION\" />\n\n<service\n android:name=\".internal.messaging.fcm.PulsateNotificationQuickReplyService\"\n android:enabled=\"true\"\n android:exported=\"false\" />\n\n<service\n android:name=\"com.evernote.android.job.gcm.PlatformGcmService\"\n tools:node=\"remove\" />\n\n<service\n android:name=\".internal.messaging.fcm.PulsateFirebaseMessagingService\"\n android:stopWithTask=\"false\">\n <intent-filter>\n <action android:name=\"com.google.firebase.MESSAGING_EVENT\" />\n </intent-filter>\n</service>", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] [block:api-header] { "title": "4. Set Authorization Data - App ID, App Key" } [/block] There are two ways to setup Authorization Data - App ID, App Key. The first way is to set them up in your Android Manifest as meta-data. The second way is by calling the "*setAuthorizationData*" method directly from the Pulsate Manager class in Java. To setup the Authorization Data in your Android Manifest as meta-data you need to add the following code: [block:code] { "codes": [ { "code": "<application>\n...\n<!-- You can either set the needed data here or you can use pulsateManager.setAuthorizationData to set it later-->\n<meta-data \n android:name=\"PulsateAppId\"\n android:value=\"xxxxxxxxxxxxxxxxxxxxxxxx\"/>\n<meta-data \n android:name=\"PulsateAppKey\"\n android:value=\"xxxxxxxxxxxxxxxxxxxxxxxx\"/>\n</application>", "language": "xml", "name": "AndroidManifest.xml" } ] } [/block] *PulsateAppId* and *PulsateAppKey* are used to associate the Pulsate SDK with your Pulsate Web Application which you have created using our Pulsate Web Console. *PulsateAppId* and *PulsateAppKey* can be found in your application configuration panel. If you do not want to set these keys in your Android Manifest, you can pass these keys using the Pulsate Manager in Java code instead. [block:api-header] { "type": "basic", "title": "5. MultiDex" } [/block] As the Android platform has continued to grow, so has the size of Android apps. When your application and the libraries it references reach a certain size, you encounter build errors that indicate your app has reached a limit of the Android app build architecture. We recommend all our users to add the following code in their projects to fix this problem. In your gradle file under "*defaultConfig*" add the following line: [block:code] { "codes": [ { "code": "defaultConfig {\n multiDexEnabled = true\n //Your defaultConfig code\n}", "language": "text" } ] } [/block] Also in your gradle file under "*dependencies*" add: [block:code] { "codes": [ { "code": "dependencies {\n //Your dependencies\n implementation 'androidx.multidex:multidex:2.0.1'\n}", "language": "text" } ] } [/block] The last thing to do is open your App class and add the following method: [block:code] { "codes": [ { "code": " @Override\nprotected void attachBaseContext(Context base) {\n super.attachBaseContext(base);\n MultiDex.install(base);\n}", "language": "java" } ] } [/block] Your app will now support MultiDexing.