I'm trying to send a push notification or a message from my IOT button to all the users who have installed my iOS and android app. Is it possible to do it, given that I don't have the user's device tokens with me?
Asked
Active
Viewed 1,228 times
2
2 Answers
1
I think it is not possible to send push notification w/o device token. Because IOT does not recognise for which device send push notification.

Jaimin Vyas
- 114
- 5
-
Thanks. But I guess there should be some way to do it. I need to send a message or notification to the mobile device/ app. But I neither know the user's mobile number nor the device token. Can we do it using a server or database? – Ashish Jul 11 '17 at 05:57
-
I dont think so it is possible, if yes than i glad to know how it will run. – Jaimin Vyas Jul 11 '17 at 06:10
-
This is not possible. Server needs to know device token to send out GCM/APNS notifications. – Ayush Jul 11 '17 at 09:34
-
Yeah you are right. I subscribed the device tokens from my app to AWS topic and now I'm pushing messages to the topic. The same thing can be implemented on Server (instead of topics), but you can't do it without device token – Ashish Jul 21 '17 at 11:30
0
Alternatively(For Send notification without device token to everyone) You can use "Topic"
- Make every user subscribe to topic in your android app using
FirebaseMessaging.getInstance.subscribeToTopic("")
- Now using FCM library code send notification to those who subscribed to your topics. As everyone has subscribed so everybody will get notification.
Note: Code for send notification to subscribed you can google it.
This is my first answer. Hope it will help. njy coding.