Skip to main content

Implement Bookings ONE to your own Native Application

This section will introduce how to implement Bookings ONE User App into your own application.

Native APP

If you want to implement Bookings ONE User app into a native app platform, you can:

iOS

Reference: https://developer.apple.com/documentation/webkit/wkwebview

import UIKit
import WebKit
class ViewController: UIViewController, WKUIDelegate {

var webView: WKWebView!

override func loadView() {
let webConfiguration = WKWebViewConfiguration()
webView = WKWebView(frame: .zero, configuration: webConfiguration)
webView.uiDelegate = self
view = webView
}
override func viewDidLoad() {
super.viewDidLoad()

let myURL = URL(string:"https://xxx.bookings.one")
let myRequest = URLRequest(url: myURL!)
webView.load(myRequest)
}}

Android

Reference: https://developer.android.com/reference/android/webkit/WebView https://developer.android.com/guide/webapps/webview

Android platform will use web container:

<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
val myWebView: WebView = findViewById(R.id.webview)
myWebView.loadUrl("http://xxx.bookings.one")

Web

If you want to put the bookings ONE in a web portal:

Redirect Button

<a href="https://xxxxx.bookings.one" target="_blank">  
<button>Booking system</button>
</a>

iFrame

Reference: https://www.w3schools.com/tags/tag_iframe.ASP

<iframe id="bookings-one"
title="Booking system"
width="100%"
height="100%"
src="https://xxxxx.bookings.one">
</iframe>

Auto sign-in

If you want to implement auto sign-in to Bookings ONE from your own application, you can implement following method:

With ADFS / OpenID single sign on

If your platform has single sign-on configuration, Bookings ONE is able to support auto sign-in under following condition:

  1. There are only 1 sign-in method.
  2. The user have already sign-in in other system (which the access-token saved in the browser can be shared to Bookings ONE).

The portal can then provides the url https://xxxxx.bookings.one?auto-sign-in=true, which Bookings ONE will help to auto login after redirection.