-
Notifications
You must be signed in to change notification settings - Fork 443
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
[Android] Revert back to target API 21 #5338
Merged
AenBleidd
merged 1 commit into
BOINC:master
from
AenBleidd:vko_android_try_to_rollback_to_the_older_sdk_version
Aug 19, 2023
Merged
[Android] Revert back to target API 21 #5338
AenBleidd
merged 1 commit into
BOINC:master
from
AenBleidd:vko_android_try_to_rollback_to_the_older_sdk_version
Aug 19, 2023
Conversation
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 was
linked to
issues
Aug 19, 2023
ee5f079
to
f66c97d
Compare
In BOINC#3418 I changed the behavior of BOINC to run always in the foreground mode. This lead to the situation when notification was always shown, even when BOINC in not running, and thus making a lot of notification noise. 3 years ago I thought that this is good decision and a necessary evil. Unfortunately, I was wrong. My main motivation of this was to be able to be on track, and have our application in the Play Store. But every new API increase the limitations from the Android side become stronger and stronger, and prevent us from doing what we want. For example, in the Android versions starting from Oreo, it is not possible to start a service from the background. And while we can leave with that fact, we received and issue with the notifications. I thought, that if we will have BOINC always running on the foreground, it will be possible to keep it always running and prevent it from being killed by the system. Unfortunately, this is not the case. The system still kills the application, and the notification is still shown. And this is not the only problem. Other problem is that starting from API 29, we are not able to start executables downloaded from the server. Since this is a core functionality, we are not able to target API 29 or higher. And since we are not able to target API 29 or higher, we are not able to put BOINC in the Play Store. And thus it makes no sense to target any API higher than 21 because it will just kill the functionality of the application. So, I decided to revert back to the API 21, and make the application work as it was before. But even in this case there is a chance that on the newer version of Android, some of the gard limitations will be applied, and it will prevent (again) BOINC from working. But at least currently application is working, and we can add necessary features to it. The only issue I see now is that the user will see a notification, that this application was developed for the older version of Android and thus might not work correctly, but I believe we can live with that. This fixes: BOINC#4189, BOINC#4218 and BOINC#4190 Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com>
f66c97d
to
9dd7396
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #5338 +/- ##
============================================
+ Coverage 10.84% 10.87% +0.02%
- Complexity 1064 1068 +4
============================================
Files 279 279
Lines 36036 36058 +22
Branches 8331 8334 +3
============================================
+ Hits 3909 3920 +11
- Misses 31735 31744 +9
- Partials 392 394 +2
|
This was referenced Aug 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #3418 I changed the behavior of BOINC to run always in the foreground mode. This lead to the situation when notification was always shown, even when BOINC in not running, and thus making a lot of notification noise. 3 years ago I thought that this is good decision and a necessary evil. Unfortunately, I was wrong.
My main motivation of this was to be able to be on track, and have our application in the Play Store. But every new API increase the limitations from the Android side become stronger and stronger, and prevent us from doing what we want. For example, in the Android versions starting from Oreo, it is not possible to start a service from the background. And while we can leave with that fact, we received and issue with the notifications. I thought, that if we will have BOINC always running on the foreground, it will be possible to keep it always running and prevent it from being killed by the system. Unfortunately, this is not the case.
The system still kills the application, and the notification is still shown. And this is not the only problem.
Other problem is that starting from API 29, we are not able to start executables downloaded from the server. Since this is a core functionality, we are not able to target API 29 or higher. And since we are not able to target API 29 or higher, we are not able to put BOINC in the Play Store. And thus it makes no sense to target any API higher than 21 because it will just kill the functionality of the application. So, I decided to revert back to the API 21, and make the application work as it was before. But even in this case there is a chance that on the newer version of Android, some of the gard limitations will be applied, and it will prevent (again) BOINC from working. But at least currently application is working, and we can add necessary features to it. The only issue I see now is that the user will see a notification, that this application was developed for the older version of Android and thus might not work correctly, but I believe we can live with that.
This fixes: #4189, #4218 and #4190