앱에 자체적인 볼륨 조절 기능 (예: 맞춤 음악 또는 음향효과
볼륨)이 있는 경우, Google 모바일 광고 SDK에 앱 볼륨 정보를 공개하면
동영상 광고에 앱 볼륨 설정을 적용할 수 있습니다. 이를 통해 사용자가 놀라지 않는 범위의 오디오 볼륨으로
동영상 광고가 게재됩니다.
볼륨 버튼 또는 OS 수준 볼륨 슬라이더를 통해 조절되는
기기 볼륨은 기기 오디오 출력 볼륨을 결정합니다. 그러나 앱의 경우 기기 볼륨에 대한 비율로 정의되는 자체 볼륨을 조절해
오디오 환경을 맞춤설정할 수 있습니다. 앱 오프닝 광고, 배너 광고, 전면 광고, 보상형 광고, 보상형 전면 광고 형식의 경우 정적 setAppVolume() 메서드를 통해 SDK에 상대적인 앱 볼륨을 보고할 수 있습니다. 유효한 광고 볼륨 값의 범위는
0.0 (무음)~1.0 (현재 기기 볼륨)입니다. 다음은 SDK에 상대적인 앱 볼륨을 보고하는 방법의 예입니다.
Kotlin
overridefunonCreate(savedInstanceState:Bundle?){super.onCreate(savedInstanceState)valbackgroundScope=CoroutineScope(Dispatchers.IO)backgroundScope.launch{// Initialize Google Mobile Ads SDK on a background thread.MobileAds.initialize(this@MainActivity){}// Set app volume to be half of current device volume.MobileAds.setAppVolume(0.5f)}}
자바
@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);newThread(()->{// Initialize Google Mobile Ads SDK on a background thread.MobileAds.initialize(this,initializationStatus->{});// Set app volume to be half of current device volume.MobileAds.setAppVolume(0.5f);}).start();}
SDK에 앱 볼륨이 음소거되었음을 알리려면 setAppMuted() 메서드를 사용하세요.
Kotlin
MobileAds.setAppMuted(true)
자바
MobileAds.setAppMuted(true);
기본적으로 앱 볼륨은 1 (현재 기기 볼륨)로 설정되며 앱은 음소거되지 않습니다.
네이티브 광고
숨기기 설정을 제어하는 방법은 VideoOptions을 참고하세요. 네이티브 광고에는 맞춤 볼륨 제어가 지원되지 않습니다.
쿠키에 대한 동의
앱에 특별한 요구사항이 있는 경우 SharedPreferencesgad_has_consent_for_cookies를 설정할 수 있습니다. SDK는 gad_has_consent_for_cookies 환경설정이 0으로 설정된 경우 제한적인 광고 (LTD)를 사용 설정합니다.
Kotlin
valsharedPrefs=PreferenceManager.getDefaultSharedPreferences(context)// Set the value to 0 to enable limited ads.sharedPrefs.edit().putInt("gad_has_consent_for_cookies",0).apply()
Java
Contextactivity=getActivity();SharedPreferencessharedPreferences=PreferenceManager.getDefaultSharedPreferences(activity);// Set the value to 0 to enable limited ads.sharedPreferences.edit().putInt("gad_has_consent_for_cookies",0).apply();
[null,null,["최종 업데이트: 2025-08-31(UTC)"],[[["\u003cp\u003eThe \u003ccode\u003eMobileAds\u003c/code\u003e class provides global settings for the Google Mobile Ads SDK, including video ad volume and consent for cookies.\u003c/p\u003e\n"],["\u003cp\u003eYou can control video ad volume by setting the app volume relative to the device volume using \u003ccode\u003eMobileAds.setAppVolume()\u003c/code\u003e and muting with \u003ccode\u003eMobileAds.setAppMuted()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhen app volume is reported as muted or 0, video ads ineligible to be shown muted may not be returned, potentially limiting ad serving.\u003c/p\u003e\n"],["\u003cp\u003eFor native ads, video mute settings are controlled through \u003ccode\u003eVideoOptions\u003c/code\u003e, and custom volume control is not supported.\u003c/p\u003e\n"],["\u003cp\u003eTo enable limited ads due to specific consent requirements, set the \u003ccode\u003egad_has_consent_for_cookies\u003c/code\u003e SharedPreferences value to 0.\u003c/p\u003e\n"]]],[],null,["Select platform: [Android](/ad-manager/mobile-ads-sdk/android/global-settings \"View this page for the Android platform docs.\") [iOS](/ad-manager/mobile-ads-sdk/ios/global-settings \"View this page for the iOS platform docs.\") [Unity](/ad-manager/mobile-ads-sdk/unity/global-settings \"View this page for the Unity platform docs.\")\n\n\u003cbr /\u003e\n\nThe `MobileAds` class provides global settings for Google Mobile Ads SDK.\n\nVideo ad volume control\n\nIf your app has its own volume controls (such as custom music or sound effect\nvolumes), disclosing app volume to Google Mobile Ads SDK allows video ads to\nrespect app volume settings. This ensures users receive video ads with the\nexpected audio volume.\n\nThe device volume, controlled through volume buttons or OS-level volume slider,\ndetermines the volume for device audio output. However, apps can independently\nadjust volume levels relative to the device volume to tailor the audio\nexperience. For app open, banner, interstitial, rewarded, and rewarded\ninterstitial ad formats, you can report the relative app volume to the SDK\nthrough the static `setAppVolume()` method. Valid ad volume values range from\n`0.0` (silent) to `1.0` (current device volume). Here's an example of how to\nreport the relative app volume to the SDK: \n\nKotlin \n\n override fun onCreate(savedInstanceState: Bundle?) {\n super.onCreate(savedInstanceState)\n\n val backgroundScope = CoroutineScope(Dispatchers.IO)\n backgroundScope.launch {\n // Initialize Google Mobile Ads SDK on a background thread.\n MobileAds.initialize(this@MainActivity) {}\n \n // Set app volume to be half of current device volume.\n MobileAds.setAppVolume(0.5f)\n }\n }\n\nJava \n\n @Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n new Thread(\n () -\u003e {\n // Initialize Google Mobile Ads SDK on a background thread.\n MobileAds.initialize(this, initializationStatus -\u003e {});\n \n // Set app volume to be half of current device volume.\n MobileAds.setAppVolume(0.5f);\n })\n .start();\n }\n\nTo inform the SDK that the app volume has muted, use the `setAppMuted()`\nmethod: \n\nKotlin \n\n MobileAds.setAppMuted(true)\n\nJava \n\n MobileAds.setAppMuted(true);\n\nBy default, the app volume is set to `1` (the current device volume), and the\napp is not muted.\n| **Note:** Video ads that are ineligible to be shown with muted audio are not returned for ad requests made when the app volume is reported as muted or set to a value of `0`. This may restrict a subset of the broader video ads pool from serving.\n\nNative ads\n\nSee\n[`VideoOptions`](/ad-manager/mobile-ads-sdk/android/native/video-ads#videooptions)\nfor instructions on how to control the mute settings. Custom volume control is\nnot supported for native ads.\n\nConsent for cookies\n\nIf your app has special requirements, you can set the optional\n[`SharedPreferences`](//developer.android.com/reference/android/content/SharedPreferences)\n`gad_has_consent_for_cookies`. The SDK will enable\n\n[limited ads (LTD)](//support.google.com/admanager/answer/9882911)\n\nwhen the `gad_has_consent_for_cookies` preference is set to zero. \n\nKotlin \n\n val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context)\n // Set the value to 0 to enable limited ads.\n sharedPrefs.edit().putInt(\"gad_has_consent_for_cookies\", 0).apply()\n\nJava \n\n Context activity = getActivity();\n SharedPreferences sharedPreferences =\n PreferenceManager.getDefaultSharedPreferences(activity);\n // Set the value to 0 to enable limited ads.\n sharedPreferences.edit().putInt(\"gad_has_consent_for_cookies\", 0).apply();"]]