I am trying to detect the Local notification settings for the App in iOS 8
for UIUserNotificationSettings
, it returns me 7 as I have turned on all Badge, Sound & Alert.
In the setting, I switch off "Allow Notification" , the app still return me 7 for UIUserNotificationSettings (Badge, Sound & Alert on). Is there a way to detect "Allow Notification
" on/off?
- (void)application:(UIApplication *)application didRegisterUserNotificationSettings:(UIUserNotificationSettings *)notificationSettings{ NSLog(@"---notificationSettings.types %d" , notificationSettings.types ); if(notificationSettings.types!=7){ UIAlertView * alert =[[UIAlertView alloc ] initWithTitle:@"Please turn on Notification" message:@"Go to Settings > Notifications > App.\n Switch on Sound, Badge & Alert" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles: nil]; [alert show]; } }
Check if the notification appears in your Android notification bar or tray. Check that you have enabled notifications on your phone. Android Settings > Apps (then Manage Apps for some users) > Signal > Check on Show notifications. > Notifications > Enable message notifications.
If you turn on Allow Notifications, choose when you want the notifications delivered—immediately or in the scheduled notifications summary—and turn Time Sensitive Notifications on or off. For many apps, you can also set a notification banner style and turn sounds and badges on or off.
To see and hear these notifications again, swipe left on the notification in Notification Center, tap Options, then tap Unmute. Turn off notifications for an app or notification group: Swipe left on a notification or group of notifications, tap Options, then tap Turn Off.
Method enabledRemoteNotificationTypes
is deprecated since iOS8.
To check remote notifications status in iOS8 you can call
[[UIApplication sharedApplication] isRegisteredForRemoteNotifications];
it will return NO if user disable notifications in Settings. Documentation on isRegisteredForRemoteNotifications
Or you can retrieve all current notification settings:
[[UIApplication sharedApplication] currentUserNotificationSettings];
Documentation on currentUserNotificationSettings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With