Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27652] Add functions to check if user has accepted permission for local notifications

GitHub Issuen/a
TypeNew Feature
PriorityNone
StatusClosed
ResolutionInvalid
Resolution Date2021-01-19T20:30:07.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsgriffin-app
ReporterBrenton House
AssigneeBrenton House
Created2019-12-12T14:16:58.000+0000
Updated2021-01-19T20:30:07.000+0000

Description

Currently, there is no way to check to see if a user has already accepted or rejected the permission for local notifications. This causes several issues such as the ability to prompt an onboarding screen before asking for permissions and the ability to see that they have rejected permissions and onboard them on how to change it in settings. There exists similar functions for other permissions: hasAudioRecorderPermissions() hasCameraPermissions( ) hasMusicLibraryPermissions( ) hasPhotoGalleryPermissions( )

Comments

  1. Brenton House 2021-01-19

    [~cwilliams] - Do you know if this is the Apple function that we would need to use to support this? https://developer.apple.com/documentation/usernotifications/unusernotificationcenter/1649524-getnotificationsettings
  2. Vijay Singh 2021-01-19

    [~bhouse] You can use https://titaniumsdk.com/api/titanium/app/ios/usernotificationcenter.html#requestusernotificationsettings and check for https://titaniumsdk.com/api/structs/getusernotificationsettings.html#authorizationstatus to get the permission.
  3. Brenton House 2021-01-19

    Thank you [~vijaysingh]! Works like a charm!
  4. Brenton House 2021-01-19

    This issue is being closed because there is a way to get this information using another function in the SDK.

JSON Source