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...
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...
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...
The following app demonstrates an example of using the WiFi SDK (and the Location SDK).
The app is ready to run but you have to set your own credentials by putting them into plist file. To test the WiFi section, based on Passpoint, you have to use a physical iOS device and have an access point configured in a Cloud4Wi account.
Add pod 'c4w-wifi-sdk'
to your Podfile
and run pod install
.
https://github.com/Cloud4Wi-Create/iOS-WifiSDK-SwiftPackage
In order to connect SDK to your Cloud4Wi account, you have to specify 'clientKey' and 'clientSecret'.
You can set them in your App Info.plist file by adding two following keys:
In order to use the SDK you have to add the 'Hotspot Configuration' capability to your application
This example represents the following use-case:
Read the list of organization policies (the term "policies" is used to refer to consents and agreements that are configured on the Cloud4Wi account)
Creating new customer
Verifying customer credentials in API by retrieving customer info (optional)
Create WPA2-Enterprise Wi-Fi profile on iOS device
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
you can put it into didFinishLaunchingWithOptions
for example
The SDKs provide a few basic methods that ultimately allow provisioning the user device with a WiFi profile. There are two main steps to provision a WiFi profile using the SDK:
To authenticate the SDK and connect it to your Cloud4Wi account, you need to generate an API key
and API secret
.
In the Cloud4Wi dashboard, go to Developers and select the WiFi SDK tab. Click the button New Mobile Add. The app Project dialog appears.
Enter a reference name for your app project. Enter the Android Package Name and iOS Bundle ID.
Enter the name of the SSID that must match the one used in the WiFi network. Leave Hidden SSID unchecked.
In the Passpoint section, enter your Domain Name, such as <company_name>.securewifi.io. In the Operator Friendly Name enter a value that identifies your company for the end users, such as "Secure WiFI by Company".
Check "Add the "Settlement-Free" RCOI to Passpoint profiles" if you want your mobile app users to be able to connect automatically to the WiFi of millions of settlement-free access points around the world from the OpenRoaming federation.
Click Save to return to the main table. Copy the API Key and API Secret in the SDK Credentials column of the app you just created.
A User must be created on the Cloud4Wi systems before creating and installing a WiFi Profile.
Cloud4Wi suggests passing at least a recognizable identifier to allow an easier reconciliation of the User records in Cloud4Wi with the related records in other systems, such as an external id or email address.
The user can be initialized by passing a specific username and password generated by the mobile app. If not provided in the initialization, Cloud4Wi generates random network credentials associated with the user, which will then be used to generate either Passpoint or WPA2 Enterprise Wireless Profiles.
Cloud4Wi allows configuring specific data processing rules in the account configuration that process each individual user's data based on the consent fields set on its record. Coud4Wi allows to create any custom consent fields from the dashboard, but it comes with 3 pre-configured consents:
Privacy Policy
Terms of Service
Marketing
The Terms of Service (termsOfUse)
and Privacy Policy (privacy)
consents are mandatory to be set to true
whenever a customer is added via APIs or via the mobile SDKs.
The Marketing consent is an optional, pre-defined field that can be set to record consent to receive promotional marketing communications. The same purpose can be achieved using custom fields if necessary.
To retrieve the custom consents, if needed, you can use the dedicated methods (getListOfPolicies)
The SDK method to initialize the user also requires setting the profiling
parameter that determines whether the customer could be "profiled' or not. The Profiling processing activity processes and stores the customer visit history and computes personalized behavioral attributes.
The user can be initialized at any time by the app, for example contextually with the app sign-up process (if any), or right before triggering the WiFi Profile installation.
Android
iOS
WiFi Profiles are configuration files, specific to each operative system, that allow a device to connect and authenticate on a WiFi network. The method to install the WiFi Profile takes as input the network credentials generated in the previous step.
Cloud4Wi SDK provides two types of authentication methods:
WPA2 Enterprise
Passpoint
Android
iOS
This document contains technical guidelines on how to use Cloud4Wi development tools, including APIs, Webhooks, Mobile SDKs and MyApps
Cloud4Wi WiFi SDK is a convenient Software Development Kit that helps you easily add seamless and secure WiFi connectivity to mobile apps and unlocks location services regardless of OS location permissions
Cloud4Wi Location SDK (referred to as "GeoUniq") helps you easily add location tracking to your app, overcoming native OS location tracking performances and capabilities.
Platforms APIs allow managing Cloud4Wi resources programmatically, including places, contacts, moments and logs.
Webhooks allow integrating real-time events with your own data stack to unlock real-time and context-aware applications such as:
trigger communications in real-time in your Marketing automation tool
synch Contacts in real-time with your CRMS as soon as a person sign up
feed Contact Profiles in real-time to clienteling interfaces when a person arrives in a location
Use Cloud4Wi demo apps for iOS and Android to test Cloud4Wi geofencing before integrating the SDK, or to test your implementation of Cloud4Wi side-by-side with a complete implementation
Create and publish custom context-aware content during the WiFi onboarding or on the dashboard
Cloud4Wi WiFi SDK empowers mobile apps with instant, automatic, and fully encrypted WiFi connection upon arrival to enabled locations, allowing app users to get a stable and fast connection for a smooth on-site experience.
Thanks to the secure WiFi authentication, the Cloud4Wi platform detects deterministically users’ arrival on site enabling apps with reliable location-awareness regardless of the OS location permissions.
Want to get started quickly? Follow these four steps:
. Create an App project in your Cloud4Wi dashboard and retrieve the client key and client secret on your dashboard. These are the credentials you need to authenticate the SDK and connect it to your Cloud4Wi account.
Set up WiFi network. Set up the in your Cloud4Wi account and with WPA2-Enterprise and/or Passpoint configuration.
Integrate the Cloud4Wi SDK into your app. Integrate the . Or, before integrating, test WiFi connectivity with our for iOS and Android.
Enable integrations. Create a or enable server-side to send Cloud4Wi events and user context to other systems. Or, you can create a triggered message in .
Cloud4Wi WiFi SDK empowers mobile apps with instant, automatic, and fully-encrypted WiFi connection upon arrival to enabled locations, empowering your app with a stable and fast connection to deliver a smooth on-site experience.
All your mobile users will be automatically connected and authenticated to the WiFi network as soon as they are in the range of the network.
Cloud4Wi SDK supports multiple WiFi authentication protocols to address different scenarios with the best solution: WPA2 Enterprise and Passpoint.
WPA2 Enterprise is a standard protocol that allows devices to connect securely to a certain network identified by an SSID. These profiles are specific to the name of the SSID, which must be known before initializing and installing the profile. If the SSID on the network changes, the WiFi profile won't work anymore and a new profile needs to be installed.
This standard is supported by all mobile devices and WiFi hardware, making it a solid choice in case universal support is required - both on the end-user devices and network side. However, the dependency on the SSID name may pose some constraints in certain scenarios.
At this time, Cloud4Wi suggests using the WPA2-Enterprise technology for Android devices, whenever it is important to provide support to the majority of mobile devices, for example in regions with a high penetration of Android versus iOS.
You can choose any SSID name for your WiFi network. You need to communicate to Cloud4Wi the bundle id (for iOS) and the package name (for Android) of your apps and the SSID name you intend to use.
Passpoint is the next-generation hotspot technology based on the Hotspot 2.0 standard. the connection to a WiFi network using Passpoint does not depend on the name of the SSID. In fact, the same SSID can virtually broadcast multiple virtual operator networks. Passpoint also offers greater support for roaming across enterprise networks, as well as public and federated networks.
Passpoint is at the foundation of the OpenRaoming federation, which allows users to connect and authenticate to a vast number of networks managed by different service providers.
At this time, Cloud4Wi suggests using the Passpoint technology for iOS devices to provide a better onboarding experience to mobile users. In fact, when using the WPA2 Enterprise method, iOS attempts to connect immediately the user to the Wifi network, and if not in range it gives an error to the user in a dialog.
With Cloud4Wi WiFi SDK your app becomes aware when end users enter and visit any of your locations, and every on-site Moment becomes an opportunity to deliver powerful location-based experiences or drive monetization.
Location Events are deterministic, overcoming the accuracy limitations of geofencing in indoor and high-dense urban environments.
No smartphone location permissions are required! User opt-in is collected with the consent experience you design in the app. The location is detected by the network, it doesn't require OS location services.
The WiFi SDK does not require Location permissions from the operative system to work. However, the SDK processes personal data for certain purposes so privacy regulations might require that you collect the proper consent from the customer.
For example, you can promote the new service to your mobile users (with a notification, banner, or button) and collect their acknowledgment and consent when they enroll.
For new users, you can rely on your existing Privacy Policy to collect the consent, and make sure it covers the personal data categories and purposes involved with this new service.
You need to use a WiFi vendor and device models that are compatible with the service and certified by Cloud4Wi. Certified tested vendors for the WPA2 Enterprise mode so far:
Aruba
Juniper (Mist)
Mikrotik
WPA2 Enterprise is a standard protocol, if the vendor is not listed among the tested ones, it is still very likely that is compatible with Cloud4Wi WiFi SDK. Please contact our team, we'll investigate the tech feasibility and develop the necessary integration if necessary.
Certified vendors for the Passpoint mode are:
Juniper (Mist)
You need to add a dedicated SSID on your WiFi network (different from the one used for standard guest WiFi), configured with WPA2-Enterprise settings and (optionally) Hotspot 2.0. The additional SSID will be used only by mobile app users and Passpoint-enabled users. At this time the SSID cannot be hidden.
The SDK is currently available for iOS and Android, however, it can be easily integrated into any app developed with non-native dev languages such as Flutter or React Native (our team will provide guidance on the process). The SDK is compatible with an Android OS starting for version 4.3 and iOS devices starting from iOS 11.0
The WPA2 Enterprise mode is compatible with all Android and iOS devices mentioned above.
The Passpoint mode is compatible with all iOS devices and with a subset of Android devices:
starting from Android 12, Passpoint support is mandatory in all OEM vendors
almost all devices with Android 10 and 11 support Passpoint
for the oldest version of Android, the support of Passpoint is fragmented and depends on the device manufacturer. For example, Samsung phones support Passpoint starting from Android 8.
This method initializes the customer object in the Cloud4Wi account. This method must be invoked before installing the WiFi Profile.
The customer
object is .
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 deduplicateAttribute
attribute is optional. If set, the system will check if an exisitng 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, source
)
Pssible values of deduplicateAttribute
are:
To create a customer without any deduplication check, set deduplicateAttribute
to nil.
Username and password are credentials for the user in the c4w environment and are used for Radius authN/Z.
Users can be initialized with attributes and identifiers that allow the reconciliation of the user data with external systems, including CRMs, CDPs, and marketing automation tools. This includes email address, phone number, or any external identifiers known to the mobile app (check the Customer object for and for the full list of attributes).
When the method to install the WiFi Profile is invoked, the Operative System prompts an alert to the user to ask for permission/confirmation (see ).
Read the to learn more about the differences between WPA2 Enterprise and Passpoint.
Passpoint profiles issued by Cloud4Wi are by default compatible with the OpenRoaming federation. Learn more about .
The automatic connection to WiFi allows Cloud4Wi to detect precisely all the customer visits and interactions and push the relevant Moments to your application systems via or . The WiFi SDK cannot provide client-side events to the app since the detection and processing of location moments are actually performed server-side.
You can design your own enrollment within your mobile app that includes the collection of consents.
, Cisco Catalyst 9800
If username
and password
are not set in the , they are generated randomly during the customer creation and returned to the app in the . This auto generation of the credentials is the best way to proceed.
If the method executes with no errors, it returns the
Initialize the SDK and updates certain Customer attributes at every login
Initializes the customer object in the Cloud4Wi account
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
Deletes installed WPA2Enterprise profile
Deletes installed Passpoint profile
Removes the customerId saved during the create customer, removes any reference to the customer, removes Wi-Fi profiles related to the customer
Returns the identified of the customer created/logged with Cloud4wi Wifi SDK
Retrieve customer profile by username/password
Update the Customer attributes
Create empty customer with default policies
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
Returns the identified of the customer created/logged with Cloud4wi Wifi SDK
This method triggers the installation of a WPA2-Enterprise Wi-Fi profile in the device. The OS will trigger a dialog to ask the user the consent to allow such operations. See User Experience
Param | |
---|---|
Username
and password
are the WiFi credentials of a Cloud4wi customer. When you create a customer using the method createCustomer
the credentials are returned in onSuccess
in the CustomerCreateResponse
object.
This method triggers the installation of a Passpoint Wi-Fi profile in the device.
Param | |
---|---|
Username
and password
are the WiFi credentials of a Cloud4wi customer. When you create a customer using the method createCustomer
the credentials are returned in onSuccess
in the CustomerCreateResponse
object.
It deletes the Passpoint profile installed by the app.
The session is opened when one of this functionscreateCustomer,
setupCustomer
and getCustomerInfo
return success.
It deletes passpoint internet profiles installed in the device using createPasspointProfile and createWPA2EnterpriseProfile
.
The delete of the wpa2-ent profile is not supported on iOs for technical limitation, the only way to delete it is to remove the application or to forgot the wifi network.
this limitation no longer exists since SDK v 1.6.0
username
authorized username
password
authorized password
username
authorized username
password
authorized password
It deletes the WPA2 profile installed by the app.
Note:
The attributes:
username
, password
, lock
are not available in the update customer function
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
.
Variable | Description | Example |
---|---|---|
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 the debug mode you have to configure this key into plist file of the app.
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.
If you need to get the remote push notification token and associate it to a customer you have to init the SDK with the token using the method cloud4WiSDKWiFi.initC4w(token).
Cloud4WiSDKWiFi allows you to share information about installed Wi-Fi profiles among applications on same iOS 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 App Group
capability in every application where SDK is integrated. Group name must be set to group.com.cloud4wi.sdk.wifi
:
After adding required capability you have to supply SDK with the list of interlinked applications identifiers:
Variable | Description | Example |
---|
Param | Format | Example |
---|---|---|
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"
memberId
loyalty member card id
number
generic document number
personalId
id card number
type
type of document
"passport"
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 |
ssid | Wi-Fi network SSID to connect to |
|
outerIdentity | The identity string to be used in the EAP-Identity/Response packet during outer EAP authentication. |
|
username | username associated to the profile |
|
trustedServerNames | An array of server certificate common name strings used to verify a server's certificate |
|
installedBy | the bundleId of the app installed the profile |
|
installed | date when the profile has been installed |
|
status | OK if customer has been created, KO otherwise |
|
generated | data when the customer has been created |
|
id | id of the customer created |
|
organizationId | organizationId owner of the customer |
|
locationId | locationId owner of the customer |
|
hotspotId | hotspotId associated to the customer (not applicable when customer is created via mobile SDK) |
username | username of the customer to access cloud4wi services |
|
password | password of the customer to access cloud4wi services |
|
mailSent | deprecated | nil |
Track customers profile status
fix getCreatedWPA2EnterpriseProfiles
and getCreatedPasspointProfiles
introduced deleteWPA2EnterpriseProfile
Added deletePasspointProfile
method
In the logout
are removed the Passpoint profile installed
Added method updateCustomer
Added DEBUG_MODE
Fix support iOs simulator for Apple Silicon architecture
fix date format in 'lastSeen' field
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
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.
It deletes the WPA2 enterprise profile installed by the app.
It deletes the Passpoint 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
Variable | Description | Example |
---|---|---|
Variable | Description | Example |
---|---|---|
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
outerIdentity
The identity string to be used in the EAP-Identity/Response packet during outer EAP authentication.
anonymous@get.securewifi.io
username
username associated to the profile
YYYYYZZZXXX1
trustedServerNames
An array of server certificate common name strings used to verify a server's certificate
["get.securewifi.io"]
installedBy
the bundleId of the app installed the profile
com.cloud4wi.c4wiapp
installed
date when the profile has been installed
2022-07-08 08:08:44 +0000
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
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
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
.
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
.
Param | Format | Example |
---|
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" |
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:
Variable | Description | Example |
---|---|---|
Variable | Description | Example |
---|---|---|
Variable | Description | Example |
---|---|---|
Variable | Description | Example |
---|---|---|
The SDK doesn't impose any requirement on the experience to enroll users into the WiFi service. The two main functions (initializing a user and installing the WiFi profile) can be deployed contextually or at different moments.
The WiFi user can be initialized at any time, even in the background, for example:
when a user signs up the first time for the app
the first time the app is opened after installing the app update that includes the SDK
at the moment the user explicitly makes some action for enabling the WiFi service
Once the WiFi user is initialized, the installation of the WiFi profile can be triggered by any user experiences, for example:
sending a push notification to the user informing them about the new WiFi service
with a banner in the home of the app
with a link in a menu
Regardless of the user experience that triggers the WiFi profile installation, Cloud4Wi advises creating and showing a dedicated informative screen that explains to the user the benefits of the service before calling the method to install the WiFi profile. In fact, installing the WiFi profile will open a dialog of the OS (different by OS and version) that might be confusing for the user if not previously informed.
For users who just downloaded the app and opened it for the first time, you can integrate the WiFi enrollment as part of your app onboarding or sign-up experience, if any.
As soon as the user sign-up/sign-in to your app, you can present the user a screen that invites him to enroll in the WiFi service. At that point, you can initialize the user in Cloud4Wi using the proper method and then invoke the method to install the WiFi profile.
Here is an example of onboarding experience in the Cloud4Wi demo application
For existing users with the app already installed, you should create an onboarding experience triggered by a call to action. For example, you can:
send a push notification to the user informing them about the new WiFi service
show a menu or a banner in the app
Below is an example of a user experience that includes a menu icon to prompt the user to enroll in the WiFi service, which then presents the user with an informative screen before installing the WiFi profile on the device.
Note that the WiFi activation process is required only once, so it is not advised to create static banners or menus that remain visible also after the WiFi service activation.
The WiFi SDK provides a method (getCreatedWPA2EnterpriseProfiles
or getPasspointProfiles
) to verify if the WiFi Profile is currently installed or not. If the WiFi Profile is already installed, for example, you can hide the banner/link/menu item.
The native OS alert that appears to the user to confirm the WiFi profile installation depends on the OS (iOS or Android), OS version, and, in the case of Android, eventually also on the smartphone vendor.
When the Profile is installed by the SDK, Android 10 doesn't prompt any immediate action. When a supported network is in range, Android triggers a silent notification that suggests the user to connect to a WiFi network.
Because the notification may appear with some delay after the profile installation, we advise instructing the user with a dedicated screen explaining the steps required to finalize the enrollment.
In Android 11, as soon as the profile is installed, the device prompts an overlay on the current screen that immediately asks the user to accept to connect to suggested networks.
Prompts may vary by smartphone model.
When connecting to a WiFi network thanks to a Passpoint profile provisioned via mobile SDK, the user will see the device associated with the WiFi, but Android and iOS show this in a different way
On iOS, the user will see the name of the SSID followed by a second line reporting "Hidden Network".
On Android, the user will see the Friendly Operator Name instead of the SSID, followed by a second line reporting "Connected via <name of the mobile App>"
Once the device connects automatically to the network thanks to a Passpoitn profile installed via the SDK, the user will see their device connected to the network.
iOS will show the name of the WiFi network (SSID) with a second line reporting "Hidden Network"
On Android devices, users will see the Friendly Operator Name instead of the SSID name, and a second line reporting "Connected via <name of the mobile app>"
The Android SDKs lower than 3.1.0 uses version 19.0.1 of the play-services-location library and it is not compatible with versions higher than 20.0.x. If you need to manually import this library, make sure it's one of the compatible versions.
Open the file build.gradle file of the application module (not the main project) on Android Studio. Add the following lines to import geouniq url repository
Add the following dependency
Replace x.y.z with a specific version of library that you can find
The library already declare the basic permissions that needs, if your app meets the Google Play Store policies for background location, make sure you've declared permission to access background location:
The library already contains its ProGuard configuration file, which will be merged with your application's during the build process.
The Mobile Key generated for your app when you configured your project (see here) must be provided as a string resource with name "geouniq_mobile_key"
.
This can be done by putting the following line into the Gradle build script of your app (build.gradle file of your app module)
It could be convenient to set a different value for the debug and the relase build types.
Note that the certificates used for the two build types are generally different, and thus their SHA1 fingerprint will be different. For this reason, you should create two different Client Apps, one for the debug and one for the release build, each with its own fingerprint (see Project Configuration). A common solution is to create two different projects, one for test and one for production, and create an Android Client App on each project, using the debug fingerprint for the test project and the release fingerprint for the production project.
Before initializing the SDK, the below must be imported.
After import, add the below code under the Application class onCreate()
method. The SDK must be enabled before calling any of the other SDK methods.
The Cloud4Wi Location SDK (referenced as GeoUniq) abstracts away cross-platform differences between location services, allowing you to add geofencing and location tracking to your apps with just a few lines of code.
Note that you can use our for iOS and Android to test Cloud4Wi before integrating the SDK, or to test your implementation of Cloud4Wi side-by-side with a complete implementation.
In order to use the geofencing features unlocked by the Location SDK, you need to install also the WiFi SDK to initialize users in your Cloud4Wi account. Read more here.
Want to get started quickly? Follow these four steps:
Setup a project. Create and apps in your console and get your mobile key
Integrate the Cloud4Wi SDK into your app. Integrate the . Or, before integrating, test geofencing with our for iOS and Android.
Configure geofencing. Create custom geofences
Enable integrations. Create a or enable to send Cloud4Wi Moments and user data to other systems.
Access the Apps Console by clicking Apps in the dashboard drawer menu.
Once you land on the Apps console, go to the list of projects and find the pre-existing Project usually named as "Default-<name of your account>". Please, do not create a new project; the ability to create multiple projects will be released soon.
For tihs Project, you can add multiple Client Apps, each one representing a mobile app for a specific mobile platform (Android or iOS) Each Client App is associated with a Mobile Key, which is used ONLY on the mobile SDK integration.
A Project can be configured with any combination of Client Apps regardless of the mobile platform of each of them.
When the Location SDK is integrated into a mobile app that has been configured as a Client App of a Project, every device on which the mobile app gets installed will be automatically registered by the Location SDK on Cloud4Wi.
Each device obtains a Device ID, generated automatically by Cloud4Wi, that can then be obtained by the mobile app.
The set of devices registered for all the Client Apps of a Project represents a unique Device Base for the Project, regardless of the Client App they belong to.
The Location SDK is lightweight and minimizes the impact on the mobile OS performance, both in terms of battery consumption as well as access to location data services.
In order to track geofencing events, you need to initialize a user in your Cloud4Wi account.
The method to initialize users is exposed in the WiFi SDK, so you need to integrate also the WiFi SDK into your project.
Once both the WiFi and Location SDKs are installed you can use the following snippet to initialize the customer in Cloud4Wi as soon the deviceId
is assigned to the phone. This function will initialize an anonymous user without any additional attribute or personal data associated.
The WiFi SDK provides a method to detect if a WiFi Profile is correctly installed in the device.
To manually check if the profile is installed on your iOS device, you can go to Settings > WiFi and click the "Edit" button on the top right corner. Profiles installed via WiFi SDK will be listed as a known network without a name, usually on top of the list. If you click on the info icon, you'll be able to see the username associated with the profile and find the matching user in your Cloud4Wi account.
The answer depends on the OS and type of WiFi profile (WPA2 Enterprise or Passpoint).
When you install a WAP2 Enterprise profile in iOS, the device will attempt to connect immediatly to the WiFi network identified by the SSID written in the WiFi profile.
When you install a Passpoint profile in iOS, if you are already connected to a WiFi network, the device won't change the WiFi network it is associated with. If the device is not currently associated to WiFi while installing the profile, the device will take some time to do the match between availalbe network and the WiFi profile just installed and eventually it might automatically connect. The time it takes, however, it is not deterministic and can very from immediatly up to a few minutes.
When you install a WAP2 Enterprise profile in Android, it depends on the Android version. Starting from Android 11, while installing the profile, the device will attempt to connect to WiFi. If the device was connected to another WiFi network while installing the WiFi, it will attempt to switch to the new WiFi if under coverage. In Android 10 and older, once the WiFi profile is installed, the device will prompt a silent notification inviting the user to connect to the WiFi network the first time the network is detected by the device and every time until the user either accept or decline the notification.
Yes, for both Passpoint and WPA2 Enterprise, the device will attempt to connect automatically to the WiFi network as soon as the device discovers the WIFi network and matches it with the WiFi profile installed in the device.
It might take some time before the device automatically connect after arriving under coverage. The reason of the delay is due to multiple factors:
The device refreshes the list of available network on certain intervals an
The device must match the available WiFi networks against the WiFi profile installed in the phone
There are also dynamics related to the power optimization mechanism of devices that could reduce the frequency of such operations while the phone is in standby mode.
Metric | Android | iOS |
---|
In the alternative, you can use the native WiFi SDK methods to .
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
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
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
memberId
loyalty member card id
number
generic document number
personalId
id card number
type
type of document
"passport"
Library size | ~800 KB | ~40 MB |
Binay size impact | ~800 KB | ~800 KB |
Memory allocation | ~14MB | ~16MB |
Battery impact | < 1% | < 2% |
Data traffic | < 1MB | < 1MB |
Location detections | ~100 / day | ~100 / day |
As soon as the SDK starts for the first time, a Device ID is assigned to that specific installation of your app.
The Device ID assigned to an installation might change in case of rare events, for example if the local storage of the device gets erased.
The SDK provides two different ways to obtain the Device ID.
The first method to obtain the Device ID is to set a IDeviceIdListener
, as shown in the example below. When a listener is set, the SDK immediately returns the Device ID through the onDeviceIdAvailable()
callback if the Device ID is already available. Otherwise, it will call the callback method as soon as the ID is obtained.
The best practice for an app that want to collect on a backend systems the Device ID assigned to each installation, is to set a
IDeviceIdListener
each time it starts. The mobile app would receive the Device ID each time and should always send it to the backend system. Then, the backend system should overwrite any previously stored value if the new received value is different.
The second way is to call the GeoUniq.getDeviceId()
method. This method returns the value of the Device ID if it has already been obtained or null
if the Device ID has not been obtained yet.
The SDK can be enabled and disabled at runtime. To make GeoUniq SDK start, you need to enable it by calling the method GeoUniq.enable()
at least once.
You might do that into the main activity of your app, as in the example below.
Once enabled, the SDK will not stop until you disable it by calling GeoUniq.disable()
. That is, it will keep performing automatic operations, such as tracking the device position, even after a device reboot or an update of the app. Disabling the SDK at runtime is useful if you want the SDK to stop completely. For example, you could remotely control a configuration parameter of your app to stop the SDK for all or some of your installations.
If you simply don't want GeoUniq to keep collecting location data for a specific User, you can do that without completely disabling the SDK (see Handle user consent). This way you can still exploit the mobile-side functionalities that the SDK provides without having GeoUniq collecting data for the specific user
For the SDK to be able to accomplish its main task, that is tracking the device position, the following requirements must be met:
The foreground location permission must be granted to the app
The background location permission must be granted to the app, if it meets the Google Play Store policies for background location
The location functionality must be enabled on the device
Google Play Services must be installed on the device (almost always met)
The SDK provides a simple way for checking all the requirements and optionally solve the related issues. Solving an issue generally implies showing an alert to the User. Depending on the specific requirement, a different alert will be shown.
The example below shows hot to check for all requirements and solve them. In the example, the check is performed on the onStart()
method of the main activity
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
Allows to get the work location calculated for this device.
Return a WorkLocation
object if work location is available or null otherwise.
Sets the listener class that will receive updates when the work location changes. The listener must be impIement the IWorkLocationListener interface.
Remove work location updates for the listener.
Minor bug fix.
Added support to Android 14
Fixed proguard rule that prevent the obfuscation of client App.
Removed the static permission ACTIVITY_RECOGNITION.
The SDK now support play-services-location library versions higher 20.0.x.
Fixed proguard rule that prevent the obfuscation of client App.
Added trigger geofence when enter for the first time
Added API resetDeviceId()
Now you can change the base API url declaring the meta data
Removed fingerprint validation SDK side
Fixed bug in the trigger manager that caused an error when updating the remote trigger list
Added engine that allow the SDK to identify "Locations Of Interest" as "Home Location" and "Work Location"
Added engine that manage Triggers set by remote
Allows to get the home location calculated for this device.
Return an HomeLocation
object if home location is available or null otherwise.
Sets the listener class that will receive updates when the home location changes.
The listener must be impIement the IHomeLocationListener
interface.
Remove home location updates for the listener.
The method GeoUniq.
getInstance(context).resetDeviceId()
reset the Device Id by invoking a new device registration.
To initialize the framework and allow it to collect data in the background it is necessary to add this call in the didFinishLaunchingWithOptions
method (this method don't start the tracking engine)
The method GeoUniq.sharedInstance().getDeviceId()
return the id relative to the device if it has been registered, nil otherwise.
The locations of interest, such as home and work locations, are places identified based on the visits detected by the SDK.
Create and apps in your console and get your mobile key
Add pod 'c4w-location-sdk'
to your Podfile and run pod install
. More details .
For other integration methods see
Add the following key to Info.plist file (String value) with the corresponding value (that you obtained when added your app to your project)
Add the following keys to Info.plist file (String value), the corresponding values will be shown to the user by iOS
To initialize the framework and allow it to collect data in the background it is necessary to add this call in the didFinishLaunchingWithOptions
method (this method don't start the tracking engine)
To start the tracking engine call enable method.
Example:
To start the tracking engine call enable method. You can do that into the didFinishLaunchingWithOptions
method. It is possible to enable directly the tracking engine when the initialize method is called. Once enabled, the SDK will not stop until you disable it by calling GeoUniq.sharedInstance().disable()
If the application does not have the permissions or has not yet requested them, the enable method will request them.
Add the following key to Info.plist file (String value) with the corresponding value (that you obtained when added your app to your project)
Add the following keys to Info.plist file (String value), the corresponding values will be shown to the user by iOS
If your app supports iOS add
Add the following key to Info.plist file (String value), it will be used to show a popup to the user before the provided by iOS. Only if the user accepted this first popup we request the permission to iOS.
In order to obtain a greater number of positions we suggest to enable this feature. To do this carry out these two steps:
Select your project -> Select your target -> Select 'Signing & Capabilities' tab -> tap on '+ Capability' -> select 'Background Modes' -> check 'Background fetch'
In AppDelegate add this code:
iOS 14 introduced the permission request to get the device's IDFA. In this regard, we have introduced two methods in our framework.
The first one checking the permission status:
And the second one that makes the request and returns the user's choice:
It is possible to use these methods but also the methods provided directly by iOS. There is no need to communicate to our framework the outcome of the permission. Invoke the request method as soon as possible. For example right after the enable.
Important: Before invoking the method for the request (both Geouniq and iOS) it is necessary to insert the key in the plist
In order to track geofencing events, you need to initialize a user in your Cloud4Wi account.
The method to initialize users is exposed in the WiFi SDK, so you need to integrate also the WiFi SDK into your project.
Once both the WiFi and Location SDKs are installed you can use the following snippet to initialize the customer in Cloud4Wi as soon the deviceId
is assigned to the phone. This function will initialize an anonymous user without any additional attribute or personal data associated.
The locations of interest, such as home and work locations, are places identified based on the visits detected by the SDK.
In the alternative, you can use the native WiFi SDK methods to .
13.3
5.2 with "Build Libraries for Distribution" enabled (in case of updating the swift version of the app it isn't necessary to update the framework).
3.0.0 - Changelog
The method GeoUniq.sharedInstance().resetDeviceId()
reset the Device Id by invoking a new device registration.