로딩중입니다
Live Operation Integration : Notification Popup (Android)
6/11/2015 10:52:56 AM

Notification Popup

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 Common Integration: Android]
  2. In order to integrate Live Operation, IgawLiveOps~*_thirdparty.jar file must be included in project. [SDK Installation: Android]

Notification Popup Initialization

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.

//Pop-up Notification Data Load
IgawLiveOps.requestPopupResource(mainContext, new LiveOpsPopupResourceEventListener() {
     @Override
     public void onReceiveResource(boolean isReceive) {
         Log.d("liveops", "isReceivePopupResource? :: " + isReceive);
     }
});



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.

Button showPopupNotiBtn;
showPopupNotiBtn = (Button)findViewById(R.id.showPopupNotiBtn);
showPopupNotiBtn.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
         //Send Popup Notification.
         //showPopup(Context context, String popup_spacekey, LiveOpsDeepLinkEventListener listener);
         IgawLiveOps.showPopUp(MainActivity.this, "공지팝업스페이스키", null);
    }
});

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

LiveOpsDeepLinkEventListener is only available when you use Popup Notification Deep Link feature.

 

Notification Popup Deep Link

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

Button showPopupNotiBtn;
showPopupNotiBtn = (Button)findViewById(R.id.showPopupNotiBtn);
showPopupNotiBtn.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        IgawLiveOps.showPopUp(mainContext, "공지팝업스페이스키", new LiveOpsDeepLinkEventListener() {
            @Override
            public void onReceiveDeeplinkData(String deepLinkDataString) {
                Log.d("liveops", "LiveOpsPopUp DeepLinkData :::: " + deepLinkDataString);
                //딥링크 데이터를 이용하여 추가 액션을 수행하도록 구현합니다.
            }
        });
    }
});

+ 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.

//IgawLiveOps.setTargetingData(Context applicationContext, final String customUserDataKey, final Object customUserData);
IgawLiveOps.setTargetingData(MainActivity.this, "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.

@Override
protected void onResume() {
	super.onResume();

	IgawLiveOps.resume(MainActivity.this);
	//… 이하 생략
}

 


Live Operation : Additional Options

공지팝업 이벤트 리스너

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

  • onCancelPopupBtnClick : Notification popup closing event
  • onPopupClick : Notification popup clicking event

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

IgawLiveOps.setLiveOpsPopupEventListener(new LiveOpsPopupEventListener() {
	@Override
	public void onCancelPopupBtnClick() {
            // Close popup notification
	}

	@Override
	public void onPopupClick() {
            // Popup Notification Open Event
	}
});



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.

IgawLiveOps.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.

IgawLiveOps.destroyAllPopups();