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

Keep toast without notification permission. #16

Closed
wants to merge 1 commit into from
Closed

Keep toast without notification permission. #16

wants to merge 1 commit into from

Conversation

ryuunoakaihitomi
Copy link

@ryuunoakaihitomi ryuunoakaihitomi commented Mar 1, 2021

I want to hide background listener service notification, but the toasts of the clipped contents are not shown.

This is the solution.

@DeweyReed
Copy link
Owner

So this is about toasting when the user disables the app notification?

@ryuunoakaihitomi
Copy link
Author

Yes.

@DeweyReed
Copy link
Owner

Since the library includes some hacks, I'll check them and reply to you later.

BTW, the library could use App Startup instead of a custom ContentProvider to provide better performance.

@ryuunoakaihitomi
Copy link
Author

Thanks for your kind suggestion, but I prefer to use platform API in order to reduce the cost of importing this library.

@DeweyReed
Copy link
Owner

I found a bug of the library.

fun Context.toast(s: String) = Toast.makeText(this, s, Toast.LENGTH_SHORT).show()

toast("a").cancel()
toast("b")

On pre-Q devices, without the library, b is shown immediately. After adding the library, there is a delay before the toast is shown.

@ryuunoakaihitomi
Copy link
Author

ryuunoakaihitomi commented Mar 2, 2021

Good job! Thanks for your bug report! I will fix it in the next version.

ryuunoakaihitomi added a commit to ryuunoakaihitomi/ReToast that referenced this pull request Mar 2, 2021
@ryuunoakaihitomi
Copy link
Author

I have upgraded the library (to version 1.3.0) and fixed the bug.

@DeweyReed
Copy link
Owner

After some reconsideration, I don't think it's good to use such hacks because they could potentially break the app on some devices.

I'm closing the PR. Feel free to fork the repo and build your version of the app.
Thanks for your contribution!

@DeweyReed DeweyReed closed this Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants