ios - App inactive state notification didn't arrive? -
when app active state shown notification using alertview ,when app inactive state show notification .
this response :
aps = { alert = { calltype = order; id = 194; info = "dear customer thank contacting sr number request sacha4 contact shortly our service professional details."; }; sound = default; }; i splitting values this:
nsdictionary *aps=[userinfo objectforkey:@"aps"]; nsdictionary *alertdic=[aps objectforkey:@"alert"]; inactive state coding:
if (application.applicationstate == uiapplicationstateinactive) { query=[nsstring stringwithformat:@"insert job ('id','message','calltype')values('%ld','%@','%@')",[[alertdic objectforkey:@"id"] integervalue],[alertdic objectforkey:@"info"],[alertdic objectforkey:@"calltype"]]; uilocalnotification *notification = [[uilocalnotification alloc] init]; notification.alertbody = [alertdic objectforkey:@"message"]; notification.applicationiconbadgenumber = 0; [[uiapplication sharedapplication] schedulelocalnotification:notification]; } but notification didn't arrive,but notification sound arrived. need friends.
if application in inactive status can not show alert notification user @ time default system notification shown user in system notification. in inactivate state have register app parse push(or whatever use) , send user notification when user tap on notification can check condition if (application.applicationstate == uiapplicationstateinactive) , in can show user alert or redirect particular page.
Comments
Post a Comment