Using the Custom Fields in Android (Since SDK V2.0)
Since Appoxee SDK V2.0 you have the ability to set custom fields
In the same way you use tags to mark your users with different business logic information, you can add custom strings, numbers and date variables. The information you set on each user can later be used to segment the users and create personalized dynamic push messages.
For example:
- Add a user's first name to create personal push messages: " Hi John, we are...."
- Add a user's birthday and use it to create a periodic birthday campaign to congratulate users on their birthday
- Add a user's level in the game and use it to segment the users according to the level they have reached in your game
Each Method is called through "Appoxee.methodName()".
Custom Fields Getters/Setters API :
------------------------------------------------------------------------
//Universal Value Getter, List of Attributes as incoming parameter, List of Values as returning values
public static ArrayList<String> getFromAttributeList(ArrayList<String> listOfAttributes)
new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { // TODO Auto-generated method stub ArrayList<String> listOfValues = Appoxee.getFromAttributeList(listOfFields); //listOfFields must be final ArrayList<String>. return null; } }.execute();
//Set Custom Field, Return TRUE on success
// aValue - Can be String containing text / number representation (Long,Int,Float,Double) / Date in the following pattern : yyyy-MM-ddThh:mm:ss
public static boolean setCustomField(String aName,Object aValue)
Sample of Usage :
new AsyncTask<Void, Void, Void>() { @Override protected Void doInBackground(Void... params) { // TODO Auto-generated method stub Appoxee.setCustomField(fieldName,objField); //fieldName & objField must be final. return null; } }.execute();