不要紧,如果我返回true或false在onTouch()的OnTouchListener?我看不到返回true或false在此示例中的任何区别:Android在桌面上滑动
我如何获得调试应用程序的 DSYM(未在 AppStore 上发布)?...
我从这个答案中知道调试会话不允许向 Fabric 报告崩溃和错误,但是在我断开设备与 xcode 的连接后,我的崩溃日志被报告并需要 DSYM,在这种情况下我如何获得它们?
另请注意,我正在使用Crashlytics.recordError(error)而不是强制崩溃来记录非致命错误。
ios firebase crashlytics twitter-fabric firebase-crash-reporting
我的问题是检测到所有触摸事件,但没有检测到Action_Down事件。该日志会导致事件1、2而不是0(向下)。
这是我的代码
final ViewPager homeViewPager = (ViewPager)findViewById(R.id.homeViewPager);
homeViewPager.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch (View v, MotionEvent event){
Log.i("ViewPager", "event " + event.getAction());
switch (event.getAction()) {
case MotionEvent.ACTION_MOVE:
Log.i("ViewPager", "ACTION_MOVE");
break;
case MotionEvent.ACTION_DOWN:
Log.i("ViewPager", "ACTION_DOWN");
break;
case MotionEvent.ACTION_UP:
Log.i("ViewPager", "ACTION_UP ");
break;
}
return false;
}
});
Run Code Online (Sandbox Code Playgroud) 我的应用正在正确接收通知,但未能显示收到信息的通知(如果应用已打开).
注意:如果应用程序在后台,则会显示通知而不会出现任何问题.
我的代码:
我收到此方法的通知:
@Override
public void onMessageReceived(RemoteMessage remoteMessage)
{
Log.d(TAG, "From: " + remoteMessage.getFrom());
if(remoteMessage!=null)
{
String id = null;
String title = null;
String body = null;
String launchPage = null;
if(remoteMessage.getNotification()!=null)
{
title = remoteMessage.getNotification().getTitle();
body = remoteMessage.getNotification().getBody();
}
if(remoteMessage.getMessageId()!=null)
{
id = remoteMessage.getMessageId();
}
Log.i(TAG, "id: " + id);
Log.i(TAG, "title: "+ title);
Log.i(TAG, "body: " + body);
int notif_id = 0;
sendNotification(notif_id, title, body, launchPage);
}
}
Run Code Online (Sandbox Code Playgroud)
然后它调用这个(它应该显示我理解的通知):
private void sendNotification(int id, String title, String …Run Code Online (Sandbox Code Playgroud) android ×3
firebase ×2
crashlytics ×1
ios ×1
list ×1
motionevent ×1
ontouch ×1
return ×1
swipe ×1