AppsFlyerSDK / appsflyer-flutter-plugin

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

onDeepLinking cannot be monitored #324

Open tudosxxx opened 1 month ago

tudosxxx commented 1 month ago

`AppsFlyerOptions appsFlyerOptions = AppsFlyerOptions( afDevKey: '***', appId: '', showDebug: true, appInviteOneLink: 'mv21', timeToWaitForATTUserAuthorization: 15, manualStart: true ); appsflyerSdk = AppsflyerSdk(appsFlyerOptions);

appsflyerSdk!.onInstallConversionData((res) {
  print("===onInstallConversionData res: $res");
});

// App open attribution callback
appsflyerSdk!.onAppOpenAttribution((res) {
  print("===onAppOpenAttribution res: $res");
});

appsflyerSdk!.onDeepLinking((DeepLinkResult dp) {
  switch (dp.status) {
    case Status.FOUND:
      print(dp.deepLink?.toString());
      print("deep link value: ${dp.deepLink?.deepLinkValue}");
      break;
    case Status.NOT_FOUND:
      print("deep link not found");
      break;
    case Status.ERROR:
      print("deep link error: ${dp.error}");
      break;
    case Status.PARSE_ERROR:
      print("deep link status parsing error");
      break;
  }
});

await appsflyerSdk!.initSdk(
    registerConversionDataCallback: true,
    registerOnAppOpenAttributionCallback: true,
    registerOnDeepLinkingCallback: true);
if (Platform.isAndroid) {
  appsflyerSdk!.performOnDeepLinking();
}

appsflyerSdk!.startSDK(
  onSuccess: () {
    print("===AppsFlyer SDK initialized successfully.");
  },
  onError: (int errorCode, String errorMessage) {
    print("===Error initializing AppsFlyer SDK: Code $errorCode - $errorMessage");
  },
);`

`getOnDeepLinkUrl() async{

AppsFlyerInviteLinkParams inviteLinkParams = AppsFlyerInviteLinkParams(
    channel: "android",
    referrerName: "aaa",
    baseDeepLink: "bbb",
    brandDomain: "ccc",
    customerID: "ddd",
    referreImageUrl: "eee",
    campaign: "fff",
    customParams: {"af_sub1":"hhh"}
);

appsflyerSdk!.generateInviteLink(inviteLinkParams,
        (result){
      print(result);
    },
        (error){
      print(error);
    }
);

}`

When I run the IDE directly, onDeepLinking detects that the deep link is not found, but when I visit the website via the invitation link I created, the website goes to the Google App Store and I open it manually. Each time, the onInstallConversionData method listens for printing. onDeepLinking nothing happens. How to combine this invitation with onDeepLinking and get the custom parameters in the invitation link

github-actions[bot] commented 1 month ago

👋 Hi @tudosxxx 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: