android / privacy-sandbox-samples

Apache License 2.0
135 stars 55 forks source link

Different API names on doc Protected App Signals Overview #113

Closed shen714 closed 2 months ago

shen714 commented 3 months ago

Hi,

I was reading some docs and code for Protect App Signals API and found that the API description is different from Protected App Signals to support relevant app install ads and other relevant docs.

For example,

  1. To add a new signal, the doc said we should use fetchSignalUpdates(), but on the developer doc it should be ProtectedSignalsManager#updateSignals().
  2. The doc mentions that inside the ad retrieval service, the adtech should provide a UDF getCandidateAds(), but i couldn't find any other reference to this API.

Wondering if the doc is not updated yet. Which doc should we take as ground truth for the PAS flow? Thanks!

cshmerling commented 2 months ago

Thanks for the feedback. Generally, we publish the "Overview" pages as the API is initially being designed, so these pages are treated more as a design proposal. The "Developer guides" come when there is actually some code people can write and implement against. We tend to not make edits or updates to the design proposals, and to that end they can become out of date in terms of API names or signatures. Developer guides and sample apps are going to serve more as the reference documentation in this case.

For your specific questions:

  1. updateSignals() is the name of the API as implemented in the SDK.
  2. That title is also outdated. The UDF that you will need to implement is the prepareDataForAdRetrieval UDF, which should generate an output that can be passed to the Ad Retrieval service to retrieve the candidate ads. This is an area we are working to improve the documentation for.

Let me know if you have any more questions!

cshmerling commented 2 months ago

I'm going close this due to inactivity, but please let us know if you have further questions