写了一个服务监控基站变化,用一个activity调用一个service,在service的oncreate事件里生命了一个PhoneStateListener,然后重写他的onCellLocationChanged和onSignalStrengthsChanged事件,程序可以正常运行,但是一旦手机关掉屏幕,就不工作了,打开屏幕后,继续工作,已经wakelock了PowerManager.PARTIAL_WAKE_LOCK,其他功能还能正常运行,不如接收wifi的扫描结果,这个结果还是不停变化的,说明手机并没有进入sleep模式,但是怎么使PhoneStateListener正常工作

解决方案 »

  1.   

    遇到类似的问题了 PhoneStateListener\ 在待机的时候不工作求高手指点啊
      

  2.   

    这个解决不了,google已经说了,在待机的时候,确实不更新cellid和signalstrength等,另想其他方法吧,或者更改RIL
      

  3.   

    /* Indicates the current state of the screen.  When the screen is off, the
     * RIL should notify the baseband to suppress certain notifications (eg,
     * signal strength and changes in LAC or CID) in an effort to conserve power.
     * These notifications should resume when the screen is on.