Giter VIP home page Giter VIP logo

Comments (5)

olucurious avatar olucurious commented on August 24, 2024 1

UPDATED and FIXED here: https://github.com/olucurious/PyFCM/releases/tag/1.2.0

from pyfcm.

olucurious avatar olucurious commented on August 24, 2024

If you don't send the message body, it means you're sending content_available instead. Look at https://github.com/olucurious/PyFCM/blob/master/pyfcm/baseapi.py#L181

from pyfcm.

ajmcgarry avatar ajmcgarry commented on August 24, 2024

They are not mutually exclusive.
On iOS the content_available flag should be used to wake the device from a background state.
If there is a message included, IOS will automatically display the notification without requiring you to fetch any data from an upstream source.
If there is no message included, IOS will display nothing (silent notification) and the device gets some background CPU time for you to fetch data should you need.

from pyfcm.

olucurious avatar olucurious commented on August 24, 2024

That's the point "If there is a message included, IOS will automatically display the notification without requiring you to fetch any data from an upstream source.", so why would you want to send content_available with a message?

from pyfcm.

deceze avatar deceze commented on August 24, 2024

Setting content_available = True seems to prevent the invocation of background service workers when pushing to web browsers (see firebase/quickstart-js#71). It is a bug to set it to True when no body is present; for browsers we want no body and no content_available.

from pyfcm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.