gpt4 book ai didi

android - 我可以延迟 instabug IntroDialog 吗?

转载 作者:行者123 更新时间:2023-11-29 17:17:06 24 4
gpt4 key购买 nike

在我的应用程序类中,我有这个方法,我在我的应用程序的 onCreate 上调用它:

   public void initInstabug() {
try {
instabug = new Instabug.Builder(this, "45c752889689ac2ae0840d11e2a5f628")
.setDebugEnabled(true)
.setEmailFieldRequired(true)
.setFloatingButtonOffsetFromTop(400)
.setShouldShowIntroDialog(true)
.setColorTheme(IBGColorTheme.IBGColorThemeLight)
.setCommentFieldRequired(true)
.setInvocationEvent(IBGInvocationEvent.IBGInvocationEventShake)
.build();
instabug.setPrimaryColor(getResources().getColor(R.color.background));
instabug.setPreSendingRunnable(new Runnable() {
@Override
public void run() {
Log.i("","instabug entered pre sending runnable");
String[] files = new String[2];
files[0] = Environment.getExternalStorageDirectory() + "/Passenger/passenger_log.txt";
files[1] = Environment.getExternalStorageDirectory() + "/Passenger/passenger_log2.txt";
Compress compress = new Compress(files, Environment.getExternalStorageDirectory() + "/Passenger/log.zip");
compress.zip(new CrudStateCallback() {
@Override
public void onResponse(String string) {
Log.i("", "instabug ended making the archive");
}
});
}
});
File file = new File(Environment.getExternalStorageDirectory() + "/Passenger/log.zip");
Uri uri = Uri.fromFile(file);
instabug.setFileAttachment(uri, null);
}catch (Exception e){
Log.e("","error instabug:" + e.getMessage());
Utils.appendLog("In case instabug crashes asyncTask process, will not crash app",true);
}
}

我的问题是我有登录页面,首先,弹出窗口总是出现,而我通常写我的登录信息(电子邮件,密码)。是否可以延迟 introDialog,使其仅在另一个 Activity 打开时出现?我尝试在应用程序中使用此代码初始化我的 instabug 实例,其中 .setShouldShowIntroDialog(FALSE) 设置为 false,如您所见。然后在时间轴中我用 .setShouldShowIntroDialog(true) 重新初始化它。但它根本不是这样显示的。

最佳答案

您可以尝试在 Activity 中使用 Instabug.showIntroMessage() 并将 .setShouldShowIntroDialog() 设置为 false。

关于android - 我可以延迟 instabug IntroDialog 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38399895/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com