Mobile SDK - Android
- ARR library: download the password-protected zip package below. The password will be communicated by Cloud4Wi during delivery
- JWT Token, shared by Cloud4Wi during delivery
- SSID name: note that the SSID is coded in the App, so make sure to know in advance the name of WiFi network you want to enable
- We prepared a getting started project that you can clone and import in your environment to get started. Contact our team to get access to the GIT.
To integrate Android Mobile SDK into your Android project copy provided AAR file to './app/libs' directory of your App.
After that add following dependency to your project's build.gradle
To provide your Cloud4Wi JWT token to the SDK you can specify it in your App properties (strings.xml).
Property name should be set to 'cloud4wi_hs2api_jwt_token'.
In the properties, you can also set required SSID, key: 'cloud4wi_hs2api_ssid'.
NOTE: These two properties may be specified in Runtime. See the API overview and examples for more info.
3. Framework API overview
AndroidManifest of this library requires the following permissions:
4. Code examples:
In the following code example, we will create a new customer and then install the WPA2-Enterprise Wi-Fi profile on an Android phone. After that when the customer will be in the range of a Wi-Fi network with matching SSID - his device will connect automatically.
This example represents the following use-case.
- MobileSDK configuration. Setting of JWT and Wi-Fi SSID values.
- Read list of organization policies from API.
- Creating new customer in API.
- Verifying customer credentials in API.
- Creating the WPA2-Enterprise Wi-Fi profile on the Android device for test user to connect to test SSID.