Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOMobile
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fallenstardust
YGOMobile
Commits
bc019fb9
Commit
bc019fb9
authored
Sep 10, 2023
by
fallenstardust
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取在线(先行 正式)对照表
parent
d96633c0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
3 deletions
+37
-3
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
+1
-1
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
...c/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
+36
-2
No files found.
mobile/src/main/java/cn/garymb/ygomobile/Constants.java
View file @
bc019fb9
...
@@ -156,7 +156,7 @@ public interface Constants {
...
@@ -156,7 +156,7 @@ public interface Constants {
String
URL_DONATE
=
"https://afdian.net/@ygomobile"
;
String
URL_DONATE
=
"https://afdian.net/@ygomobile"
;
String
URL_MASTER_RULE_CN
=
"https://ocg-rule.readthedocs.io/"
;
String
URL_MASTER_RULE_CN
=
"https://ocg-rule.readthedocs.io/"
;
String
WIKI_SEARCH_URL
=
"https://ygocdb.com/card/"
;
String
WIKI_SEARCH_URL
=
"https://ygocdb.com/card/"
;
String
URL_HOME_VERSION
=
"https://ygomobile.top/ver
ndwnload
.txt"
;
String
URL_HOME_VERSION
=
"https://ygomobile.top/ver
sion
.txt"
;
String
URL_YGO233_DOWNLOAD_LINK
=
"https://ygo233.com/download/ygomobile"
;
String
URL_YGO233_DOWNLOAD_LINK
=
"https://ygo233.com/download/ygomobile"
;
String
URL_YGO233_ADVANCE
=
"https://ygo233.com/pre"
;
String
URL_YGO233_ADVANCE
=
"https://ygo233.com/pre"
;
String
URL_YGO233_DATAVER
=
"https://ygo233.com/pre/dataver"
;
String
URL_YGO233_DATAVER
=
"https://ygo233.com/pre/dataver"
;
...
...
mobile/src/main/java/cn/garymb/ygomobile/ui/home/HomeActivity.java
View file @
bc019fb9
...
@@ -25,8 +25,17 @@ import com.ashokvarma.bottomnavigation.TextBadgeItem;
...
@@ -25,8 +25,17 @@ import com.ashokvarma.bottomnavigation.TextBadgeItem;
import
com.tencent.smtt.export.external.TbsCoreSettings
;
import
com.tencent.smtt.export.external.TbsCoreSettings
;
import
com.tencent.smtt.sdk.QbSdk
;
import
com.tencent.smtt.sdk.QbSdk
;
import
java.io.BufferedReader
;
import
java.io.ByteArrayOutputStream
;
import
java.io.FileInputStream
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.io.OutputStreamWriter
;
import
java.io.StringReader
;
import
java.nio.charset.StandardCharsets
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.AppsSettings
;
import
cn.garymb.ygomobile.Constants
;
import
cn.garymb.ygomobile.Constants
;
...
@@ -56,6 +65,10 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
...
@@ -56,6 +65,10 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
long
exitLasttime
=
0
;
long
exitLasttime
=
0
;
public
static
String
Version
;
public
static
String
Version
;
public
static
String
Cache_link
;
public
static
String
Cache_link
;
public
static
String
Cache_pre_release_code
;
public
static
List
<
Integer
>
pre_code_list
=
new
ArrayList
<>();
public
static
List
<
Integer
>
released_code_list
=
new
ArrayList
<>();
private
static
final
int
TYPE_GET_VERSION_OK
=
0
;
private
static
final
int
TYPE_GET_VERSION_OK
=
0
;
private
static
final
int
TYPE_GET_VERSION_FAILED
=
1
;
private
static
final
int
TYPE_GET_VERSION_FAILED
=
1
;
...
@@ -83,8 +96,10 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
...
@@ -83,8 +96,10 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
switch
(
msg
.
what
)
{
switch
(
msg
.
what
)
{
case
TYPE_GET_VERSION_OK:
case
TYPE_GET_VERSION_OK:
Version
=
msg
.
obj
.
toString
().
substring
(
0
,
msg
.
obj
.
toString
().
indexOf
(
"|"
));
//截取版本号
Version
=
msg
.
obj
.
toString
().
substring
(
0
,
msg
.
obj
.
toString
().
indexOf
(
"|"
));
//截取版本号
Cache_link
=
msg
.
obj
.
toString
().
substring
(
msg
.
obj
.
toString
().
indexOf
(
"|"
)
+
1
);
Cache_link
=
msg
.
obj
.
toString
().
substring
(
msg
.
obj
.
toString
().
indexOf
(
"|"
)
+
1
,
msg
.
obj
.
toString
().
indexOf
(
"\n"
));
Log
.
i
(
BuildConfig
.
VERSION_NAME
,
Version
+
"和"
+
Cache_link
);
Cache_pre_release_code
=
msg
.
obj
.
toString
().
substring
(
msg
.
obj
.
toString
().
indexOf
(
"\n"
)
+
1
);
arrangeCodeList
(
Cache_pre_release_code
);
Log
.
i
(
Constants
.
TAG
,
Cache_pre_release_code
);
if
(!
Version
.
equals
(
BuildConfig
.
VERSION_NAME
)
&&
!
Version
.
isEmpty
()
&&
!
Cache_link
.
isEmpty
())
{
if
(!
Version
.
equals
(
BuildConfig
.
VERSION_NAME
)
&&
!
Version
.
isEmpty
()
&&
!
Cache_link
.
isEmpty
())
{
DialogPlus
dialog
=
new
DialogPlus
(
getActivity
());
DialogPlus
dialog
=
new
DialogPlus
(
getActivity
());
dialog
.
setMessage
(
R
.
string
.
Found_Update
);
dialog
.
setMessage
(
R
.
string
.
Found_Update
);
...
@@ -312,9 +327,11 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
...
@@ -312,9 +327,11 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
super
.
onStart
();
super
.
onStart
();
}
}
public
CardLoader
getCardLoader
()
{
public
CardLoader
getCardLoader
()
{
return
cardLoader
;
return
cardLoader
;
}
}
public
ImageLoader
getImageLoader
()
{
public
ImageLoader
getImageLoader
()
{
return
imageLoader
;
return
imageLoader
;
}
}
...
@@ -401,4 +418,21 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
...
@@ -401,4 +418,21 @@ public abstract class HomeActivity extends BaseActivity implements BottomNavigat
});
});
}
}
private
void
arrangeCodeList
(
String
code
)
{
BufferedReader
br
=
new
BufferedReader
(
new
StringReader
(
code
));
try
{
String
line
;
while
((
line
=
br
.
readLine
())
!=
null
)
{
String
[]
words
=
line
.
trim
().
split
(
"[ ]+"
);
pre_code_list
.
add
(
Integer
.
valueOf
(
words
[
0
]));
released_code_list
.
add
(
Integer
.
valueOf
(
words
[
1
]));
}
}
catch
(
Exception
e
)
{
Log
.
e
(
"读取对照表"
,
e
+
""
);
}
finally
{
Log
.
w
(
"读取对照表"
,
pre_code_list
.
toString
());
Log
.
e
(
"读取对照表"
,
released_code_list
.
toString
());
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment