Added X-Greyed-App in the headers and updated google service json (#5342)

This commit is contained in:
shankar yadav
2023-02-14 15:40:33 +05:30
committed by GitHub Enterprise
parent 6e359c4e84
commit b623366cc6
4 changed files with 238 additions and 5 deletions

View File

@@ -6,6 +6,45 @@
"storage_bucket": "navi-dev-593cf.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:7545371166:android:7be3e213d25f5641ca0c0f",
"android_client_info": {
"package_name": "com.naviapp"
}
},
"oauth_client": [
{
"client_id": "7545371166-e927k3npd4mc7auo0g4fbj3ghli4odt1.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBxvRqQRHyi6B-isZv0VpF2al5cJA4SZ7s"
},
{
"current_key": "AIzaSyAxa20cH98hAlk0TmAdldaiD6o1nlAoPnA"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "7545371166-29f25vn86fpdlolv6uj7n757k8m53e5s.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "7545371166-9gmh4tpgglkh1dsr7ojfs3kvjmatb0u0.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.gonavi.app.debug"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:7545371166:android:50fa837fb7444a25ca0c0f",
@@ -22,14 +61,63 @@
"api_key": [
{
"current_key": "AIzaSyBxvRqQRHyi6B-isZv0VpF2al5cJA4SZ7s"
},
{
"current_key": "AIzaSyAxa20cH98hAlk0TmAdldaiD6o1nlAoPnA"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "7545371166-e927k3npd4mc7auo0g4fbj3ghli4odt1.apps.googleusercontent.com",
"client_id": "7545371166-29f25vn86fpdlolv6uj7n757k8m53e5s.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "7545371166-9gmh4tpgglkh1dsr7ojfs3kvjmatb0u0.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.gonavi.app.debug"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:7545371166:android:fa337bc10b3d4676ca0c0f",
"android_client_info": {
"package_name": "com.naviapp.fps.dev"
}
},
"oauth_client": [
{
"client_id": "7545371166-e927k3npd4mc7auo0g4fbj3ghli4odt1.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBxvRqQRHyi6B-isZv0VpF2al5cJA4SZ7s"
},
{
"current_key": "AIzaSyAxa20cH98hAlk0TmAdldaiD6o1nlAoPnA"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "7545371166-29f25vn86fpdlolv6uj7n757k8m53e5s.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "7545371166-9gmh4tpgglkh1dsr7ojfs3kvjmatb0u0.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.gonavi.app.debug"
}
}
]
}

View File

@@ -8,9 +8,9 @@
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:1074736393094:android:21cc2dbc71b97768059a07",
"mobilesdk_app_id": "1:1074736393094:android:1b42658f489d11fd059a07",
"android_client_info": {
"package_name": "com.naviapp"
"package_name": "com.navi"
}
},
"oauth_client": [
@@ -30,6 +30,101 @@
{
"client_id": "1074736393094-u0ouuc378q74e5iagn36dse6nr3ph152.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "1074736393094-n0d5aeopsk3k7vdb9f1ms7mobhmq9jlk.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.gonavi.app"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:1074736393094:android:21cc2dbc71b97768059a07",
"android_client_info": {
"package_name": "com.naviapp"
}
},
"oauth_client": [
{
"client_id": "1074736393094-ai231snch0jpkrujicedk0bs9c7nu5kl.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.naviapp",
"certificate_hash": "13fe8ea387b1fe6b47c28b918080ab2d5e499a48"
}
},
{
"client_id": "1074736393094-u0ouuc378q74e5iagn36dse6nr3ph152.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDxK8u8ONNh3C2-3Xvvavosd2NNuI62wTk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1074736393094-u0ouuc378q74e5iagn36dse6nr3ph152.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "1074736393094-n0d5aeopsk3k7vdb9f1ms7mobhmq9jlk.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.gonavi.app"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:1074736393094:android:9ced0c993b0e71b4059a07",
"android_client_info": {
"package_name": "com.naviapp.fps"
}
},
"oauth_client": [
{
"client_id": "1074736393094-lni6s872pm15hd4ta99mnsc9brekgr74.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "com.naviapp.fps",
"certificate_hash": "7982ade408008dbe40e5cca019305551d68722ea"
}
},
{
"client_id": "1074736393094-u0ouuc378q74e5iagn36dse6nr3ph152.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDxK8u8ONNh3C2-3Xvvavosd2NNuI62wTk"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "1074736393094-u0ouuc378q74e5iagn36dse6nr3ph152.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "1074736393094-n0d5aeopsk3k7vdb9f1ms7mobhmq9jlk.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.gonavi.app"
}
}
]
}

View File

@@ -1,6 +1,7 @@
{
"project_info": {
"project_number": "679085041776",
"firebase_url": "https://navi-qa-default-rtdb.asia-southeast1.firebasedatabase.app",
"project_id": "navi-qa",
"storage_bucket": "navi-qa.appspot.com"
},
@@ -14,7 +15,7 @@
},
"oauth_client": [
{
"client_id": "679085041776-n6juhqpcr8221cifb7051ipkk2se4tpt.apps.googleusercontent.com",
"client_id": "679085041776-433aj023nobf5g9u08ggpqfhg4q9flm1.apps.googleusercontent.com",
"client_type": 3
}
],
@@ -27,8 +28,51 @@
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "679085041776-n6juhqpcr8221cifb7051ipkk2se4tpt.apps.googleusercontent.com",
"client_id": "679085041776-433aj023nobf5g9u08ggpqfhg4q9flm1.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "679085041776-5e456o4prchtmblcl6r2vs7nrtuo5tvc.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.gonavi.app.debug"
}
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:679085041776:android:e2fdb172f0bd6df6546cb5",
"android_client_info": {
"package_name": "com.naviapp.fps.dev"
}
},
"oauth_client": [
{
"client_id": "679085041776-433aj023nobf5g9u08ggpqfhg4q9flm1.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyDNSiKfkive7IietLqcsnoNLVER3OvHwrc"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "679085041776-433aj023nobf5g9u08ggpqfhg4q9flm1.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "679085041776-5e456o4prchtmblcl6r2vs7nrtuo5tvc.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "com.gonavi.app.debug"
}
}
]
}

View File

@@ -11,6 +11,8 @@ import android.content.Context
import android.os.Build
import com.navi.analytics.utils.NaviAnalyticsHelper
import com.navi.analytics.utils.NaviTrackEvent
import com.navi.base.sharedpref.CommonPrefConstants
import com.navi.base.sharedpref.PreferenceManager
import com.navi.base.utils.BaseUtils
import com.navi.common.model.NetworkInfo
import okhttp3.*
@@ -37,6 +39,9 @@ abstract class BaseHttpClient(private val networkInfo: NetworkInfo, private val
private val headerInterceptor: Interceptor
get() = Interceptor { chain ->
var request = chain.request()
val isNewLogoEnable =
PreferenceManager.getStringPreferenceApp(key = CommonPrefConstants.NEW_APP_LOGO) == CommonPrefConstants.NEW_APP_LOGO
val builder =
request.headers.newBuilder().apply {
add("Content-Type", "application/json")
@@ -44,6 +49,7 @@ abstract class BaseHttpClient(private val networkInfo: NetworkInfo, private val
add("appVersionCode", networkInfo.appVersionCode)
add("osVersion", "Android_" + Build.VERSION.RELEASE)
add("deviceId", BaseUtils.getDeviceId(context))
add("X-Greyed-App", isNewLogoEnable.toString())
add("defaultLocale", BaseUtils.getDefaultLocale())
BaseUtils.getSessionToken()?.let { add("X-Session-Token", it) }
try {