I used firebase to create a messaging channel between two users that are chatting with each other. Assuming that you send someone a message and their phone is locked, the app should be able to send notifications (such as whats seen below) but instead it would say something like, "Bobby just you a new message". What's the name of that kind of notification and how is it normally used with messaging apps?
Related
I am currently working on an iOS app that allows users to make calls and send messages to eachother, effectively it is WhatsApp with a few extras.
When one of the users is offline, I send an APNS to the other user that brings up a short notification. The notification that is shown works well for messages but when it comes to an incoming call, it would be nice if it stuck around on screen and the phone vibrated for an extended period.
From what I have read, you cannot alter the vibration pattern of an APNS. WhatsApp, however, has managed to do it and I was wondering if anybody had an idea of how they achieve this?
You should use VoIP Push Notifications (PushKit). These are special push notifications intended to be used for VoIP call notifications.
Some source to get started:
http://blog.biokoda.com/post/114315188985/ios-and-pushkit
http://pierremarcairoldi.com/ios-8-voip-notifications/
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
How can I send a text message (natively or through the use of an API) from an iOS application to someone without having them have to interact with the message before hand?
The message would be prewritten and would send on tap of screen. Its ok if the user needs to okay it once, but I need a way to send a message without having to have the user interact with their device each time.
Example:
Phone is off, I shake phone, phone senses shake, sends text messaging saying "I'm shaking" to another user via SMS or MMS without having the user need to OK the sending. Is this possible? How would I do it?
You can't do that. You need to show the user the message in the MFMessageComposeViewController that pops up first, and he has to send it by himself.
This restriction was made, because otherwise, many apps could spam your contacts etc. with a massive amount of sms or they could even write sms to expensive numbers.
But if you want to send just some kind of notification to another user, you could use push notifications. To do that, I would recommend you to use parse.com and their free push notification-service. Also, because Push Notifications are free, in contrast to SMS, you will save a lot of money. Of course you need to make some preparations before you can send notifications, but that way you could do it. But also there are restrictions. One restriction is, that the receiver of the notification also must have the app installed on the receiving device.
So the receiver would receive a "message" like that:
So I would recommend you to check the QuickStart Guide from Parse.com for iOS for further informations. The Guide is really simple and shows you step by step how to activate your app for Push notifications.
Sorry, but you can't, it is completely impossible. The only way to send sms is through messageUI, which always requires the users consent. You can probably do it on a jailbroken phone, though.
Yes, it is possible. But you would have to use a 3rd party service to send the text message. for example, Twilio.
I have an app which is using Mixpanel. In that app I am using push notification. I could able to send the push notification manually to the registered devices list from Mixpanel profile.
My requirement is user can set reminder for persons who are in his phone book contact. Those persons should get the push notification who are using my app and accepted to recieve push notification. How can I do this if this is possible ?
I did not get any reply to this post. After that I asked to support Team. This is the reply to my question.
What is the use of People Analytics? Can it help to notify Mixpanel to send push notifications? if so how?
People Analytics is a platform that allows you to generate lists of user profiles in Mixpanel and compile unique attributes to it. For example, I created a profile for myself, where my favorite music is classical here. I can then aggregate all users who's favorite music is classical, and send a targeted push notification to them. The goal with Mixpanel People Analytics is to help you deliver targeted notifications to your users. So it's definitely the right platform to help you send push notifications through! Here's how you start storing user profiles, and here how is how you set up push notifications.
How can we send the reminder note to Mixpanel which will be send as push notification to the concerned person?
All through the UI! Through Mixpanel, you set up the push notification to have it look exactly how you want (here) and then you define the targeted criteria of users you'd like to reach.
How can we notify mixpanel to send push notification to the particular person ?
Once again, as long as you can identify those users through the unique attributes (for example, all users who's favorite music is classical) you can send them those notifications (here).
Mixpanel JQL API enables your to retrieve user device tokens via the properties $ios_devices and $android_devices. Using Apple APN and GCM endpoints, i guess your could push your own notifications via your own code with this (i've managed to retrieve the tokens, havent tried actually pushing my own way yet).
I am create a firebase based chat application for iOS. One of the features is to send push notification to the users in the same chat room (if they are offline).
I can't find a firebase function (for iOS) that can be used to send push notifications to the user.
Is it possible?
Displaying alert badges and notifications on iPhone applications is accomplished through Apple's Push Notification system. Since the application is not running on the user's phone when they receive notifications, the APN will have to be triggered from your server-side code.
You'll probably want to create a server-side module that listens for changes to your chat Firebase. When a message appears for a user that is offline, you'll have to schedule a remote notification with the APN. That latter part has nothing to do with Firebase, but has extensive documentation on Apple's developer web site.
I'm not sure if a web application can display alerts or badges. Otherwise this approach will only work if you create a native wrapper for your Firebase chat application.