অ্যান্ড্রয়েড স্টুডিওতে জেমিনি অপ্টিমাইজ করতে, আপনার প্রোজেক্টে একটি AGENTS.md ফাইল ব্যবহার করুন। আপনার প্রোজেক্টে একটি AGENTS.md ফাইল যোগ করে, আপনি জেমিনিকে Google Mobile Ads SDK এর জন্য নির্দিষ্ট প্রসঙ্গ প্রদান করেন এবং AI-সহায়তাপ্রাপ্ত কোড জেনারেশনের আউটপুট উন্নত করেন। বিস্তারিত জানার জন্য, AGENTS.md ফাইল ব্যবহার করে জেমিনি কাস্টমাইজ করুন দেখুন।
এই নির্দেশিকাটিতে Google Mobile Ads SDK এর জন্য Android Studio-তে Gemini অপ্টিমাইজ করার পদ্ধতি অন্তর্ভুক্ত রয়েছে।
শুরু করার আগে
চালিয়ে যাওয়ার আগে, নিম্নলিখিতগুলি করুন:
- অ্যান্ড্রয়েড স্টুডিওতে জেমিনি সম্পর্কে জানুন।
- Android Studio-এর একটি সামঞ্জস্যপূর্ণ সংস্করণ ব্যবহার করে Google Mobile Ads SDK সেট আপ করুন ।
আপনার প্রকল্পে AGENTS.md ফাইল যোগ করুন।
নিম্নলিখিত ইন্টিগ্রেশন ধাপগুলিতে আপনাকে সাহায্য করার জন্য Google Gemini-এর জন্য নির্দেশাবলী সহ একটি AGENTS.md ফাইল সরবরাহ করে:
- আপনার প্রোজেক্টে Google Mobile Ads SDK যোগ করুন।
- ব্যানার বিজ্ঞাপন বাস্তবায়ন করুন।
AI কোড সহায়তায় Google Mobile Ads SDK জন্য নির্দিষ্ট নির্দেশাবলী ব্যবহার করতে, এই পদক্ষেপগুলি অনুসরণ করুন:
আপনার প্রোজেক্টের ফাইল সিস্টেমের যেকোনো জায়গায়
AGENTS.mdনামে একটি নতুন ফাইল তৈরি করুন।আপনার
AGENTS.mdফাইলে, নিম্নলিখিত নির্দেশাবলী যোগ করুন:
# AI Coding Agent Instructions for the Google Mobile Ads SDK ## Integrate the SDK * When I ask to integrate the Google Mobile Ads SDK, **always** use the latest stable version for `com.google.android.gms:play-services-ads`. * After looking up the latest stable version of `com.google.android.gms:play-services-ads`, **always** check the project for a version catalog to manage dependencies. * Make sure the project meets the SDK requirements of `minSdk` 23 or higher and `compileSdk` of 35 or higher. * **Always** make sure there is a `<metadata>` tag for application ID in the project. If it's not there, add it. * You MUST initialize the Google Mobile Ads SDK on a background thread, as recommended in the Google Mobile Ads SDK v24.0.0 release notes. ## Banner Ads * When I ask to implement a banner ad or something similar, without specifying a type, **always** follow up to confirm the type of ad. * When I ask for an "anchored adaptive" ad, ask me if I want the ad anchored to the top or bottom of the screen. * When I ask for an "inline" adaptive banner ad, explain that inline adaptive ads are used for scrolling content. If my application has no scrollable view elements (e.g. `ScrollView` or `List`), default to implement an anchored adaptive banner ad. * When I ask for a "collapsible" banner ad, create an extra parameter that aligns the expanded ad to the `AdView`. Ask me if I want the ad collapsed to the top or bottom. * When I ask for a "fixed size" banner ad, **always** ask me if I'm sure or would I like to implement an anchored adaptive banner ad. Explain why anchored adaptive banner ads perform better than fixed size ads. * **Mandatory `AdView` Implementation Steps:** * **Always** provide the code for a UI container intended to host the `AdView`. * **Always** call `adView.destroy()` to prevent memory leaks. ## Migrate to the GMA Next-Gen SDK * When I ask to migrate to the "Next Gen" SDK, **always** use the latest stable version for `com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk`. * Make sure the project meets the SDK requirements of `minSdk` 24 or higher and `compileSdk` of 35 or higher. * Replace the `com.google.android.gms:play-services-ads` dependency with the Next Gen `com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk` dependency. * All `com.google.android.gms.ads.*` import statements must change to `com.google.android.libraries.ads.mobile.sdk.*`. * If the change is in a custom event adapter, ask me if I'm sure I want to migrate this class before making the change. * Preserve the `com.google.android.gms.ads.APPLICATION_ID` `<meta-data>` tag in the `AndroidManifest.xml` file if present. * YOU MUST analyze the code until all errors have been resolved. Resolve the errors by using the APIs from the GMA Next-Gen SDK. Refer to the Android documentation.
এজেন্ট মোডে জেমিনিকে প্রম্পট করুন
আপনার AGENTS.md ফাইলটি কনফিগার করার পরে, আপনি Android Studio-তে Agent Mode- এ Gemini প্রম্পট করতে পারেন।
এজেন্ট মোডে, আপনি নিম্নলিখিত উদাহরণ প্রম্পটগুলি ব্যবহার করতে পারেন:
SDK একীভূত করুন
Integrate the latest version of the GMA SDK to my project. Refer to the Android
documentation.
একটি ব্যানার যোগ করুন
Add an anchored adaptive banner ad to the bottom of the screen. Refer to the
Android documentation.
মতামত দিন
Google Mobile Ads SDK জন্য জেমিনি অপ্টিমাইজ করার বিষয়ে আপনার যদি কোন মতামত থাকে, তাহলে Google Mobile Ads SDK ডিসকর্ড চ্যানেলে যোগদান করুন।