StageUp
모바일 SDK프로모션

Android

AdStage Promotion을 통해 사용자 특성에 맞는 프로모션을 조회하거나, UI를 포함해 바로 열 수 있습니다. 아래 예시 코드는 리스트 조회와 즉시 열기(렌더링) 두 가지 방식을 모두 보여줍니다.

1. PromotionParams 전체 샘플

val params = AdStage.PromotionListParams(
	bannerType = "REWARDED_VIDEO",     // NATIVE, INTERSTITIAL, REWARDED_VIDEO, POPUP
	targetAudience = "new_user",        // 예: new_user, paying_user
	deviceType = "HIGH_END",            // LOW_END, MID_END, HIGH_END
	region = "KR",                      // KR, JP, US, SEA, EU, GLOBAL
	limit = 5,                           // 조회할 최대 개수
	status = "ACTIVE",                  // ACTIVE, PENDING, PAUSED, ENDED
	partner = "SuperAds",               // 광고주/제휴사 식별자
	primaryInterest = "GAMES",          // GAMES, SHOPPING, ENTERTAINMENT 등
	primaryAgeGroup = "25-34",          // 13-17, 18-24, 25-34, 35-44, 45+
	gameGenrePreference = "RPG",        // RPG, STRATEGY, CASUAL, ACTION, PUZZLE
	playerSpendingTier = "DOLPHIN",     // F2P, DOLPHIN, WHALE
	playTimePattern = "EVENING"         // MORNING, AFTERNOON, EVENING, NIGHT
)

2. 프로모션 열기: openPromotion

openPromotion은 조건에 맞는 프로모션을 조회하고, 앱 내에서 UI를 포함해 즉시 렌더링/처리합니다.

AdStage.openPromotion(
	activity = this,
	params = AdStage.PromotionListParams(
		bannerType = "REWARDED_VIDEO",
		targetAudience = "new_user",
		deviceType = "HIGH_END",
		region = "KR",
		limit = 5,
		status = "ACTIVE",
		partner = "SuperAds",
		primaryInterest = "GAMES",
		primaryAgeGroup = "25-34",
		gameGenrePreference = "RPG",
		playerSpendingTier = "DOLPHIN",
		playTimePattern = "EVENING"
	),
	showTodayButton = true
) { url, error ->
	if (error == null) {
		Log.d("Promotion", "프로모션 처리 완료: $url")
	} else {
		Log.e("Promotion", "프로모션 처리 실패", error)
	}
}

3. 프로모션 리스트 조회: getPromotionList

getPromotionList는 조건에 맞는 프로모션 리스트만 조회합니다. UI 렌더링은 직접 구현합니다.

val params = AdStage.PromotionListParams(
	bannerType = "REWARDED_VIDEO",
	targetAudience = "new_user",
	deviceType = "HIGH_END",
	region = "KR",
	limit = 5,
	status = "ACTIVE",
	partner = "SuperAds",
	primaryInterest = "GAMES",
	primaryAgeGroup = "25-34",
	gameGenrePreference = "RPG",
	playerSpendingTier = "DOLPHIN",
	playTimePattern = "EVENING"
)
 
AdStage.getPromotionList(params) { promotions ->
	val promotionCount = promotions?.totalItems ?: 0
	val promotionItems = promotions?.promotions ?: emptyList()
	Log.d("Promotion", "총 $promotionCount 개 프로모션 수신됨")
 
	// TODO: promotionItems를 RecyclerView 등으로 렌더링
}

4. 참고

  • 각 파라미터는 null 가능하며, 생략 시 기본 전체 조건으로 검색됩니다.
  • openPromotion은 UI 포함 자동 렌더링 방식이며, getPromotionList는 리스트만 조회합니다.

목차