আরম্ভ এবং বিজ্ঞাপন লোডিং অপ্টিমাইজ করুন

প্ল্যাটফর্ম নির্বাচন করুন: অ্যান্ড্রয়েড ইউনিটি

Starting from Google Mobile Ads (GMA) SDK version 21.0.0, you can enable optimized SDK initialization and ad loading to improve the overall responsiveness of ads and help prevent "Application Not Responding" (ANR) errors on your app. This guide outlines the changes you need to make to enable these optimizations.

আবশ্যকতা

  • Google Mobile Ads SDK সংস্করণ 21.0.0 বা তার উচ্চতর।

আপনার ম্যানিফেস্ট ফাইল আপডেট করুন

There are two optimization flags available: OPTIMIZE_INITIALIZATION and OPTIMIZE_AD_LOADING . Once they're turned on, the initialization and ad loading tasks that require extended processing time are offloaded to background threads.

Follow the instructions below to add the corresponding <meta-data> tags in your app's AndroidManifest.xml file and turn on the flags. Note that you can turn on one or both options in the same app.

Google Mobile Ads SDK ইনিশিয়ালাইজেশন অপ্টিমাইজ করুন

The best way to optimize initialization is to call MobileAds.initialize() on a background thread, as described in the Get Started guide . If you are already doing so, you don't need to enable this flag.

যদি আপনাকে মেইন থ্রেডে মেথডটি কল করতেই হয়, তাহলে নিচের ফ্ল্যাগটি সক্রিয় করলে কিছু ইনিশিয়ালাইজেশন টাস্ক ব্যাকগ্রাউন্ড থ্রেডে চলে যাবে।

<manifest>
  ...
  <application>
      ...
      <meta-data
          android:name="com.google.android.gms.ads.flag.OPTIMIZE_INITIALIZATION"
          android:value="true"/>
  </application>
</manifest>
বিজ্ঞাপন লোডিং অপ্টিমাইজ করুন

নিচের পতাকাটি সমস্ত বিজ্ঞাপন ফর্ম্যাটের জন্য বিজ্ঞাপন লোড কল অপ্টিমাইজ করে:

<manifest>
  ...
  <application>
      ...
      <meta-data
          android:name="com.google.android.gms.ads.flag.OPTIMIZE_AD_LOADING"
          android:value="true"/>
  </application>
</manifest>