Why do I get RemoteServiceException for creating/updating a notification?

陌路散爱 提交于 2019-12-03 12:54:39

OK, I still don't know why this occurs, but a workaround for this that I've found, is to let the service do all of the updating of its notification, by safely just calling it via the context.startForegroundService function.

So far, by using this instead, I still don't see any crashes of this sort.

I think this is the problem:

.putExtra(Settings.EXTRA_CHANNEL_ID, context.getString(R.string.channel_id__app_monitor))

You need to put the (unchanging) channel id, not the localized channel name

If you are able to reproduce this you can also look in your bugreport for AppSettings.*[your app] and see if there is a channel with an id matching the one you're trying to use.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!