2. SDK Integration

Calling functions in activity lifecycle

@Override
protected void onResume() {
    super.onResume();
    FID.INSTANCE.notifyActive(this);
    FPay.INSTANCE.notifyActive(this);
}

@Override
protected void onPause() {
    super.onPause();
    FID.INSTANCE.notifyInactive(this);
    FPay.INSTANCE.notifyInactive(this);
}

Register callback

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FID.INSTANCE.registerSDK(this);
    FPay.INSTANCE.register(this); 
}

@Override
protected void onDestroy() {
    super.onDestroy();
    FID.INSTANCE.unregisterSDK(this);
    FPay.INSTANCE.unregister(this);
}

Loading dynamic config

FID.INSTANCE.loadingConfig(new FIDConfigCallBack() {
            @Override
            public void onMaintenance(@NonNull MaintenanceConfig maintenanceConfig) {
               //You app should show maintenance dialog of FID
            }

            @Override
            public void onSuccess() {
               //Must do other FID feature after load config success   
            }

            @Override
            public void onFail(@Nullable String error) {

            }
 });

Last updated