Search code examples
androidtelephonymanagerphone-state-listener

Unable to get broadcast of PhoneStateListener on Android 4.0 device


With a receiver and I'm getting broadcast of PhoneStateListener on 2.3 devices like (offhook, idle, Ringing) but when i run the same code with 4.0 device it unable to get broadcast the state of phone.

Can Anyone tell how to get broadcast on 4.0 with receiver???


Solution

  • After lots of searching finally i reached at result that Above to v3.0 api it is compulsory to use atleast one activity. If you are not using any activity( means only receiver) then above to v3.0 you cannot get broadcast of PhoneStateListner. This is done by Google for security reason.