Closed manarbajafar closed 1 year ago
Adding android:exported="true"
to
<service
android:label="notifications"
android:name="notification.listener.service.NotificationListener"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
android:exported="true">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
in android/app/src/main/AndroidManifest.xml
made it work for me
More details: I created a new flutter project, imported the latest version of the package, copy-pasted the example from this repo and added previous reply content in AndroidManifest, it worked with no errors
I already mentioned this in the docs
.
.
<service android:label="notifications" android:name="notification.listener.service.NotificationListener"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" android:exported="false">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
...
</application>
The error shows that the android needs to be exported for the android and higher
It should be set to false if the component is only accessible within the app. For example, if the component is only used for internal functions and doesn't need to be called from other apps.
It should be set to true if the component needs to be called from outside the app. For example, if the component provides a public API that other apps can access or if it's a broadcast receiver that should receive broadcasts from outside the app.
Hi everyone I downloaded my example https://github.com/X-SLAYER/foreground_plugins_test to try Error after error appeared to me until I reached this error that I could not solve
AndroidManifest.xml:
android/build.gradle:
android/app/build.gradle:
if i put android:exported="true" in notification.listener.service.NotificationListener service Error:Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more details will appear
Can someone help me? i use vs code