AppsFlyer Android onInstallConversionDataLoaded延迟回调

时间:2018-08-14 10:44:28

标签: appsflyer-android-sdk appsflyer-cordova-sdk

好,所以我从AppsFlyer Cordova插件中获取了代码:

    AppsFlyerProperties.getInstance().set(AppsFlyerProperties.LAUNCH_PROTECT_ENABLED, false);
    AppsFlyerLib instance = AppsFlyerLib.getInstance();

    try{
        final JSONObject options = args.getJSONObject(0);

        devKey = options.optString(AF_DEV_KEY, "");
        isConversionData = options.optBoolean(AF_CONVERSION_DATA, false);

        if(devKey.trim().equals("")){
            callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.ERROR, NO_DEVKEY_FOUND));
        }

        isDebug = options.optBoolean(AF_IS_DEBUG, false);

        instance.setDebugLog(isDebug);

        if(isDebug == true){
            System.out.println("AppsFlyer Here 0");
            Log.d("AppsFlyer", "Starting Tracking");
        }

        trackAppLaunch();
        instance.startTracking(c.getApplication(), devKey);

        if(isConversionData == true){
            if(mAttributionDataListener == null) {
                mAttributionDataListener = callbackContext;
            }

            if(mConversionListener == null){
                mConversionListener = callbackContext;
            }

            registerConversionListener(instance);
            sendPluginNoResult(callbackContext);

        }
        else{
            callbackContext.success(SUCCESS);
        }

    }
    catch (JSONException e){
        e.printStackTrace();
    }

registerConversionListener

private void registerConversionListener(AppsFlyerLib instance){
        instance.registerConversionListener(cordova.getActivity().getApplicationContext(), new AppsFlyerConversionListener(){

        @Override
        public void onAppOpenAttribution(Map<String, String> attributionData) {
        }

        @Override
        public void onAttributionFailure(String errorMessage) {
            handleError(AF_ON_ATTRIBUTION_FAILURE, errorMessage);
        }

        @Override
        public void onInstallConversionDataLoaded(Map<String, String> conversionData) {
                    // Delay here up to some minutes
        }

OnInstallCoversionDataLoaded回调最多延迟几分钟。谁能建议如何解决这个问题?

0 个答案:

没有答案