Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
4ca8fcf1
Commit
4ca8fcf1
authored
Mar 12, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update script
parent
37b36a63
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
332 additions
and
12 deletions
+332
-12
push_module_app.sh
+7
-0
script/obact.json
+2
-1
script/obact.py
+40
-0
script/obact_lib.json
+2
-1
script/obact_lib.py
+39
-0
src/main/java/com/common/base/BaseActivity.java
+52
-4
src/main/java/com/common/base/BaseTrustee.java
+169
-0
src/main/java/tech/starwin/impl/HttpObserver.java
+1
-1
src/main/java/tech/starwin/impl/OnEntrustListener.java
+15
-0
src/main/java/tech/starwin/mvp/ui/adapter/EventCenterAdapter.java
+1
-1
src/main/java/tech/starwin/utils/LoginManager.java
+2
-2
src/main/java/tech/starwin/utils/TrackEventHelper.java
+1
-1
src/main/java/tech/starwin/utils/collection/UploadManager.java
+1
-1
No files found.
push_module_app.sh
0 → 100755
View file @
4ca8fcf1
cd
../app/src/app/
git add
.
echo
-n
"commit message: "
read
message
git commit
-m
"
${
message
}
"
git push origin master
\ No newline at end of file
script/obact.json
View file @
4ca8fcf1
...
@@ -22,5 +22,6 @@
...
@@ -22,5 +22,6 @@
"RepaymentFragment"
"RepaymentFragment"
],
],
"root"
:
"../../app/src/main"
,
"root"
:
"../../app/src/main"
,
"manifest"
:
"../../app/src/main/AndroidManifest.xml"
"manifest"
:
"../../app/src/main/AndroidManifest.xml"
,
"applibroot"
:
"../../app/src/app"
}
}
script/obact.py
View file @
4ca8fcf1
...
@@ -79,3 +79,43 @@ manifest_path = os.path.join(os.getcwd(), manifest)
...
@@ -79,3 +79,43 @@ manifest_path = os.path.join(os.getcwd(), manifest)
process_file_content
(
manifest_path
,
"AndroidManifest.xml"
)
process_file_content
(
manifest_path
,
"AndroidManifest.xml"
)
#update applib
# read configs
with
open
(
'obact_lib.json'
,
"rt"
)
as
f
:
json_root
=
json
.
load
(
f
)
activities
=
json_root
[
"activities"
]
source_root
=
json_root
[
"applibroot"
]
manifest
=
json_root
[
"appmanifest"
]
print
(
"activity mapping
%
s"
%
activity_mangle_setting
)
s
root_path
=
os
.
path
.
join
(
os
.
getcwd
(),
source_root
)
# perform content replace for the files
print
(
"processing file content..."
)
for
root
,
dirs
,
files
in
os
.
walk
(
source_root
):
directory
=
os
.
path
.
join
(
os
.
getcwd
(),
root
)
for
file
in
files
:
if
file
.
endswith
(
".java"
):
# get the path of the java file
path
=
os
.
path
.
join
(
directory
,
file
)
process_file_content
(
path
,
file
)
print
(
"processing file content done"
)
print
(
"renaming files"
)
for
root
,
dirs
,
files
in
os
.
walk
(
source_root
):
directory
=
os
.
path
.
join
(
os
.
getcwd
(),
root
)
for
file
in
files
:
if
file
.
endswith
(
".java"
):
name
=
os
.
path
.
splitext
(
file
)[
0
]
if
name
in
activity_mangle_setting
:
# get the path of the java file
src
=
os
.
path
.
join
(
directory
,
file
)
dst
=
os
.
path
.
join
(
directory
,
"
%
s.java"
%
activity_mangle_setting
[
name
])
print
(
"
%
s ->
%
s"
%
(
src
,
dst
))
os
.
rename
(
src
,
dst
)
print
(
"renaming files done"
)
script/obact_lib.json
View file @
4ca8fcf1
...
@@ -82,5 +82,6 @@
...
@@ -82,5 +82,6 @@
"root"
:
"../../lib_base/src/main"
,
"root"
:
"../../lib_base/src/main"
,
"manifest"
:
"../../lib_base/src/main/AndroidManifest.xml"
,
"manifest"
:
"../../lib_base/src/main/AndroidManifest.xml"
,
"approot"
:
"../../app/src/main"
,
"approot"
:
"../../app/src/main"
,
"appmanifest"
:
"../../app/src/main/AndroidManifest.xml"
"appmanifest"
:
"../../app/src/main/AndroidManifest.xml"
,
"applibroot"
:
"../../app/src/app"
}
}
script/obact_lib.py
View file @
4ca8fcf1
...
@@ -120,3 +120,42 @@ manifest_path = os.path.join(os.getcwd(), manifest)
...
@@ -120,3 +120,42 @@ manifest_path = os.path.join(os.getcwd(), manifest)
process_file_content
(
manifest_path
,
"AndroidManifest.xml"
)
process_file_content
(
manifest_path
,
"AndroidManifest.xml"
)
#update applib
# read configs
with
open
(
'obact_lib.json'
,
"rt"
)
as
f
:
json_root
=
json
.
load
(
f
)
activities
=
json_root
[
"activities"
]
source_root
=
json_root
[
"applibroot"
]
manifest
=
json_root
[
"appmanifest"
]
print
(
"activity mapping
%
s"
%
activity_mangle_setting
)
s
root_path
=
os
.
path
.
join
(
os
.
getcwd
(),
source_root
)
# perform content replace for the files
print
(
"processing file content..."
)
for
root
,
dirs
,
files
in
os
.
walk
(
source_root
):
directory
=
os
.
path
.
join
(
os
.
getcwd
(),
root
)
for
file
in
files
:
if
file
.
endswith
(
".java"
):
# get the path of the java file
path
=
os
.
path
.
join
(
directory
,
file
)
process_file_content
(
path
,
file
)
print
(
"processing file content done"
)
print
(
"renaming files"
)
for
root
,
dirs
,
files
in
os
.
walk
(
source_root
):
directory
=
os
.
path
.
join
(
os
.
getcwd
(),
root
)
for
file
in
files
:
if
file
.
endswith
(
".java"
):
name
=
os
.
path
.
splitext
(
file
)[
0
]
if
name
in
activity_mangle_setting
:
# get the path of the java file
src
=
os
.
path
.
join
(
directory
,
file
)
dst
=
os
.
path
.
join
(
directory
,
"
%
s.java"
%
activity_mangle_setting
[
name
])
print
(
"
%
s ->
%
s"
%
(
src
,
dst
))
os
.
rename
(
src
,
dst
)
print
(
"renaming files done"
)
src/main/java/com/common/base/BaseActivity.java
View file @
4ca8fcf1
...
@@ -12,7 +12,6 @@ import android.support.v4.widget.DrawerLayout;
...
@@ -12,7 +12,6 @@ import android.support.v4.widget.DrawerLayout;
import
android.support.v7.app.AppCompatActivity
;
import
android.support.v7.app.AppCompatActivity
;
import
android.util.Log
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.FrameLayout
;
import
android.widget.FrameLayout
;
...
@@ -31,7 +30,6 @@ import tech.starwin.base.BasePresenter;
...
@@ -31,7 +30,6 @@ import tech.starwin.base.BasePresenter;
import
tech.starwin.mvp.IView
;
import
tech.starwin.mvp.IView
;
import
tech.starwin.mvp.presenter.UserPresenter
;
import
tech.starwin.mvp.presenter.UserPresenter
;
import
tech.starwin.utils.PreferencesManager
;
import
tech.starwin.utils.context_utils.AppLanguageUtils
;
import
tech.starwin.utils.context_utils.AppLanguageUtils
;
import
tech.starwin.utils.PresenterHoler
;
import
tech.starwin.utils.PresenterHoler
;
import
tech.starwin.utils.context_utils.FragmentLauncher
;
import
tech.starwin.utils.context_utils.FragmentLauncher
;
...
@@ -79,6 +77,11 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -79,6 +77,11 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
private
final
BehaviorSubject
<
ActivityEvent
>
lifecycleSubject
=
BehaviorSubject
.
create
();
private
final
BehaviorSubject
<
ActivityEvent
>
lifecycleSubject
=
BehaviorSubject
.
create
();
/**
* 逻辑代码托管
*/
private
BaseTrustee
trustee
;
@Override
@Override
protected
void
attachBaseContext
(
Context
newBase
)
{
protected
void
attachBaseContext
(
Context
newBase
)
{
super
.
attachBaseContext
(
AppLanguageUtils
.
attachBaseContext
(
newBase
,
LibConfig
.
LANGUAGE
));
super
.
attachBaseContext
(
AppLanguageUtils
.
attachBaseContext
(
newBase
,
LibConfig
.
LANGUAGE
));
...
@@ -100,7 +103,13 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -100,7 +103,13 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
if
(
"HomeActivity"
.
equals
(
TAG
))
{
if
(
"HomeActivity"
.
equals
(
TAG
))
{
getPresenter
(
UserPresenter
.
class
).
getCustomerMsg
(
""
);
getPresenter
(
UserPresenter
.
class
).
getCustomerMsg
(
""
);
}
}
if
(
getTrustee
()==
null
){
getTrustee
().
onCreate
();
}
}
public
ViewGroup
getContentView
()
{
return
rootLayout
;
}
}
@Override
@Override
...
@@ -115,16 +124,26 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -115,16 +124,26 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
// MsgHandleService.handleMsg(this, new RemoteMessage(getIntent().getExtras()));
// MsgHandleService.handleMsg(this, new RemoteMessage(getIntent().getExtras()));
// }
// }
lifecycleSubject
.
onNext
(
ActivityEvent
.
START
);
lifecycleSubject
.
onNext
(
ActivityEvent
.
START
);
if
(
getTrustee
()==
null
){
getTrustee
().
onStart
();
}
}
}
public
ViewGroup
getContentView
()
{
@Override
return
rootLayout
;
protected
void
onRestart
()
{
super
.
onRestart
();
if
(
getTrustee
()==
null
){
getTrustee
().
onRestart
();
}
}
}
@Override
@Override
protected
void
onResume
()
{
protected
void
onResume
()
{
super
.
onResume
();
super
.
onResume
();
lifecycleSubject
.
onNext
(
ActivityEvent
.
RESUME
);
lifecycleSubject
.
onNext
(
ActivityEvent
.
RESUME
);
if
(
getTrustee
()==
null
){
getTrustee
().
onResume
();
}
}
}
@Override
@Override
...
@@ -132,6 +151,9 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -132,6 +151,9 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
super
.
onPause
();
super
.
onPause
();
lifecycleSubject
.
onNext
(
ActivityEvent
.
PAUSE
);
lifecycleSubject
.
onNext
(
ActivityEvent
.
PAUSE
);
progressDialog
.
dissmissLoading
();
progressDialog
.
dissmissLoading
();
if
(
getTrustee
()==
null
){
getTrustee
().
onPause
();
}
}
}
@Override
@Override
...
@@ -139,6 +161,9 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -139,6 +161,9 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
super
.
onStop
();
super
.
onStop
();
progressDialog
.
setEnable
(
false
);
progressDialog
.
setEnable
(
false
);
lifecycleSubject
.
onNext
(
ActivityEvent
.
STOP
);
lifecycleSubject
.
onNext
(
ActivityEvent
.
STOP
);
if
(
getTrustee
()==
null
){
getTrustee
().
onStop
();
}
}
}
@Override
@Override
...
@@ -149,7 +174,11 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -149,7 +174,11 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
}
}
lifecycleSubject
.
onNext
(
ActivityEvent
.
DESTROY
);
lifecycleSubject
.
onNext
(
ActivityEvent
.
DESTROY
);
presenterHelper
.
onDestory
();
presenterHelper
.
onDestory
();
if
(
getTrustee
()==
null
){
getTrustee
().
onDestroy
();
}
}
}
@Override
@Override
@NonNull
@NonNull
...
@@ -190,6 +219,9 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -190,6 +219,9 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
}
}
}
}
@Override
public
void
onHttpSuccess
(
String
action
,
Object
result
)
{
}
@Override
@Override
public
void
onHttpFinish
(
String
action
)
{
public
void
onHttpFinish
(
String
action
)
{
...
@@ -234,6 +266,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -234,6 +266,7 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
}
}
unBinder
=
LibConfig
.
bindView
(
this
,
rootLayout
);
unBinder
=
LibConfig
.
bindView
(
this
,
rootLayout
);
initView
();
initView
();
getFragmentLauncher
();
}
}
/**
/**
...
@@ -300,6 +333,9 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -300,6 +333,9 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
public
FragmentLauncher
getFragmentLauncher
()
{
public
FragmentLauncher
getFragmentLauncher
()
{
if
(
bindFragmentLayout
()
!=
0
&&
fragmentLauncher
==
null
)
{
if
(
bindFragmentLayout
()
!=
0
&&
fragmentLauncher
==
null
)
{
fragmentLauncher
=
new
FragmentLauncher
(
this
,
bindFragmentLayout
());
fragmentLauncher
=
new
FragmentLauncher
(
this
,
bindFragmentLayout
());
if
(
getTrustee
()==
null
){
getTrustee
().
setFragmentLauncher
(
fragmentLauncher
);
}
}
}
return
fragmentLauncher
;
return
fragmentLauncher
;
}
}
...
@@ -360,4 +396,16 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
...
@@ -360,4 +396,16 @@ public abstract class BaseActivity extends AppCompatActivity implements IView {
}
}
},
ms
);
},
ms
);
}
}
public
BaseTrustee
bindTrustee
()
{
return
null
;
}
public
BaseTrustee
getTrustee
()
{
if
(
trustee
==
null
)
{
trustee
=
bindTrustee
();
}
return
trustee
;
}
}
}
src/main/java/com/common/base/BaseTrustee.java
0 → 100644
View file @
4ca8fcf1
package
com
.
common
.
base
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.support.annotation.CheckResult
;
import
android.support.annotation.IdRes
;
import
android.support.annotation.NonNull
;
import
android.support.annotation.StringRes
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.trello.rxlifecycle2.LifecycleTransformer
;
import
com.trello.rxlifecycle2.RxLifecycle
;
import
com.trello.rxlifecycle2.android.ActivityEvent
;
import
com.trello.rxlifecycle2.android.RxLifecycleAndroid
;
import
javax.annotation.Nonnull
;
import
io.reactivex.Observable
;
import
io.reactivex.subjects.BehaviorSubject
;
import
tech.starwin.LibConfig
;
import
tech.starwin.base.BasePresenter
;
import
tech.starwin.mvp.IView
;
import
tech.starwin.utils.PresenterHoler
;
import
tech.starwin.utils.context_utils.FragmentLauncher
;
/**
* Created by SiKang on 2019/3/12.
*/
public
abstract
class
BaseTrustee
implements
IView
{
private
ViewGroup
trustorView
;
private
Activity
trustorActivity
;
private
Object
unBinder
;
/**
* 创建和缓存Presenter实例
*/
private
PresenterHoler
presenterHelper
;
private
FragmentLauncher
fragmentLauncher
;
private
final
BehaviorSubject
<
ActivityEvent
>
lifecycleSubject
=
BehaviorSubject
.
create
();
public
BaseTrustee
(
Activity
activity
,
ViewGroup
view
)
{
this
.
trustorActivity
=
activity
;
this
.
trustorView
=
view
;
}
protected
View
findViewById
(
@IdRes
int
viewId
)
{
return
trustorView
.
findViewById
(
viewId
);
}
public
abstract
void
initView
();
public
void
setPresenterHelper
(
PresenterHoler
presenterHelper
)
{
this
.
presenterHelper
=
presenterHelper
;
}
/**
* 获取Presenter
*/
public
<
T
extends
BasePresenter
>
T
getPresenter
(
Class
<
T
>
clz
)
{
if
(
presenterHelper
==
null
)
{
presenterHelper
=
new
PresenterHoler
(
this
);
}
return
presenterHelper
.
getPresenter
(
clz
);
}
/**
* 生命周期托管
*/
public
void
onCreate
()
{
lifecycleSubject
.
onNext
(
ActivityEvent
.
CREATE
);
unBinder
=
LibConfig
.
bindView
(
this
,
trustorView
);
initView
();
}
protected
void
onStart
()
{
lifecycleSubject
.
onNext
(
ActivityEvent
.
START
);
}
protected
void
onRestart
()
{
}
protected
void
onResume
()
{
lifecycleSubject
.
onNext
(
ActivityEvent
.
RESUME
);
}
protected
void
onPause
()
{
lifecycleSubject
.
onNext
(
ActivityEvent
.
PAUSE
);
}
protected
void
onStop
()
{
lifecycleSubject
.
onNext
(
ActivityEvent
.
STOP
);
}
protected
void
onDestroy
()
{
lifecycleSubject
.
onNext
(
ActivityEvent
.
DESTROY
);
if
(
unBinder
!=
null
)
{
LibConfig
.
unBindView
(
unBinder
);
}
if
(
presenterHelper
!=
null
)
{
presenterHelper
.
onDestory
();
}
}
public
void
onBackPressed
(){}
@Override
public
void
onHttpStart
(
String
action
,
boolean
isShowLoading
)
{
}
@Override
public
void
onHttpSuccess
(
String
action
,
Object
result
)
{
}
@Override
public
void
onHttpError
(
String
action
,
String
msg
)
{
}
@Override
public
void
onHttpFinish
(
String
action
)
{
}
@Override
@NonNull
@CheckResult
public
final
Observable
<
ActivityEvent
>
lifecycle
()
{
return
lifecycleSubject
.
hide
();
}
@Override
@NonNull
@CheckResult
public
final
<
T
>
LifecycleTransformer
<
T
>
bindUntilEvent
(
@NonNull
ActivityEvent
event
)
{
return
RxLifecycle
.
bindUntilEvent
(
lifecycleSubject
,
event
);
}
@Override
@NonNull
@CheckResult
public
final
<
T
>
LifecycleTransformer
<
T
>
bindToLifecycle
()
{
return
RxLifecycleAndroid
.
bindActivity
(
lifecycleSubject
);
}
public
Activity
getActivity
()
{
return
trustorActivity
;
}
public
ViewGroup
getTrustorView
()
{
return
trustorView
;
}
public
String
getString
(
@StringRes
int
id
)
{
return
getActivity
().
getString
(
id
);
}
public
FragmentLauncher
getFragmentLauncher
()
{
return
fragmentLauncher
;
}
public
void
setFragmentLauncher
(
FragmentLauncher
fragmentLauncher
)
{
this
.
fragmentLauncher
=
fragmentLauncher
;
}
}
src/main/java/tech/starwin/impl/HttpObserver.java
View file @
4ca8fcf1
...
@@ -92,7 +92,7 @@ public abstract class HttpObserver<T> implements Observer<T> {
...
@@ -92,7 +92,7 @@ public abstract class HttpObserver<T> implements Observer<T> {
return
true
;
return
true
;
// case 403:
// case 403:
// // 短信发送失败
// // 短信发送失败
// onError(Error.SERVER_ERROR, LibConfig.get
Context
().getString(R.string.sms_code_error));
// onError(Error.SERVER_ERROR, LibConfig.get
Activity
().getString(R.string.sms_code_error));
// return true;
// return true;
case
409
:
case
409
:
if
(
exception
.
response
().
body
()
!=
null
)
{
if
(
exception
.
response
().
body
()
!=
null
)
{
...
...
src/main/java/tech/starwin/impl/OnEntrustListener.java
0 → 100644
View file @
4ca8fcf1
package
tech
.
starwin
.
impl
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
com.common.base.BaseTrustee
;
/**
* Created by SiKang on 2019/3/12.
*/
public
interface
OnEntrustListener
{
BaseTrustee
onEntrust
(
Activity
activity
,
ViewGroup
view
,
Class
clz
);
}
src/main/java/tech/starwin/mvp/ui/adapter/EventCenterAdapter.java
View file @
4ca8fcf1
...
@@ -27,6 +27,6 @@ public class EventCenterAdapter extends BaseRecyclerAdapter<ActivityInfoBean> {
...
@@ -27,6 +27,6 @@ public class EventCenterAdapter extends BaseRecyclerAdapter<ActivityInfoBean> {
@Override
@Override
public
void
bindData
(
RecyclerViewHolder
holder
,
int
position
,
ActivityInfoBean
item
)
{
public
void
bindData
(
RecyclerViewHolder
holder
,
int
position
,
ActivityInfoBean
item
)
{
Glide
.
with
(
getContext
()).
load
(
item
.
getUrl
()).
into
(
holder
.
getImageView
(
R
.
id
.
iv_image_activity_center
));
Glide
.
with
(
getContext
()).
load
(
item
.
getUrl
()).
into
(
holder
.
getImageView
(
R
.
id
.
iv_image_activity_center
));
// holder.getTextView(R.id.tv_content_activity_center).setText(get
Context
().getString(R.string.title_activity_center));
// holder.getTextView(R.id.tv_content_activity_center).setText(get
Activity
().getString(R.string.title_activity_center));
}
}
}
}
src/main/java/tech/starwin/utils/LoginManager.java
View file @
4ca8fcf1
...
@@ -65,8 +65,8 @@ public class LoginManager {
...
@@ -65,8 +65,8 @@ public class LoginManager {
// if (!TextUtils.isEmpty(LibConfig.LOGIN_ACTIVITY_ACTION)) {
// if (!TextUtils.isEmpty(LibConfig.LOGIN_ACTIVITY_ACTION)) {
// //跳转登录界面
// //跳转登录界面
// if (isActionSupport(LibConfig.get
Context
(), LibConfig.LOGIN_ACTIVITY_ACTION)) {
// if (isActionSupport(LibConfig.get
Activity
(), LibConfig.LOGIN_ACTIVITY_ACTION)) {
// new ActivityJumper.Builder(LibConfig.get
Context
(), LibConfig.LOGIN_ACTIVITY_ACTION)
// new ActivityJumper.Builder(LibConfig.get
Activity
(), LibConfig.LOGIN_ACTIVITY_ACTION)
// .build().start();
// .build().start();
// } else {
// } else {
// LogUtils.e(TAG, "找不到LoginActivity,请在build.gradle中配置正确的 ‘LOGIN_ACTIVITY_ACTION’ ");
// LogUtils.e(TAG, "找不到LoginActivity,请在build.gradle中配置正确的 ‘LOGIN_ACTIVITY_ACTION’ ");
...
...
src/main/java/tech/starwin/utils/TrackEventHelper.java
View file @
4ca8fcf1
...
@@ -64,7 +64,7 @@ public class TrackEventHelper {
...
@@ -64,7 +64,7 @@ public class TrackEventHelper {
public
static
void
logEvent
(
String
eventName
)
{
public
static
void
logEvent
(
String
eventName
)
{
//TODO - FireBase配置
//TODO - FireBase配置
//FireBase 埋点
//FireBase 埋点
// FirebaseAnalytics.getInstance(LibConfig.get
Context
()).logEvent(eventName, null);
// FirebaseAnalytics.getInstance(LibConfig.get
Activity
()).logEvent(eventName, null);
if
(
onTrackEventListener
!=
null
)
{
if
(
onTrackEventListener
!=
null
)
{
onTrackEventListener
.
onActionEvent
(
eventName
);
onTrackEventListener
.
onActionEvent
(
eventName
);
}
}
...
...
src/main/java/tech/starwin/utils/collection/UploadManager.java
View file @
4ca8fcf1
...
@@ -114,7 +114,7 @@ public class UploadManager {
...
@@ -114,7 +114,7 @@ public class UploadManager {
// options.put(FMAgent.OPTION_DOMAIN,LibConfig.TD_TEST_SERVER );
// options.put(FMAgent.OPTION_DOMAIN,LibConfig.TD_TEST_SERVER );
// options.put(FMAgent.OPTION_BLACKBOX_MAXSIZE, 5 * 1024);
// options.put(FMAgent.OPTION_BLACKBOX_MAXSIZE, 5 * 1024);
// options.put(FMAgent.OPTION_PARTNER_CODE, LibConfig.TONGDUN_DEVICE_PARENT_CODE);
// options.put(FMAgent.OPTION_PARTNER_CODE, LibConfig.TONGDUN_DEVICE_PARENT_CODE);
// FMAgent.initWithCallback(LibConfig.get
Context
(), FMAgent.ENV_PRODUCTION, options, new FMCallback() {
// FMAgent.initWithCallback(LibConfig.get
Activity
(), FMAgent.ENV_PRODUCTION, options, new FMCallback() {
// @Override
// @Override
// public void onEvent(String blackbox) {
// public void onEvent(String blackbox) {
// LogUtils.d(TAG, "callback_blackbox: " + blackbox);
// LogUtils.d(TAG, "callback_blackbox: " + blackbox);
...
...
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