• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Sending notifications between two devices

Ratchoss

Newbie
Oct 24, 2017
17
0
Hello, so i'm going to explain the situation.

I have two phones (devices) (Both are ANDROID), and I would like the Phone No. 1 sends a notification to the phone No. 2.

I do not know how to do that, maybe using the IMEI of each phone?
Knowing that my application is connected entirely with Firebase from GOOGLE.

Thank you for telling me more and help me! Thank you very much.
 
Hello again, so I tried to understand how the SOCKETS work, but hey, I would like the phone n°1 could open an activity on the phone n°2.

upload_2017-10-29_20-25-21.png


It's both connected to firebase, so how can i do exactly the same running as in the image with SOCKETS or any thing else? please.

Thanks.
 
Upvote 0
Well that should be quite simple. Your notification message will contain some kind of command code. When the receiver gets this message, it starts up an Activity.

Your first step will be to code a simple client/server application. The server will be listening on a socket, and the client will open up that socket. There's plenty of information available to allow you to get something like this working pretty quickly.
This page has some code for both server and client

https://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/
 
Upvote 0
Hello, so i'm going to explain the situation.

I have two phones (devices) (Both are ANDROID), and I would like the Phone No. 1 sends a notification to the phone No. 2.

I do not know how to do that, maybe using the IMEI of each phone?
Knowing that my application is connected entirely with Firebase from GOOGLE.

Thank you for telling me more and help me! Thank you very much.

Just curious...but why do u want to do that?
 
Upvote 0
Just curious...but why do u want to do that?

Hey, I am trying to make an Android app, and on my application there are two connection types: professionals and customers. The professionals have a different dashboard than the clients on the app ..

So when a customer sends an order, I want the professional receives the order and can accept it .. I just need the connection between the sending of order and the order receipt.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones