Getting started

You should read this entire page before you start coding for starti.app

Integrations

The app has a list of integrations which serves different purposes. For example there are integrations for handling push notifications and integrating with the calendar on the device.

Methods on the respective integrations can be called directly on the integrations using dot annotation.

Easiest way of getting started

You should follow these steps to get started:

  1. Read how you should call functions on integrations from the website.
  2. Read about events calling from the app to your website.
  3. Read about the app integration which is included no matter which other integrations are included in your app.
  4. Read about the integrations your app includes.

Example

Here you’ll find a short example of how to get started using push notifications inside your website.

<html>

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>

<body>
    <button onclick="javascript: location.reload()">Reload</button>

    <button onclick="javscript: PushNotificationIntegration.initialize()">
      Initialize push notifications
    </button>

    <button
      onclick="javascript: PushNotificationIntegration.getLastPublishedToken()">
        Get the latest token
    </button>

    <script type="text/javascript">
        var PushNotification = {
            getLastPublishedTokenResult(token) {
                alert('Push notification token received: ' + token);
            }
        }

        var App = {
            versionResult(version) {
                alert('Running app version: ' + version);
            }
        };

        // We should always listen for a call to appIntegrationsAreReady.
        // When this function is called we know we are running inside the
        // app.
        function appIntegrationsAreReady() {
            // Tell the app we are ready to receive events
            AppIntegration.webAppIsReady();

            // Get the app version (remember the result is given to
            // the function App.versionResult)
            AppIntegration.version();
        }
    </script>
</body>

</html>