Thanks for this post. I'm using this to clean up auto lock in OI Safe. Randy
On Jul 20, 9:36 am, Peli <[email protected]> wrote: > In your main activity, you have to write something like > > BroadcastReceivermReceiver = newBroadcastReceiver() { > @Override > public void onReceive(Context context, Intent intent) { > Log.v(TAG, "onReceive()"); > } > }; > > @Override > protected void onResume() { > super.onResume(); > IntentFilter filter = new IntentFilter > (Intent.ACTION_SCREEN_ON); > registerReceiver(mReceiver, filter); > } > > @Override > protected void onPause() { > super.onPause(); > unregisterReceiver(mReceiver); > } > > Peliwww.openintents.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

