Comments (4)
So I've solved the issue by doing the following quick fix:
In the end of Push/Notification->getBody() I simply added:
$request['priority'] = "high";
Now; you might want to consider extend this within your management getters/settes to make this a real feature.
This made my notifications go in warp speed no matter of the devices state (I use cordova).
Also for housekeeping purposes 😃 the naming of function getBody() in this class is contradictory as it clashes with setBody(..) and it is not exactly the same type of "body" these two are playing around with (I managed to figure this out when I tried manually to build the full payload array body but the setter function just manages the message body).
My Regards to all for the nice work with the API once again!
from php-fcm.
Hi @lukasza67
That's really useful to know, thanks, I didn't realised normal priority push messages were treated that way. I'll have a look at writing a getter and setter for this.
Re getBody v setBody, I see what you mean, if we can't fix this in a non breaking way we can adjust the docs to better explain it.
from php-fcm.
Re getBody v setBody, I see what you mean, if we can't fix this in a non breaking way we can adjust the docs to better explain it.
How about renaming getBody() to buildJsonRequest() and leaving behind a deprecated getBody() that just redirects and will be removed in the next major release?
from php-fcm.
I'd also need the priority. I believe I could put together a PR if that helps.
from php-fcm.
Related Issues (20)
- Documentation not consistent with composer package HOT 8
- Increase automated test coverage to 100%
- Android Notification channel id HOT 11
- Guzzle option, made a bit of a mess of the commit / merge HOT 2
- Sending to multiple topics fails HOT 4
- Improve documentation
- If you add more than five topics in FCM, the push doesn't send
- Tag a new version for Guzzle 7 HOT 5
- Optional Laravel support HOT 3
- Add TTL in Notification? HOT 1
- addTopic in && non only in || HOT 9
- If you send a data only push, and empty message is sent HOT 1
- Not Registered in Results => remove device_id HOT 3
- content_available field HOT 1
- Feature request: set time out value HOT 1
- Missing collapse key HOT 5
- Cloud Messaging API (Legacy) Deprecated HOT 2
- Tests not running as documented HOT 1
- Notification Received on mobile but not vibrating HOT 1
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 php-fcm.