Skip to content

Commit 0def3ce

Browse files
committed
Comment version check
1 parent 5775e6c commit 0def3ce

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

General/src/main/java/org/openimis/general/General.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ public void ChangeLanguage(Context ctx,String Language){
6262
res.updateConfiguration(config, dm);
6363
}
6464

65-
public String getVersion(Context ctx, String PackageName){
65+
// ToDo: remove this method if published to Google Play
66+
/*public String getVersion(Context ctx, String PackageName){
6667
String VersionName = "";
6768
6869
PackageManager manager = ctx.getPackageManager();
@@ -77,9 +78,10 @@ public String getVersion(Context ctx, String PackageName){
7778
}
7879
return VersionName;
7980
80-
}
81+
}*/
8182

82-
public String getFromRestApi(final String functionName) {
83+
// ToDo: remove this method if published to Google Play
84+
/*public String getFromRestApi(final String functionName) {
8385
String uri = getDomain()+ "api/";
8486
8587
final String[] content = {null};
@@ -102,14 +104,14 @@ public String getFromRestApi(final String functionName) {
102104
}
103105
}
104106
return content[0];
105-
}
107+
}*/
106108

107-
// ToDo: depricate this method if published to Google Play
109+
// ToDo: depricate/remove this method if published to Google Play
108110
public boolean isNewVersionAvailable(String Field,Context ctx, String PackageName){
109-
String result = getFromRestApi("system/apkversion/" + Field);
110-
if(result.contains(",")) {
111-
result = result.replaceAll("(\\d+)\\,(\\d+)", "$1.$2");
112-
}
111+
//String result = getFromRestApi("system/apkversion/" + Field);
112+
//if(result.contains(",")) {
113+
// result = result.replaceAll("(\\d+)\\,(\\d+)", "$1.$2");
114+
//}
113115
// return result == ""?false:Float.parseFloat(this.getVersion(ctx, PackageName)) < Float.parseFloat(result);
114116
return false;
115117
}

0 commit comments

Comments
 (0)