Comments (6)
So, the fcm server endpoint always require a recipient registration_id and right now there's no documentation reference for implementing "User Segment".
However, there's a way to send push notifications to multiple devices without supplying registration_ids by making the app instances subscribe to a topic, I'll work on a commit to handle this feature alongside conditional topic selection to describe it better
Thanks for pointing this out.
Cheers.
from pyfcm.
https://github.com/alexbaranov49/GcmFcmSender
jGcmData.put("to",
"/topics/global");`
uses a "global" topic, all devices are subscribed to this
from pyfcm.
A new version has just been completed, you can check it out
- Added topic messaging functionality
So, you can now use "global" as a topic name since you said all devices are subscribed to that topic.
You should check it out, the README file has been updated with description of the topic functionality.
Cheers.
from pyfcm.
Any new news? If the project have many apps. this User segment
send it helpful. all devices are subscribed to that topic.
need a extra step in client.
from pyfcm.
I try with this code:
from pyfcm import FCMNotification
push_service = FCMNotification(api_key="XXXXXXXXX")
registration_id = "XXXXXXXX"
message_title = "Message title"
message_body = "test"
result = push_service.notify_single_device(registration_id=registration_id, message_title=message_title, message_body=message_body)
print result
and this is the result, but the notification never popup in the device...
{'multicast_ids': [xxxxxxx], 'canonical_ids': 0, 'success': 1, 'topic_message_id': None, 'results': [{u'message_id': u'xxxxxxxxx'}], 'failure': 0}
so I need to create a topic? how I can do that with pyfcm?
I'll appreciate any kind of help
from pyfcm.
@Josh179 you should have created a new issue for that
You need to setup your client to display the message, same goes for topic, you have to subscribe your clients to a topic.
from pyfcm.
Related Issues (20)
- async notify_single_device
- How I can send category in "aps" dictionary ?
- tests are not working properly
- Migrate from legacy FCM APIs to HTTP v1 HOT 6
- need to include new requirements in setup.py HOT 1
- Documentation indicates just the service file is needed: HOT 1
- push notification doesn't work in pyfcm 2.0.2 HOT 6
- Access token not refreshed in notify
- How should we send notifications to multiple tokens with the updated API? HOT 15
- The options click_action and low_priority not available anymore. HOT 2
- removed parameters of the notify API HOT 1
- exceptions must derive from BaseException HOT 1
- How can i send extra_kwargs=extra_kwargs, sound="default" for Ios HOT 1
- Result does not return success or failed HOT 1
- Error: Cannot run the event loop while another loop is running when using async_notify_multiple_devices HOT 1
- CERTIFICATE_VERIFY_FAILED using 'async_notify_multiple_devices' HOT 1
- The InvalidDataError exception logs multi line text (JSON) HOT 1
- `ChefBuildError` while installing the latest version (`v2.0.5`) HOT 2
- Python 3.12 support HOT 1
- this library do not support send notification to multiple user.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyfcm.