Skip to content

Conversation

@brosssh
Copy link
Member

@brosssh brosssh commented Aug 27, 2025

Starting from Android 13, notification permission is now not granted by default. With this motivation, I created a component to handle permission requests (PermissionRequestHandler). This will show a dialog with an explantion of why the permission is requested, and will allow the user to give or reject the permission. Currently this is just used for the notifications permission, but it's possible other permissions will be needed in the future.

image0

I have also added a notification when the patching process is completed (both in case of success and failure).
Screenshot_2025-08-27-15-43-29-91_b783bf344239542886fee7b48fa4b892

Axelen123 and others added 30 commits May 20, 2025 14:01
Comment on lines +313 to +318
<string name="patcher_notification_running_title">Patching in progress…</string>
<string name="patcher_notification_running_text">Tap to return to the patcher</string>
<string name="patcher_notification_success_title">Patching completed</string>
<string name="patcher_notification_success_text">Patching completed! Tap to return to the patcher</string>
<string name="patcher_notification_failure_title">Failure while patching</string>
<string name="patcher_notification_failure_text">Patching completed with errors. Tap to return to the patcher</string>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My english sucks, please propose anything that works better in these strings.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flutter manager might have similar strings. Otherwise, I can try and help you come up with strings later.

@brosssh brosssh requested a review from Axelen123 August 27, 2025 13:52
Copy link
Member

@Axelen123 Axelen123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if permissions should be requested on app launch or in the patcher screen. This is up to the UI team to decide.

Comment on lines +313 to +318
<string name="patcher_notification_running_title">Patching in progress…</string>
<string name="patcher_notification_running_text">Tap to return to the patcher</string>
<string name="patcher_notification_success_title">Patching completed</string>
<string name="patcher_notification_success_text">Patching completed! Tap to return to the patcher</string>
<string name="patcher_notification_failure_title">Failure while patching</string>
<string name="patcher_notification_failure_text">Patching completed with errors. Tap to return to the patcher</string>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flutter manager might have similar strings. Otherwise, I can try and help you come up with strings later.

@brosssh
Copy link
Member Author

brosssh commented Aug 27, 2025

I don't know if permissions should be requested on app launch or in the patcher screen. This is up to the UI team to decide.

My reasoning for putting the dialog in the patcher screen is that there is already a popup shown at app first launch (to configure updates). Once that is closed, there are two mores "alert", one for the battery optimization and one for the downloaders configuration.

I didn't want to add another dialog to not overwhelm the user; also the notification permission is striclty related to the patching process (for now at least). Of course, it can be changed according to what UI team thinks.

@brosssh brosssh requested a review from Axelen123 September 4, 2025 20:57
Comment on lines +281 to +282
("An exception occurred in the remote process while patching." +
" ${e.originalStackTrace}").logFmt())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to split this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to respect the right margin.

@brosssh brosssh changed the title feat(Compose): Component to handle permissions request (A13+) feat: Component to handle permissions request (A13+) Sep 6, 2025
@kitadai31
Copy link
Contributor

kitadai31 commented Sep 6, 2025

  • The new "Patching completed" notification should not include Tap to return to the patcher sentence.
    Because it will be displayed even when the patcher screen is open. This text was originally created for background running notifications. It's not necessary in the patching completion notification.
  • The new "Patching completed" notification is a bit annoying. What's particularly annoying is having to manually clear the notifications after every patching.
    It would be convenient if notifications were automatically deleted upon leaving the patcher screen.

@MarcaDian
Copy link

MarcaDian commented Oct 12, 2025

Hi. I see in your screenshot that there is a problem with the white ReVanced logo being displayed on a white background. I plan to fix this in #2762, can you please rebase this PR to the dev branch? Thanks

By the way, does this PR fix the lack of a notification icon in the status bar during patching?

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.

feat: Request POST_NOTIFICATIONS permission in Android 13 and higher