Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,7 @@ private void onForeground() {

if (sharedInstance.isInitialized()) {
if (sharedInstance.config.autoPushRegistration && hasStoredPermission && (isNotificationEnabled != systemNotificationEnabled)) {
if (!systemNotificationEnabled) {
sharedInstance.disablePush();
} else {
sharedInstance.registerForPush();
}
sharedInstance.registerForPush();
Copy link
Collaborator

@sumeruchat sumeruchat Jan 17, 2025

Choose a reason for hiding this comment

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

same as iOS when notifications are disabled will android give us a token? If not maybe we have to use the previously registered token and set notificationsEnabled to false with it

Copy link
Contributor

Choose a reason for hiding this comment

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

You shouldn't need to OS permissions turned on to get the push token, you just request it from the device. It is given regardless of that setting, the OS setting simply just gates whether or not the device will display the notifications.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@davidtruong Okay sounds good then. lets test it thoroughly

}

SharedPreferences.Editor editor = sharedPref.edit();
Expand Down
Loading