This method triggers the installation of a Passpoint Wi-Fi profile in the device.
/** * Add or update HotSpot 2.0 Wi-Fi profile * * @param username - authorization user name * @param password - authorization password * * @throwsException - exception thrown if profile cannot be created or updated */ @TargetApi(Build.VERSION_CODES.O)publicFuture<Boolean>createPasspointProfile(String username,String password,Callback<Boolean> onSuccess,Callback<MobileSDKException> onError) { return asyncExecutor.execute(() -> wiFiProfileService.createPasspointProfile(username, password), onSuccess, onError);
}
Passpoint is supported in Android 11+.
We suggest to fallback to WPA2 enterprise if the device doens't support Passpoint using the following snippet.
if(cloud4wiSDK.isPasspointSupported()) {cloud4wiSDK.createPasspointProfile(username, password)} else {// Android 10- and other devices that don't support Passpointcloud4wiSDK.createWPA2EnterpriseProfile(username, password)}