Untuk mendiskusikan dan memberikan masukan tentang produk kami, bergabunglah ke channel Discord Ad Manager resmi di server Komunitas Iklan dan Pengukuran Google.
Class MobileAds menyediakan setelan global untuk Mobile Ads SDK.
Kontrol volume iklan video
Jika aplikasi Anda memiliki kontrol volume sendiri (seperti volume kustom untuk musik atau efek suara), pengungkapan volume aplikasi ke Google Mobile Ads SDK memungkinkan iklan video mematuhi setelan volume aplikasi. Hal ini memastikan pengguna menerima iklan video dengan volume audio yang diharapkan.
Volume perangkat, yang dikontrol melalui tombol volume atau penggeser volume tingkat OS,
menentukan volume output audio perangkat. Namun, aplikasi dapat menyesuaikan tingkat volume secara independen relatif terhadap volume perangkat untuk menyesuaikan pengalaman audio.
Anda dapat melaporkan volume aplikasi relatif ke Google Mobile Ads SDK dengan memanggil
metode SetApplicationVolume(). Nilai volume iklan yang valid berkisar dari 0.0
(senyap) hingga 1.0 (volume perangkat saat ini). Berikut adalah contoh cara melaporkan
volume aplikasi relatif ke SDK:
// Set app volume to be half of current device volume.MobileAds.SetApplicationVolume(0.5f);
Untuk memberi tahu SDK bahwa volume aplikasi telah dibisukan, gunakan metode
SetApplicationMuted():
// Set app to be muted.MobileAds.SetApplicationMuted(true);
Secara default, volume aplikasi disetel ke 1 (volume perangkat saat ini), dan aplikasi tidak dibisukan.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-05 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eMobileAds\u003c/code\u003e class allows you to manage global settings for the Mobile Ads SDK, including video ad volume.\u003c/p\u003e\n"],["\u003cp\u003eYou can control the volume of video ads relative to your app's volume using \u003ccode\u003eSetApplicationVolume()\u003c/code\u003e for a better user experience.\u003c/p\u003e\n"],["\u003cp\u003eMuting or lowering app volume can impact video ad eligibility and potentially reduce ad revenue, so use volume controls judiciously and only when reflecting actual user preferences.\u003c/p\u003e\n"]]],["The `MobileAds` class allows control over video ad volume. Apps with custom volume controls can set the relative app volume using `SetApplicationVolume()` with values from `0.0` (silent) to `1.0` (device volume). Muting the app is possible via `SetApplicationMuted(true)`. Default app volume is `1`, and the app is not muted. Lowering volume or muting reduces video ad eligibility and may lower revenue, thus these APIs should only reflect user volume choices.\n"],null,[]]