I was implementing mobile game with my team. And we have argument that push system may not reliable enough. So we should find third party chat message service or open our own chat server instead of relying on silent push notification
But some still belief that using silent push to chat is the standard nowaday and more reliable than implement our own server
The requirement is just to send chat message to active user's chatbox while the app is open
Are there any concern to consider each method?
How about ios and android system setting?
Will our app receive surely recieve silent push if our app still open?
Are there any chat service that software industry used as standard
Try having a look at Firebase it has real time database and an FCM for your chat / push notification needs.
Related
I am building my first Android app and need to know how I could use push notification.
My project is a home alarm system and also I have built my own local web server. Now I want to push a notification from my server to my Android app when an alarm appears in my server.
Currently my garage doors use the MyQ app and when the garage door opens or closes I get a notification on my phone, I want to implement the same thing in my app.
I've been reading about the Google Firebase Cloud Messaging but it seems exceeding my need.
If you need push notification on your cell phone then you definitely need to integrate your app with Google Firebase. (or at least that's the right way of doing it).
Alternatively, there is something called as local notifications & background process in Android you could do long polling to check if the garage door is open (probably every 2 mins or something). However, I don't recommend that as it can drain your mobile battery.
Also I recommend using Flutter as oppose to using Native Android. As there are some pre-built libraries for android and Google Firebase integration.
Take a look at this Youtube video - https://www.youtube.com/watch?v=2TSm2YGBT1s
Ouh, maybe thats a little bit too much for starting with android - nevertheless I want to help you.
You need a communication protocol between your server and your phone (i.e. Firebase as you mentioned or Websockets).
If your server sends a message to you client (your phone) you have to create a notification. (Android Developer Guide). That's the theoretical part. You will also stumble across a lot of
challenges with
asynchronous programming.
Firebase might actually be the simplest option. You could build your own web socket service too, but that would probably be more than you need. See this previous question for more options: Android push notification without firebase
Android has some services that communicate with firebase to receive notifications.
You'll need to implement a service on top of your web server (using backend languages such as Python, Node.js, PHP,...) so it can send notifications when an event happened (like the door closed) witch isn't a simple way for a beginner.
then your web server sends a message to firebase and tells it to send a notification to my client.
so I highly recommend using firebase because of the simplicity of usage. otherwise, you should implement a separate service on your android phone to get the notification (if you want to run it locally) also as explained do the backend side.
Using a serverless architecture built on AWS, I'm looking for the best way to have users receive near-instant notifications of new "chats" within my Android app. I don't necessarily want to see a push notification appear in the phone's notification tray - I just want the app to listen for new messages, and update the view accordingly.
Here's my thinking: every time a user sends a chat, I'd basically trigger a Lambda function which would call SNS or IoT to publish the notification to any subscribed users of this chat.
But since SNS / IoT both work by sending "push notifications" to the phone, does that mean the message would have to appear within the phone's notification tray? I'm just looking for a way for my app to silently receive near-instant notifications from AWS and execute code to update its view.
Some other notes:
1) I don't want to build this using a server / EC2 with websocket listeners - I'd rather go serverless.
2) I've looked in Google's Firebase real-time DB which looks very capable, but as the rest of my architecture is on AWS, I'd like to stay there if possible
If you are making app for Android only, you can make use of the data message in FCM from Firebase. You can handle the message in onMessageReceived no matter your apps is on Foreground or Background.
Apart from that, firebase provide integration with most server side language. You should be able to send the message in your lambda function.
my suggestion is using FireBase...
and make your Json tag with "data" than "Notification"
I want to setup some maintenance related messages that would be dispatched to Slack and ideally some mobile users via push notifications (avoiding SMS if I can). I already handled Slack via some SNS + Lambda combo, and I'm tackling the Mobile push part.
I was somehow hoping I could just subscribe my phone number to some SNS channel but I guess its not so simple yet...
If my understanding is correct, it is not possible to receive push notifications without an App, since the Cloud-to-mobile-push service actually needs a client running on the device.
Actually, from what I can read on the internet it would seem most articles and documentations explain how to setup push notifications inside some application along with other features (and basically the push notifications is just one feature amongst the others), and that the push notification is not an end in itself.
However, I am just interested subscribing to push notifications as an end in itself (I don't need any other app feature).
What is the way to proceed in this case ? Are there some generic apps that are made for this and would let me subscribe to any mobile "push-list" ? Are there some kits that let one easily make an app just for the purpose of receiving push messages ? Is there maybe a builtin way in Android/iOS to subscribe to a push list without downloading a different app ?
EDIT : I am in the eu-central-1 region. I have some serviced in eu-west-1 (sending emails to SES) but otherwise all my servers and alarms are in eu-central-1
What will an ideal android app notification server architecture. I am developing an android in ionic. It has a mqtt server that serve chat purpose.
What i want is when my app receive a new message it should show the message as native notification.
What I am confuse is as I already have mqtt server that can do real time messaging, do I really need to use google GCM for sending & receiving notification or I can serve my purpose with my existing configuration.
In my existing app I directly calling mqqt server from my android app for chatting purpose, so can it be same for notification also i.e. send a push notification directly from app just as a chat message.
Can anyone brief me about a push notification architecture implementation ?
Conceptually this should all work fine with just MQTT, no need for GCM.
The problem may be your use of cordova/ionic. It's been a long time since I looked at MQTT support in cordova, but to do push notifications properly you will need to run the MQTT client in a Android Service so it will stay running in the background and have it create notifications in response to received messages.
If the cordova MQTT support will not allow background services you will need to write your own extension.
This question already has answers here:
How to make a chat application in android? [closed]
(6 answers)
Closed 9 years ago.
I am developing an Android app in which I have to implement chat messaging. I would like one to one chat or a group chat.
But I have no idea how to start. Please help me with this stuff. Any help will be appreciated.
A simple chat mechanism will have 2 basic functionalities
Send the message to server (with info about the recipient)
Receive the message from server (designated for my user name)
First step is simple, we can create a web service which will accept the message with additional information about recipient(s). We can create it using any server side language.
Step 2, that is fetching the message from server can be done using 2 techniques, Pull the message (using polling) from server, or Push the message from server to android phone
Polling: In this, the android device will keep accessing server after a few seconds to check if there is a message available for user. This again can be implemented using a simple async task at the client side which will keep calling a web service after say 2-3 seconds. This is fine to use if we are planning to enable chatting only when user is accessing the app (no notifications like gmail or facebook), so that we can kill the polling service when not in use (otherwise it will eat up resources).
Push notifications: a better option is to use push notifications. Android provide Google cloud messaging or GCM (http://developer.android.com/google/gcm/index.html) which will help achieve push from server easily. Otherwise you can try a third party API like urbanairship or pushwoosh depending on your requirement. Push notifications will help the user to receive messages even when he is not using the app.
So in nutshell, a webservice to receive the messages and a push notification mechanism should be sufficient to implement a chat service in android.
Little bit about UrbanAirship
I used UA in one of my projects for push notifications as I needed to support both iOS and Android. If you just want to support Android GCM might also be a good option.
Coming back to UA, check this for sample code and usage: https://docs.urbanairship.com/display/DOCS/Home
The way it works is simple, when someone installs the app and is connected to internet, app registers itself to the UA service. A unique code is specified for each installed app (this is the time when you can capture the user name and unique code and store somewhere in your DB). Next UA provides an API using which you can push a message to designated recipient(s), using the unique codes which are available with UA. These messages can be received by android app and used as per the requirement. Even if the app is not running we can show a notification just like when we receive an email or a message
You can use an existing platform like Scringo. It gives you a one-on-one chat as well as group chat (both the client and the server) as well as the push notification service.