Skip to content
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

Add canRequest to Android #753

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Conversation

nan-li
Copy link
Contributor

@nan-li nan-li commented Sep 27, 2023

Description

One Line Summary

OneSignal.Notifications.canRequest() has been fixed for Android in OneSignal/OneSignal-Android-SDK#1798, make it available in Flutter SDK.

Details

Motivation

Add OneSignal.Notifications.canRequest() functionality to Android. It was previously iOS-only, with Android always returning false.

Scope

Adds OneSignal.Notifications.canRequest() functionality to Android.

Note that the method OneSignal.Notifications.canRequest() returns whether or not the device has been prompted for push already, and may not indicate on Android whether or not a push prompt will display.

Testing

Manual testing

Testing on Android emulator API 33:

  1. New app install and see canRequest = true
  2. Prompt for push and accept
  3. See canRequest = false which is correct

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible.
  • I have reviewed this PR myself, ensuring it meets each checklist item

This change is Reviewable

@nan-li nan-li merged commit 0a5b56e into user_model/main Sep 27, 2023
@nan-li nan-li deleted the fix/add_can_request_to_android branch September 27, 2023 21:41
@nan-li nan-li mentioned this pull request Sep 28, 2023
nan-li added a commit that referenced this pull request Jan 31, 2024
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