You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by romedius <gi...@git.apache.org> on 2017/03/25 01:41:30 UTC

[GitHub] cordova-plugin-media pull request #137: CB-12146 (android) Adding playAudioW...

GitHub user romedius opened a pull request:

    https://github.com/apache/cordova-plugin-media/pull/137

    CB-12146 (android) Adding playAudioWhenScreenIsLocked for Android

    When loosing focus of the app in android (onPause()) the audio playback is paused when playAudioWhenScreenIsLocked is set to false.
    
    <!--
    Please make sure the checklist boxes are all checked before submitting the PR. The checklist
    is intended as a quick reference, for complete details please see our Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    Android
    
    ### What does this PR do?
    Adds the playAudioWhenScreenIsLocked flag to the Android version. This makes it possible to selectively keep audios playing, when onPause is called.
    
    ### What testing has been done on this change?
    Manual testing on Android N
    
    ### Checklist
    - [X] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
    - [X] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected.
    - [ ] Added automated test coverage as appropriate for this change.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/romedius/cordova-plugin-media CB-12146cordova-plugin-media

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-media/pull/137.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #137
    
----
commit 36e4fdf22820f750d96774e0e254327aca062dec
Author: Romedius Weiss <ro...@gmail.com>
Date:   2017-03-24T17:54:26Z

    CB-12146 (android) Adding playAudioWhenScreenIsLocked for Android
    
    When loosing focus of the app in android (onPause()) the audio playback is paused if playAudioWhenScreenIsLocked is set to false.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by filmaj <gi...@git.apache.org>.
Github user filmaj commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    Hmm, looks like all three CI runs against Android (4.4, 5.1, and 6.0) failed. Output for these three test runs:
    
    - Android 4.4: http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/121/PLATFORM=android-4.4/console
    - Android 5.1: http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/121/PLATFORM=android-5.1/
    - Android 6.0: http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/121/PLATFORM=android-6.0/
    
    All three fail because of a missing import, `PermissionHelper`, which you removed in your PR:
    
    ```
    Error: /private/var/folders/nd/5vd2nqsn3tlc6kljds0c95200000gp/T/tmp-8821EyOxfsP58Sxv/platforms/android/gradlew: Command failed with exit code 1 Error output:
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    /private/var/folders/nd/5vd2nqsn3tlc6kljds0c95200000gp/T/tmp-8821EyOxfsP58Sxv/platforms/android/src/org/apache/cordova/media/AudioHandler.java:83: error: cannot find symbol
            PermissionHelper.requestPermission(this, requestCode, permissions[WRITE_EXTERNAL_STORAGE]);
            ^
      symbol:   variable PermissionHelper
      location: class AudioHandler
    ```
    
    We cannot accept this PR if it causes Cordova apps that add the plugin to not be able to compile.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by filmaj <gi...@git.apache.org>.
Github user filmaj commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    Let there be tests


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    Cordova CI Build has one or more failures. 
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-media/pull/137/commits/36e4fdf22820f750d96774e0e254327aca062dec)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115/)
    
    | Builder Name  | Console Output | Test Report | Device Logs  |
    |     :---:     |     :---:      |   :---:     |     :---:    |
    | [Windows 10  Store]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=windows-10-store/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=windows-10-store/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=windows-10-store/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=windows-10-store/artifact/) |
    | [iOS 9.3]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=ios-9.3/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=ios-9.3/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=ios-9.3/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=ios-9.3/artifact/) |
    | [iOS 10.0]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=ios-10.0/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=ios-10.0/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=ios-10.0/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=ios-10.0/artifact/) |
    | [Android 4.4]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=android-4.4/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=android-4.4/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=android-4.4/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=android-4.4/artifact/) |
    | [Android 5.1]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=android-5.1/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=android-5.1/console) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=android-5.1/testReport/) | [Link]( http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/115//PLATFORM=android-5.1/artifact/) |
     



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    Cordova CI Build has one or more failures. 
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-media/pull/137/commits/36e4fdf22820f750d96774e0e254327aca062dec)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/121/)
    
     81 tests run, 15 skipped, 0 failed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by cordova-qa <gi...@git.apache.org>.
Github user cordova-qa commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    Cordova CI Build has completed successfully.
    
    **Commit**     - [Link](https://github.com/apache/cordova-plugin-media/pull/137/commits/e5a5e6fc4c8b54caab5e72b9ae10c7437c2f95f3)
    **Dashboard** - [Link](http://cordova-ci.cloudapp.net:8080/job/cordova-plugin-media-pr/125/)
    
     162 tests run, 24 skipped, 0 failed.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by romedius <gi...@git.apache.org>.
Github user romedius commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    (hopefully this triggers the CI)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by filmaj <gi...@git.apache.org>.
Github user filmaj commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    Sweet, I'm down with merging this in. Small nit: if you could rebase w/ latest master and combine the commits into one that'd be fantastic!
    
    @infil00p any concerns from you on this one?
    
    Worth noting that the media plugin will likely be sunset down the road, in favour of the Media Capture plugin (which is more aligned with the latest W3C specs). For more info, see [CB-12714](https://issues.apache.org/jira/browse/CB-12714).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by romedius <gi...@git.apache.org>.
Github user romedius commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    Let there be tests


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-plugin-media issue #137: CB-12146 (android) Adding playAudioWhenScre...

Posted by romedius <gi...@git.apache.org>.
Github user romedius commented on the issue:

    https://github.com/apache/cordova-plugin-media/pull/137
  
    Old PR: #121 
    
    One question:
    I couldn't test the 
    `onMessage(String id, Object data) {`
    method and its affects. when is this triggered?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org