Developer Hub
SupportDashboardGuides
  • Home
  • WiFi SDK
    • Overview
    • Integrating the SDK
      • iOS
        • QuickStart
        • SDK methods
          • initC4w
          • createCustomer
          • setupCustomer
          • createWPA2EnterpriseProfile
          • createPasspointProfile
          • getCreatedWPA2EnterpriseProfiles
          • getCreatedPasspointProfiles
          • getCustomerId
          • getCustomerInfo
          • updateCustomer
          • updateCustomerInfo
          • checkIfCustomerExists
          • getListOfPolicies
          • deletePasspointProfile
          • deleteWPA2EnterpriseProfile
          • setAPIAuthParams
          • setInterlinkedC4WIMobileSDKApplications
          • getInterlinkedC4WIMobileSDKApplications
          • logout
        • Objects
          • Customer
          • CustomerDocument
          • CustomerCreateResponse
          • CustomerInfo
          • CustomerQuery
          • WPA2EnterpriseProfile
          • PasspointProfile
        • Additional features
        • Changelog
      • Android
        • QuickStart
        • SDK methods
          • initC4w
          • createCustomer
          • setupCustomer
          • createWPA2EnterpriseProfile
          • deleteWPA2EnterpriseProfile
          • createPasspointProfile
          • deletePasspointProfile
          • isPasspointSupported
          • getCustomerId
          • getCustomerInfo
          • checkIfCustomerExists
          • updateCustomer
          • updateCustomerInfo
          • getListOfPolicies
          • setAPIAuthParams
          • getCreatedWPA2EnterpriseProfiles
          • getCreatedPasspointProfile
          • setInterlinkedC4WIMobileSDKApplications
          • getInterlinkedC4WIMobileSDKApplications
          • logout
        • Objects
          • Customer
          • CustomerDocument
          • CustomerCreateResponse
          • CustomerInfo
          • CustomerQuery
          • WPA2EnterpriseProfile
          • PasspointConfiguration
        • Additional features
        • Troubleshooting
        • Changelog
      • Flutter
        • QuickStart
        • Changelog
    • User experience
    • FAQ
  • Location SDK
    • Overview
    • Integrating the SDK
      • Android
        • Quickstart
        • Project initialization
        • SDK Methods
          • Enable/Disable
          • Handling blocking issues
          • Get Device Id
          • Reset device Id
          • Locations of Interest
            • Home location
            • Work location
        • Changelog
      • iOS
        • QuickStart
        • Installation
        • Project initialization
        • SDK methods
          • Initialization
          • Enable/Disable
          • Get Device Id
          • Reset device Id
          • Locations of interest
            • Home location
            • Work location
        • Reference versions
        • Changelog iOS
      • Flutter
        • QuickStart
        • Changelog
  • Demo toolkit
    • Demo app
    • Testlab WiFi setup
  • API Reference
    • Getting started
      • Authentication
      • Contacts
      • Locations
      • Geofences
      • Devices
      • Segments
      • WiFi logs
      • Events
    • Webhooks
    • Use cases
    • Legacy APIs (v2)
  • MyApps
    • My App Intro
    • Creating Apps
      • Access Journey Apps
      • Apps for the Dasbhoard
    • MyApps APIs and SDK
      • Access Journey SDK
      • REST APIs in MyApp
      • Context APIs
    • Sample projects
      • MyApps -Js SDK boilerplate
      • Video Advertising
      • Typeform integration
      • Facebook Pixel in Acces Journey
  • Tutorials
    • Sample onboarding flow for new app users
    • Integrating WiFi SDK in Flutter apps
Powered by GitBook
On this page
  • goNext()
  • getNextUrl()
  • goHome()
  • end()
  • renderNavbar(navbarOptions)
  • showNextBtn()
  • getSk()
  • getParam(param)
  • session(function)

Was this helpful?

Export as PDF
  1. MyApps
  2. MyApps APIs and SDK

Access Journey SDK

The SDK can be included with your application by including the following tag in your HTML document.

<script src="https://splashportal.cloud4wi.com/myapps/v1/myapps-sdk.js"></script>

Including the script in your application gives access to the MYAPPS object. This object encapsulates a handful of functions that allow your application to integrate itself into the Access Journey provided by Cloud4Wi.

‍

goNext()

Moves the user away from the page to the next destination on the Access Journey. This method is not available when the application is opened from the App Bar as it is not a part of the Access Journey.

getNextUrl()

Returns the URL that points to the next destination on the Access Journey. It is the same URL that would be used by the goNext() function to continue the Journey.

This method is not available when the application is opened from the App Bar as it is not a part of the Access Journey.

goHome()

Moves the user away from the page to the Welcome Portal. In many cases, has the effect of going Next, but can also have the effect of going back. Useful for App Bar applications that can use it as a "back" button in lieu of not having access to the goNext() function.

end()

Combines goNext() and goHome(). If available, will behave as goNext(), but revert to goHome() otherwise.

renderNavbar(navbarOptions)

Takes as an argument a JavaScript Object that contains options that are applied to the navigation bar. The options it supports are a delayed timer before the continue button is revealed, foreground and background color, and the text shown in the upper left corner.

let navbarOptions = {    
	apn: "Welcome",     // Label text for upper left    
  fontColor: "white",       // Font Color    
  backgroundColor: "black", // Background Color for gradient    
  nextBtn: 10         // Number of seconds for delay timer
}

The options object does not have to be filled, as there are default options that can be relied upon. One simply has to omit an entry in the object to revert to the default settings.

MYAPPS.renderNavbar(navbarOptions);

The styling is hardcoded into the nav tag that is produced, so apart from JavaScript manipulation, custom styling is fairly limited.

showNextBtn()

This function changes the style of the "next" button produced by the renderNavbar function from hidden to inline-block.

getSk()

getParam(param)

Returns the value of the given argument parameter by parsing the URL.

‍

Available parameters:

  • tgr: step of the Access Journey that invoked the App. The possible values are: - trOpn: Connect - trRgt: Sign up - trPlgn: Log in Attempt - trLgn: Log in - trLgt: Disconnect - false: When not part of the Access Journey

session(function)

Retrieve the session data and executes the callback function, function(SessionData). SessionData is false if there is any error, which is logged in the console.

Example:

var printSession = function(sessionData) {  
	console.log(sessionData);
  }  
  
MYAPPS.session(printSession);
PreviousMyApps APIs and SDKNextREST APIs in MyApp

Last updated 2 years ago

Was this helpful?

Returns the session key necessary for the call.

sk: session key, used for the

context API
context API call