Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #10 from kolserdav/develop
Browse files Browse the repository at this point in the history
fixed change node bug
  • Loading branch information
kolserdav authored Jun 29, 2023
2 parents 6c43fd6 + 85a5f9f commit 5d7af04
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ android {
applicationId "com.kolserdav.ana"
minSdk 21
targetSdk 33
versionCode 123
versionName "1.23"
versionCode 124
versionName "1.24"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
23 changes: 7 additions & 16 deletions android/app/src/main/java/com/kolserdav/ana/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.EventListener;
import java.util.concurrent.ExecutionException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand All @@ -32,21 +31,13 @@ public class MainActivity extends Activity {

public WebView mWebView;

private EventListener event = new Event();

public DB db;

private Config config = new Config();

private Helper helper;

private Boolean firstLoad = true;


public interface Check {
void onGetStatusCode(int a);
}

private static class Request extends AsyncTask<Void, Void, String> {

public int status = 500;
Expand All @@ -60,21 +51,22 @@ private static class Request extends AsyncTask<Void, Void, String> {
public static final String TAG = "Request";

protected String doInBackground(Void... params) {
AppInterface dataApp = db.app.init(new AppInterface());
try {
// Create a URL object with the target URL
String useUrl = "https://uyem.ru/api/check";
if (dataApp.url.equals("null")) {
return "Error";
}

String useUrl = dataApp.url + Config.CHECK_URL_PATH;
Log.d(TAG, "Try request " + useUrl);
URL url = new URL(useUrl);

// Open a connection to the URL
HttpURLConnection connection = (HttpURLConnection) url.openConnection();

// Set the request method to GET
connection.setRequestMethod("GET");

// Get the response code
status = connection.getResponseCode();

// Read the response from the input stream
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
StringBuilder response = new StringBuilder();
String line;
Expand All @@ -83,7 +75,6 @@ protected String doInBackground(Void... params) {
}
reader.close();

// Return the response as a string
return response.toString();
} catch (Exception e) {
e.printStackTrace();
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelogs/124.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fixed change node bug

0 comments on commit 5d7af04

Please sign in to comment.