Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Andorid cannot open deeplink for 8.0.2 #341

Closed
qirong-zhang-ext opened this issue Jun 18, 2024 · 5 comments
Closed

Andorid cannot open deeplink for 8.0.2 #341

qirong-zhang-ext opened this issue Jun 18, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@qirong-zhang-ext
Copy link

qirong-zhang-ext commented Jun 18, 2024

Describe the bug
Thanks a lot for your package, it helps us a lot. There is a issue may need your help.

All functions works well for version 8.0.1, after upgrade to version 8.0.2 Android cannot open the deeplink.

The case very similar to #325, the onInitFinish callback seems not be called, even though I add the branch.json file to Android project.

Smartphone (Please complete the following information. remove session if not platform):

  • Flutter: version: 3.16.9

  • Package version: 8.0.1 (Android device will not work for 8.0.2)

  • OS: Android 14

  • Device: Google Pixel 3a / 6a

  • Additional context
    log detail:

D/FlutterBranchSDK(20233): triggered onAttachedToEngine
D/FlutterBranchSDK(20233): triggered setupChannels
D/FlutterBranchSDK(20233): SDK Init
D/FlutterBranchSDK(20233): triggered onAttachedToActivity
D/FlutterBranchSDK(20233): triggered setActivity
D/FlutterBranchSDK(20233): triggered onActivityStarted: xxx.MainActivity
D/FlutterBranchSDK(20233): triggered SessionBuilder init
D/FlutterBranchSDK(20233): triggered onActivityResumed: xxx.MainActivity
D/FlutterBranchSDK(20233): triggered setupBranch
D/FlutterBranchSDK(20233): notifyNativeToInit()
D/FlutterBranchSDK(20233): triggered setTrackingDisabled
D/FlutterBranchSDK(20233): triggered onAttachedToEngine
D/FlutterBranchSDK(20233): triggered setupChannels
D/FlutterBranchSDK(20233): SDK Init
D/FlutterBranchSDK(20233): triggered onListen

# move app to background
D/FlutterBranchSDK(20233): triggered onActivityPaused: xxx.MainActivity
D/FlutterBranchSDK(20233): triggered onActivityStopped: xxx.MainActivity

# click deeplink and back to app
D/FlutterBranchSDK(20233): triggered onActivityStarted: xxx.MainActivity
D/FlutterBranchSDK(20233): triggered SessionBuilder init
D/FlutterBranchSDK(20233): triggered onNewIntent
D/FlutterBranchSDK(20233): triggered onActivityResumed: xxx.MainActivity

Thanks a lot!

@qirong-zhang-ext qirong-zhang-ext added the bug Something isn't working label Jun 18, 2024
@RodrigoSMarques
Copy link
Owner

Hi @qirong-zhang-ext

Remove the branch.json file from your project.

In issue #325, it was just an instruction to try to identify the problem. The SDK adds this file automatically, so it is not in the configuration instructions.

Has your default Activity in the Native code (Kotlin/Java) been changed? Does it use FlutterActivity or FlutterFragmentActivity?

I identified that you are using DisableTracking. I answered you in issue #339. In these scenarios, retrieving the deeplink data will not work.

@qirong-zhang-ext
Copy link
Author

Hi @RodrigoSMarques,

Thanks again for your kindly help!

I checked issue you provided, actually my scenario should work.

But I noticed this not working issue will happen on simulator, I checked on release package for real device, 8.0.2 works well with disableTracking and without branch.json file.

I will close this issue🤗

@qirong-zhang-ext
Copy link
Author

Hi @RodrigoSMarques, in case you know some root cause, could you please have a quick look for this issue from native side? BranchMetrics/cordova-ionic-phonegap-branch-deep-linking-attribution#731

with disableTracking is true, it will work sometimes but sometimes not, thanks a lot for your help!

@RodrigoSMarques
Copy link
Owner

This is a behavior on the native side of the SDK.

I don't know if it is working.

I suggest you open an issue in the Android SDK repository: https://github.com/BranchMetrics/android-branch-deep-linking-attribution

@RodrigoSMarques
Copy link
Owner

When you call disableTracking (true or false), this is persisted in some SharedPreferences of the Native SDK.

It takes effect after you restart the application. For this reason, when you opened the application it worked and after calling disableTracking and opening the application again it no longer works.

But the Branch team can give you accurate information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants