1. Create a new app in Quixxi Portal using Add New button.
  2. In Create your app dialog give a name of your application and click Continue
  3. Click the newly created app and choose Control in header tab and choose Package in left side menu.
  4. Click Add Platform and choose Android as platform and check Analytics in Select module option.
  5. Give proper package name for your application and click on Start Packaging .
  6. Now Quixxi will pack Analytics framework and notify you once it gets completed.
  7. Click Download Demo to receive a complete demo application which showcases the features of Analytics framework.
  8. Click Launch Demo App for a quick demo with in the browser.
  9. Click Download Library to get the library and you will receive a package which contains module called QuixxiLibrary.aar


Let’s see how to setup Quixxi Analytics with your application in following steps.

  1. In the Android Studio go to File -> New Module -> Choose Import .JAR/.AAR Package and click next.
  2. Choose the extracted Quixxi Analytics SDK(QuixxiLibrary.aar), change the subproject name if required and click finish.
  3. After Importing the Analytics SDK, go to File->Project Structure.Select Module you need to add as Quixxi Analytics SDK.
  4. Now, proceed to dependencies in Project Structure. Add Quixxi Analytics SDK as a module dependency.
  5. Always use recent version of Google Play Services API.


Add the below permissions in your Manifest.xml


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;"><uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" /></span></span>


To track the location of a user add the permissions mentioned below


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;"><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /></span></span>


Initialising the Quixxi Analytics SDK

Initialise the Quixxi Analytics SDK by adding the following line to the onCreate() of the Application Class.


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">QuixxiAnalytics.fetchLocation(true);</span></span>


true - for fetching location of user


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">QuixxiAnalytics.start(getApplicationContext())</span></span>


For debug logs:

        If you need Debug Logs in Quixxi Analytics SDK.Use the following,


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">QuixxiAnalytics.isDebug = true;</span></span>


Sending events

        Once analytics library is initialized, you can track and push events with following callbacks,


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">QuixxiAnalytics.sendEvent(title,description);</span></span>


        title - a string unique identifier of your event

        description - a string describes your event val


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">QuixxiAnalytics.sendEvent(title,description,additionalDescription);</span></span>


        title - a string unique identifier of your event

        description - a string describes your event value

        additionalDescription - additional string describes your event


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">QuixxiAnalytics.sendEvent(title,description,additionalDescription,customMapObject);</span></span>


        title - a string unique identifier of your event
        description - a string describes your event value
        additionalDescription - additional string describes your event
        customMapObject - a custom map Object from Developer


Example

<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">Map<String, Object> customMapObject = new HashMap<String, Object>();
customMapObject.put("sku_id", 123456);
customMapObject.put("sku_price", “$25.50”);
customMapObject.put("sku_brand", "Nike");
customMapObject.put(“sku_size”,9):
customMapObject.put("sku_model", "DownShifter Running Shoes");
QuixxiAnalytics.sendEvent(“Purchase”,”Sport’s Shoe”,”Amazon”,customMapObject);</span></span>


Sending crash reports

        Quixxi Analytics SDK will catch all the exceptions and being a developer you can send caught exception with following callback to Quixxi.


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">try 
{
// your code here
} 
catch (Exception e) 
{
QuixxiAnalytics.sendException(e, Thread.currentThread());
}</span></span>


Sending shared preference

        You can push the Shared Preference Collection(stored by the App) to Quixxi Cloud with following callback,


<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">QuixxiAnalytics.sendSharedPreferences();</span></span>


Updating email id

        Gets EmailId from User and send it to Quixxi,

<span style="font-size: 16px;"><span style="font-family: 'Times New Roman',Times,serif;">QuixxiAnalytics.sendUserEmail(java.lang.String EmailId)

</span></span>


EmailID - String denoting user email id