AppsFlyerSDK / appsflyer-flutter-plugin

Flutter Plugin for AppsFlyer SDK
MIT License
142 stars 111 forks source link

Testing for Android not response code: 200 as expect #308

Closed stanhe closed 3 months ago

stanhe commented 3 months ago

Describe the bug my flutter project Initializing the SDK,when i finished,and Testing for Android, there has no request and response as mentioned in the doc.

To Reproduce Steps to reproduce the behavior:

  1. finish all the step of initializing the SDK with flutter guide
  2. create the deep link and send to my email
  3. uninstall my android app on the phone
  4. click the email ,jump to play stroe, then install my app with Android Studio debug mode
  5. open my app, and check the logcat output

Expected behavior as mentioned, show the right logcat info as Testing for Android doc show

Screenshots image my logcat: image

Smartphone (please complete the following information):

Additional context i put "appsflyerSdk!.startSDK();" in my logic code,that's say i do this on my MAIN page sometimes kill and restart my application it works,en... i just debug it half day ago.

github-actions[bot] commented 3 months ago

👋 Hi @stanhe and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify:

stanhe commented 3 months ago

i fixed it by split initSdk() and startSdk() to diffrent place. initSdk() may take some time, so do not call initSdk() and startSdk() in one method. bad code:

 static initSdk() {
    .....
    appsflyerSdk = AppsflyerSdk(options);
    appsflyerSdk!.initSdk(
        registerConversionDataCallback: true,
        registerOnAppOpenAttributionCallback: true,
        registerOnDeepLinkingCallback: true);
     appsflyerSdk!.startSDK();
}

good code:

static AppsflyerSdk? appsflyerSdk;
static initSdk() {
     .....
    appsflyerSdk = AppsflyerSdk(options);
    appsflyerSdk!.initSdk(
        registerConversionDataCallback: true,
        registerOnAppOpenAttributionCallback: true,
        registerOnDeepLinkingCallback: true);
}
static startSdk() {
    appsflyerSdk?.startSDK();
    HiLog.d('appsflyerSdk.startSdk');
  }