信鸽推送时,关于状态栏显示消息的两个问题

信鸽推送,会在通知栏上显示消息。
现在的问题是:
1、点击通知栏的消息,程序会崩溃。报错log如下。
07-15 18:32:06.779: E/ZTEGesture(1087): ViewRootGestureDispatcher bindService Fail
07-15 18:32:06.789: E/ActivityThread(1087): Activity com.activity.Login has leaked ServiceConnection android.view.ViewRootGestureDispatcher$1@41986228 that was originally bound here
07-15 18:32:06.789: E/ActivityThread(1087): android.app.ServiceConnectionLeaked: Activity com.activity.Login has leaked ServiceConnection android.view.ViewRootGestureDispatcher$1@41986228 that was originally bound here
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.LoadedApk$ServiceDispatcher.(LoadedApk.java:965)
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:859)
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.ContextImpl.bindService(ContextImpl.java:1260)
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.ContextImpl.bindService(ContextImpl.java:1252)
07-15 18:32:06.789: E/ActivityThread(1087): at android.content.ContextWrapper.bindService(ContextWrapper.java:394)
07-15 18:32:06.789: E/ActivityThread(1087): at android.view.ViewRootGestureDispatcher.(ViewRootGestureDispatcher.java:32)
07-15 18:32:06.789: E/ActivityThread(1087): at android.view.ViewRootImpl.(ViewRootImpl.java:415)
07-15 18:32:06.789: E/ActivityThread(1087): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:292)
07-15 18:32:06.789: E/ActivityThread(1087): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:224)
07-15 18:32:06.789: E/ActivityThread(1087): at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:149)
07-15 18:32:06.789: E/ActivityThread(1087): at android.view.Window$LocalWindowManager.addView(Window.java:547)
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2646)
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2097)
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.ActivityThread.access$600(ActivityThread.java:133)
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1203)
07-15 18:32:06.789: E/ActivityThread(1087): at android.os.Handler.dispatchMessage(Handler.java:99)
07-15 18:32:06.789: E/ActivityThread(1087): at android.os.Looper.loop(Looper.java:137)
07-15 18:32:06.789: E/ActivityThread(1087): at android.app.ActivityThread.main(ActivityThread.java:4794)
07-15 18:32:06.789: E/ActivityThread(1087): at java.lang.reflect.Method.invokeNative(Native Method)
07-15 18:32:06.789: E/ActivityThread(1087): at java.lang.reflect.Method.invoke(Method.java:511)
07-15 18:32:06.789: E/ActivityThread(1087): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
07-15 18:32:06.789: E/ActivityThread(1087): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
07-15 18:32:06.789: E/ActivityThread(1087): at dalvik.system.NativeStart.main(Native Method)

2、我想隐藏状态栏的推送信息,不让它显示,有没有什么方法。
我在onNotifactionShowedResult回调方法的最后一行,使用了
XGPushManager.clearLocalNotifications(context);
XGPushManager.deleteTag(context, CommData.TAG_TYPE);
NotificationManager notificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancelAll();
这几句话,完全没有效果啊

可以,继承 XGPushBaseReceiver,但是通知不行,如果是消息,你可以自己控制弹出

好吧,每次都是。不发帖子好几个小时都没找到解决问题的方案,刚发完帖子没多久,问题就解决了。
/**
* 通知被展示触发的结果,可以在此保存APP收到的通知
*/
@Override
public void onNotifactionShowedResult(Context context,
XGPushShowedResult xgPushShowedResult) {
String jsonString = xgPushShowedResult.getCustomContent();
long msgId = xgPushShowedResult.getMsgId();
// 处理推送数据
receiverData(context, jsonString);
// XGPushManager.clearLocalNotifications(context);
// XGPushManager.deleteTag(context, CommData.TAG_TYPE);
NotificationManager notificationManager = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancelAll();
notificationManager.cancel((int) msgId);
}
注:
notificationManager.cancelAll();
notificationManager.cancel((int) msgId);这两句话缺一不可

上面的方法,每次收到推送信息,都会先在手机通知栏先显示一下,然后再消失,很烦人,如何设置直接不显示在通知栏

同样的问题 感谢楼主了 不过没有先显示一下再消失 直接没出现在通知栏