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

BranchLinkCreateListener callback never executed when generateShortUrl is called without network connection #1017

Open
NicolasEymael opened this issue Sep 29, 2022 · 0 comments

Comments

@NicolasEymael
Copy link

Describe the bug

Our customer complained that the app keeps loading forever when generating a deep link when the device has no network connection.

We use the generateShortUrl() method to generate the link asynchronously and display a loading animation during link generation. The problem is that the BranchLinkCreateListener callback never executes if the device is offline.

Is this the expected behavior of the method? I thought the callback would execute with a BranchError in that case.

buo.generateShortUrl(this, linkProperties, new Branch.BranchLinkCreateListener() {
            @Override
            public void onLinkCreate(String s, BranchError branchError) {
                // do something...
                // this callback is never executed when offline
            }
        });

Steps to reproduce

  1. Turn off network connection
  2. Call generateShortUrl()
  3. The callback is never executed

Expected behavior

The callback should be executed with a BranchError

SDK Version

5.1.4

Make and Model

Google Pixel 2 Emulator

OS

Android 9 (API 28)

Additional Information/Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant