-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "switch foreground service type"
This reverts commit a518a3d.
- Loading branch information
Showing
2 changed files
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
86cebda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't use both in same time? it fixed the problem on samsung android 13
https://developer.android.com/about/versions/14/changes/fgs-types-required
86cebda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of the foreground service here is to accept incoming calls.
Can you explain what you fixed on samsung on android 13? And how?
86cebda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it fixed the microphone access problem of non foreground meshenger
#160 (comment)
86cebda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iddq ok, and how? By using FOREGROUND_SERVICE_TYPE_MICROPHONE and FOREGROUND_SERVICE_TYPE_CAMERA?
If that is the case, then have you tried to reinstall Meshenger to see if it still works?
86cebda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understood the Android documentation correctly, for the FGS to access the microphone even when the app is not in the foreground, the FOREGROUND_SERVICE_TYPE_MICROPHONE is necessary. So, I don’t understand how this can work on some devices without it… If you find that in certain cases the FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK works better, it might be worth trying to specify all the above service types at once.
86cebda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not certain yet and need to perform more testing. But to put a CallActivity into background does not make it a FGS. And the FGS is starting the MainActivity. So I am not entirely certain this will fix the issue.
86cebda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is microphone access handled from the MainService FGS?