ios - How to detect Push notification when app is open -
this question has answer here:
in application have used push notification service problem when close app @ time notification appears when open application , send notification notification not come. please me.
you can easily handle function mentioned below in appdelegate.m
---implement application:didreceiveremotenotification:
example:-
- (void)application:(uiapplication *)application didreceiveremotenotification:(nsdictionary *)userinfo { uiapplicationstate appstate = [application applicationstate]; if (appstate == uiapplicationstateactive) { uialertview *alertvw = [[[uialertview alloc] initwithtitle:@"notify" message:yourmessage delegate:self cancelbuttontitle:@"done" otherbuttontitles: @"vizllx", nil] autorelease]; [alertvw show]; } else { // push notification received while app in background } }
Comments
Post a Comment