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

The service notification disappears after some times #126

Closed
AlenToma opened this issue Apr 3, 2022 · 16 comments · Fixed by #127
Closed

The service notification disappears after some times #126

AlenToma opened this issue Apr 3, 2022 · 16 comments · Fixed by #127
Labels
bug Something isn't working released

Comments

@AlenToma
Copy link

AlenToma commented Apr 3, 2022

Hi, as the title says, the notification disappears after sometime but the BackgroundService.isRunning is still running.

Is that okey ? or is it a problem.

as I know when the notification disappears it should indicate that the service is down right?

@Rapsssito
Copy link
Owner

@AlenToma, the background handling implementation heavily depends on the OS flavor you are running. Normally, if when the notification disappears, it means the service is no longer running, but it may not be the case. The only way of knowing is checking the process itself.

@AlenToma
Copy link
Author

AlenToma commented Apr 5, 2022

The process is while loop that always running, so if there were an error on the android part. then you could not have seen it.
Now I have downgraded to 2.6.2 and everything works as it should be.

The notification is always up as long as my app is open.

I am using this in Samsung s10 lite with android version 11

@JariPulkkinen
Copy link

JariPulkkinen commented Apr 8, 2022

I also noticed that the service got stopped when I closed the application. May be related. Call to stopForeground() here might be the reason:

@AlenToma
Copy link
Author

AlenToma commented Apr 8, 2022

Obs I forgot to say that the notification disappear only when the app have gone on foreground for 6 to 10 mins

@Rapsssito
Copy link
Owner

I also noticed that the service got stopped when I closed the application. May be related. Call to stopForeground() here might be the reason:

@JariPulkkinen that this.stopForeground(false); is only called when there was already a running background task and you started a new one. It should not interfere.

@Rapsssito
Copy link
Owner

@AlenToma, does it happen in version 2.6.4?

@AlenToma
Copy link
Author

Hmm was 2.6.4 the latest version? if it was then yes.

@Rapsssito
Copy link
Owner

Rapsssito commented Apr 12, 2022

@AlenToma, the latest version is 2.6.6. Could you check if 2.6.4 works for you?

@Mhp23
Copy link

Mhp23 commented Apr 18, 2022

@Rapsssito in the latest version (2.6.6) background services will be stop and notification bar will gone when close application, before updating to the latest version it was been working correctly, please review.

@Rapsssito
Copy link
Owner

Rapsssito commented Apr 18, 2022

@Mhp23, could you please confirm that this did not happen in 2.6.5 or 2.6.4?

@Rapsssito Rapsssito added bug Something isn't working work-in-progress labels Apr 18, 2022
@Mhp23
Copy link

Mhp23 commented Apr 18, 2022

@Rapsssito in v2.6.5 that I worked by it, it hadn't the problem and work correctly.

@AnagramEngineering
Copy link

I see the notification disappear as well after 1 min (it looked pretty exaxt) (Pixel3, Android 12).

(Application is in background, background process is still running (i see the console outputs) also after the notification went away)

my guess was that the system is maybe removing them automatically (as it's pretty exactly one minute until it's gone) but haven#t found anything on this topic.

i'm using the latest 2.6.6 version.

Rapsssito added a commit that referenced this issue Apr 25, 2022
Revert #124 as it is causing issues (#126)
Rapsssito added a commit that referenced this issue Apr 25, 2022
Revert #124 as it is causing issue #126
github-actions bot pushed a commit that referenced this issue Apr 25, 2022
## [2.6.7](v2.6.6...v2.6.7) (2022-04-25)

### Bug Fixes

* **Android:** Revert [#124](#124) ([#127](#127)) ([ba3bf29](ba3bf29)), closes [#126](#126)
@github-actions
Copy link

🎉 This issue has been resolved in version 2.6.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@Rapsssito
Copy link
Owner

@AnagramEngineering @Mhp23 @AlenToma could you check if this is fixed in the last version as I reverted #124

@AnagramEngineering
Copy link

I can confirm this is working with 2.6.6 version. The notification is shown until the process is ended (which is happening after 5 minutes on my side (closing ble connection).

thx @Rapsssito

@AlenToma
Copy link
Author

I am truly sorry I did not have time to test this with the other version, will try to make time to test it later on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants