initializeIdentity function
Implementation
Future<void> initializeIdentity(String appid) async {
setApplicationID(appid);
try {
final ca = await PlatformAssetBundle().load('assets/certs/rootCA.pem');
SecurityContext.defaultContext.setTrustedCertificatesBytes(ca.buffer.asInt8List());
} catch (err) {
LOG.printError([err]);
}
await ApplicationInfo().init();
var manager = SystemStorageManager();
manager.setPreferencias(await ApplicationPreferenceManager().load());
manager.addprovide((preferences) => ServerSettingsSorage(preferences));
manager.addprovide((preferences) => LoginFielsStorage(preferences));
manager.addprovide((preferences) => SelectedSucursalStorage(preferences));
await SoundService().init();
final infoManager = DeviceInfoManager();
await infoManager.init();
if (infoManager.licences.isEmpty) throw "No hay ninguna licencia asociada con este dispositivo";
}