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

fix(YouTube - GmsCore support): Prompt to disable battery optimizations, if not done already #2958

Merged

Conversation

LisoUseInAIKyrios
Copy link
Contributor

@LisoUseInAIKyrios LisoUseInAIKyrios commented Mar 31, 2024

If GmsCore is not whitelisted from device power optimizations:

  • Show a dialog explaining why they need to turn off power optimizations
  • Open the prompt to turn off optimizations

This is much simpler than opening a website explaining more changes.

If GmsCore is not running in the background on app launch, then the dontkillmyapp.com is still opened, as that condition needs instructions specific to the users device and operating system (a simple exclude from battery optimizations likely will not fix it).

Integration changes

dialog

permission

@LisoUseInAIKyrios LisoUseInAIKyrios force-pushed the fix_gmscore_adjust_dialog_text branch from 6b79246 to c707804 Compare March 31, 2024 10:03
@oSumAtrIX
Copy link
Member

GmsCore is the new official name of MicroG. I don't think it makes sense to mislabel it. If at all, I'd call it MicroG GmsCore.

@LisoUseInAIKyrios LisoUseInAIKyrios force-pushed the fix_gmscore_adjust_dialog_text branch from e6f52a4 to 0172929 Compare March 31, 2024 13:05
@LisoUseInAIKyrios LisoUseInAIKyrios force-pushed the fix_gmscore_adjust_dialog_text branch from 0172929 to 4db2a9e Compare March 31, 2024 13:05
@LisoUseInAIKyrios LisoUseInAIKyrios changed the title fix(YouTube - GmsCore support): Improve dialog text instructions fix(YouTube - GmsCore support): Open device disable battery optimizations menu, if GmsCore is not whitelisted Apr 1, 2024
@LisoUseInAIKyrios
Copy link
Contributor Author

It now opens opens the device prompt to turn off battery optimizations.

src/main/resources/addresources/values/strings.xml Outdated Show resolved Hide resolved
src/main/resources/addresources/values/strings.xml Outdated Show resolved Hide resolved
src/main/resources/addresources/values/strings.xml Outdated Show resolved Hide resolved
@oSumAtrIX oSumAtrIX changed the title fix(YouTube - GmsCore support): Open device disable battery optimizations menu, if GmsCore is not whitelisted fix(YouTube - GmsCore support): Prompt to disable battery optimizations, if not done already Apr 2, 2024
@LisoUseInAIKyrios LisoUseInAIKyrios force-pushed the fix_gmscore_adjust_dialog_text branch from 974740d to a7d0cd8 Compare April 3, 2024 10:25
@LisoUseInAIKyrios
Copy link
Contributor Author

I think this might be good to go

…ialog_text

# Conflicts:
#	src/main/resources/addresources/values/strings.xml
…ialog_text

# Conflicts:
#	src/main/resources/addresources/values/strings.xml
LisoUseInAIKyrios and others added 2 commits April 4, 2024 18:34
# Conflicts:
#	src/main/resources/addresources/values/strings.xml
@oSumAtrIX oSumAtrIX merged commit 82acb84 into ReVanced:dev Apr 6, 2024
2 checks passed
@LisoUseInAIKyrios LisoUseInAIKyrios deleted the fix_gmscore_adjust_dialog_text branch April 6, 2024 18:47
revanced-bot pushed a commit that referenced this pull request Apr 6, 2024
## [4.6.1-dev.3](v4.6.1-dev.2...v4.6.1-dev.3) (2024-04-06)

### Bug Fixes

* **YouTube - GmsCore support:** Prompt to disable battery optimizations, if not done already ([#2958](#2958)) ([82acb84](82acb84))
revanced-bot pushed a commit that referenced this pull request Apr 21, 2024
# [4.7.0](v4.6.0...v4.7.0) (2024-04-21)

### Bug Fixes

* **Tumblr - Fix old versions:** Improve reliability by removing remnances of Tumblr Live  ([#2988](#2988)) ([897b4db](897b4db))
* **YouTube - GmsCore support:** Prompt to disable battery optimizations, if not done already ([#2958](#2958)) ([82acb84](82acb84))
* **YouTube - Hide ads:** rename `Hide paid content` to `Hide paid promotion label` ([#3026](#3026)) ([17e4ac9](17e4ac9))
* **YouTube - Hide load more button:** Include patch with `Hide layout components`, and hide button only in search feed  ([#2959](#2959)) ([b007e8e](b007e8e))
* **YouTube - Hide Shorts components:** Correctly hide Shorts if navigation tab is changed using device back button ([#3007](#3007)) ([e5848e9](e5848e9))
* **YouTube - Player flyout menu:** Add hide Lock screen menu ([#2985](#2985)) ([308de4a](308de4a))
* **YouTube - Spoof device dimensions:** Warn about potential performance issues ([#3039](#3039)) ([9d6f305](9d6f305))
* **YouTube Music - Remove upgrade button:** Fix compatibility with latest versions ([#3045](#3045)) ([80de996](80de996))

### Features

* Add `Hex` patch ([#3034](#3034)) ([3c95aac](3c95aac))
* **Amazon:** Add `Always allow deep-linking` patch ([#3000](#3000)) ([a92b7fb](a92b7fb))
* **Strava - Unlock subscription:** Remove compatible version constraint ([80a5599](80a5599))
* **Twitter:** Add `Sanitize sharing links` patch ([#3003](#3003)) ([186b887](186b887))
* **YouTube - Hide layout components:** Add option to hide horizontal shelves ([#2951](#2951)) ([9ae0650](9ae0650))
* **YouTube - Hide layout components:** Hide playables ([8423515](8423515))
* **YouTube - Hide Shorts components:** Hide `Shop`, `Location` and `Save sound to playlist` buttons ([#3018](#3018)) ([5210ac4](5210ac4))
* **YouTube - Hide Shorts components:** Hide tagged products, hide search suggestions ([#3019](#3019)) ([e0d2fe5](e0d2fe5))
* **YouTube - Swipe controls:** Save and restore brightness and add auto-brightness toggle ([#2996](#2996)) ([f6c3bc4](f6c3bc4))
* **YouTube:** Add 'About' preference to settings menu ([#2981](#2981)) ([5abf894](5abf894))
* **YouTube:** Match overlay icons style to YouTube ([#3023](#3023)) ([6849393](6849393))
* **YouTube:** Support version `19.09.38`, `19.10.39` and `19.11.43` ([#2971](#2971)) ([730f3e3](730f3e3))
* **YT Music - Hide 'Get Music Premium' label:** Remove occurences of label in settings ([#3046](#3046)) ([10e170a](10e170a))
E85Addict pushed a commit to E85Addict/revanced-patches that referenced this pull request Apr 21, 2024
# [4.7.0](v4.6.0...v4.7.0) (2024-04-21)

### Bug Fixes

* **Tumblr - Fix old versions:** Improve reliability by removing remnances of Tumblr Live  ([ReVanced#2988](https://github.com/E85Addict/revanced-patches/issues/2988)) ([897b4db](897b4db))
* **YouTube - GmsCore support:** Prompt to disable battery optimizations, if not done already ([ReVanced#2958](https://github.com/E85Addict/revanced-patches/issues/2958)) ([82acb84](82acb84))
* **YouTube - Hide ads:** rename `Hide paid content` to `Hide paid promotion label` ([ReVanced#3026](https://github.com/E85Addict/revanced-patches/issues/3026)) ([17e4ac9](17e4ac9))
* **YouTube - Hide load more button:** Include patch with `Hide layout components`, and hide button only in search feed  ([ReVanced#2959](https://github.com/E85Addict/revanced-patches/issues/2959)) ([b007e8e](b007e8e))
* **YouTube - Hide Shorts components:** Correctly hide Shorts if navigation tab is changed using device back button ([ReVanced#3007](https://github.com/E85Addict/revanced-patches/issues/3007)) ([e5848e9](e5848e9))
* **YouTube - Player flyout menu:** Add hide Lock screen menu ([ReVanced#2985](https://github.com/E85Addict/revanced-patches/issues/2985)) ([308de4a](308de4a))
* **YouTube - Spoof device dimensions:** Warn about potential performance issues ([ReVanced#3039](https://github.com/E85Addict/revanced-patches/issues/3039)) ([9d6f305](9d6f305))
* **YouTube Music - Remove upgrade button:** Fix compatibility with latest versions ([ReVanced#3045](https://github.com/E85Addict/revanced-patches/issues/3045)) ([80de996](80de996))

### Features

* Add `Hex` patch ([ReVanced#3034](https://github.com/E85Addict/revanced-patches/issues/3034)) ([3c95aac](3c95aac))
* **Amazon:** Add `Always allow deep-linking` patch ([ReVanced#3000](https://github.com/E85Addict/revanced-patches/issues/3000)) ([a92b7fb](a92b7fb))
* **Strava - Unlock subscription:** Remove compatible version constraint ([80a5599](80a5599))
* **Twitter:** Add `Sanitize sharing links` patch ([ReVanced#3003](https://github.com/E85Addict/revanced-patches/issues/3003)) ([186b887](186b887))
* **YouTube - Hide layout components:** Add option to hide horizontal shelves ([ReVanced#2951](https://github.com/E85Addict/revanced-patches/issues/2951)) ([9ae0650](9ae0650))
* **YouTube - Hide layout components:** Hide playables ([8423515](8423515))
* **YouTube - Hide Shorts components:** Hide `Shop`, `Location` and `Save sound to playlist` buttons ([ReVanced#3018](https://github.com/E85Addict/revanced-patches/issues/3018)) ([5210ac4](5210ac4))
* **YouTube - Hide Shorts components:** Hide tagged products, hide search suggestions ([ReVanced#3019](https://github.com/E85Addict/revanced-patches/issues/3019)) ([e0d2fe5](e0d2fe5))
* **YouTube - Swipe controls:** Save and restore brightness and add auto-brightness toggle ([ReVanced#2996](https://github.com/E85Addict/revanced-patches/issues/2996)) ([f6c3bc4](f6c3bc4))
* **YouTube:** Add 'About' preference to settings menu ([ReVanced#2981](https://github.com/E85Addict/revanced-patches/issues/2981)) ([5abf894](5abf894))
* **YouTube:** Match overlay icons style to YouTube ([ReVanced#3023](https://github.com/E85Addict/revanced-patches/issues/3023)) ([6849393](6849393))
* **YouTube:** Support version `19.09.38`, `19.10.39` and `19.11.43` ([ReVanced#2971](https://github.com/E85Addict/revanced-patches/issues/2971)) ([730f3e3](730f3e3))
* **YT Music - Hide 'Get Music Premium' label:** Remove occurences of label in settings ([ReVanced#3046](https://github.com/E85Addict/revanced-patches/issues/3046)) ([10e170a](10e170a))

### Performance Improvements

* Personal Logo && Add upstream sync ([7f40bcb](7f40bcb))
@d-e-n-n-i-s-t
Copy link

Why does this have to keep annoying users that don't need to whitelist MicroG GmsCore? I don't use background playback/notifications, so why do I have to dismiss this annoying popup everytime I open ReVanced YouTube? Atleast create an option to disable this popup.

@oSumAtrIX
Copy link
Member

GmsCore must run in the background for the app to work correctly, not just for notifications.

@d-e-n-n-i-s-t
Copy link

d-e-n-n-i-s-t commented Apr 22, 2024

Not true from my experience, I never had any issues with it's Battery Optimization Setting being on restricted (worse than default, "optimized"). Weirdly, even background playback works for me up to an hour (haven't used it longer yet)
Furthermore, it actually can run in the background without being set to unrestricted. Afaik, that settings mostly affects behavior on Android Doze. It can still run in the background when using the phone/ReVanced YouTube.

@oSumAtrIX
Copy link
Member

If it runs anyways in the background you have no reason to worry about setting it to unrestricted. Once you can provide evidence on setting the option to unrestricted being problematic we can reconsider.

@d-e-n-n-i-s-t
Copy link

d-e-n-n-i-s-t commented Apr 22, 2024

Yeah, Im not doing that for anyone to "reconsider" - its probably not possible to even provide that evidence. It's a matter of principle; only apps that absolutely need it, should be set to unrestricted - it doesn't need to run in idle sleep.
I guess this is where it stays then, just want to annotate that its really inconsiderate to not create a toggle for that popup. Seems to me like it goes against the general pathos of ReVanced, as you can turn off any annoying popups, except this one.

@oSumAtrIX
Copy link
Member

Yeah, Im not doing that

Feel free to open an issue once you change your mind, as it stands, no change is necessary.

@ReVanced ReVanced locked as resolved and limited conversation to collaborators Apr 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants