Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
To integrate SDK library into your Android project you need to add Cloud4Wi repository. After that add the following dependency to your project's build.gradle along with 3 dependencies required by Cloud4Wi SDK as described below:
In order to connect your application with your Cloud4Wi account, you need to provide SDK with clientKey
and clientSecret
credentials.
Credentials may be provided to SDK either via configuration property or at runtime. Add two records into your application's string.xml
as in examples below:
Add the following in 'application' section of your AndroidManifest.xml
file:
AndroidManifest
of this library requires following permissions
In following code example we will create new customer in the API and then install WPA2-Enterprise Wi-Fi profile on Android phone. After that when customer will be in range of Wi-Fi network with specified SSID - his device will connect automatically.
This example represents following use-case.
MobileSDK configuration. Setting API client credentials.
Read list of organization policies from API.
Creating new customer in API.
Verifying customer credentials in API.
Creation of WPA2-Enterprise Wi-Fi profile on Android device for test user to connect to test SSID.
To track the last seen date of the customer and to keep always updated the remote push notification token (if applicable) it is necessary to call the method every time the app starts
This method initiative the customer object in the Cloud4Wi account. This method must be invoked before installing the WiFi Profile.
Calling this function It is equivalent to a make a login. The success of this function opens a session with the customer returned. To close the session use logout()
method.
The deduplicate
string is optional. If set, the system will check if an existing customer with a matching attribute already exists in the same Cloud4Wi account.
If a matching record exists, the createCustomer
method will override the existing matching customer attributes with the one passed in the createCustomer
(except for username, password,
and source
)
Pssible values of deduplicate
string are:
To create a customer without any deduplicaiton check, set deduplicate
string to null.
If username
and password
are not set in the Customer object, they are assigned randomly during the customer creation and returned to the app in the CustomerCreate Response object.
Method | Description |
---|---|
Initialize the SDK and updates certain Customer attributes at every login
Initializes the customer object in the Cloud4Wi account
Create empty customer with default policies
Triggers the installation of a WPA2-Enterprise Wi-Fi profile in the device
Triggers the installation of a Passpoint Wi-Fi profile in the device
Returns list of WPA2-Enterprise Profiles initialized on the device
Returns list of Passpoint Profiles initialized on the device
Returns the identified of the customer created/logged with Cloud4wi Wifi SDK
Retrieve customer profile by username/password
Update the Customer attributes
Update a Customer metadata
Search a Customer by customer properties
Get the list of policies configured in the Cloud4Wi account
Set SDK authentication parameters
Configure the list of applications to be interlinked with the current application
Get the applications interlinked with the current one
It deletes the WPA2 enterprise profile installed by the app.
This method triggers the installation of a WPA2-Enterprise Wi-Fi profile in the device or update an existing one for the same network. The OS will trigger a dialog to ask the user the consent to allow such operations. See User Experience
It deletes the Passpoint profile installed by the app.
This method allows retrieving the list of consents (referred as "policies" in this context) configured in the Cloud4Wi account, including the default one and the custom-defined ones.
The first 3 consents returned by the method are always the ones referring to:
terms of use ("termsOfUse
")
privacy policy ("privacy
")
marketing ("marketing
")
As a reminder, to create a Customer is always mandatory to set the privacy policy and the terms of use to true
.
You can get your API client key and secret following .