public abstract class TopicsManager


TopicsManager provides APIs for App and Ad-Sdks to get the user interest topics in a privacy preserving way.

Summary

Public methods

abstract @NonNull GetTopicsResponse
@RequiresPermission(value = "android.permission.ACCESS_ADSERVICES_TOPICS")
getTopics(@NonNull GetTopicsRequest request)

Return the topics.

static final TopicsManager

Creates TopicsManager.

Public methods

getTopics

@RequiresPermission(value = "android.permission.ACCESS_ADSERVICES_TOPICS")
public abstract @NonNull GetTopicsResponse getTopics(@NonNull GetTopicsRequest request)

Return the topics.

Parameters
@NonNull GetTopicsRequest request

The GetTopicsRequest for obtaining Topics.

Returns
@NonNull GetTopicsResponse

GetTopicsResponse

Throws
java.lang.SecurityException

if caller is not authorized to call this API.

kotlin.IllegalStateException

if this API is not available.

android.os.LimitExceededException

if rate limit was reached.

obtain

Added in 1.0.0
public static final TopicsManager obtain(@NonNull Context context)

Creates TopicsManager.

Returns
TopicsManager

TopicsManagerCompat object. If the device is running an incompatible build, the value returned is null.