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...
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.
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 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
The terms Customer and User are sometimes used in this documentation interchangeably, and they both refer to the app user
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 Passpoint profile installed by the app.
It deletes the WPA2 enterprise profile installed by the app.
You can get your API client key and secret following these instructions.
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
.
memberId
loyalty member card id
number
generic document number
personalId
id card number
type
type of document
"passport"
status
OK if customer has been created, KO otherwise
{"OK","KO"}
generated
data when the customer has been created
2022-07-08T13:15:43.885Z
id
id of the customer created
986a372347aac5e4a94516db835d58aa
organizationId
organizationId owner of the customer
3a8ccd060216452e09b2b32e750cb5eb
locationId
locationId owner of the customer
ff80808170f5232b01754653699e109e
hotspotId
hotspotId associated to the customer (not applicable when customer is created via mobile SDK)
username
username of the customer to access cloud4wi services
YDSDFDKJEAS
password
password of the customer to access cloud4wi services
XYXXZXYX
locked
field that identifies whether the account is blocked
They represent the list of the policy to apply to the customer. You can retrieve them using the function
It is mandatory that the policies returned by the function getListOfPolicies
in position 0 and 1 (named "termsOfUse
" and "privacy
") are set to true
.
In order to be able to process and profiling the customer it is necessary that the attributes profiling
and ppd
are set to true
.
language
ISO 639-1
"it"
country
ISO 3166-1 alpha2
"IT"
birthdate
YYYY-MM-DD
"2000-12-01"
gender
{M,F,O}
"M"
phoneNumber
international prefix + number
"+39123456789"
cid
id of the customer
extId
a string value associated to the customer. Usually it is used to store an external CRM id of the customer
extProp1
a generic string value associated to the customer
extProp2
a generic string value associated to the customer
realm
Passpoint home realm which will be recognized by device as home Passpoint network.
wifi.cloud4wi.com
friendlyName
User friendly name describing Passpoint network.
Cloud4Wi WiFi
roaming
It indicates if device with Passpoint profile would try to connect to 3rd party Passpoint networks.
false
status
OK if customer has been created, KO otherwise
{"OK","KO"}
generated
data when the customer has been created
2022-07-08T13:15:43.885Z
present
id
id of the customer created
986a372347aac5e4a94516db835d58aa
extId
a string value associated to the customer. Usually it is used to store an external CRM id of the customer
The debug mode allows you to have useful information on the console for debugging the application and the SDK. When enabled - SDK will print configuration parameter on startup and additional information on every API request that may help you during application development
To enable debugging add following record to your application's string.xml
:
In DEBUG MODE sensitive informations (like customer attributes, credentials, keys ...) are written to the debug console.
To disable the DEBUG MODE before deploy/publish the application.
Cloud4WiDSK searches for com.google.firebase.messaging.FirebaseMessaging
class in classpath. If such a class is present it means SDK can call getToken()
methods and therefore update push-token.
To enable Firebase push notifications your application should be set it up accordingly. Please refer https://console.firebase.google.com
Your application needs to have MyFirebaseMessagingService
registered in AndroidManifest.xml
and google-services.json file retrieved from https://console.firebase.google.com placed next to your project build.gradle
Cloud4WiSDKWiFi allows you to share information about installed Wi-Fi profiles among applications on the same Android device. This will help to avoid duplications of Wi-Fi profiles and make your application more flexible.
NOTE: this feature is optional, you may need it only if you integrate SDK in more than one application from your domain.
To enable interlinking you have to add the following in the 'application' section of your AndroidManifest.xml file:
NOTE: 'multiprocess' and 'exported' parameter values have to be set to 'true'
After adding required configuration to Android Manifest you have to supply SDK with the list of interlinked applications identifiers:
Track customers profile status
fix to handler deleted/locked customer
fix bug with SDK-Version in API requests header.
fix bug with NullPointer in token update service.
Added deletePasspointProfile
and deleteWPA2EnterpriseProfile
methods
In the logout
are removed the internet profiles installed
Added method updateCustomer
Added DEBUG_MODE
Passpoint support
New create customer function with deduplication on specific parameter
Extended support of custom policies
Note: this version has not fully compatible with version 1.1.0 (see following migration guide)
The signature of the method
has been replaced by
To create a customer without deduplication:
The signature of the method getListOfPolicies
has been replaced by
Create customer now support the attributes of the CreateCustomer API v3
WPA2-Enterprise profile creation support
Integration with Location SDK