I wanted to know if it is possible to send a Push to App A and App B at the same time, and if the user has both apps installed, only one will be shown.
Edit:
I was trying to prevent duplicate Notifications to be shown if the user has both Apps installed. But it seems this is not possible to do on the App side. We will have to come up with something server side to prevent duplicate messages to be sent.
Each app has its own deviceToken on that device. To send pushes to both apps you would need to send the push to both device tokens. The device will display both notifications.
Related
So, I have about 1000 iOS users installed my app.
I tried to send push notification to these users thru my app's backend panel, however, my devices did not receive the push notification. I also asked some users, and some of them said they did receive the push notification and some did not.
I was wondering why not all of the 1000 iOS users receive the push notification successfully.
At first, I thought it has to do with my applications, because my device has the latest update that is yet to release to public. So I went on and delete all the device tokens I got, and register my device again to test the push notification.
This time, my device received the push notification from backend panel successfully. So, I am sure there is nothing wrong with the coding part on receiving push notifications. (I ran multiple test on this and sure that push are send and receive successfully)
It only happens when I tried to send bulk push notifications to iOS users.
so, is sending push notification has a limit? like it only allows to send may be to 100 users?
or may be there are invalid device token so that pushes are stopped before finish sending to all users? but in what situation device token become invalid? will uninstalled user's device token may be a cause?
In our experience notifications have far from a 100% delivery rate, and that's with only between 50 and a 100 installs across iOS. In theory there is no cap set in place.
The only limits I'm aware of is sending an identical notification to the same device multiple times within a short window of time.
On Android, when supplying the same id in two calls to NotificationManager.notify, only one notification will be shown in the notification drawer.
But how to do it on iOS
Thanks
Notifications on iOS are not designed to be grouped/collapsed or replaced by other notifications. Just check other messenger apps, the convention is to have a separate notification for each message, contrary to Android. Also a message doesn't get replaced by a new message in the same conversation. The functionality that Android provides here simply doesn't exist in iOS.
What you could do instead is, to send silent notifications ("push-to-sync") and handle the grouping/replacing on client side, since you have more control over local notifications (e.g. you can remove single local notifications, but not single remote notifications). But keep in mind, if the app was force quit, it won't be woken up to process the silent notification.
I think your best option is to stick to the convention and don't group/replace notifications.
about iOS you have to understand many things about the push notification
first it is not part of your app, in iOS it is separate application called notification centre that your app add itself to it so when APNS send a notification it send it to the notification centre in your iPhone not to your app.
so what you need to do will be in the server side not in the mobile side
for example let's say it is a chat application
the server side should check if the message is sent from the same user
the badge count should remain the same and not to notify APNS with new count
and also in the server side
the server will check if the message from the same user to send only sound notification not text or if the server got many message at once from the same user send the text with got many message from same user
but all of that is just work around as something like this is not provided yet in iOS may be in iOS9 as it become more open and not like previous versions
good luck
I cant find a clear answer about this in the Titanium documentation. Is it possible to directly respond to a push notification while the app is killed ?
I know that the callback is called when you open the app trough the push notification. but is there a way to respond when the app is opened manually ?
I tried to use remote-notification as UIBackgroundModes, but this only helps for paused apps.
My goal is to show the push notification in a in-app message center.
You should never rely on push notifications to deliver you payloads, they are too limited for that. If the user receives 5 push notifications and opens the app via the app icon, you will never receive any of the payloads. If he opens the app via one of those notifications you will only receive that payload.
You could use silentpush:
http://docs.appcelerator.com/platform/latest/#!/guide/iOS_Background_Services-section-37539664_iOSBackgroundServices-SilentPush
But the app should always query a back-end to get the actual data. That's how WhatsApp does it as well, as you can see when you open it via a notification it will then still fetch the message(s) form the server.
I created an app which receives push notifications from my server. At the same time, if some other app is sending push notifications (for e.g., whatsaap, twitter), the notification is getting displayed when I'm using my app. I want to hide all other app's push notifications except my app's push notifications. Can this be done in iOS? I want my app to receive push notifications only from my server but not from the other apps.
Thanks in advance.
Try to think like your customer. Would they like to receive the push notifications of the other apps (whatsapp, twitter, the notification that a very important email just arrived)? Of course they would. Your App is one of many and most probably not the most important one they own.
Let me provide some background first.
Your app can only receive notifications from your service/server.
The user might have apps that are receiving notifications from the respective service/server.
e.g. if the user has FB app, then it would be receiving notification from FB servers.
In the end, you are only responsible for managing your service/server.
There is no way for you to block notifications that are received from other services from your app.
Hope this helps.
I have an iOS app with a Rails backend (and frontend). I am using Parse for push notifications.
I am trying to figure out the best way to only send push notifications that will be received; that is, I want to avoid sending them to:
Users who only use the web app and don't have the iOS app
Users who had the iOS app but then uninstalled it
The way that the Parse Push API works is that I can broadcast a notification on a certain channel, and any device that is listening to that channel will receive the notifications. Therefore, I am planning to make separate channels for each user.
Obviously, I am going to need to store some sort of information on the server side about who is running the iOS app. I'm curious as to whether anyone out there has experience solving a problem like this and can offer any wisdom. Thanks!
Parse already stores information about who is running iOS and Android apps. Check out the Data Browser, there is an Installation table with a deviceType field.
Have the iOS app register a unique (per-user) channel. If you're only sending push notifications on user channels, it will only be sent to users who have installed the iOS app.
There's not much you can do for users who had the iOS app but uninstalled it. Apple doesn't provide a way for applications to run any code before being uninstalled, so you can't unregister the device with Parse. I'm not sure if Parse does this, but Urban Airship polls the APNS servers and removes devices that have had the app uninstalled after a certain amount of days.