android / privacy-sandbox-samples

Apache License 2.0
130 stars 52 forks source link

Topics API is not available on UpsideDownCakePrivacySandbox emulator #71

Closed landyrev closed 1 year ago

landyrev commented 1 year ago

Hey! I'm trying to launch the TopicsJava sample app on emulator running on UpsideDownCakePrivacySandbox (dev-preview-main branch), but keep getting the Service is not available error (similar to the #61 issue)

Privacy sandbox is enabled on device (using the adb shell am start -n com.google.android.adservices.api/com.android.adservices.ui.settings.activities.AdServicesSettingsMainActivity command)

PPAPI enabled, signature_allow_list set to *, disable_topics_enrollment_check set to true

cshmerling commented 1 year ago

Sorry for the delayed response- missed this!

In addition to the prep work you mentioned above, can you try running the following set of commands:

adb shell device_config set_sync_disabled_for_tests persistent adb shell device_config put adservices ppapi_app_allow_list \"\*\"
adb shell device_config put adservices ppapi_app_signature_allow_list \"\*\"
adb shell device_config put adservices adservice_system_service_enabled true
adb shell device_config put adservices adservice_enabled true
adb shell device_config put adservices adservice_enable_status true
adb shell device_config put adservices global_kill_switch false
adb shell device_config put adservices topics_kill_switch false

This should set your device in the right configuration to use the Topic API.

Let me know if you are still not able to call Topics after the above.

cshmerling commented 1 year ago

Closing this issue since its been open awhile with no updates. Let us know if you have any more issues!