收藏
回答

backgroundAudioManager 安卓系统无法触发onPlay

框架类型 问题类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
小程序 Bug backgroundAudioManager 客户端 Android 6.6.5 1.9.97
  1. SDKVersion:"1.9.97"

  2. language:"zh_CN"

  3. model:"Letv X500"

  4. system:"Andrioid 6.0"

  5. version:"6.6.5"


backgroundAudioManager 安卓系统无法触发onPlay、onPauseonStop,为什么?IOS和微信工具下是可以的,有人知道吗?bug?


//app.js

App({

    onLaunch: function () {

    var that = this;


    backgroundAudioManager.onPlay(function (res) {

    console.log('音乐打开')

    that.globalData.isPlaying = true;

    })


    backgroundAudioManager.onPause(function (res) {

    console.log('音乐暂停')

    that.globalData.isPlaying = false;

    })

})



回答关注问题邀请回答
收藏

3 个回答

  • Special
    Special
    2018-04-02

    麻烦给个相关的代码片段(https://mp.weixin.qq.com/debug/wxadoc/dev/devtools/minicode.html),我们定位下问题

    2018-04-02
    有用
    回复
  • 2018-04-03

    我知道错在哪了,非常感谢!

    2018-04-03
    有用
    回复
  • 2018-04-02

    wechatide://minicode/geuJ5nm868Yg

    2018-04-02
    有用
    回复 1
    • 路西法
      路西法
      2022-09-30
      请问是什么原因呢
      2022-09-30
      回复
登录 后发表内容