getInstallationId method
String
getInstallationId(
- SharedPreferences sharedPrefs
)
Implementation
String getInstallationId(SharedPreferences sharedPrefs) {
if (_installationId != null) {
return _installationId!;
}
final storedInstallationId = sharedPrefs.getString(installationIdKey);
if (storedInstallationId != null) {
_installationId = storedInstallationId;
return storedInstallationId;
} else {
final newInstallationId = Uuid().v1();
_installationId = newInstallationId;
sharedPrefs.setString(
AvoInstallationId.installationIdKey, newInstallationId);
return newInstallationId;
}
}