Cactus
Cactus copied to clipboard
Bad notification for startForeground
2020-04-10 09:42:32.977 1709-1709/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.gyf.cactus.sample, PID: 1709 android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification: Notification(channel=Cactus pri=-2 contentView=null vibrate=null sound=null defaults=0x0 flags=0x50 color=0x00000000 groupKey=ranker_group180816150 vis=SECRET) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2300) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:213) at android.app.ActivityThread.main(ActivityThread.java:8147) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101) 2020-04-10 09:42:32.977 1709-1709/? I/Process: Sending signal. PID: 1709 SIG: 9
模拟crash时就会出现
对的,这是8.0以上隐藏通知栏的问题导致的,要么hideNotificationAfterO设置为false
对的,这是8.0以上隐藏通知栏的问题导致的,要么hideNotificationAfterO设置为false
有没有其他办法呢?通知栏一直显示感觉不太友好
我发现bugly 上面报错的都是 8.1 系统 , hideNotificationAfterO设置为false的, 也会报这个问题
我发现bugly 上面报错的都是 8.1 系统 , hideNotificationAfterO设置为false的, 也会报这个问题
原来是api不同, bugly定位错误不同, 8.0版本也有这问题
对的,这是8.0以上隐藏通知栏的问题导致的,要么hideNotificationAfterO设置为false
有没有其他办法呢?通知栏一直显示感觉不太友好
你好, 请问你现在解决这个问题了嘛? 我一开始是当应用进入后台 启动保活, 进入前台关闭保活, 这样体验上会好些, 但发现经常报“Context.startForegroundService() did not then call Service.startForeground()” 这个错误; 最新的一个版本 又把通知栏直接隐藏了, 这样又发现 "Bad notification for startForeground" 报错又特别多; 总之现在无论用哪种方式bugly 统计到的崩溃率都很高, 感觉是在无解.
对的,这是8.0以上隐藏通知栏的问题导致的,要么hideNotificationAfterO设置为false
有没有其他办法呢?通知栏一直显示感觉不太友好
你好, 请问你现在解决这个问题了嘛? 我一开始是当应用进入后台 启动保活, 进入前台关闭保活, 这样体验上会好些, 但发现经常报“Context.startForegroundService() did not then call Service.startForeground()” 这个错误; 最新的一个版本 又把通知栏直接隐藏了, 这样又发现 "Bad notification for startForeground" 报错又特别多; 总之现在无论用哪种方式bugly 统计到的崩溃率都很高, 感觉是在无解.
使用最新版,打开通知栏,在bugly之后初始化
对的,这是8.0以上隐藏通知栏的问题导致的,要么hideNotificationAfterO设置为false
有没有其他办法呢?通知栏一直显示感觉不太友好
你好, 请问你现在解决这个问题了嘛? 我一开始是当应用进入后台 启动保活, 进入前台关闭保活, 这样体验上会好些, 但发现经常报“Context.startForegroundService() did not then call Service.startForeground()” 这个错误; 最新的一个版本 又把通知栏直接隐藏了, 这样又发现 "Bad notification for startForeground" 报错又特别多; 总之现在无论用哪种方式bugly 统计到的崩溃率都很高, 感觉是在无解.
使用最新版,打开通知栏,在bugly之后初始化
我的需求是在驾驶这一个页面进行保活,我可以不在application注册,就在驾驶页面注册然后打开通知栏么,是不是不会出现这个Context.startForegroundService() did not then call Service.startForeground()错误了
对的,这是8.0以上隐藏通知栏的问题导致的,要么hideNotificationAfterO设置为false
有没有其他办法呢?通知栏一直显示感觉不太友好
你好, 请问你现在解决这个问题了嘛? 我一开始是当应用进入后台 启动保活, 进入前台关闭保活, 这样体验上会好些, 但发现经常报“Context.startForegroundService() did not then call Service.startForeground()” 这个错误; 最新的一个版本 又把通知栏直接隐藏了, 这样又发现 "Bad notification for startForeground" 报错又特别多; 总之现在无论用哪种方式bugly 统计到的崩溃率都很高, 感觉是在无解.
使用最新版,打开通知栏,在bugly之后初始化
我的需求是在驾驶这一个页面进行保活,我可以不在application注册,就在驾驶页面注册然后打开通知栏么,是不是不会出现这个Context.startForegroundService() did not then call Service.startForeground()错误了
只要该页面在前台就没问题。