Appcelerator - Android

Appcelerator Android SDK

Before starting your application instrumentation, ensure that you have created an app and have an appKey


  1. Copy the plugin zip inside your project directory

  2. Open tiapp.xml and under modules add the following line

<module version="1.0.0" platform="android">ti.pyze</module> 


Open tiapp.xml and add the pyze app key as follows

<android xmlns:android="">
       <meta-data android:name="PyzeAppKey" android:value="YOUR PYZE APP KEY"/>

Import pyze module and get a reference for the module

var pyze = require('ti.pyze');

Custom Events

Custom events allow you to easily track unique user actions within your app.


pyze.postCustomEvent("Event Name");

This allows you to track when a user executed an action, for a simple count of how often that event is occurring.

Event with Attributes

Attributes are any key-value pair that you can attach to an event. You can have up to 99 attributes with any event. It is highly recommended to follow our Best Practices and heavily rely on attributes to make your instrumentation as minimal and useful as possible. In a typical application, you should have many more attributes than events.

import {PyzeEvents} from 'ti.pyze'; //Import PyzeEvents class from the Pyze Appcelerator package

var customAttribute = {};
customAttribute.color = "Red";
pyze.postCustomEventWithAttributes("Event Name",customAttribute);

User Privacy

Pyze provides APIs to allow end-users to Opt out of Data Collection and also instruct the Pyze system to forget a user’s data.


Allows end-users to opt out from data collection. Opt-out can be toggled true or false.


To resume user data collection set value to false


Allows end-users to opt out from data collection and delete the user in the Pyze system. We recommend you confirm this action as once a user is deleted, this cannot be undone.


In-App Notifications

In-app notifications allow app businesses to reach out to app users when they use your app. In-App notifications are built-in to the pyze sdk and have no additional dependecies.businesses to reach out to users from manually from Dynamic Funnels and Intelligence Explorer, and automatically based on workflows and campaigns from Growth Automation. In-App notifications can be sent from Campaigns

Call the following method, wherever you want to check for new messages and pop-up a modal with the notification:

Method accepts a callback handler method which will be invoked whenever any of the call to action button on the UI is pressed.



  "Params" + params);

API Reference

Full API reference available here

Last modified 2020-12-03