Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-14103

Audio not playing when play() called from push notification on ios devices with closed app

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • cordova-ios@4.5.4
    • None
    • cordova-plugin-media
    • None

    Description

      1. When I call `media.play()` manually from app - audio play works.
      2. When I call `media.play()` from push notification (app is in background) - audio play works.
      3. When I call `media.play()` from push notification (app is not in background and device is not locked) - audio play not works and I receive data in error callback `{"message":"","code":4}` (see it in Xcode device logs)
      4. When I call `media.play()` from push notification (app is not in background and device is locked) - audio play not works and I receive data in error callback `{"message":"","code":4}` (see it in Xcode device logs)

      I use real device iPad with ios 10.3.3

       

      cordova-plugin-media 5.0.2 with KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE = true

       

      phonegap-plugin-push 2.2.2

       

      cordova-plugin-background-mode from master (also try to enable background on push notification receive before start audio)

       

      Is there any chance to make it work?

      Attachments

        Activity

          People

            Unassigned Unassigned
            snikh Eugene Snihovsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: