Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/187.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android M中的NotificationService_Android_Service_Notifications_Android Notifications_Android 6.0 Marshmallow - Fatal编程技术网

android M中的NotificationService

android M中的NotificationService,android,service,notifications,android-notifications,android-6.0-marshmallow,Android,Service,Notifications,Android Notifications,Android 6.0 Marshmallow,我的应用程序使用NotificationService,它可以在安卓L以下的设备上正常工作。当在安卓M设备上尝试时,服务不会启动。OnCreate根本不被激发 服务通常在AndroidManifest中声明: <service android:name="com.abc.def.MyCustomService" android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">

我的应用程序使用NotificationService,它可以在安卓L以下的设备上正常工作。当在安卓M设备上尝试时,服务不会启动。OnCreate根本不被激发

服务通常在AndroidManifest中声明:

   <service android:name="com.abc.def.MyCustomService"
        android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
        <intent-filter>
            <action android:name="android.service.notification.NotificationListenerService" />
        </intent-filter>
    </service>


有没有办法解决这个问题

是否实现了onBind()?是否实现了onBind()?