From 109222f43c55eff6fbce816b3baddfdff4df6aaa Mon Sep 17 00:00:00 2001 From: Uriah Date: Sat, 25 Apr 2020 02:01:21 +0300 Subject: [PATCH] Added new login mechanism | uploading version 96 - 12.1.0 --- app/build.gradle | 4 ++-- .../com/bald/uriah/baldphone/utils/S.java | 19 ++++++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 732ae6c5..97ed26c9 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -24,8 +24,8 @@ android { applicationId "com.bald.uriah.baldphone" minSdkVersion 21 targetSdkVersion 28 - versionCode 95 - versionName "12.0.1" + versionCode 96 + versionName "12.1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/bald/uriah/baldphone/utils/S.java b/app/src/main/java/com/bald/uriah/baldphone/utils/S.java index 175d149f..15767316 100644 --- a/app/src/main/java/com/bald/uriah/baldphone/utils/S.java +++ b/app/src/main/java/com/bald/uriah/baldphone/utils/S.java @@ -51,6 +51,7 @@ import androidx.recyclerview.widget.RecyclerView; import com.android.volley.Request; +import com.android.volley.RequestQueue; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import com.bald.uriah.baldphone.BuildConfig; @@ -358,15 +359,27 @@ public static void sendVersionInfo(final Context context) { sharedPreferences.edit().putString(BPrefs.UUID_KEY, UUID.randomUUID().toString()).apply(); } - Volley.newRequestQueue(context).add( + final RequestQueue requestQueue = Volley.newRequestQueue(context); + + requestQueue.add( new StringRequest( Request.Method.GET, - String.format(Locale.US, "http://baldphone.c1.biz/insert_new_install.php?uuid=%s&vcode=%d", sharedPreferences.getString(BPrefs.UUID_KEY, null), BuildConfig.VERSION_CODE), + "https://raw.githubusercontent.com/UriahShaulMandel/BaldPhone/master/logging%20mechanism/loga.txt", response -> { + requestQueue.add( + new StringRequest( + Request.Method.GET, + String.format(Locale.US, "%s?uuid=%s&vcode=%d&locale=%s&flavor=%s", response, sharedPreferences.getString(BPrefs.UUID_KEY, null), BuildConfig.VERSION_CODE, String.valueOf(Locale.getDefault()), BuildConfig.FLAVOR), + response2 -> { + }, + error2 -> { + } + ).setTag("baldphone_server")); }, error -> { } - ).setTag("baldphone_server")); + ).setTag("baldphone_get_server_info")); + } }