2. SDK 초기화 및 구현
1. MainActivity 클래스
public class MainActivity extends FlutterFragmentActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
}2. Initialize 클래스
AdWhaleMediationAds 클래스
void initialize()초기화 샘플코드
void main() {
WidgetsFlutterBinding.ensureInitialized();
AdWhaleMediationAds.instance.initialize();
runApp(const MyApp());
}3. GDPR, COPPA설정
AdWhaleMediationAds 클래스
파라미터 타입
파라미터 값
bool
true : gdpr 동의 false : gdpr 비동의
파라미터 타입
파라미터 값
bool
true : coppa 동의 false : coppa 비동의
초기화 샘플코드
에러 메시지
TIME_OUT (WebView 로 consent form 을 불러오는 데 시간이 너무 오래 걸려 발생 또는 네트워크 연결에 실패한 경우)
Web view timed out
Timed out while loading consent form
INTERNET_ERROR (네트워크 연결이 없거나, 요청이 서버까지 도달하지 못한 경우)
Failed to load consent form due to network error
No internet connection
INTERNAL_ERROR (SDK 내부 로직이나 예외적인 상황에서 발생. 드물게 WebView 초기화 실패 등에서도 볼 수 있음)
Internal error
An unexpected error occurred while loading the consent form
INVALID_OPERATION (아직 load 되지 않은 폼을 show 하려 하거나, 이미 표시 중인데 다시 show 호출했을 때 발생)
Invalid operation. Consent form already showing
Invalid operation: Consent form not ready
Last updated