Skip to content

Commit

Permalink
test code to prompt without using onesignal
Browse files Browse the repository at this point in the history
  • Loading branch information
emawby committed Jun 6, 2024
1 parent 04321d3 commit 677b8fd
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,10 @@ private void setupSubscriptionSwitch() {

private void setupPromptPushButton() {
promptPushButton.setOnClickListener(v -> {
OneSignal.getUser().getPushSubscription().optIn();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
getActivity().requestPermissions(new String[]{android.Manifest.permission.POST_NOTIFICATIONS}, 1);
}
//OneSignal.getUser().getPushSubscription().optIn();
});
}

Expand Down

0 comments on commit 677b8fd

Please sign in to comment.