Skip to content

Commit

Permalink
creates Concurrent Modification Excaption
Browse files Browse the repository at this point in the history
- permission has to be off
  • Loading branch information
nan-li committed Dec 19, 2023
1 parent 8863284 commit 9261c29
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,8 @@ public void onFailure() {

private void setupTagsLayout() {
setupTagRecyclerView();

System.out.println("❌ calling requestPermission within setupTagsLayout");
OneSignal.getNotifications().requestPermission(false, Continue.with(r -> {}));
addTagButton.setOnClickListener(v -> dialog.createAddPairAlertDialog("Add Tag", ProfileUtil.FieldType.TAG, new AddPairAlertDialogCallback() {
@Override
public void onSuccess(Pair<String, Object> pair) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.onesignal.inAppMessages.internal

import android.app.AlertDialog
import com.onesignal.OneSignal
import com.onesignal.common.AndroidUtils
import com.onesignal.common.IDManager
import com.onesignal.common.JSONUtils
Expand Down Expand Up @@ -338,6 +339,8 @@ internal class InAppMessagesManager(
}

private suspend fun attemptToShowInAppMessage() {
println("❌ calling requestPermission within attemptToShowInAppMessage")
var resp = OneSignal.Notifications.requestPermission(false);
// We need to wait for system conditions to be the correct ones
if (!_applicationService.waitUntilSystemConditionsAvailable()) {
Logging.warn("InAppMessagesManager.attemptToShowInAppMessage: In app message not showing due to system condition not correct")
Expand Down

0 comments on commit 9261c29

Please sign in to comment.