// CaulySquare Initiation void initCaulySquare() { // CaulyAdInfo creation : CaulyAdInfoBuilder with APP_CODE CaulyAdInfo adInfo1 = new CaulyAdInfoBuilder(APP_CODE).build(); // CaulySquare Initiation mCaulySquare = CaulySquare.initWithAdInfo(this, adInfo1); // kakaoid or user unique key in Game. ( optional ) mCaulySquare.setCustomId("kakaoid_of_the_game,안녕하세요"); // callback listener register. mCaulySquare.setListener(this); }
@Override public void onClick(View v) { switch (v.getId()) { case R.id.request_adwall_status: mCaulySquare.requestOfferStatus(this); break; case R.id.show_adwall: showOfferWallScreen(); break; case R.id.request_isnew_adwall: requestIsNewOfferWallCheck(); break; } }
@Override protected void onStop() { super.onStop(); mCaulySquare.onStop(); }
@Override protected void onResume() { super.onResume(); mCaulySquare.onResume(); }
@Override protected void onPause() { super.onPause(); mCaulySquare.onPause(); }
// show adwall page. it calls back "onOpenOfferwall","onCloseOfferwall" on CaulySquareListener void requestIsNewOfferWallCheck() { mCaulySquare.requestIsNewOfferWall(this); }
// show adwall page. it calls back "onOpenOfferwall","onCloseOfferwall" on CaulySquareListener void showOfferWallScreen() { mCaulySquare.showOfferwall(this, "Your own title"); }