Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
machine
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hooloo
android
machine
Commits
f572ff3a
Commit
f572ff3a
authored
Dec 03, 2022
by
wjg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add install app
parent
e6d3d116
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
main_app/src/main/java/com/ihaoin/hooloo/device/update/UpdateService.java
+9
-2
No files found.
main_app/src/main/java/com/ihaoin/hooloo/device/update/UpdateService.java
View file @
f572ff3a
...
...
@@ -106,9 +106,16 @@ public class UpdateService extends Thread {
private
void
startDownload
(
UpdateDataVo
dataVo
)
{
String
filename
=
"hooloo-device_"
+
dataVo
.
getVersion
()
+
"_"
+
dataVo
.
getVersionCode
()
+
"_"
+
System
.
currentTimeMillis
()
+
".apk"
;
String
path
=
Environment
.
getExternalStorageDirectory
().
getAbsolutePath
()
+
"/hooloo"
;
if
(!
new
File
(
path
).
exists
())
{
new
File
(
path
).
mkdirs
();
File
pathFile
=
new
File
(
path
);
if
(!
pathFile
.
exists
())
{
pathFile
.
mkdirs
();
}
if
(
pathFile
.
listFiles
()
!=
null
)
{
for
(
File
subfile
:
pathFile
.
listFiles
())
{
subfile
.
delete
();
}
}
String
file
=
path
+
"/"
+
filename
;
Utils
.
i
(
AppConfig
.
TAG_UPDATE
,
String
.
format
(
"开始下载文件 url: %s, file: %s"
,
dataVo
.
getUrl
(),
file
));
if
(
AppConfig
.
DEBUG
)
{
...
...
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