Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting exported to false in Notifee Core #1110

Open
shubham-imoney opened this issue Sep 30, 2024 · 7 comments · May be fixed by #1132
Open

Setting exported to false in Notifee Core #1110

shubham-imoney opened this issue Sep 30, 2024 · 7 comments · May be fixed by #1132
Labels
needs-feedback Waiting on response to questions question Type: Stale

Comments

@shubham-imoney
Copy link

An audit of our application which uses the Notifee library showed that app.notifee.core.NotificationRecieverActivity has exported set to true with no permission in AndroidManifest.xml. If i override this activity in my app AndroidManifest.xml and set it's exported to false, would this create any issues given that I use the notifee.displayNotification, notifee.onForegroundEvent and notifee.onBackgroundEvent functions.

I'm not too familiar with Android development so any input would be appreciated.

@mikehardy
Copy link
Collaborator

https://developer.android.com/guide/topics/manifest/receiver-element#exported

I believe - though please test it - that if you set it to not exported / exported == false, the app will still receive system broadcasts. I believe the restriction is just that inter-app communication with the receiver is blocked.

The point of the receiver is to receive notifications from the network, processed by the system and system-delivered to the app, so I think setting it to false will work fine.

If you test that and things work well for you, then this is something we may be able to change here so it is false to start. I think our intended use cases are supported well enough with it false assuming it works when you test it

@mikehardy mikehardy added needs-feedback Waiting on response to questions question labels Sep 30, 2024
@shubham-imoney
Copy link
Author

https://developer.android.com/guide/topics/manifest/receiver-element#exported

I believe - though please test it - that if you set it to not exported / exported == false, the app will still receive system broadcasts. I believe the restriction is just that inter-app communication with the receiver is blocked.

The point of the receiver is to receive notifications from the network, processed by the system and system-delivered to the app, so I think setting it to false will work fine.

If you test that and things work well for you, then this is something we may be able to change here so it is false to start. I think our intended use cases are supported well enough with it false assuming it works when you test it

Okay. I'll test and get back in a day or two

@mikehardy
Copy link
Collaborator

@shubham-imoney how did the testing go? I think you are correct and this can likely be exported=false but I would love confirmation from testing besides myself if you have it also

@shubham-imoney
Copy link
Author

@mikehardy Apologies for not replying. Based on the preliminary testing by setting exported to false, the functions that I had mentioned were working fine. But I did not do in depth testing of the other notifee functionality. You could let me know if there are any other Notifee functions you would want me to re-check?

Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

@mikehardy
Copy link
Collaborator

closer to being able to test the related PR #1132 after invertase/react-native-firebase#8143
will have it tested and be able to merge shortly

Copy link

Hello 👋, to help manage issues we automatically close stale issues.

This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?

This issue will be closed in 15 days if no further activity occurs.

Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-feedback Waiting on response to questions question Type: Stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants