How to Include Advertising in Games on Xiaomi Phones: A Complete Guide

Advertising in mobile games has become an integral part of monetization for developers, and for Xiaomi users, a way to get bonuses or free content. MIUI Often there are problems with displaying advertising blocks: they are either not shown at all or they work with interruptions, this is due to the peculiarities of system optimization, aggressive management of background processes and restrictions for advertising. SDK.

In this article, we’ll look at all the ways you can turn on ads in games on Xiaomi smartphones, from basic settings to advanced developer techniques, how to set up a system to properly display banners, videos and interstitial ads, and what tools to use for testing, and focus on problems with Google AdMob, Unity Ads and other popular platforms.

If you are a developer, here you will find the technical details on integration. SDK circumvention MIUI. If you are a user who wants to see ads in games (for example, to receive a reward), we will tell you how to set up your phone so that banners and videos are shown consistently, and also touch on the issue of legality and security, because some β€œsolutions” from the Internet can harm the device.

Why is it that ads are not shown in Xiaomi games?

Ad display problems on Xiaomi are usually due to three key factors:

  1. Optimization MIUI β€” The system aggressively closes the background processes, including advertising SDK, It's a way of saving battery, and it causes requests for impressions to just not reach the servers.
  2. Restrictions on Advertising Identifiers β€” MIUI Can block application access to Advertising ID, What is critical for targeted advertising.
  3. Regional restrictions – some ad networks (such as Facebook Audience Network) may not work in certain countries or require additional settings.

In addition, on devices with MIUI Functions such as Security are often activated β†’ Battery Optimization or Permissions β†’ Auto-runs that interfere with the normal operation of the ad modules, even if the game itself is running, SDK Banner displays may be blocked.

⚠️ Note: If you use custom firmware (such as LineageOS or Pixel Experience), the problems may be due to the lack of Google Play services or the malfunction of Google Play Services. β†’ Annexes β†’ Application management.

Another common reason is an outdated version of the advertising SDK. For example, if the game uses AdMob versions 2020 This may conflict with the latest updates. MIUI 14/15. Developers should keep an eye on the relevance of libraries, and users should keep an eye on game updates.

Basic settings MIUI for proper advertising

Before digging deep into the technical details, check the basic system settings that can block ads:

β˜‘οΈ Checklist before setting up the advertisement

Done: 0 / 5

Let us consider each item in more detail.

1. Disabling battery optimization

Go to Settings. β†’ Battery and productivity β†’ Battery optimization. Find your game in the list and select No Limits.This will prevent forced closure of background processes, including advertising modules.

Authorization of auto-start

B Settings β†’ Annexes β†’ Application management β†’ [Name of game] β†’ Auto-run: Enable the option. This will allow the game to run the necessary services when the system starts.

3. Background activity resolution

In the same game settings (Settings) β†’ Annexes β†’ [Game] find the Background Activity item and allow it. This is critical for displaying interstitial ads (full-screen banners between levels).

4. Access to the advertising identifier (Advertising) ID)

Some games require access to Advertising ID to serve targeted advertising, to allow it to be:

  1. Go to Settings β†’ Google β†’ Advertising.
  2. Make sure that the optimisation option is enabled.
  3. Go back to the game settings and in the Permissions section find Other permissions β†’ Access to the advertising identifier.

If the option is missing, the game does not request this identifier, and the problem lies in another.

5. Update to Google Play Services

An outdated version of Google Play Services is a common cause of disruptions in AdMob and other ad networks.

  1. Open the Google Play Store.
  2. In the search, type in Google Play Services.
  3. If you have an update button, press it.
πŸ“Š What Advertising Networks Are Most Used in Games?
Google AdMob
Unity Ads
AppLovin
IronSource
Another.

Advertising for Developers: Integration SDK

If you are a developer and are facing problems displaying ads on Xiaomi devices, follow these guidelines:

1. Use current versions SDK

Older libraries conflict with the latest versions MIUI. Minimum requirements for 2026:

  • πŸ“Œ Google Mobile Ads SDK β€” version 22.0.0 or later.
  • πŸ“Œ Unity Ads – version 4.7.0+.
  • πŸ“Œ AppLovin MAX β€” version 11.5.0+.

Update. SDK For example, for AdMob, build.gradle should be:

implementation 'com.google.android.gms:play-services-ads:22.6.0'

2. Setting up AndroidManifest.xml

Add the following permissions and activities to the manifesto:

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


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





<!-- For AdMob -->




<meta-data




android:name="com.google.android.gms.ads.APPLICATION_ID"




android:value="ca-app-pub-XXXXXXXXXXXXXXXX~YYYYYYYYYY"/>

Replace. XXXX... on your real-life AdMob App ID.

3. Testing on Xiaomi devices

When testing, use real devices, not emulators. Xiaomi is especially important:

  • πŸ” Test on MIUI 14/15 (latest).
  • πŸ” Check when the battery optimization is enabled (as most users do not turn it off).
  • πŸ” Use test ad units (for example, for AdMob there are special test units) ID).

Example of test banner ID for AdMob:

ca-app-pub-3940256099942544/6300978111

4. Handling Advertising Loading Errors

Add to the code the handling of typical errors for Xiaomi:

  • 🚫 ERROR_CODE_NO_FILL β€” No ads available (check targeting).
  • 🚫 ERROR_CODE_NETWORK_ERROR β€” Internet problems (only MIUI background traffic may be blocked).
  • 🚫 ERROR_CODE_INTERNAL_ERROR β€” conflict with system optimization.

Example of code for AdMob:

adView.setAdListener(new AdListener() {


@Override




public void onAdFailedToLoad(@NonNull LoadAdError error) {




Log.e("AdMob", "Error: " + error.getMessage());




// Re-boot attempt after 5 seconds




new Handler(Looper.getMainLooper()).postDelayed(() -> {




adView.loadAd(new AdRequest.Builder().build());




}, 5000);




}




});

πŸ’‘

If the ad does not show on Xiaomi, but works on other devices, add logging errors with the device model (Build.MODEL) and version to the code. MIUI (MiuiVersion.getVersionName() This will help identify patterns.

Problems with specific advertising networks

Different advertising platforms behave differently on Xiaomi, and let's take a look at the most popular and their features.

Advertising networkTypical problems on XiaomiDecision
Google AdMobBanners are not loaded, an error NO_FILLUpdate SDK 22.0.0+, disable battery optimization, check regional targeting
Unity AdsVideo ads are not played, black screenEnable hardware acceleration in game settings, update Unity to 2022 LTS
AppLovin MAXLow fill rate (less than 50%)Add backup networks (waterfall), check mediation settings
IronSourceThe initialization error INITIALIZATION_ERRORCheck it out. AndroidManifest.xml All required activities are available
Facebook Audience NetworkIt does not work in some regions (for example, Russia)Use proxy or alternative networks

For Unity Ads on Xiaomi, it often helps to force hardware acceleration to turn on. AndroidManifest.xml:

<application android:hardwareAccelerated="true" ...>

If you use AppLovin MAX, Make sure that backup networks (such as AdMob or Unity Ads) are added to the mediation settings, as MIUI Fill rate may fall due to blocking background requests.

⚠️ Note: If you are targeting users from China, consider that Xiaomi devices are for the Chinese market (e.g. Redmi Note 12 Pro).+ 5G firmware CN-Google Play Services may not be available in the region, and use alternative ad networks such as Baidu Mobile Ads or Tencent Ads.

How do you turn on ads in games (if they are not shown)?

If you are a player and want to see ads (for example, to receive in-game currency), but banners or videos are not loaded, follow the following steps:

1. Checking the Internet connection

Advertising requires a stable Internet, and Xiaomi can include Background Traffic Limitation:

  1. Go to Settings. β†’ SIM-maps and mobile networks β†’ Transfer of data β†’ Limiting background traffic.
  2. Make sure the game is not on the list of limited apps.

2. Resetting advertising settings

Sometimes it helps to reset the advertising ID:

  1. Open Settings β†’ Google β†’ Advertising.
  2. Click Reset Advertising ID.
  3. Reset the device.

3. Clean up the game's cache and Google Play Services

A cluttered cache can interfere with the loading of ads:

  1. Go to Settings β†’ Applications β†’ Application Management.
  2. Find the game and click Clear Cache.
  3. Repeat for Google Play Services and Google Play Store.

4. Verification of regional restrictions

Some games only show ads in certain countries. VPN, try:

  • 🌍 Shut down. VPN check the advertising work.
  • 🌍 If the game requires a specific region (e.g., the United States), set up the game. VPN this country before the game launches.

Also check your device language settings: Some ad networks (such as AdMob) may not show ads if the system language is not the same as the targeting.

5. Re-installation of the game

If nothing helps:

  1. Delete the game.
  2. Reboot the phone.
  3. Install the game again from the Google Play Store (not through the Google Play Store) APK).
What if the advertisement is shown but does not give a reward?
Sometimes the problem is not the device, but the game itself. Check: - Is the game's adblock disabled (some games block rewards if they detect modified traffic). - Is the game version current (update it). - Is the promotional offer expired (for example, the bonus for watching videos can only be valid once a day).

Alternative ways to monetize developers

If Xiaomi ads are not working well, consider alternative monetization models:

  • πŸ’° Paid content (IAP) β€” Selling skins, levels or premium features through Google Play Billing.
  • 🎁 Affiliate programs – integration with services like Tapjoy or Fyber, where users complete reward-based tasks.
  • πŸ“Š Sponsored content – placement of branded levels or items (for example, in Subway Surfers, sponsored boards are often found).
  • πŸ”„ Hybrid model – a combination of advertising with paid features (for example, advertising is shown to those who did not buy a premium).

Xiaomi is particularly interested in integrating with Chinese payment systems (such as Alipay or WeChat Pay) if you target the Asian market, and you can also consider a subscription model (such as through Google Play Pass).

If you want to leave advertising, but minimize the problems MIUI, Use mediation – connecting multiple ad networks through a single platform (e.g. AppLovin) MAX This will increase the chances of showing up even if one of the networks is blocked.

πŸ’‘

On Xiaomi devices with firmware for the Chinese market (CN-ROM) Google AdMob and other Western ad networks will not work. Use local alternatives or release a separate version of the game for this region.

Security and legality: what can’t be done?

In an effort to include ads, some users resort to dangerous methods that could harm the device or violate Google Play’s rules:

⚠️ Note: Never use: - Modified APK (hacked versions of games with disabled ads) – this violates the terms of use and may contain viruses. – Fake clicks on advertising – this leads to a ban of an account in AdMob or another network. – Change system files MIUI (for example, /system/app/MiuiDaemon) β€” This violates the integrity of the firmware and can lead to a device brique.

Also avoid:

  • 🚫 Disabling Google services through adb – it breaks the work of many applications.
  • 🚫 Using unofficial firmware for advertising alone does not guarantee results, but increases the risk of losing data.
  • 🚫 Advertising substitutions ID β€” This violates Google Play policy and may result in a device ban.

If you are a developer, don’t try to cheat the impression system (for example, through click-fraud or impregnated fraud).Google AdMob and other networks use advanced fraud detection algorithms, and your account can be blocked without right of appeal.

Legal ways to increase your ad impressions on Xiaomi:

  • βœ… Optimize targeting for the user region.
  • βœ… Use mediation to increase the fill rate.
  • βœ… Test the game on real Xiaomi devices before release.

FAQ: Frequent questions about advertising in games on Xiaomi

Why is there no advertising in the game, even though the Internet is available and everything is set up?
Probable reasons: The game uses an outdated version of the advertising SDK. The device has battery optimization enabled for the game. The ad network does not support your region (check targeting). = Solution: Try another ad game (e.g. Candy Crush) – if it shows ads, the problem is in the particular game.
Can I include ads on Xiaomi without Google services?
Yes, but with limitations: Use games with integrated alternative networks (like AppLovin for China); some games show their own ads (like cross-promoting other projects of the same developer); on devices without Google Play Services (like Xiaomi for China), AdMob ads will not work.
How to check if it is blocking MIUI jingle?
Diagnostics: Install the AdMob Mediation Test Suite from Google Play and check the test banners. Connect the device to Android Studio and look for logs for errors like No fill or Network error. Try the same game on another device (not Xiaomi) - if the ads there work, the problem is the firmware.
Which Xiaomi models block ads the most?
Problems are more common in: Poco F3/F4/F5 (because of aggressive battery optimization. - Redmi Note 10/11/12 (popular models with a large number of custom firmware. Xiaomi 12/13/14 (flagships with strict limitations for background processes. MIUI For China (no Google Play Services), Poco and Black Shark (gaming smartphones) tend to be more stable due to less aggressive optimization.
Can I make money by watching ads in games on Xiaomi?
Technically yes, but: Most applications give meager amounts (e.g. 0.01)$ Some services (such as Mistplay or Cash’App) pay for gaming activity but require proof of identity; Xiaomi may have lower revenue than other devices because of its ad impression problems. Beware of fraudulent apps that promise big earnings – they can steal data or show hidden ads.