Versions Compared

Key

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

Compile time error will happen if you will not implement IAppoxeeCallable in your Main Camera Unity Script.

...

Code Block
languagec#
titleIs Device Push Enabled - Example
linenumberstrue
 bool isPushEnabled = appoxeePlugin.IsPushEnabled();


Tags API

Remove Tags

public void RemoveTagsFromDevice(String tags);

...

public void GetTagList();

Get Application's Tags, from which Device Tags can be taken from.

Info
titleJsonUtility usage

As of Unity3D ver 5.3, the Class JsonUtility is introduced to help parse json object. Please refer to Unity's manual here.

If you are using Unity3D version lower than 5.3 , you may use other JSON parsing open source projects, such as JSONObject or SimpleJSON.

Code Block
languagec#
titleGet Application Tags - Example
linenumberstrue
    [Serializable]
    public class AppTags
    {
        public String[] app_tags;
    }
...	
	appoxeePlugin.GetTagList();
...
	//Matching Callback Method from IAppoxeeCallable, message is App Tags, as a JSONObject represnted String.
	void OnGetAppTags (String message) {
        AppTags appTagsFromJson = JsonUtility.FromJson<AppTags> (message);
		String[] appTags = appTagsFromJson.app_tags;
		//Rest of your code
	}

Push API

Enable/Disable Push

public void SetPushEnabled(boolean flag);
Soft Opt In / Out for Push .
flag - set true to enable , false to disable
Code Block
languagec#
titlePush Opt Out - Example
linenumberstrue
	appoxeePlugin.SetPushEnabled(true);
...
	//Matching Callback Method from IAppoxeeCallable, message is true/false (is operation successful)
	void OnPushOptOut (String message) {
	//Your code after Opting in/out 
	}

Custom Fields API

Set Custom Date Field

public void SetDateField(String fieldName,DateTime fieldValue);

fieldName - name of custom field to set.

fieldValue - value of custom date field to set

Code Block
languagec#
titleSet Custom Field - Example
linenumberstrue
	appoxeePlugin.SetDateField("LastPlayed", DateTime.now());
...
	//Matching Callback Method from IAppoxeeCallable, message is true/false (is operation successful)
	void OnSetCustomField (String message) {
	//Your code after setting a custom field
	}

Set Custom Numeric Field

public void SetNumericField(String fieldName,Decimal fieldValue);

fieldName - name of custom field to set.

fieldValue - value of custom field to set.

Code Block
languagec#
titleSet Custom Field - Example
linenumberstrue
	appoxeePlugin.SetNumericField("score", 1000);
...
	//Matching Callback Method from IAppoxeeCallable, message is true/false (is operation successful)
	void OnSetCustomField (String message) {
	//Your code after setting a custom field
	}

Set String Field

public void SetStringField(String fieldName,String fieldValue);

fieldName - name of custom field to set.

fieldValue - value of custom field to set.

Code Block
languagec#
titleSet Custom Field - Example
linenumberstrue
	appoxeePlugin.SetStringField("Name", "John Doe");
...
	//Matching Callback Method from IAppoxeeCallable, message is true/false (is operation successful)
	void OnSetCustomField (String message) {
	//Your code after setting a custom field
	}

 

Get Custom Field

Gets Custom Field.

public void GetCustomFieldAsString(String fieldName);

fieldName - name of custom field to get.

Code Block
languagec#
titleGet Custom Field - Example
linenumberstrue
	appoxeePlugin.GetCustomFieldAsString("Name");
...
	//Matching Callback Method from IAppoxeeCallable, message is custom field value as String
	void OnGetCustomField (String message) {
	//Your code after getting a custom field as callback result.
	} 

Notifications

Last Push Payload Received 

public String GetLastPush();

Gets last push payload from last incoming push notification. Deletes it after returning.

Code Block
languagec#
titleLast Push Payload Received - Example
linenumberstrue
String pushPayload = appoxeePlugin.GetLastPush();
Note
titlePush Notification Callback and Extra Fields Parsing

The method GetLastPush() is the method that should be called every time you wish to handle an incoming push notification. Further explanation on using the Incoming Last Push Notification Method can be found here.

 

Set Application Badge Number (iOS only)
public void setApplicationBadgeNumber(int bdageNumber);
Set the application badge number, where 0 will remove the badge, and any other number will display it, or update a displayed badge.

 

Code Block
languagec#
titleSet Application Badge Number
appoxeePlugin.setApplicationBadgeNumber (0); // The application's badge icon will be removed.
appoxeePlugin.setApplicationBadgeNumber (2); // The application's badge icon will display a badge count of 2.

 

 

Note
titlePush Notification Callback and Extra Fields Parsing
The method GetLastPush() is the method that should be called every time you wish to handle an incoming push notification. Further explanation on using the Incoming Last Push Notification Method can be found here.