Skip to content

fix: show notification permission rationale in release builds#93

Closed
sanasol wants to merge 1 commit intostoatchat:devfrom
sanasol:fix/fcm-push-registration
Closed

fix: show notification permission rationale in release builds#93
sanasol wants to merge 1 commit intostoatchat:devfrom
sanasol:fix/fcm-push-registration

Conversation

@sanasol
Copy link
Copy Markdown

@sanasol sanasol commented Mar 4, 2026

The notification permission prompt was gated behind BuildConfig.DEBUG, so release users were never asked for notification permissions.

  • Show rationale in all builds, not just debug
  • Auto-register FCM token when permissions are already granted
  • Check Google Play Services availability before FCM registration
  • Add try-catch around subscribePush to prevent silent failures

The notification permission prompt was gated behind BuildConfig.DEBUG,
so release users were never prompted. Also adds:
- Auto-register FCM token when permissions are already granted
- Google Play Services availability check before FCM registration
- Error handling around subscribePush

Signed-off-by: sanasol <mail@sanasol.ws>
@infi
Copy link
Copy Markdown
Collaborator

infi commented Mar 28, 2026

This is intentional as push notifications are (on the server side) not in a state where we can ship them to general availability.

Some feedback for the future:

  • Please avoid using fully qualified package names when there are no conflicts. Use the auto import feature of relevant IDEs instead. Note that AI assistance tools may need to specifically get instructed to use imports instead of fully qualified package names.
  • Please avoid using the android.util.Log class directly in new code. New code should use Square Logcat (logcat.logcat function).

@infi infi closed this Mar 28, 2026
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.

2 participants