Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

tag is used to label users with different elements of the app's business logic. 
For example, if your app is intended for pet owners, you can define the different pets as tags ("Dog", "Cat", “Parrot” etc.) and then label users with different tags, depending on the pets they own. 
Tags are a useful way to create Segments: Groups of devices that share the same parameters (in this case, the tag values). 
You can then send Push notifications to the relevant segments (for example, one notification for dog owners and another for cat owners). 

...

Note

Since Appoxee.setup() is an Asynchronous Initialisation method, any set action can be performed only after the call Appoxee.isReady()==True. Only after Appoxee.Setup() finished, the flag is set to TRUE value. It is recommended to check the flag before calling setters.

Using Tags API Methods must be done under AsyncTask. For example : 

Code Block
languagejava
titleTags API Sample
firstline1
linenumberstrue
new AsyncTask<Void, Void, Void>() {

                    ArrayList<String> deviceTags;

                    @Override

                    protected void onPreExecute() {
						//Do what you need before executing, Progress Bar init etc.

                    }

                    @Override

                    protected Void doInBackground(Void... params) {

                        // get all tags

                        allTags = Appoxee.getTagList();
                        Utils.Debug("Got Application Tag List = " + allTags);

                        deviceTags = Appoxee.getDeviceTags();
                        Utils.Debug("Got Device Tag List = " + deviceTags);

                        if (allTags == null)
                            allTags = new ArrayList<String>();

                        if (deviceTags == null)
                        	deviceTags =  new ArrayList<String>();

                        return null;
                    }

                    @Override
                    protected void onPostExecute(Void result) {

                        //Do What you need with the Data, Dismiss Progress Bar etc.
                    }

                }.execute();

 

Tag API Methods

Table of Contents
maxLevel2
minLevel2

...

public static boolean removeTagsFromDevice(ArrayList<String> tags)

Parameters

ArrayList – a string array of tags to be removed from the device.

...