Skip to content

Commit

Permalink
Added new login mechanism | uploading version 96 - 12.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
UriahShaulMandel committed Apr 24, 2020
1 parent 86f146f commit 109222f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down
19 changes: 16 additions & 3 deletions app/src/main/java/com/bald/uriah/baldphone/utils/S.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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"));

}
}

Expand Down

0 comments on commit 109222f

Please sign in to comment.