configureWithAppsFlyer method
Implementation
Future<bool> configureWithAppsFlyer(String devKey, String appid) async {
_appsflyersdk =
AppsflyerSdk(AppsFlyerOptions(afDevKey: devKey, appId: appid));
if(Platform.isAndroid) {
String? androidId = await IdeaDeviceHelper.getAndroidId;
if(androidId is String) {
_appsflyersdk?.setAndroidIdData(androidId);
}
}
if(_customId is String) {
_appsflyersdk?.setCustomerUserId(_customId!);
}
try {
var result = await _appsflyersdk?.initSdk(registerConversionDataCallback: true);
print("result of init appsflyersdk" + result.toString());
return true;
} on Exception catch (e) {
print("error: " + e.toString());
return false;
}
}