I'm developing an application on Xamarin Android similar to uber but I need to make real-time notifications of travel request, cancellation and location, any idea how to do it?
There are several choices you can choose:
1. Firebase
You can to use Firebase to provide real-time notifications.
By using only two Firebase features, you can create real-time notifications for users: the Firebase Realtime database for web users , and Firebase Cloud Messaging for Android users.
What the Firebase Realtime database provides us with is the ability to save, retrieve and sync our data with our NoSQL cloud database. We can sync data across all clients in real time. The Firebase Realtime Database is simply a cloud-hosted NoSQL database and the data is stored as a JSON and synchronized in real time to every connected client.
For more details, you can check: https://www.atlantbh.com/blog/using-firebase-provide-real-time-notifications/
2. SignalR
Azure Mobile Services has SignalR integrated, and Azure Mobile Services provide a SDK for client apps, I suppose it is provide out-of-the box.
You will find many capabilities included in Mobile Services and
readily available for your Web API. Mobile push notifications,
real-time notifications with SignalR (auto-scaled out), social auth
for your consumer apps, offline data sync for occasionally connected
scenarios, to name a few.
For more details:
https://visualstudiomagazine.com/Articles/2013/11/01/How-To-Use-SignalR-in-iOS-and-Android-Apps.aspx?Page=2
https://blogs.msdn.microsoft.com/azuremobile/2014/05/30/real-time-with-asp-net-signalr-and-azure-mobile-net-backend/
https://azure.microsoft.com/zh-cn/blog/azure-mobile-services-why-should-asp-net-developers-care/#HighValueCapabilities
Samples:
https://github.com/gshackles/RealTimeGallery
http://saramgsilva.github.io/NotificationHubs/
3.PubNub
Live Notifications of it keep everyone, and everything, realtime with live notifications across HTTP, SMS, FCM, APNS2 and more.
For more: https://www.pubnub.com/solutions/live-notifications/
4. Pusher
PubNub and Pusher are all offerring real-time infrastructure as a service and all the benefits that come with that. Both of these solutions are pub/sub. Pusher also offers an additional event abstraction: Evented PubSub.
For more: https://www.pubnub.com/developers/
Related
Have 2 apps on separate devices: Rider & Driver.
Let's say, the Driver needs to contact the Rider via messaging, or vice versa, is there a way to do it without using the stocked message app to protect privacy?
My idea was to create on both apps an empty box, add a text view for the message and send button and add the msgs to firebase db. Unfortunately, i am not sure how i would do it in Android as well as the response.
Any suggestions or how to's would be greatly appreciated.
You could probably integrate your app with Firebase.
For simple messaging, you could use Firebase Cloud Firestore to do it and for notification, you can use Firebase Cloud Messaging.
Messaging
You can have a sub-collection to store all the chats between the rider and driver in the form of documents. 1 chat will be a document storing the info such as time, sender, as well as message.
Notification
From the doc:
Send acknowledgments, chats, and other messages from devices back to
your server over FCM’s reliable and battery-efficient connection
channel.
You could start research from Firebase sample application.
Highly recommend you go through this third party tutorial: Firebase Tutorial: Real-time Chat to get some idea, it's in iOS but the concept is the same.
Yes, there is a way to do it.
Actually you can use any messaging platform, e.g. Firebase, ConnectyCube, Twillio, Layer etc.
All of them provide API & SDK for iOS, Android and Web for chat so you can easily do it using it.
I used ConnectyCube some time ago, it can be done in the following way:
Initialize app
Sign Up user
Connect to chat
Create a chat dialog with other user
Send/Receive messages
More detailed chat code sample for Android can be found here
Most of the above platforms provide a cloud hosted plan, but some of them also provide an Enterprise plan when you the whole platform can be installed at your AWS/Google/Azure account, so hence the privacy is the best because you own all your data
I want to make an Android app where there will be several clients and an admin.The app will be installed in client's device.Admin can be send message from computer to the clients and clients could be reply the message.
The admin could be also send notification to the all clients or to individual client.
Can anyone give me some suggestions that which technologies should i use to build such an app?
You need to build a backend for your app with a database to store user informations , messages etc... I suggest you to use a non-relational database because access to db values it's more efficient for this uses-case.
To make it easy you could try Firebase Cloud Messaging.
Here the official site
Firebase
You can use the Firebase which provides you a bunch of products like notification, authentication,cloud storage, cloud messaging, Notification. You can easily integrate this in your app by just following the documentation.
I want to use FCM & Firebase Realtime DB to allow messaging between users. The Realtime DB will work as a chat and the FCM messaging will be used to send notifications in case the other user app is not active.
I need a backend module, I want to use a Google Platform App-Engine with Android Studio. Is it possible to use the Standard App Engine to look for notifications request in the Realtime DB and then send messages through the FCM API (HTTP Post)? or do I have to implement the Flexible App Engine?
Thanks for your help,
you can use the Firebase Java API in App engine
this example is pretty close to what you are trying to do it sounds like
https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio
I need to retrieve data from firebase database while app is in background or closed. For this, I have been thinking of using database reference in a service.
Instead of this, people recommend using Firebase Cloud Messaging. But what exactly is that?
How does is interact with the database? How do I use it for listening and retrieving data? There are very little explanation on these and firebase docs are too broad. Or maybe I just cant find it
But what exactly is that?
Firebase Cloud Messaging (FCM) is the latest version of Google Cloud Messaging (GCM), which is Google's Push Notification Service.
It allows developers to send data from their App Server towards the Client App. For your case, you may be able to send over the desired data towards your Client App, by integrating your Database with FCM.
How does is interact with the database? How do I use it for listening and retrieving data?
If you are using Firebase Realtime Database, you may choose to integrate with FCM in such a way (referring to #FrankvanPuffelen's answer):
Sending messages to devices based on inserts into the Firebase Database will require you to run a trusted process, typically on an app server that you control. This trusted process listens to the database changes and then calls Firebase Cloud Messaging to send the messages.
For an example of how to send messaging from a node.js script, see my answer here: How to send Firebase Cloud Messaging from a node server?
In summary, you don't use it to listen for data. You can however use it as the medium to send the data from your Database towards your Client App.
Since you are implementing Firebase for the first time, I'd recommend you to go through this and get a basic idea about it.
Broadly, FCM (previously GCM) is a Cloud Messaging service for your app. Most importantly, the Analytics and Realtime Database of Firebase are used.
Here is a link to their docs. Go through it for better understanding of Firebase and its implementation.
I want something similar to Facebook messenger and
I don't have much knowledge about web servers,can i use them?
It should be like
I accept on String from user and then upload it to my server and program the server to send it to other device and the other device gets notified by a background service
To create something similar to Facebook messenger, you could do a lot of things.
Just to start, in my opinion, a Serverless service. Firebase could be your solution or AWS (or any other service). It has a Push notifications and database where to store that Strings.
Firebase Cloud Messaging
Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.
Using FCM, you can notify a client app that new email or other data is available to sync. You can send notification messages to drive user reengagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.
Firebase Realtime Database
The Firebase Realtime Database is a cloud-hosted database. Data is stored as JSON and synchronized in realtime to every connected client. When you build cross-platform apps with our iOS, Android, and JavaScript SDKs, all of your clients share one Realtime Database instance and automatically receive updates with the newest data.
Other way is open a socket in your Android app and handle all the events. I recommend you Socket.io to do that.
You could use node.js in your server to create a socket server and use the Android client.
http://socket.io/blog/native-socket-io-and-android/