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
7af9b970
Commit
7af9b970
authored
Sep 26, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove GAID
parent
9e8f733f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
24 deletions
+23
-24
build.gradle
+4
-2
src/main/java/tech/starwin/network/DefaultHeaderAddInterceptor.java
+19
-22
No files found.
build.gradle
View file @
7af9b970
...
@@ -125,12 +125,14 @@ dependencies {
...
@@ -125,12 +125,14 @@ dependencies {
// api 'com.google.android.gms:play-services-auth-api-phone:15.0.1'
// api 'com.google.android.gms:play-services-auth-api-phone:15.0.1'
// api 'com.google.android.gms:play-services-ads:15.0.1'
// api 'com.google.android.gms:play-services-ads:15.0.1'
// api 'com.google.android.gms:play-services-analytics:17.0.0'
//facebook accountKit SDK
//facebook accountKit SDK
api
'com.facebook.android:account-kit-sdk:5.+'
api
'com.facebook.android:account-kit-sdk:5.+'
api
'com.google.android.gms:play-services-analytics:16.0.0'
//SDK-FACEBOOK-START
//SDK-FACEBOOK-START
api
'com.facebook.android:facebook-android-sdk:
[4,5)
'
api
'com.facebook.android:facebook-android-sdk:
5.5.1
'
//SDK-FACEBOOK-END
//SDK-FACEBOOK-END
//AppsFlyer
//AppsFlyer
...
...
src/main/java/tech/starwin/network/DefaultHeaderAddInterceptor.java
View file @
7af9b970
...
@@ -3,9 +3,6 @@ package tech.starwin.network;
...
@@ -3,9 +3,6 @@ package tech.starwin.network;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.google.android.gms.ads.identifier.AdvertisingIdClient
;
import
com.google.android.gms.common.GooglePlayServicesNotAvailableException
;
import
com.google.android.gms.common.GooglePlayServicesRepairableException
;
import
java.io.IOException
;
import
java.io.IOException
;
...
@@ -72,7 +69,7 @@ class DefaultHeaderAddInterceptor implements Interceptor {
...
@@ -72,7 +69,7 @@ class DefaultHeaderAddInterceptor implements Interceptor {
.
header
(
"thirdpartyDataFlag"
,
String
.
valueOf
(!
TextUtils
.
isEmpty
(
LibConfig
.
TONGDUN_PARENT_KEY
)))
.
header
(
"thirdpartyDataFlag"
,
String
.
valueOf
(!
TextUtils
.
isEmpty
(
LibConfig
.
TONGDUN_PARENT_KEY
)))
// .header("X-APP-SIM-MOBILE", getSimInfo())
// .header("X-APP-SIM-MOBILE", getSimInfo())
.
header
(
"X-AF-ID"
,
LibConfig
.
APPSFLYER_DEV_KEY
==
null
?
""
:
LibConfig
.
APPSFLYER_DEV_KEY
)
.
header
(
"X-AF-ID"
,
LibConfig
.
APPSFLYER_DEV_KEY
==
null
?
""
:
LibConfig
.
APPSFLYER_DEV_KEY
)
.
header
(
"X-GA-ID"
,
getGAId
())
//
.header("X-GA-ID", getGAId())
.
header
(
"X-GP-PKG-FLAG"
,
String
.
valueOf
(!
LibConfig
.
IS_COLLECT_MODE
))
.
header
(
"X-GP-PKG-FLAG"
,
String
.
valueOf
(!
LibConfig
.
IS_COLLECT_MODE
))
.
header
(
"X-APP-CODE-VERSION"
,
"ID_V2"
);
.
header
(
"X-APP-CODE-VERSION"
,
"ID_V2"
);
...
@@ -97,24 +94,24 @@ class DefaultHeaderAddInterceptor implements Interceptor {
...
@@ -97,24 +94,24 @@ class DefaultHeaderAddInterceptor implements Interceptor {
// return SIM_INFO;
// return SIM_INFO;
// }
// }
private
String
getGAId
()
{
//
private String getGAId() {
if
(!
TextUtils
.
isEmpty
(
GA_ID
))
{
//
if (!TextUtils.isEmpty(GA_ID)) {
return
GA_ID
;
//
return GA_ID;
}
//
}
AdvertisingIdClient
.
Info
adInfo
=
null
;
//
AdvertisingIdClient.Info adInfo = null;
try
{
//
try {
adInfo
=
AdvertisingIdClient
.
getAdvertisingIdInfo
(
LibConfig
.
getContext
());
//
adInfo = AdvertisingIdClient.getAdvertisingIdInfo(LibConfig.getContext());
GA_ID
=
adInfo
.
getId
();
//
GA_ID = adInfo.getId();
}
catch
(
IOException
e
)
{
//
} catch (IOException e) {
// Unrecoverable error connecting to Google Play services (e.g.,
//
// Unrecoverable error connecting to Google Play services (e.g.,
// the old version of the service doesn't support getting AdvertisingId).
//
// the old version of the service doesn't support getting AdvertisingId).
}
catch
(
GooglePlayServicesNotAvailableException
e
)
{
//
} catch (GooglePlayServicesNotAvailableException e) {
// Google Play services is not available entirely.
//
// Google Play services is not available entirely.
}
catch
(
GooglePlayServicesRepairableException
e
)
{
//
} catch (GooglePlayServicesRepairableException e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
//
}
return
GA_ID
;
//
return GA_ID;
}
//
}
}
}
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