-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Description:
Currently, when the Link SDK opens a URL in the external browser, the callback is occasionally invoked with a SUCCESS status. This behavior is inconsistent, occurring unpredictably. This creates challenges for developers who need to perform additional actions (e.g., pop the current screen, log analytics, or update UI state) once the external browser is opened.
Proposed Enhancement:
Introduce or modify the existing callback mechanism to be triggered after the external browser (launchUrl) is successfully launched.
Proposed Solution:
class: LeanWebClient
// Open all URLs in default web browser
if (await canLaunchUrl(uri)) {
LeanLogger.info(msg: 'Opening URL in browser: ${request.url}');
// Invoke the existing callBack here
callback?.call(LeanResponse(
status: 'BROWSER_LAUNCHED',
message: 'URL opened in external browser',
bankId: null,
exitPoint: null,
lastApiResponse: null,
secondaryStatus: null,
bankIsSupported: null,
exitIntentPoint: null,
exitSurveyReason: null,
leanCorrelationId: null,
));
await launchUrl(uri, mode: LaunchMode.externalApplication);
} else {
LeanLogger.info(msg: 'Could not launch ${request.url}');
}
Metadata
Metadata
Assignees
Labels
No labels