Upgrade to Pro — share decks privately, control downloads, hide ads and more …

privacysandbox

ymsk11
June 09, 2023
420

 privacysandbox

社内LT会の資料です

ymsk11

June 09, 2023
Tweet

Transcript

  1. 10 things to know about the Privacy Sandbox on
    Android
    https://io.google/2023/program/fc59358a-e959-42e8-8043-93775cfd7191

    View full-size slide

  2. この動画で話されていたこと
    Recap What's New! How to get Involved!
    Status update Beta and Jetpack As an ad tech
    Partner Feedback SDK Extensions As an app developer
    SDK Runtime
    SDK Shim Library
    APP <> Web
    Measurement
    Measurement
    Simulation Libary
    Topics Classifier Colab

    View full-size slide

  3. SDK Runtime
    https://developer.android.com/design-for-safety/privacy-sandbox/sdk-runtime

    View full-size slide

  4. Beta and Jetpack
    Developer Preview と同時に、Privacy Sandbox Beta が
    リリース
    Jetpack ライブラリを利用して、Privacy Sandbox を利
    用することができる

    View full-size slide

  5. PrivacySandboxKotlin
    https://github.com/android/privacy-sandbox-samples
    jetpack-main branch
    試した環境
    Android Studio Hedgehog | 2023.1.1 Canary 4
    https://github.com/android/privacy-sandbox-
    samples/issues/43
    Android 14 Beta / Emulator TiramisuPrivacySandbox

    View full-size slide

  6. Load SDK
    mSdkSandboxManager.loadSdk(
    SDK_NAME, Bundle(), { obj: Runnable -> obj.run() }, callback
    )
    Request WebView
    mSdkSandboxManager.requestSurfacePackage(
    SDK_NAME, params, { obj: Runnable -> obj.run() }, RequestSurfacePackageCallbackImpl()
    )
    https://github.com/android/privacy-sandbox-
    samples/blob/a138f15fdaabe914d16c955a610fd798436e8d
    a3/PrivacySandboxKotlin/client-
    app/src/main/java/com/example/client/MainActivity.kt

    View full-size slide

  7. SDK Extensions
    Android 10 以降で、一部のAndroid System Componentがモジュール化
    通常のAndroid リリースサイクル以外で更新が可能
    SDK Extensionを使用して Privacy Sandboxにアクセスすることが可能

    View full-size slide

  8. SdkSandboxManager
    https://developer.android.com/design-for-safety/privacy-
    sandbox/reference/sdksandbox/SdkSandboxManager

    View full-size slide

  9. Privacy Sandbox に SDK Extensions 経由でアクセスす

    build.gradle
    android {
    compileSdk = 33
    compileSdkExtension = 5
    }
    端末の SDK Extensions のバージョンをチェック
    SdkExtensions.getExtensionVersion(SdkExtensions.AD_SERVICES) >= 3

    View full-size slide

  10. Topics Classifier Colab
    https://github.com/privacysandbox/android-topics-
    classifier
    アプリからトピックを分類するデモ

    View full-size slide

  11. Beta and Jetpack
    SDK Extensions
    SDK Runtime
    Topics Classifier Colab

    View full-size slide