Skip to content

隐私设置

隐私合规

设置个性化推荐开关状态

typescript
sigmob.personalizedAdvertising(state: sig.PersonalizedAdvertising);
typescript
	/**
   * 个性化状态
   */
  export enum PersonalizedAdvertising {
    on = 0, // 开启
    off = 1, // 关闭
  }

开发者可以通过自定义隐私设备信息,来控制位置信息的获取和广告标识符OAID的获取

typescript
export class SIGCustomPrivacyController {

  /**
   * 是否允许SDK主动使用地理位置信息
   * @return true可以获取,false禁止获取。默认为true
   */
  isCanUseLocation();

  /**
   * isCanUseLocation=false时,可传入地理位置信息
   * @returns 地理位置信息SGLocation
   */
  getLocation(): sig.Location;

  /**
   * 是否可以使用oaid
   * @returns true: 可以使用;false: 不可以使用
   */
  isCanUseAppTrackingConsent(): boolean;


  /**
   * isCanUseOaid=false时,开发者可以传入oaid
   *
   * @return oaid
   */
  async getDevOaid(): Promise<string>;
}