android / privacy-sandbox-samples

Apache License 2.0
130 stars 52 forks source link

After registration, the API don't issues http requests to the service endpoint #83

Closed wcftest closed 10 months ago

wcftest commented 11 months ago
  1. I am using the following device: Pixel 6a(Android 14)
  2. I ran all the instructions on this page:https://developer.android.com/design-for-safety/privacy-sandbox/program-overview?version=preview
  3. I am trying to run the demo( https://github.com/android/privacy-sandbox-samples/tree/main/AttributionReporting/MeasurementSampleApp) on my phone and using Charles to capture packets, when I clicked on the "Register Click Event" button, I did not catch requests and there were no related error logs in Logcat. After using the "adb shell cmd jobscheduler run - f com. Google. android. adservices. api" command, I was able to occasionally catch the relevant
  4. After registration, the API don't issues http requests to the service endpoint,Can anyone help me to figure out?
erintwalsh commented 11 months ago

Hi! Some more information would be helpful for debugging. Are you testing on a Developer Preview or Beta release? Which Android API level are you using (33 or 34)? Are you using a physical device or emulator? If you could share more information about the steps you are taking when you try to register a source or trigger, that would also be helpful. Thank you!

wcftest commented 11 months ago

Hi! Some more information would be helpful for debugging. Are you testing on a Developer Preview or Beta release? Which Android API level are you using (33 or 34)? Are you using a physical device or emulator? If you could share more information about the steps you are taking when you try to register a source or trigger, that would also be helpful. Thank you!

erintwalsh commented 11 months ago

Here are a few debugging steps to try:

Each time after calling registerSource or registerTrigger, run this command:

Opt in to receiving verbose debug reports by adding this value to your Attribution-Reporting-Register-Source and Attribution-Reporting-Register-Trigger response headers:

wcftest commented 10 months ago

Here are a few debugging steps to try:

Each time after calling registerSource or registerTrigger, run this command:

  • adb shell cmd jobscheduler run -f com.google.android.adservices.api 20

Opt in to receiving verbose debug reports by adding this value to your Attribution-Reporting-Register-Source and Attribution-Reporting-Register-Trigger response headers:

  • "debug_reporting": true Then check the reports to see if there are any errors in registering source or trigger

Problem solved, thanks for your help