The Cirrent sample app provides an example of how to use the Cirrent SDK for the initial onboarding experience, and also for ongoing lifecycle management. You may choose to incorporate some or all of this functionality into your mobile app. You can download the sample app for iOS from the App Store at https://itunes.apple.com/ca/app/zipkey-dev-tool/id1265896377 or from Google Play at https://play.google.com/store/apps/details?id=com.cirrent.ZipKeyApp The sample app is a real working app that can be used to onboard a ZipKey-enabled product. You can also pick the "Walkthru" option to see what the user experience when onboarding a ZipKey-enabled product onto your private network.
Here's a quick summary of the screens included in the Cirrent sample app for these two use cases.
|Screen||Description||SDK methods used|
|Sign in||Logs the user into the sample cloud, generates search token||None - only talks to sample cloud|
|Create an account||Let's the user create an account in the sample cloud, if they do not already have one.||None - only talks to sample cloud|
|Add a product||First screen that is shown when user does not have any devices associated with their account||gatherEnvironment
|Select your product||Screen showing list of nearby discoverable devices||
|Automatic Connection||Screen showing the options for how the device can be onboarded (by manual entry of network, or by requesting that the broadband provider supply the credentials)||putProviderCredentials|
|Configure Network||If user chooses to manually enter credentials, this screen shows the drop-down list of networks the device can see, and lets the user enter the PSK for their private network||putPrivateCredentials|
|Connecting||Shows progress to the user as the device downloads the credentials, drops off the ZipKey network and joins (or fails to join) the private network||getDeviceJoiningStatus|
|GoToSoftAP||Guides the user on how to move over to the SoftAP network (on iOS), or moves over to SoftAP network automatically (on Android), if the device was not found via the Cirrent cloud.||ConnectToDeviceViaSoftAp|
|Success||Screen that is shown when the device has successfully joined the private network (may be replaced by the main screen for your app as the device is now connected to the internet on the user's private network and ready for normal use)||None|
The diagram below gives a high-level overview of the screens that should be shown to the user during the onboarding process, and the SDK methods to call on each screen. The SDK methods are defined in more detail in this article. This represents the simplest case, where a single device is being onboarded. Optionally, you can have the user take some action on the device, or have the device identify itself during the onboarding process. You can use this as a guide for your onboarding implementation.
Once a device has been bound to the user's account, it is no longer discoverable by other users. As long as the device stays in range of the user's private network, the device will connect to the user's private network without any additional work. There may be times when the user needs to change the private network(s) configured in the device - e.g. if the user changes their private network SSID or pre-shared key, or moves the device to a new location. The sample app includes a set of screens to cover this use case - maintain a list of the devices associated with the user's account, add or delete private networks on the user's device, or reset the device (returning it to discoverable state). Note that the list of devices associated with the user account is managed by the sample cloud, not by the Cirrent cloud.
|Screen||Description||SDK methods used|
|Manage Devices||Shows a list of the devices associated with the user's account. Enables the user to remove a device from their account.||resetDevice|
|Manage Networks||Shows the list of networks that are already configured in the user's device||
|Add Network||Screen that enables the user to add a new network to the list of private networks configured in the device||