如何在通知访问中显示我的应用程序

时间:2014-04-28 03:32:33

标签: android service notifications android-notifications

我知道这个编码:

startActivity(new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS"));

致意Notification AccessSettings的{​​{1}}部分。

但是我的申请没有显示在其中。

知道如何在enable/disable the application for granting the permission to get notification or not中的Notification Access部分注册我的应用的人

请告诉我,

谢谢,

p / s:这是我的Manifest.xml文件:

Settings

1 个答案:

答案 0 :(得分:3)

将此编码添加到清单文件后:

<!-- Services -->
        <service android:name="controller.BluetoothLeService" />
        <service
            android:name="utils.NotificationListener"
            android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" >
            <intent-filter>
                <action android:name="android.service.notification.NotificationListenerService" />
            </intent-filter>
        </service>

可以在Notification Access部分看到。