Android GDPR Guide [KOR] - bidmad/Bidmad-Android GitHub Wiki
유럽사용자 동의 요청(GDPR)
Bidmad와 연동된 AdNetwork SDK에서 제공하는 GDPR(EU 온라인 개인정보보호지침 및 개인정보 보호법)에 대한 Interface를 제공하고 있습니다. Ad Network에 따라 인터페이스가 상이한 부분이 있어 총 두 가지 Interface를 제공하고 있으므로 사용하시는 네트워크에 맞는 Interface를 사용 바랍니다.
*일부 네트워크의 경우 GDPR Interface를 제공하지 않는 경우가 있으므로 GDPR 적용 전에 문의를 부탁 드립니다.
Google GDPR Interface
Google에서는 동의 관리 솔루션으로 User Messaging Platform을 제공하고 있으며, 이 솔루션을 통해 사용자 동의 팝업을 설정하고 사용자에게 동의를 받아 관리할 수 있습니다. Bidmad에서 제공하는 Google GDPR Interface는 UMP SDK에 대한 Wrapper Interface 입니다. Bidmad 이전에 UMP SDK를 통해 Google GDPR을 적용하였다면, Bidmad에서 제공하는 Interface로 변경하여 작업을 하지 않아도 괜찮습니다.
Admob 대시보드 [개인정보보호 및 메시지] > [동의 관리 솔루션 - 유렵 규졍]에서 GDPR 동의 팝업 양식 생성 후 아래 사용법에 따라 사용자 동의 요청을 수행하세요.
-
객체 초기화 및 콜백 리스너 세팅
함수를 호출하고 응답 결과를 받기 위해 객체를 초기화하고 콜백 리스너를 세팅합니다.
GoogleGDPRConsent googleGDPRConsent = new GoogleGDPRConsent(this); //this = Activity
googleGDPRConsent.setListener(new GoogleGDPRListener() {
@Override
public void onConsentInfoUpdateSuccess() {}
@Override
public void onConsentInfoUpdateFailure(FormError formError) {}
@Override
public void onConsentFormLoadSuccess() {}
@Override
public void onConsentFormLoadFailure(FormError formError) {}
@Override
public void onConsentFormDismissed(FormError formError) {}
});
-
최신 동의 정보 요청
동의 정보에 대한 업데이트를 요청하여 사용자의 동의가 필요한지 확인합니다. 성공응답을 받았다면 isConsentFormAvailable를 호출하여 양식에 접근이 가능한지 확인 후 loadForm을 호출하는 것을 권장합니다.
googleGDPRConsent.requestConsentInfoUpdate();
....
@Override
public void onConsentInfoUpdateSuccess() {
// The consent information state was updated.
if(googleGDPRConsent.isConsentFormAvailable()) // You are now ready to check if a form is available.
googleGDPRConsent.loadForm();
}
@Override
public void onConsentInfoUpdateFailure(FormError formError) {
Log.d("GDPR","onConsentInfoUpdateFailure" + formError.getMessage());
}
...
-
양식 불러오기
Funding Choices에서 설정한 양식을 불러옵니다. 성공응답을 받았다면 getConsentStatus를 호출하여 사용자의 동의가 필요한 상태인지 확인한 후 팝업을 띄울것을 권장합니다.
googleGDPRConsent.loadForm();
....
@Override
public void onConsentFormLoadSuccess() {
if(googleGDPRConsent.getConsentStatus() == GoogleGDPRConsent.ConsentStatus.REQUIRED) // If user consent to the GDPR is required.
googleGDPRConsent.showForm();
}
@Override
public void onConsentFormLoadFailure(FormError formError) {
Log.d("GDPR","onConsentFormLoadFailure = " + formError.getMessage());
}
....
-
팝업 띄우기
사용자에게 동의를 받기위해 팝업을 띄웁니다.
googleGDPRConsent.showForm();
....
@Override
public void onConsentFormDismissed(FormError formError) { //FormError Nullable
Log.d("bidmad","onConsentFormDismissed");
if(formError != null)
Log.d("bidmad","FormError = " + formError.getErrorCode());
}
....
*테스트 옵션 테스트가 필요한 경우 setDebug(TEST-DEVICE-HASHED-ID, isEEA)를 호출하여 디버깅 모드를 세팅합니다. TEST-DEVICE-HASHED-ID는 Log에서 확인할 수 있습니다.
UserMessagingPlatform: Use new ConsentDebugSettings.Builder().addTestDeviceHashedId("TEST-DEVICE-HASHED-ID") to set this as a debug device.
reset 함수를 호출하면 테스트 결과를 초기화 할 수 있습니다.
GoogleGDPRConsent googleGDPRConsent = new GoogleGDPRConsent(this); //this = Activity
...
googleGDPRConsent.setDebug("TEST-DEVICE-HASHED-ID", true); //true is EEA, false is not EEA
googleGDPRConsent.reset();
...
googleGDPRConsent.requestConsentInfoUpdate();
GDPR Interface
Google(Admob / Admanager)를 제외한 타 Ad Network에서 제공하는 GDPR Interface에 대한 대응 Interface입니다. 타 Ad Network에서는 광고 요청 시 사용자 동의 결과(동의 / 비동의)에 대한 값을 SDK에 전달하도록 Interface가 구성되어 있으며 Bidmad에서 제공하는 GDPR Interface는 사용자 동의 결과를 각 Ad Network의 SDK에 전달하는 역할을 수행합니다.
GDPR Interface를 사용하고자 하시는 경우 사용자 동의를 받기 위한 팝업을 개발 하신 후 팝업 결과에 따라 GDPR Interface를 호출바랍니다.
Consent consent = new Consent(this, true); // this = context, true is EEA, false is not EEA
consent.setGdprConsent(true); //Set user GDPR consent result
consent.getGdprConsent(); //Get user GDPR consent result, GDPRConsentStatus[YES(1),NO(0),UNKWON(-1),UNUSE(-2)]