Friendship requests are sent with a link as in Pubg Mobile or Clash Royale. In React Native, users will be able to share a link and when others click on the link, the data in the link will be added to the user's database. Is such a thing possible?
Yes, you need to use Firebase Cloud messaging.
First you need to create a Firebase account
You can integrate that into your react native project through this link (RNFirebase cloud messaging). Once you installed and setted all the environment, follow the guide about Notifications. That guide teaches you how to handle push notifications sent by firebase. You will be able to set a listener when a message (like a link) is received and when the user press on it, after that in your app you can access to the data that has been sent and manipulate as you want (like adding it to user's database)
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
The Firebase Console allows us to send notifications to single users, groups, users subscribed to topics or to the entire user base. Is there any code that allows us to directly send notifications in the same way, but programmatically?
For example, if I had a list of users (containing their Firebase UIDs), if I click on one of the users, could I send a notification to that user through Firebase the same way the console allows us to send a notification through the console?
This Firebase Blog uses the Google App Engine Flexible Environment to actually send the notifications, but it requires a free trial and costs money.
This Quickstart doesn't really show how to send user to user notifications. It focuses on the subscription-based notifications, but this isn't really what I need.
Is there any good way of doing this with Java/Kotlin and the Firebase API?
FCM doesn't support you sending message directly from Android app to Android app. However, this is a workaround to solve your problem:
Create a firebase cloud function. Listen a special path in firebase database
Android app 1 push a data (maybe Android app 2 ID) to this path
Firebase cloud function process data, determine who to send notification (Android app 2).
Firebase cloud function push notification to Android app 2.
ref: https://firebase.google.com/docs/functions/use-cases#notify_users_when_something_interesting_happens
In a basic concept: we write our server to get action from firebase database and decision to send notification to other user by FCM. This our server can write with NodeJS or using Firebase Cloud Function (above)
Guide how to using Nodejs is here: https://firebase.googleblog.com/2016/08/sending-notifications-between-android.html
Can anyone tell me how can I get notifications with their mail Id and name on my app when a new user signed up with my app?
For example I am the developer of an app on which users will sign up, and I will make an app for myself to get notified when and how many users signed up with my production app I am using Firebase for authentication, can anyone give me some ideas on this?
Yes, this can be done using cloud functions. That way you do not need to use your own server or create an API call for your backend, which will lead to making your work easier.
From the docs:
Cloud Functions for Firebase lets you automatically run backend code in response to events triggered by Firebase features and HTTPS requests. Your code is stored in Google's cloud and runs in a managed environment. There's no need to manage and scale your own servers.
check this link: https://firebase.google.com/docs/functions/
You can add the user to the database and then using cloud functions a database trigger will get triggered everytime a new user is added and you will get notified, or you can use the authentication to get notified when a user creates or deletes an account.
For more info: https://firebase.google.com/docs/functions/auth-events
Also this: https://firebase.google.com/docs/functions/database-events
You can make an API call to your backend wherein you can capture all the data required(In your case email_id and Name) by the backend after the user sign in. And the same data can be used by your backend to send notifications to you. You can look at FCM for sending the Push Notifications. Please let me know if I made myself clear.
You can use service like Logspot. No need to setup anything in your side.
Start tracking sign-ups on the client side with Web SDK:
import Logspot from "#logspot/web";
Logspot.init({ publicKey: "YOUR_PUBLIC_KEY" });
Logspot.track({
event: "User signed up",
metadata: {
email: "john#doe.com"
}
});
Install their mobile app and login.
Receive mobile notification on each sign up
More info in the docs.
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 am currently developing an app where users create posts that are stored on a server. When another user shows interest in a post by clicking a button, I want to notify the author of the post using push notifications. I have already set up the data storage using cloud endpoints with Google App Engine. Is there anyway I can use these endpoints to implement push notifications? If not is there another easy way to implement push notifications given my current setup? I have already read about Google Cloud Messaging on the developers page but was somewhat confused. I have kept track of the registration id's but I don't really know where to go from there. Thanks in advance.
You can use the HTTP interface to the GCM servers as described in this
Android developers page.
The easiest way to do it is by downloading the Google Cloud Messaging for Android Library using the Android SDK Manager, which will give you a jar that handles all the complexity of setting up the requests and responses to GCM.
Towards the bottom of that page, there is a sample Java application for push notifications on App Engine which you can use to get familiar with sending push notifications and then adapt to your needs.