AppSetIdManager
public
class
AppSetIdManager
extends Object
| java.lang.Object | |
| ↳ | android.adservices.appsetid.AppSetIdManager |
AppSetIdManager 可為應用程式和廣告 SDK 提供用於存取 appSetId 的 API,適用於非營利用途。
摘要
公用方法 | |
|---|---|
static
AppSetIdManager
|
get(Context context)
建立 AppSetIdManager 執行個體的工廠方法。 |
void
|
getAppSetId(Executor executor, OutcomeReceiver<AppSetId, Exception> callback)
擷取 AppSetId。 |
繼承方法 | |
|---|---|
公用方法
get
public static AppSetIdManager get (Context context)
建立 AppSetIdManager 執行個體的工廠方法。
| 參數 | |
|---|---|
context |
Context:要使用的 Context
此值不能為 null。 |
| 傳回 | |
|---|---|
AppSetIdManager |
AppSetIdManager 執行個體
此值不能為 null。 |
getAppSetId
public void getAppSetId (Executor executor, OutcomeReceiver<AppSetId, Exception> callback)
擷取 AppSetId。
| 參數 | |
|---|---|
executor |
Executor:執行回呼的執行程式。
此值不能為 null。
回呼和事件監聽器事件會透過這個
Executor,可讓您輕鬆控制
如何透過應用程式的主執行緒分派事件
可以使用
Context.getMainExecutor()。
否則,請提供會調度至適當執行緒的 Executor。 |
callback |
OutcomeReceiver:在 appsetid 可使用或發生錯誤後呼叫的回呼。
此值不能為 null。 |
| 傳回 | |
|---|---|
void |
此值不能為 null。 |
| 擲回 | |
|---|---|
IllegalStateException |
如果這個 API 無法使用 |