Skip to content

[MOB-10627] removes disable device call #864

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

Merged
merged 1 commit into from
Jan 17, 2025
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