Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e3f97fbd
authored
Apr 05, 2023
by
wukun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台被杀,重启
parent
212ed087
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
30 deletions
app/src/main/java/com/dayu/bigfish/InitializeActivity.java
app/src/main/java/com/dayu/bigfish/MyApplication.java
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
baseSDK/src/main/java/com/dayu/common/Constants.java
app/src/main/java/com/dayu/bigfish/InitializeActivity.java
View file @
e3f97fbd
...
...
@@ -38,6 +38,7 @@ public class InitializeActivity extends DataBindingActivity<ActivityInitializeMa
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
MyApplication
.
APP_STATUS
=
1
;
super
.
onCreate
(
savedInstanceState
);
}
...
...
app/src/main/java/com/dayu/bigfish/MyApplication.java
View file @
e3f97fbd
...
...
@@ -10,6 +10,7 @@ import android.net.wifi.WifiManager;
import
android.os.Build
;
import
android.os.Handler
;
import
android.support.annotation.NonNull
;
import
android.util.Log
;
import
com.dayu.bigfish.ui.service.LocationService
;
import
com.dayu.common.BaseApplication
;
...
...
@@ -47,6 +48,8 @@ public class MyApplication extends BaseApplication {
private
static
Handler
mHandler
;
private
static
int
mMainThreadId
;
private
static
MyApplication
myApplication
;
public
static
int
APP_STATUS
=
0
;
// 记录App的启动状态
/**
* 程序的入口方法
...
...
@@ -245,4 +248,12 @@ public class MyApplication extends BaseApplication {
e
.
printStackTrace
();
}
}
public
static
void
reInitApp
()
{
if
(
myApplication
!=
null
){
Intent
intent
=
new
Intent
(
myApplication
,
InitializeActivity
.
class
);
intent
.
setFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
|
Intent
.
FLAG_ACTIVITY_NEW_TASK
);
myApplication
.
startActivity
(
intent
);
}
}
}
app/src/main/java/com/dayu/bigfish/ui/MainActivity.java
View file @
e3f97fbd
...
...
@@ -29,6 +29,7 @@ import com.dayu.base.api.DownloadService;
import
com.dayu.base.api.protocol.AddressInfoBean
;
import
com.dayu.base.api.protocol.RedPacketBean
;
import
com.dayu.base.ui.activity.BaseActivity
;
import
com.dayu.bigfish.MyApplication
;
import
com.dayu.bigfish.R
;
import
com.dayu.bigfish.api.APIService
;
import
com.dayu.bigfish.api.protocol.BindUmengData
;
...
...
@@ -116,6 +117,15 @@ public class MainActivity extends BaseActivity<MainPresenter, ActivityMainBindin
}
@Override
public
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
if
(
MyApplication
.
APP_STATUS
!=
1
)
{
MyApplication
.
reInitApp
();
finish
();
}
}
@Override
public
void
initView
()
{
Runnable
runnable
=
new
Runnable
()
{
@Override
...
...
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
e3f97fbd
...
...
@@ -45,21 +45,21 @@ public class Constants {
/**
* dev环境配置.
*/
//
public static String ENVIROMENT = "debug";
//
public static String PHOTO = "dev";
//
public static int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static String BASE_URL = "http://47.94.101.239:3112";
//
public static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
//
public static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
//
public static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
//
public static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
//
public static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
//
public static final String UP_PHOTO = "/file/uploadMore?targetPath=dev/sp/mobile/android/business/checkApply";
//
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=dev/video";
//
public static boolean IS_DEBUG = true;
//
public static String VIDEO_SHARE_URL = "http://uat.kf.ai:9099/#/shareVideo?type=_type&id="; //uat 学习视频分享链接 type(课程: course 直播: live)
//
public static int XLR_PID = 239; //小绿人商家id
//
public static String SCHEME_9099 = "http://dev.kf.ai:9099/#/";
public
static
String
ENVIROMENT
=
"debug"
;
public
static
String
PHOTO
=
"dev"
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
String
BASE_URL
=
"http://47.94.101.239:3112"
;
public
static
String
WEB_SOP
=
"http://47.94.101.239:9004/#/sop"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manyServiceResult"
;
public
static
String
MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manySop"
;
public
static
String
WEB_SOP_DETAIL
=
"http://47.94.101.239:9004/#/sopdetail"
;
public
static
String
WEB_ZHI_SHI
=
"http://47.94.101.239:9004/#/detail"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=dev/sp/mobile/android/business/checkApply"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=dev/video"
;
public
static
boolean
IS_DEBUG
=
true
;
public
static
String
VIDEO_SHARE_URL
=
"http://uat.kf.ai:9099/#/shareVideo?type=_type&id="
;
//uat 学习视频分享链接 type(课程: course 直播: live)
public
static
int
XLR_PID
=
239
;
//小绿人商家id
public
static
String
SCHEME_9099
=
"http://dev.kf.ai:9099/#/"
;
/**
...
...
@@ -85,21 +85,21 @@ public class Constants {
/**
* 正式环境.
*/
public
static
String
ENVIROMENT
=
"release"
;
public
static
String
PHOTO
=
"online"
;
public
static
int
LOG_LEVEL
=
LogUtils
.
LEVEL_OFF
;
public
static
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
public
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
public
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
public
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult"
;
public
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop"
;
public
static
final
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"
;
public
static
final
String
UP_VIDEO
=
"/file/uploadVideoOne?targetPath=online/video"
;
public
static
boolean
IS_DEBUG
=
false
;
public
static
String
VIDEO_SHARE_URL
=
"http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="
;
//学习视频分享链接 type(课程: course 直播: live)
public
static
int
XLR_PID
=
1936
;
//小绿人商家id
public
static
String
SCHEME_9099
=
"http://app.dl.kf.ai/ext/#/"
;
//
public static String ENVIROMENT = "release";
//
public static String PHOTO = "online";
//
public static int LOG_LEVEL = LogUtils.LEVEL_OFF;
//
public static String BASE_URL = "https://mobile.kf.ai";
//
public static String WEB_SOP = "https://sop.kf.ai/#/sop";
//
public static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
//
public static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
//
public static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
//
public static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
//
public static final String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
//
public static final String UP_VIDEO = "/file/uploadVideoOne?targetPath=online/video";
//
public static boolean IS_DEBUG = false;
//
public static String VIDEO_SHARE_URL = "http://app.dl.kf.ai/ext/#/shareVideo?type=_type&id="; //学习视频分享链接 type(课程: course 直播: live)
//
public static int XLR_PID = 1936; //小绿人商家id
//
public static String SCHEME_9099 = "http://app.dl.kf.ai/ext/#/";
/**
...
...
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