How to get started mobile-embedded Harbour integration
Within a mobile app, Harbour agreement workflows are designed to support being embedded with a WebView (WKWebView).
On workflow completion, our API and realtime webhooks can then trigger follow-on app actions:
https://developers.harbourshare.com/v2.html#webhooks
or go to a custom redirect URL:
https://knowledgebase.harbourshare.com/knowledge/add-url-redirect
You can also embed a styled version of the workflow too in you app (match app colors, match app font, minimize default padding/styling of links):
https://knowledgebase.harbourshare.com/knowledge/styling-your-agreements
Demo code
If you're using flutter, please use the following steps:
1- Install webview plugin:
flutter pub add webview_flutter
2- Install webview plugin for android and ios
flutter pub add webview_flutter_android
flutter pub add webview_flutter_wkwebview
3- If you would like the webview to appear in a dialog, We implemented a simple class that contains two methods:
initWebViewController(context, harbourLink)
This function initialize the webview controller based on the running platform(ios/android) launch Harbour agreement link, tracks the link loading progress, and logs if there is any error.
showHarbourDialog(context, harbourLink)
This function you can call from any action like onPressed() and it will show Harbour agreement link in the webview inside the dialog once you send the link as an argument. Here is an example of how to call it.
WebViewDialog webViewDialog = WebViewDialog();
onPressed: () => webViewDialog.showHarbourDialog(context, harbourLink),
Full flutter demo app: https://github.com/Harbour-Enterprises/Harbour-Mobile
ios demo:
Android Demo: