信鸽推送,会在通知栏上显示消息。
现在的问题是:
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();
这几句话,完全没有效果啊