- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 networkStateReceiver,它检查我是否有互联网。如果我这样做,我会重新启动 instabug,如果没有,我想停用。我怎样才能做到这一点?我尝试将其设置为 null,但它不起作用。
if(haveConnectedMobile || haveConnectedWifi){
//TODO will need to make a queue, and go through all that queue
PSLocationCenter.getInstance().initInstabug();
}else{
PSLocationCenter.getInstance().instabug = null;
}
这是我的初始化:
public void initInstabug() {
String[] feedbackArray = getResources().getStringArray(R.array.feedback);
String randomStr = feedbackArray[new Random().nextInt(feedbackArray.length)];
Instabug.DEBUG = true;
instabug = Instabug.initialize(this)
.setAnnotationActivityClass(InstabugAnnotationActivity.class)
.setShowIntroDialog(true, PSTimelineActivity.class)
.enableEmailField(true, false)
.setEnableOverflowMenuItem(true)
.setDebugEnabled(true)
.setCommentRequired(true)
.setPostFeedbackMessage(randomStr)
.setPostBugReportMessage(randomStr) //TODO will be the post report message, random from array
.setCommentFieldHint("Please describe what went wrong")
.setPreSendingRunnable(new Runnable() {
@Override
public void run() {
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("", "ended making the archive");
}
});
}
})
.attachFileAtLocation(Environment.getExternalStorageDirectory() + "/Passenger/log.zip");
}
最佳答案
您可以使用此代码来禁用 Instabug 自动调用:
Instabug.getInstance().setInvocationEvent(IBGInvocationEvent.IBGInvocationEventNone)
这样它就不会被自动调用。这只会影响下一个 Activity (而不是当前 Activity )。您可以通过在当前 Activity 上调用 onPause
和 onResume
强制停止并重新启动所有监听器。 (不过我们可能会很快解决这个问题,以便将此类更改应用于当前正在运行的 Activity)。
不要忘记在恢复互联网访问时也启用摇动调用事件。
请记住,Instabug SDK 已经缓存了所有报告,并将在下次应用启动时重新尝试发送它们,直到它们成功上传。
关于android - Instabug,如果没有互联网访问,是否可以停用摇动以获得反馈?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31179021/
我找不到在来电时激活和停用振动的方法。 菜单中的选项 --> 设置 --> 声音和显示提到 - PHONE VIBRATE - 来电时手机振动... 我想通过代码激活和停用它(如果可能的话)。 最佳答
我有两个元素在彼此之上。当我点击第一个 div 上的按钮时,第二个 div 在第一个 div 之上打开,我想要做的是让底层 div 成为非交互式的(我不能点击底层 div 上的任何东西只要 overl
有没有办法取消 UIScrollView 的减速? 我想允许用户滚动 Canvas ,但我不希望用户抬起手指后 Canvas 继续滚动。 最佳答案 这可以通过利用 UIScrollView 委托(de
这里是关于 Stack Oveflow 的第一个问题,所以不要作恶! :) 言归正传:如果有堆叠的元素和堆叠的操作区域,如何继续操作以确保您对所看到的内容而不是底层元素进行操作? 我正在学习有关 Qt
这个问题已经有答案了: Deleting Objects in JavaScript (14 个回答) 已关闭 9 年前。 我有一个类,我通过以下方式调用: this.infiniteScroll =
我有一个优化问题,正在尝试使用 optaplanner 来解决。求解算法使用一组规则。引擎使用一个对象来捕获每个规则的权重。规则的最终得分是规则的中间得分乘以权重。分数设置在每条规则的右侧。每个规则的
有没有办法取消 UIScrollView 的减速? 我想允许用户滚动 Canvas ,但我不希望用户抬起手指后 Canvas 继续滚动。 最佳答案 这可以通过利用 UIScrollView 委托(de
我正在尝试更新 native android 应用程序,该应用程序以前是由其他一些人在某些跨平台技术(Titanium)中构建和上传的。应用程序以高级模式发布,其中针对平板电脑和手机有不同的构建。但现
我有一个 JList 列表和以下代码行: list.getInputMap().put(KeyStroke.getKeyStroke('d'), "action"); 因此,当我的列表处于焦点状态并且
有没有办法通过 SQL 语句停用 postgres 用户帐户? 我想阻止用户使用他们的数据库,但不删除用户或他们的数据库。 最佳答案 您还可以考虑 ALTER USER someone WITH NO
我有一个问题。我有一个 ViewController1,它通过 Push-segue 打开 ViewController2。//两者都是NavigationControllers - (void)pr
当我去 Playground 写 let test = "\u{062F}\u{0625} Hello" 时,我得到 Hello دإ(通过当我从输出控制台复制到这里时,我得到 دإ Hello) 似
我想通过扬声器播放歌曲,同时能够使用 Quickblox 接听视频通话。 我的音频速率越来越乱了。还有一个更大的问题是,当通话结束时,quickblox 框架将 Audio Session 设置为停用
我有一个工作项目,我以 tomcat 用户身份登录,但我不知道如何注销,我尝试停用 tomcat session ,我们使用 java spring,这是我尝试从 Controller : @Requ
我正在使用 javascript 来缩放我的 asp.net 网页上的图像。我想在上面放 2 个按钮,例如“缩放”、“取消缩放”,并相应地激活/停用 javascript 功能。现在我有一个 java
我有一个 TextField 和一个按钮。此 TextField 最多可包含 3 个字母或数字。 这是我的问题。当程序运行时,如果这个文本字段为空或者如果这个文本字段不只包含数字,我希望我的按钮被禁用
我有几个组,可以选择三个按钮。我试图做到这一点,以便当有人选择 N/A 按钮时,它会禁用其他两个按钮。当取消选择 N/A 按钮时,将启用其他两个按钮。我让它在我的机器上工作,其他两个按钮被着色为禁用,
HTML: Button Main Menu A Main Menu B
我是 php 新手,如何才能完成这项工作 删除.php prepare("UPDATE tbluser set status=1 WHERE id=:id"); $stmt->execute(
周五,我开始在运行 Ubuntu 14.04 的 VPS 上编写我的第一个 python API hello world 示例。我使用 python3,创建文件夹,virtualenv,激活它,然后断
我是一名优秀的程序员,十分优秀!