@@ -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,16 @@ public String getFromRestApi(final String functionName) {
102104 }
103105 }
104106 return content[0];
105- }
107+ }*/
106108
109+ // ToDo: depricate/remove this method if published to Google Play
107110 public boolean isNewVersionAvailable (String Field ,Context ctx , String PackageName ){
108- String result = getFromRestApi ("system/apkversion/" + Field );
109- if (result .contains ("," )) {
110- result = result .replaceAll ("(\\ d+)\\ ,(\\ d+)" , "$1.$2" );
111- }
112- return result == "" ?false :Float .parseFloat (this .getVersion (ctx , PackageName ).toString ()) < Float .parseFloat (result );
111+ //String result = getFromRestApi("system/apkversion/" + Field);
112+ //if(result.contains(",")) {
113+ // result = result.replaceAll("(\\d+)\\,(\\d+)", "$1.$2");
114+ //}
115+ // return result == ""?false:Float.parseFloat(this.getVersion(ctx, PackageName)) < Float.parseFloat(result);
116+ return false ;
113117 }
114118}
115119
0 commit comments