로딩중입니다
Live Operation Integration : Notification Popup (Unity Android)
6/24/2016 2:00:28 PM

Live Operation Notification Popup Service

Live Operation Notification Service is a service to show messages to users by popup notifications whenever needed.

News about ongoing events or new features can be informed to users by this service.


Notice
  1. IGAW General Integration must be set in order to integrate Live Operation add-on. [IGAW General Integration : Unity Android]
  2. In order to integrate Live Operation, IgawLiveOps~*_thirdparty.jar file must be included in Unity project. [SDK Installation : Unity]



Notification Popup Initialization API

To use the Notification Popup service, follow the following steps to initialize.

It is recommended to call the initialization API at the point when the application starts.


Input User ID

User ID is a set of information to identify users who have completed the campaign and are eligible for a reward.

User ID must be set before the user inputs the coupon codes.

 

    Notice

  1. One user should only have one unique value, not variable.
  2. Must not contain any personal information(email, name, phone number, username).
  3. Must go through URL encoding if contains Korean, special character, or blank space.
  4. Must be set before requestPopupResource API is called up.

Follow the above notice when input the User ID value.

IgaworksUnityPluginAOS.Common.setUserId("user10001");


Loading the Notification Popup Data

Call requestPopupResource api to load the notification popup data set in the Live Operation admin page.

User ID must be set before loading the data.

 

Notice

  1. Data loading cannot be done without the user id.
  2. Without this data loading process, SDK cannot recognize any new notification added on the Live Operation notification popup admin page. 

Follow the above notice when loading the notification popup data.

IgaworksUntiyPluginAOS.LiveOps.requestPopupResource();



Notification Popup API

Show notifications in the popup form at a desired point by calling up the showPopUp api.

The content of the notification must be set in the notification popup admin page.

The following example shows a notification popup is displayed when clicking the showPopupNotiBtn button.

void OnGUI() {
	//Display notification popup.
	if(GUI.Button (new Rect(100,100,200,200), "showPopupNoti")) {
		IgaworksUnityPluginAOS.LiveOps.showPopUp("Notification popup space key");
	}
}

+ Notification popup space key can be created only from the notification popup admin page.


Notification Popup Deep Link

Use the Deep Link feature of a notification popup to handle various types of actions.

void Start() {
    //Set deep link delegate
    IgaworksUnityPluginAOS.OnReceiveDeeplinkData = mOnReceiveDeeplinkData;
}

//Implement deep link delegate
void mOnReceiveDeeplinkData(string deeplink) {
    //Use transferred deep link data to implement the additional actions.
    Debug.Log("deep link data :::: " + deeplink);
}

+ Deep Link can be registered in the Live Operation admin page.

+ Deep Link supports Json type data.



Targeting Notification Popup Users

Set user groups to verify specific targets of the target push directly.

You can set the data to create your own user group manually.


Set Targeting Data

You can set customized user data to send target push.

Created custom user data is listed at Target Push admin page. The following example shows collecting the number of purchases of users as the custom data.

//IgaworksUnityPluginAOS.LiveOps.setTargetingData(string  customUserDataKey, string customUserData);
IgaworksUnityPluginAOS.LiveOps.setTargetingData("purchaseCount", purchaseCount);

+ customUserData : Input user data for targeting. Supports bool, int, long, float, string.

+ customUserDataKey : Input user custom data key.


Sync Targeting Data

Call resume api to sync the targeting data to Live Operation server.

Call at the point when you want the synchronization or when the app status changes.

//Check the app status
void OnApplicationPause(bool pauseStatus){
    if (pauseStatus) {
        Debug.Log ("go to Background");
    } else {
        Debug.Log ("go to Foreground");
	//Sync targeting data
	IgaworksUnityPluginAOS.LiveOps.resume();
    }
} 



Live Operation : Additional Options


Notification Popup Event Delegate

We offer delegates for the click events which occurs in the notification popups.

  • OnLiveOpsCancelPopupBtnClick : Notification popup closing event
  • OnLiveOpsPopupClick : Notification popup clicking event

Call setLiveOpsPopupEventListener api, register the event delegate, and implement.

void Start () {
	IgaworksUnityPluginAOS.LiveOps.setLiveOpsPopupEventListener ();

	IgaworksUnityPluginAOS.OnLiveOpsCancelPopupBtnClick = mOnLiveOpsPopupCancel;
	IgaworksUnityPluginAOS.OnLiveOpsPopupClick = mOnLiveOpsPopupClick;
}

void mOnLiveOpsPopupCancel(){
	Debug.Log("PopupCancel :::: call");
}

void mOnLiveOpsPopupClick(){
	Debug.Log("PopupClick :::: call");
}



Force Quitting Notification Popups

By using the api, you can force quit the notification without the user's click event.


Closing the Notification Popup on View

Call destroyPopup api to close the first top notification popup on view.

IgaworksUnityPluginAOS.LiveOps.destroyPopup ();


Closing All Notification Popups

Call destroyAllPopups api to close all notification popups including the first top notification popup on view and every other notification popups in queue.

IgaworksUnityPluginAOS.LiveOps.destroyAllPopups ();