0

I want to send push notification from Device "A" with Application "A" to Device "B" with application "B" how I can achieve that?

Any help will be appreciated.

can I use firebase with that?

With parse I can define that with number like :

ParseQuery query = ParseInstallation.getQuery();
query.whereEqualTo("phone", "1234567890");
ParsePush push = new ParsePush();
push.setQuery(query);
push.sendPushInBackground();

how can I achieve that in other cases ?

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
  • See [This article](https://firebase.googleblog.com/2016/08/sending-notifications-between-android.html) – Jay Jun 08 '17 at 18:13

3 Answers3

1

You'd probably have to go with something like this:

  1. Create two separate Firebase Projects for each app with FCM enabled. (Project A and B)
  2. Implement FCM for both Apps and generate tokens for each project to both apps (i.e. App A has tokenA and tokenB, App B has tokenC and tokenD). See my answer here.
  3. Store the tokens to the corresponding servers.

From there, the flow of interaction should be something like:

App A > sends data > Server A // (contains App B's tokenC)
Server A > sends notification > App B // (by using tokenC)

and vice versa:

App B > sends data > Server B // (contains App A's tokenB)
Server B > sends notification > App A // (by using tokenB)

That's pretty much the general idea.

With all that said, "how can I achieve that in other cases?" is too broad of a question.

AL.
  • 36,815
  • 10
  • 142
  • 281
0

No, because package name will be different for two application. You cannot use same google-services.json file in both application if you are using FCM.

0

First of all Parse no more exists

now coming to your question yes you can send the push from application A to application B

First implement FCM in App B and store the device id on server.

Now you have device id of App B with user id on server.

Now send request to server to send the push from A to B.

Lajos Arpad
  • 64,414
  • 37
  • 100
  • 175
param
  • 393
  • 6
  • 17