সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# SdkSandboxActivityHandler\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [Ad Services Extensions 7](/sdkExtensions) \n\nSdkSandboxActivityHandler\n=========================\n\n\n`\npublic\n\n\ninterface\nSdkSandboxActivityHandler\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------------------------|\n| android.app.sdksandbox.sdkprovider.SdkSandboxActivityHandler |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nThis is used to notify the SDK when an [Activity](/reference/android/app/Activity) is created for it.\n\nWhen an SDK wants to start an [Activity](/reference/android/app/Activity), it should register an implementation of this\nclass by calling [SdkSandboxController.registerSdkSandboxActivityHandler(android.app.sdksandbox.sdkprovider.SdkSandboxActivityHandler)](/design-for-safety/privacy-sandbox/reference/sdksandbox/sdkprovider/SdkSandboxController#registerSdkSandboxActivityHandler(android.app.sdksandbox.sdkprovider.SdkSandboxActivityHandler)) that will\nreturn an [IBinder](/reference/android/os/IBinder) identifier for the registered [SdkSandboxActivityHandler](/design-for-safety/privacy-sandbox/reference/sdksandbox/sdkprovider/SdkSandboxActivityHandler) to The SDK.\n\nThe SDK should be notified about the [Activity](/reference/android/app/Activity) creation by calling [onActivityCreated(android.app.Activity)](/design-for-safety/privacy-sandbox/reference/sdksandbox/sdkprovider/SdkSandboxActivityHandler#onActivityCreated(android.app.Activity)) which happens when the caller app calls\n[SdkSandboxManager.startSdkSandboxActivity(Activity, IBinder)](/design-for-safety/privacy-sandbox/reference/sdksandbox/SdkSandboxManager#startSdkSandboxActivity(android.app.Activity,%20android.os.IBinder)) using\nthe same [IBinder](/reference/android/os/IBinder) identifier for the registered [SdkSandboxActivityHandler](/design-for-safety/privacy-sandbox/reference/sdksandbox/sdkprovider/SdkSandboxActivityHandler).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onActivityCreated](/design-for-safety/privacy-sandbox/reference/sdksandbox/sdkprovider/SdkSandboxActivityHandler#onActivityCreated(android.app.Activity))`(`[Activity](/reference/android/app/Activity)` activity) ` Notifies SDK when an [Activity](/reference/android/app/Activity) gets created. |\n\nPublic methods\n--------------\n\n### onActivityCreated\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [Ad Services Extensions 7](/sdkExtensions) \n\n```\npublic abstract void onActivityCreated (Activity activity)\n```\n\nNotifies SDK when an [Activity](/reference/android/app/Activity) gets created.\n\nThis function is called synchronously from the main thread of the [Activity](/reference/android/app/Activity) that is\ngetting created.\n\nSDK is expected to call [Activity#setContentView(View)](/reference/android/app/Activity#setContentView(android.view.View)) to the passed [Activity](/reference/android/app/Activity) object to populate the view.\n\nIf SDK registers lifecycle callbacks over the passed [Activity](/reference/android/app/Activity) object using [Activity.registerActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks)](/reference/android/app/Activity#registerActivityLifecycleCallbacks(android.app.Application.ActivityLifecycleCallbacks)), it is important to note that [Application.ActivityLifecycleCallbacks.onActivityPreCreated(Activity, Bundle)](/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPreCreated(android.app.Activity,%20android.os.Bundle))\nand [Application.ActivityLifecycleCallbacks.onActivityCreated(Activity, Bundle)](/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityCreated(android.app.Activity,%20android.os.Bundle)) will not be triggered as [onActivityCreated(android.app.Activity)](/design-for-safety/privacy-sandbox/reference/sdksandbox/sdkprovider/SdkSandboxActivityHandler#onActivityCreated(android.app.Activity)) is called at the\n[Activity](/reference/android/app/Activity) creation stage. Then to know about the Activity state, SDKs should override\n[Application.ActivityLifecycleCallbacks.onActivityPostCreated(Activity, Bundle)](/reference/android/app/Application.ActivityLifecycleCallbacks#onActivityPostCreated(android.app.Activity,%20android.os.Bundle)).\n\n\u003cbr /\u003e\n\n| Parameters ||\n|------------|--------------------------------------------------------------------------------------------------------------|\n| `activity` | `Activity`: the [Activity](/reference/android/app/Activity) gets created This value cannot be `null`. \u003cbr /\u003e |"]]