(Notification.CATEGORY_SERVICE) .build();
startForeground但是我在Android 8.1,9.0和10.0 Emulator上得到了下面的错误。android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeExcep
我有一个Service,我想在其中使用startForeground()函数: if (notif == null)在较新的Android版本中,一切都很好,没有错误,但在2.3.4中,我得到了错误:android.app.RemoteServiceException:Bad notification for startForeground:
java.la
只在android 11和10中得到了这个错误,其他的都很好,已经检查了这个问题,看起来我的代码没问题。startForeground fails with Bad notification for startForegroundandroid.app.RemoteServiceException: Bad(1, notification); 我在Android 11中遇到错误 at android.app.ActivityThread$H.handleMessage
我目前正在开发音频播放应用程序,我正在使用一个已启动的绑定服务来播放背景音乐。我使用以下代码启动并绑定到服务。// onAudioPlayservice.stopForeground但是,当用户在暂停状态下滑动(删除)通知时,服务会在几秒钟后崩溃,从而导致此错误。E/AndroidRuntime: FATAL EXCEPTION: main
我正在构建一个在后台做一些处理的应用程序。这是打开粘滞通知的函数。我在上读到了它,从它的外观来看,如果我的服务被取消以恢复更多的内存,我会很好。我有我的工作经理设置,它会自动启动服务,如果死了。这是抛出的异常。FATAL EXCEPTION: main
E/AndroidRuntime(20132): Proc