Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7016401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:46:47+00:00 2026-05-27T22:46:47+00:00

I am enabling push notification for my application. How can we read the flags

  • 0

I am enabling push notification for my application. How can we read the flags for notification in “Settings” app when my app is Running. For some reasons, I need to know whether a particular notification (alert, sound, badge) is set to ON/OFF.

Please guide.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:46:48+00:00Added an answer on May 27, 2026 at 10:46 pm

    Try evoking this method [[UIApplication sharedApplication] enabledRemoteNotificationTypes]

    It will return a UIRemoteNotificationType which you can work with to determine what is available.

    UIRemoteNotificationType status = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
    

    Now, status can be looked at as an int using NSLog(@"status = ", status);, to which we can determine exactly what is on. But to do this we need to understand UIRemoteNotificationType.

    typedef enum {
       UIRemoteNotificationTypeNone    = 0,
       UIRemoteNotificationTypeBadge   = 1 << 0,
       UIRemoteNotificationTypeSound   = 1 << 1,
       UIRemoteNotificationTypeAlert   = 1 << 2,
       UIRemoteNotificationTypeNewsstandContentAvailability = 1 << 3
    } UIRemoteNotificationType;
    

    Without going into much detail, what you basically need to walk away from this knowing is that …

    • If badges are on, add 1
    • If sound is on, add 2
    • If alerts are on, add 4
    • If Newsstand Content is available, add 8 (I’m not going to worry about this guy)

    Let’s say you want to know if badges/sound/alerts are all on. The UIRemoteNotificationType (status if you are playing along) should come out to be 7.

    Now, lets work backwards. Lets say that status == 5. There is only one configuration of settings that can give us this value, and that is if badges and alerts are on (badges add 1, alerts add 4, total is 5) and sound is off.

    What if status == 6? Again, there is only one configuration of settings that will return this number, and that is if alerts and sound are both on, while badges are off.

    Using IF statements, we can do something like

    If (status == 5)
    {
        NSLog(@"User has sound alerts disabled");
        [self fireThatSpecialMethod];
    }
    

    To run a set block of code, or fire a particular method for when sound is disabled, but everything else is on. Anyways, hope this response is helpful to people!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are some best practices on enabling a web application to support multiple resolutions?
When a app has a push notification feature implemented at what point in time
I've read some topics regarding enabling google to crawl ajax based sites but the
What are differences between enabling and disabling Enable 32-Bit applications in websites application pools
By enabling Wake-on-LAN on my PC, I can remotely power it on. Suppose I
In my application i am enabling and disabling a button according to the value
I have a large application and I'm going to enabling short-cut key for it.
I think there are some steps to enable SQL Cache Depdndency : Enabling notifications,
On my application, after enabling ASP.NET Tracing in an ASP.NET MVC application, the time
I have read that enabling Change Data Capture obviously has an impact on database

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.