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);
}
override fun onResume() {
super.onResume()
FID.notifyActive(this)
FPay.notifyActive(this)
}
override fun onPause() {
super.onPause()
FID.notifyInactive(this)
FPay.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);
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
FID.registerSDK(this)
FPay.register(this)
}
override fun onDestroy() {
super.onDestroy()
FID.unregisterSDK(this)
FPay.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) {
}
});
FID.loadingConfig(object : FIDConfigCallBack {
override fun onMaintenance(maintenanceConfig: MaintenanceConfig) {
//You app should show maintenance dialog of FID
}
override fun onSuccess() {
//Must do other FID feature after load config success
}
override fun onFail(error: String?) {
}
})
Last updated