-Remove the code to update it when the application get's updated - it does not function anyway.
Refactoring
- FileDownloader object must have only one instance and must belong to PTAppLogic.
- The code to connect to remote must be moved out of the constructor in a new function.
- The logic for generating the version must be found in FileDownloader and not in PTAppLogic.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
In FileDownloader add
public String getVersion()
{
if (_newEntries != null && _newEntries.size() > 0)
{
String appVersion = "";
int ver = _newEntries.getFirst()._fileVer;
String strVersion = "" + ver;
if (strVersion.length() > 0)
{
appVersion = strVersion.substring(0, 1);
strVersion = strVersion.substring(1);
if (strVersion.length() > 0)
{
appVersion += "." + strVersion.substring(0, 1);
strVersion = strVersion.substring(1);
if (strVersion.length() > 0)
{
appVersion += "." + strVersion;
}
}
System.out.println(appVersion);
return appVersion;
}
}
return null;
}
Fixed in version 5.0.3
The app version must be updated on app startup.
-Remove the code to update it when the application get's updated - it does not function anyway.
Refactoring
- FileDownloader object must have only one instance and must belong to PTAppLogic.
- The code to connect to remote must be moved out of the constructor in a new function.
- The logic for generating the version must be found in FileDownloader and not in PTAppLogic.