컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(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-27(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 |"]]