iPhone push notification unable in reading notification - apple-push-notifications

The apple device showing me notification but when i open it , its batch number does not gets clear from device please help.

Use [UIApplication sharedApplication].applicationIconBadgeNumber = 0; in your UIApplicationDelegate.didFinishLaunchingWithOptions or UIApplicationDelegate.didReceiveRemoteNotification.
If you need reset application icon badge number from server, set badge value to 0 in APN message.

Related

Is it possible display a banner for ios when receiving push notification while app is in foreground?

Currently my app can receiving push notification and display a banner when receiving a push notification while the app is in background.
But however when my app is in foreground, there is no banner showing up. I look in the log and I found out that I can receive push notification (i print out the payload).
Any way to display a banner while in app? Or is it a limitation?
I am using the Appcelerator Ti.Network.registerForPushNotifications for push notification.
This is not a limitation of Titanium.
Apple doesn't allow to show notification banner when app is in foreground.
All you can do is to create and animate a manual view when your Push callback is called in foreground state.

Using Swift 2 won't allow iOS 8 devices to Register for Push Notifications

I am configuring push notifications on for iOS using Xcode 7 and Parse. The notifications are working perfectly on a device running iOS 9.
But when running the application on a device with iOS 8, I am running into problems. I am unable to get the Alert View where the user can select to "Allow Notifications from App X".
But, the device token registration call is being called successfully when the user opts in to push notifications and the device is successfully registering an Installation object with a valid device token. Notifications are also being sent to the device.
If I go into Settings->Notifications->My App and turn the Notifications On or Off, it doesnt make a difference the notifications are still being sent through.
This is the code I am using to register for notifications:
let settings = UIUserNotificationSettings(forTypes: UIUserNotificationType([.Alert, .Badge, .Sound]), categories: nil)
application.registerUserNotificationSettings(settings)
application.registerForRemoteNotifications()
Found the solution here on stackoverflow... Registration for notifications are sent only once on devices running versions older than iOS 9.
As answered by another user here...
"The first time a push-enabled app registers for push notifications, iOS asks the user if they wish to receive notifications for that app. Once the user has responded to this alert it is not presented again unless the device is restored or the app has been uninstalled for at least a day."
OR
"If you want to simulate a first-time run of your app, you can leave the app uninstalled for a day. You can achieve the latter without actually waiting a day by setting the system clock forward a day or more, turning the device off completely, then turning the device back on."
Reference Links:
Push Notification ON or OFF Checking in iOS
https://developer.apple.com/library/ios/technotes/tn2265/_index.html#//apple_ref/doc/uid/DTS40010376-CH1-TNTAG42

how to detect received push notification when app is closed

Is there anybody knows that if I received a push notification when my app is fully closed, but then I go back to open the app how can I detect this received notification and make certain changes pertain to this notification?
Thanks very much in advance.
I found out a way:
Just detect the Badge numbers, and set it as a user default in app delegate.
In other view controllers, you can perform stuffs depends on the badge numbers, which you can track from NSUserDefault.

Unsuscribe to WP7 notification for uninstalled application

I have a toast notification system that is working on WP7. When I send a notification, all registered devices receive the toast notification.
But, If someone uninstall the application, I will continue to try to send to the registered device (in fact, I will ask Microsoft service to send to the unavailable device).
Is it possible to detect if someone uninstall the app, then I can remove it from my list of device to send.
Or maybe can Ms services tell me if the app as unsuscribe to the toast notification ?
My list of registered device grows infinitely ....
Thanks in advance for any Help,
Best regards
You can't detect if the user deleted the app, but can always check the subscription status return code when you send a notification!
Check here for the return codes, specifically where the SubscriptionStatus != Active

Scanning notification through WIA

I've registered to receive WIA notifications for all devices through RegisterEventCallbackInterface for WIA_EVENT_DEVICE_CONNECTED and WIA_EVENT_SCAN_IMAGE events. However I only receive notifications when scanner device is plugged in - I don't receive notification when I scan (for example with mspaint which uses WIA). Am I supposed to receive scanning notifications from applications or only when Scan button is pressed on a device? (I haven't tried the latter since I use a multifunction printer without Scan button). Is there any other way to be notified about successful scans through WIA? Thank you.
The notification API will just tell you if the button has been pushed. You can register a temporary or permanent (i.e launch an app) handler. If you're trying to scan you need to use Item.Transfer() or CommonDialog.ShowTransfer() from device.Items[1].

Resources