SDK Installation
Android Native
Get Started for Android
8 min
cooee's android sdk enables app developers to track and retain their customers with template less in apps this guide will walk you through the easy steps of installing the cooee sdk, configuring it, and verifying the data within cooee's dashboard while you finish your coffee configure repository this step is not required for v1 4 1 and above if you use an older gradle (\<v7 0), add the below maven link to your project level build gradle file groovy allprojects { repositories { maven { url "https //letscooee jfrog io/artifactory/default maven local" } } } for the newer version, add below to settings gradle file groovy dependencyresolutionmanagement { repositories { maven { url "https //letscooee jfrog io/artifactory/default maven local" } } } install dependency update your app level build gradle with the following changes to install the cooee sdk groovy android { compileoptions { sourcecompatibility javaversion version 1 8 targetcompatibility javaversion version 1 8 } } dependencies { implementation 'com letscooee\ cooee android sdk\ x y z' } replace x y z with the latest release of the sdk configure credentials add the following in androidmanifest xml inside the application tag \<meta data android\ name="cooee app id" android\ value="my cooee app id"/> replace my cooee app id with the app id which is present at cooee portal permissions setup (optional) cooee sdk supports prompting the following permissions via engagement to make it work, you need to add the following to the app's androidmanifest xml file \<! cooee sdk use this permission to run augmented reality engagements > \<uses permission android\ name="android permission camera" /> \<! cooee sdk use this permission to run location based engagements > \<uses permission android\ name="android permission access fine location" /> \<! cooee sdk use this permission to post an notification(required only on android 13 and above) > \<uses permission android\ name="android permission post notifications" /> initialize the cooee sdk in the oncreate() method of your application’s main activity, add the below line this will initialize the cooee sdk cooeesdk cooeesdk = cooeesdk getdefaultinstance(this);val cooeesdk = cooeesdk getdefaultinstance(this); android 13 and above needs permission to be granted to post a notification you will need to add the below code once you initialize cooeesdk private void requestnotificationpermission() { cooeesdk requestnotificationpermission(activity); }fun requestnotificationpermission() { cooeesdk requestnotificationpermission(activity) }