- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
所以我去面试,他们要求我弄清楚这些参数dkh、uid和af_v是如何在给定的代码 fragment 中生成的。该代码 fragment 是从 apk 文件反编译的。 我应该在其中搜索 dkh 的 fragment 是:-
stringbuilder.append("https://track.appsflyer.com/api/v2.3/androidevent?buildnumber=1.15&app_id=").append(context.getPackageName());
hashmap.put("brand", Build.BRAND);
hashmap.put("device", Build.DEVICE);
hashmap.put("product", Build.PRODUCT);
hashmap.put("sdk", Integer.toString(android.os.Build.VERSION.SDK_INT));
hashmap.put("model", Build.MODEL);
hashmap.put("deviceType", Build.TYPE);
obj = com.appsflyer.f.a().b("sdkExtension");
if (obj == null)
{
break MISSING_BLOCK_LABEL_386;
}
if (((String) (obj)).length() > 0)
{
hashmap.put("sdkExtension", obj);
}
obj = i(context);
obj1 = b(context, ((String) (obj)));
if (obj1 == null)
{
break MISSING_BLOCK_LABEL_418;
}
hashmap.put("channel", obj1);
if (obj1 == null) goto _L4; else goto _L3
_L3:
if (!((String) (obj1)).equals(obj)) goto _L5; else goto _L4
_L5:
hashmap.put("af_latestchannel", obj);
_L37:
obj = context.getSharedPreferences("appsflyer-data", 0);
if (!((SharedPreferences) (obj)).contains("INSTALL_STORE")) goto _L7;
else goto _L6
_L6:
obj = ((SharedPreferences) (obj)).getString("INSTALL_STORE", null);
_L15:
if (obj == null)
{
break MISSING_BLOCK_LABEL_506;
}
hashmap.put("af_installstore", ((String) (obj)).toLowerCase());
obj = h(context);
if (obj == null)
{
break MISSING_BLOCK_LABEL_533;
}
hashmap.put("af_preinstall_name", ((String) (obj)).toLowerCase());
obj = g(context);
if (obj == null)
{
break MISSING_BLOCK_LABEL_560;
}
hashmap.put("af_currentstore", ((String) (obj)).toLowerCase());
if (s == null)
{
break MISSING_BLOCK_LABEL_574;
}
obj = s;
if (s.length() != 0)
{
break MISSING_BLOCK_LABEL_585;
}
obj = com.appsflyer.f.a().b("AppsFlyerKey");
if (obj == null) goto _L9; else goto _L8
_L8:
if (((String) (obj)).length() <= 0) goto _L9; else goto _L10
_L10:
hashmap.put("appsflyerKey", obj);
if (((String) (obj)).length() > 8)
{
hashmap.put("dkh", ((String) (obj)).substring(0, 8));
}
s = com.appsflyer.f.a().b("AppUserId");
if (s == null)
{
break MISSING_BLOCK_LABEL_666;
}
hashmap.put("appUserId", s);
s = com.appsflyer.f.a().a("userEmails");
if (s == null) goto _L12; else goto _L11
_L11:
obj = new StringBuilder();
i1 = s.length;
l = 0;
我应该在其中搜索uid的代码 fragment 是:-
hashmap.put("eventValue", s2);
if (com.appsflyer.f.a().b("appid") != null)
{
hashmap.put("appid", com.appsflyer.f.a().b("appid"));
}
s = com.appsflyer.f.a().b("currencyCode");
if (s == null)
{
break MISSING_BLOCK_LABEL_987;
}
if (s.length() != 3)
{
Log.w("AppsFlyer_1.15", (new StringBuilder("WARNING:currency code
should be 3 characters!!! '")).append(s).append("' is not a legal
value.").toString());
}
hashmap.put("currency", s);
s = com.appsflyer.f.a().b("IS_UPDATE");
if (s == null)
{
break MISSING_BLOCK_LABEL_1013;
}
hashmap.put("isUpdate", s);
hashmap.put("af_preinstalled", Boolean.toString(j(context)));
s = a(context.getContentResolver());
if (s == null)
{
break MISSING_BLOCK_LABEL_1055;
}
hashmap.put("fb", s);
a(context, ((Map) (hashmap)));
s = com.appsflyer.k.a(context);
if (s == null)
{
break MISSING_BLOCK_LABEL_1082;
}
hashmap.put("uid", s);
_L28:
try
{
hashmap.put("lang", Locale.getDefault().getDisplayLanguage());
}
// Misplaced declaration of an exception variable
catch (String s) { }
try
{
s = (TelephonyManager)context.getSystemService("phone");
hashmap.put("operator", s.getSimOperatorName());
hashmap.put("carrier", s.getNetworkOperatorName());
}
// Misplaced declaration of an exception variable
catch (String s) { }
s = (ConnectivityManager)context.getSystemService("connectivity");
if (!s.getNetworkInfo(1).isConnectedOrConnecting()) goto _L18; else goto
_L17
af_v 是:-
public final void run()
{
String s2 = com.appsflyer.AppsFlyerLib.a(a);
Object obj = (Context)d.get();
if (obj == null) goto _L2; else goto _L1
_L1:
String s = com.appsflyer.f.a().a(((Context) (obj)));
if (s == null)
{
break MISSING_BLOCK_LABEL_70;
}
if (s.length() > 0 && a.get("referrer") == null)
{
a.put("referrer", s);
}
Map map;
boolean flag1;
flag1 = "true".equals(((Context) (obj)).getSharedPreferences("appsflyer-
data", 0).getString("sentSuccessfully", ""));
s = (String)a.get("eventName");
map = a;
Object obj1;
boolean flag;
if (s == null)
{
flag = true;
} else
{
flag = false;
}
map.put("counter",
Integer.toString(com.appsflyer.AppsFlyerLib.a(((Context) (obj)), flag)));
flag = flag1;
_L5:
obj = a;
if (!flag)
{
flag = true;
} else
{
flag = false;
}
((Map) (obj)).put("isFirstCall", Boolean.toString(flag));
s = (String)a.get("appsflyerKey");
if (s == null)
{
break MISSING_BLOCK_LABEL_195;
}
if (s.length() != 0)
{
break MISSING_BLOCK_LABEL_204;
}
Log.d(s2, "Not sending data yet, waiting for dev key");
return;
new j();
Object obj2 = a;
obj = (String)((Map) (obj2)).get("appsflyerKey");
String s1 = (String)((Map) (obj2)).get("af_timestamp");
obj2 = (String)((Map) (obj2)).get("uid");
obj = com.appsflyer.j.a((new StringBuilder()).append(((String)
(obj)).substring(0, 7)).append(((String) (obj2)).substring(0,
7)).append(s1.substring(s1.length() - 7)).toString());
a.put("af_v", obj);
obj = com.appsflyer.AppsFlyerLib.b(a);
try
{
com.appsflyer.AppsFlyerLib.a(c, ((String) (obj)), s, d, null, s2,
b);
return;
}
catch (IOException ioexception)
{
s = ((String) (obj));
obj1 = ioexception;
}
_L3:
if (s != null && d != null && !c.contains("&isCachedRequest=true"))
{
Log.e(s2, ((IOException) (obj1)).getMessage(), ((Throwable)
(obj1)));
com.appsflyer.a.a.a().a(new b(c, s, "1.15"), (Context)d.get());
return;
} else
{
return;
}
obj1;
Log.e(s2, ((Throwable) (obj1)).getMessage(), ((Throwable) (obj1)));
return;
obj1;
s = null;
goto _L3
_L2:
flag = false;
if (true) goto _L5; else goto _L4
_L4:
}
}
经过对互联网的长期研究,我了解到这些参数和这些 fragment 所属的 .java 文件是 AppsFlyer SDK 的一部分,并与应用程序集成以用于跟踪目的不。下载应用程序和其他移动广告跟踪 Activity 的用户数量。我也知道 hashmap.put 方法的用途,但不知道在此代码中的确切用途。所以我的问题是这三个参数是如何生成的以及它们的用途?
最佳答案
dkh:
从下面的代码 fragment 中我们可以看到,dkh
只是 AppsFlyer key 的前 8 个字符。
obj = com.appsflyer.f.a().b("AppsFlyerKey");
// [...]
if (((String) (obj)).length() > 8)
{
hashmap.put("dkh", ((String) (obj)).substring(0, 8));
}
至于它是如何使用的 - 在您发布的代码中,它不是。鉴于您发布的代码首先创建一个使用 URL 初始化的 StringBuilder
,因此可以有把握地猜测正在构建的 hashamp 也与该 URL 相关。
处理 API 调用时, HashMap 最常见的用途是作为 HTTP 参数(例如通过 GET 或 POST)。因此,我的假设是所有这些 HashMap 条目只是发送到 AppsFlyer API 的参数。有些用于提供有关用户设备的信息,有些(例如 dkh
)可能被 AppsFlyer 用于将设备信息与您的帐户关联起来。
uid
该代码 fragment 没有提供足够的信息来收集有关 uid
如何生成的任何有意义的信息。我们真正知道的是它不为 null,并且来自 AppsFlyer SDK 中基于以下代码段的其他函数:
s = com.appsflyer.k.a(context);
// [null check]
hashmap.put("uid", s);
鉴于上面 dkh 的上下文以及程序员之间的普遍共识“uid”代表“用户 ID”,我认为这是一个也将发送到 API 的用户标识符。
af_v
我认为对代码 fragment 应用一些格式会有所帮助:
obj = (String)((Map) (obj2)).get("appsflyerKey");
String s1 = (String)((Map) (obj2)).get("af_timestamp");
obj2 = (String)((Map) (obj2)).get("uid");
obj = com.appsflyer.j.a(
new StringBuilder()
.append(((String) (obj)).substring(0, 7))
.append(((String) (obj2)).substring(0, 7))
.append(s1.substring(s1.length() - 7))
.toString()
);
a.put("af_v", obj);
从顶部开始,我们知道 obj
又是我们的 AppsFlyer key 。 s1
是某种时间戳。 obj2
是上面我们的 uid。我们最终放入 af_v
中的字符串由以下三个部分组成:
obj1
)obj2
)再说一次,这可能只是发送到 API,真正的用途只有 AppsFlyer 团队的人知道。它可能是特定请求的标识符 - 事实上它基于特定用户、时间戳和 API key ,这意味着它对于每个请求来说可能相当唯一,并且将它们(仅部分)压缩到一个字符串中可能不是这样对于任何人来说都不是特别有用的数据。
关于java - 使用 dkh 、 uid 和 af_v 参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31543930/
简而言之:我想从可变参数模板参数中提取各种选项,但不仅通过标签而且通过那些参数的索引,这些参数是未知的 标签。我喜欢 boost 中的方法(例如 heap 或 lockfree 策略),但想让它与 S
我可以对单元格中的 excel IF 语句提供一些帮助吗? 它在做什么? 对“BaselineAmount”进行了哪些评估? =IF(BaselineAmount, (Variance/Baselin
我正在使用以下方法: public async Task Save(Foo foo,out int param) { ....... MySqlParameter prmparamID
我正在使用 CodeGear RAD Studio IDE。 为了使用命令行参数测试我的应用程序,我多次使用了“运行 -> 参数”菜单中的“参数”字段。 但是每次我给它提供一个新值时,它都无法从“下拉
我已经为信用卡类编写了一些代码,粘贴在下面。我有一个接受上述变量的构造函数,并且正在研究一些方法将这些变量格式化为字符串,以便最终输出将类似于 号码:1234 5678 9012 3456 截止日期:
MySql IN 参数 - 在存储过程中使用时,VarChar IN 参数 val 是否需要单引号? 我已经像平常一样创建了经典 ASP 代码,但我没有更新该列。 我需要引用 VarChar 参数吗?
给出了下面的开始,但似乎不知道如何完成它。本质上,如果我调用 myTest([one, Two, Three], 2); 它应该返回元素 third。必须使用for循环来找到我的解决方案。 funct
将 1113355579999 作为参数传递时,该值在函数内部变为 959050335。 调用(main.c): printf("%d\n", FindCommonDigit(111335557999
这个问题在这里已经有了答案: Is Java "pass-by-reference" or "pass-by-value"? (92 个回答) 关闭9年前。 public class StackOve
我真的很困惑,当像 1 == scanf("%lg", &entry) 交换为 scanf("%lg", &entry) == 1 没有区别。我的实验书上说的是前者,而我觉得后者是可以理解的。 1 =
我正在尝试使用调用 SetupDiGetDeviceRegistryProperty 的函数使用德尔福 7。该调用来自示例函数 SetupEnumAvailableComPorts .它看起来像这样:
我需要在现有项目上实现一些事件的显示。我无法更改数据库结构。 在我的 Controller 中,我(从 ajax 请求)传递了一个时间戳,并且我需要显示之前的 8 个事件。因此,如果时间戳是(转换后)
rails 新手。按照多态关联的教程,我遇到了这个以在create 和destroy 中设置@client。 @client = Client.find(params[:client_id] || p
通过将 VM 参数设置为 -Xmx1024m,我能够通过 Eclipse 运行 Java 程序-Xms256M。现在我想通过 Windows 中的 .bat 文件运行相同的 Java 程序 (jar)
我有一个 Delphi DLL,它在被 Delphi 应用程序调用时工作并导出声明为的方法: Procedure ProduceOutput(request,inputs:widestring; va
浏览完文档和示例后,我还没有弄清楚 schema.yaml 文件中的参数到底用在哪里。 在此处使用 AWS 代码示例:https://github.com/aws-samples/aws-proton
程序参数: procedure get_user_profile ( i_attuid in ras_user.attuid%type, i_data_group in data_g
我有一个字符串作为参数传递给我的存储过程。 dim AgentString as String = " 'test1', 'test2', 'test3' " 我想在 IN 中使用该参数声明。 AND
这个问题已经有答案了: When should I use "this" in a class? (17 个回答) 已关闭 6 年前。 我运行了一些java代码,我看到了一些我不太明白的东西。为什么下
我输入 scroll(0,10,200,10);但是当它运行时,它会传递字符串“xxpos”或“yypos”,我确实在没有撇号的情况下尝试过,但它就是行不通。 scroll = function(xp
我是一名优秀的程序员,十分优秀!