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)
- Error: type object 'Retry' has no attribute 'DEFAULT_ALLOWED_METHODS' HOT 6
- Badge is not updated if the app is open HOT 1
- Being explicit about your versioning strategy HOT 2
- Can't import module HOT 1
- Connection pool is full, discarding connection: fcm.googleapis.com
- AttributeError: type object 'Retry' has no attribute 'DEFAULT_ALLOWED_METHODS' HOT 2
- SyntaxError: getting error while pytesting in python 2.7
- SyntaxError: getting error while pytesting in python 2.7 HOT 1
- Receiving FCM notifications HOT 1
- android_channel_id is missing in multiple_devices_data_message
- what is the role of private and public key
- Any plans for migrating from lagecy HTTP to HTTPv1 ? HOT 7
- It looks like this bit of doco should be "default" and not "Default" HOT 1
- How to get registration_id HOT 2
- Add EMOJI in title HOT 1
- Fix async_notify_multiple_devices
- Default priority should be normal, not high
- Will PyFCM be affected by API discontinuance HOT 9
- async notify_single_device
- How I can send category in "aps" dictionary ?
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.