How do I retrieve all player_id of devices connected in OneSignal? - push-notification

I am trying to do a test on OneSignal in Unity. I want to send push notification to a specific user listed in OneSignal via code.
I have found that connected devices have player ids and I want to grab all those player_ids for checking purposes. How can it be done?

Related

problem in react native chat app algorithm

I am building an app contains chat but i couldn't figure out somethings.
Notifications: I can send notifications to devices but they appear everytime (app in on screen or not) but i want to send "chat" notification only the chat page not open. I think i need to send data notifications instead of normal notifications.
Storing chats: I can't pull all the chats eveytime user wants to see messages. I need to store them and show only the new messages. How can i seperate them? Device has to say i have messages until this timestamp give me newer ones.
I am using firebase and gifted chat. I can give you any version codes if you want.

How to send a push notification from the Firebase console to a specific GCM/FCM device token ID

In Urban Airship, when I am composing a notification, I can target specific users by searching for a Urban Airship channel_id (device ID):
I sent from Urban Airship the push notification that I am showing above, and I received it successfully. Now I want to do the same thing, send a push notification to a specific device, but now using the Firebase console. The problem is that in Firebase, in the step where I need to specify the target, it only allows me to choose User segment or topic. I was expecting to see a third option: Target specific users (for sending notifications to one or many specific GCM/FCM device token IDs. So my alternative is to add a GCM/FCM device token ID to a topic and then send the push notification to that topic, which is something that I have successfully done before. Nonetheless, that would be a workaround and not the way I would prefer to do this. Is it possible to send push notifications to specific users (by defining the target GCM/FCM device token IDs) from the Firebase console? Thank you.
UPDATE 1: See how the Firebase console (https://console.firebase.google.com/) only shows User segment and Topic as the Target:
First Step:
Second Step:
Third Step:
By design, the notification feature in the console is for sending out broadcast-type events. Sending user-specific alerts would be more of a programmatic operation done through the API.
For sending test messages, there is a console tool for this, explained here.
Note that it is possible to send a notification to one device by subscribing a device to any topic and sending the notification to that topic in the console (keep in mind topics are public and you can't prevent users from signing up to them; fine for testing most likely).
Another alternative is to send a message via HTTP or curl. Perhaps the best resource for this is the quickstart/messaging example.

Is possible to push notification for specific users in ionic 2?

Is ionic 2 supported pushing notification from device to other device by using firebase or any thing else ?
Because most of tutorials explain how to push for all users but I'm trying to send one to specific user/users ..
Your sender device or your backend will need to know the receiver device registration id; You get this when the device registers with FCM for example, in my case after getting the id back I send it to my backend so I can track all the users registration Ids for whenever I need to send then a push notification.

Amazon SNS Sending direct push notification to individual device

I am developing REST API application on Symfony3. I want to register mobile devices and send direct push notifications to them. For example, when one user sends feedback to another, that second user will get push notification.
With Amazon SNS is it possible not to broadcast, but directly notify individual device from server?
yes, is possible, you create a platform and then you can create multiple 'Endpoints' wich represent a devices in SNS with the corresponding token or device id. then you can notify to one device using the endpoint arn value

Gamethrive Onesignal Send push from unit to unit

I am considering switching from pushwoosh to gamethrive / onesignal but am a little confused. I am using the Unity SDK and cant see anywhere in the documentation that I am able to sund push from one unit to a specific othe unit. Can anyone help me clarify if this is possible
Thanks in advance
Yes this is possible.
The OneSignal API supports delivering notifications to individual users or groups of users in several ways. In your case, the best way is probably through the device's OneSignal ID (through the include_player_ids field in the OneSignal API).
You can send notifications from one device to another by interacting through the OneSignal API either on your own backend server or from the code running in your app. However, in either case, you will need to have a backend server to store a list of the OneSignal ID for each one of your users.
Here's a rough outline of the process:
Part A (First getting the OneSignal ID):
A device runs your application for the first time
You initialize OneSignal in your application and you receive a new unique OneSignal ID for this new device in a callback
You then must store this OneSignal ID on your own backend server somewhere.
Part B (Delivering a message):
You wish to send a message to a specific user
You ask your backend server for the OneSignal ID of the user who you wish to send a message to.
You use the OneSignal API to send a message to the user.
Related links:
OneSignal Homepage
OneSignal Documentation Home
OneSignal Notification Delivery API Documentation

Resources