This only works with registerReceiver(), not when declared in the manifest.
Your filter looks fine, so you should be receiving it. Try looking in the log to make sure there isn't some message being printed there. On Thu, Nov 10, 2011 at 3:52 AM, Namrata <[email protected]> wrote: > Hi, > > I am trying to listen broadcast for Screen Off as follow > > IntentFilter filter = new IntentFilter(); > filter.addAction(Intent.ACTION_SCREEN_OFF); > BroadcastReceiver mReceiver = new ScreenReceiver(); > registerReceiver(mReceiver, filter); > > > But when screen locks somehow my ScreenReceiver is not getting a > braodcast. What could be wrong here? > I also tried declaring it in manifest, there too it didn't work. > > > Thanks in Advance > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

