로딩중입니다
adPOPcorn OfferWall: Unity Android
4/22/2016 5:08:00 PM

adPOPcorn OfferWall

adPOPcorn service shows OfferWall(charging station) inside an app and return profit to developers based on users’ completed ad campaign. 

For more information about adPOPcorn service, please check the article below.

[About adPOPcorn]


NOTE
  1. IGAW Integration must be set before integration adPOPcorn add-on. [IGAW General Integration: Unity Android]
  2. IgawAdpopcorn~*_thirdparty.jar file must be included in an Unity project. [Install SDK : Unity]



AndroidManifest.xml

Edit AndroidManifest file to integrate adPOPcorn.

In integration, add additional permission, reward server type, required activity right after app key, hash key, and permission.


Add Permission

Add permission at <manifest></manifest>.

GET_ACCOUNT / WRITE_EXTERNAL_STORAGE  permission must be added to stop any abusing attempt using a Google account on the same ads.

<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

GET_ACCOUNT permission requires adPOPcorn 4.0.5 or above.


Set Reward Server Type 

Follow the below guide to choose the type of ( * )reward server integration at <application></application>. If you use your own server, set it to 'server.'

<meta-data android:name="igaworks_reward_server_type" android:value="server"/>

(*)reward server integration type

Set how to receive reward information from IGAW reward server. We encourage developers to set callback server to receive. 

Using your own server will be better for security and maintenance. 


If you can’t set up your own, you can receive callback using IGAW reward server. 

In this case you have to set igaworks_reward_server_type to client and require additional API integration.

[Client Reward Integration: Android]


Add required activity

Add required activity at <application></application> tag. Must be added for OfferWall operation.

<activity android:name="com.igaworks.adpopcorn.activity.ApOfferWallActivity_NT"
          android:theme="@android:style/Theme.Translucent.NoTitleBar"/>

<activity android:name="com.igaworks.adpopcorn.activity.ApCSActivity_NT"
          android:theme="@android:style/Theme.NoTitleBar" />

<activity android:name="com.igaworks.adpopcorn.activity.ApVideoAdActivity"
          android:theme="@android:style/Theme.NoTitleBar"
          android:screenOrientation="landscape"/>


Interested in participating as an advertiser?

If you want to start CPI or above ad campaign through adPOPcorn ad network, you need to register Google Install Receiver.

[IGAWorks Google Install Receiver Registration Guide]



adPOPcorn API

After general integration, you can start using adPOPcorn API. Use following APIs to integrate for adPOPcorn OfferWall exposure.


Enter User Identifier Value

User Identifier Value is to verify users finished ad campaign to give reward. It must be set before users use coupon code. 


    NOTE

  1. One user should have an unique value and cannot be changed. 
  2. Must not contain any personal information(email, name, phone number, ID, etc).
  3. If contains Korean,  special characters, or blank space, the value must be URL encoded.
  4. Must set before openOfferwall API is called.

Put User Identifier with above warning in mind.

IgaworksUnityPluginAOS.Common.setUserId("player1001");


OfferWall Exposure

Use openOfferWall API to expose OfferWall. 

Connect through click action like button, banner, or images to call OfferWall. 

public class MySampleScene : MonoBehavior {         
    Rect openOfferwallBtn = new Rect(100, 100, 200, 200);

    void OnGUI() {
        //When user tap OfferWall button, call OfferWall.  
        if (GUI.Button(openOfferwallBtn, "OfferWall")) {
            IgaworksUnityPluginAOS.Adpopcorn.openOfferwall();
        }
    }
} 


Additional Option: Device Rotation

For landscape mode app, Use setSensorLandscapeEnable API to set up/down rotation.

// true:Landscape Mode,  false:Default  IgaworksUnityPluginAOS.Adpopcorn.setSensorLandscapeEnable(true);


Additional Option: Event Delegate

Offers event delete for closing OfferWall. You can materialize and use specific action you want to occur when OfferWall ends.

See following example to use delegate.

public class MySampleScene : MonoBehavior {      
	void Start () {
                //Add adPOPcorn Event Listner
                IgaworksUnityPluginAOS.Adpopcorn.setAdpopcornOfferwallEventListener();
          
		//Add OfferWall Event Close Delegate          
		IgaworksUnityPluginAOS.OnClosedOfferwallPage = mOnClosedOfferwallPage;      
	}        
	//Materialize OfferWall Close Event Delegate      
	void mOnClosedOfferwallPage () {
		Debug.Log("Close OfferWall");      
	}  
}



adPOPcorn OfferWall Style API

You can change color style of OfferWall. Call setOfferwall~* API to change style.

// OfferWall Theme Color Code Setting
// IgaworksUnityPluginAOS.Adpopcorn.setOfferwallThemeColor(string color)
IgaworksUnityPluginAOS.Adpopcorn.setOfferwallThemeColor("ff9d261c");

// OfferWall Theme Text Color Code Setting
// IgaworksUnityPluginAOS.Adpopcorn.setOfferwallTextThemeColor(string color)
IgaworksUnityPluginAOS.Adpopcorn.setOfferwallTextThemeColor("ff9d261c");

// OfferWall Reward Box Color Code Setting
// IgaworksUnityPluginAOS.Adpopcorn.setOfferwallRewardThemeColor(string color) IgaworksUnityPluginAOS.Adpopcorn.setOfferwallRewardThemeColor("ff9d261c"); // OfferWall Reward Check Color Code Setting
// IgaworksUnityPluginAOS.Adpopcorn.setOfferwallRewardCheckThemeColor(string color) IgaworksUnityPluginAOS.Adpopcorn.setOfferwallRewardCheckThemeColor("ff9d261c");



Reward Server Integration and QA

Integration for exposing OfferWall on an app is done.

Now you have to go through reward server integration to actually give reward to users with finished campaign. 

[IGAW Reward Server Integration Guide]

After finishing the reward server integration, you have to request QA process after testing ad campaign. 

To use AdPOPcorn OfferWall, you must go through QA process. Use ‘QA Request’ on AdPOPcorn management page to send .apk file and we will send you result within 1~2 days.

QA Inquiry: QA@igaworks.com