Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bd1a2737d |
@@ -8,8 +8,8 @@ android {
|
|||||||
applicationId "com.streamplayer"
|
applicationId "com.streamplayer"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 100400
|
versionCode 100500
|
||||||
versionName "10.0.4"
|
versionName "10.0.5"
|
||||||
buildConfigField "String", "DEVICE_REGISTRY_URL", '"http://194.163.191.200:4000"'
|
buildConfigField "String", "DEVICE_REGISTRY_URL", '"http://194.163.191.200:4000"'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ public class UpdateManager {
|
|||||||
private static final String TAG = "UpdateManager";
|
private static final String TAG = "UpdateManager";
|
||||||
private static final String LATEST_RELEASE_URL =
|
private static final String LATEST_RELEASE_URL =
|
||||||
"https://gitea.cbcren.online/api/v1/repos/renato97/app/releases/latest";
|
"https://gitea.cbcren.online/api/v1/repos/renato97/app/releases/latest";
|
||||||
|
private static final String GITEA_TOKEN = "4b94b3610136529861af0821040a801906821a0f";
|
||||||
|
|
||||||
private final Context appContext;
|
private final Context appContext;
|
||||||
private final Handler mainHandler;
|
private final Handler mainHandler;
|
||||||
@@ -74,6 +75,7 @@ public class UpdateManager {
|
|||||||
try {
|
try {
|
||||||
Request request = new Request.Builder()
|
Request request = new Request.Builder()
|
||||||
.url(LATEST_RELEASE_URL)
|
.url(LATEST_RELEASE_URL)
|
||||||
|
.header("Authorization", "token " + GITEA_TOKEN)
|
||||||
.get()
|
.get()
|
||||||
.build();
|
.build();
|
||||||
try (Response response = httpClient.newCall(request).execute()) {
|
try (Response response = httpClient.newCall(request).execute()) {
|
||||||
@@ -247,7 +249,11 @@ public class UpdateManager {
|
|||||||
if (TextUtils.isEmpty(url)) {
|
if (TextUtils.isEmpty(url)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Request request = new Request.Builder().url(url).get().build();
|
Request request = new Request.Builder()
|
||||||
|
.url(url)
|
||||||
|
.header("Authorization", "token " + GITEA_TOKEN)
|
||||||
|
.get()
|
||||||
|
.build();
|
||||||
try (Response response = httpClient.newCall(request).execute()) {
|
try (Response response = httpClient.newCall(request).execute()) {
|
||||||
if (!response.isSuccessful() || response.body() == null) {
|
if (!response.isSuccessful() || response.body() == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user