android-branch-deep-linking-attribution
android-branch-deep-linking-attribution copied to clipboard
BranchLinkCreateListener callback never executed when generateShortUrl is called without network connection
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
- Turn off network connection
- Call
generateShortUrl() - 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