android Programming Glossary: intent.action_screen_on
Override Power button just like Home button http://stackoverflow.com/questions/10077905/override-power-button-just-like-home-button do here wasScreenOn false else if intent.getAction .equals Intent.ACTION_SCREEN_ON and do whatever you need to do here wasScreenOn true DisableHardButton.java.. R.layout.main IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF BroadcastReceiver..
How to get Boot_Complete intent in HTC when i use 'poweroff' for reboot? http://stackoverflow.com/questions/10411731/how-to-get-boot-complete-intent-in-htc-when-i-use-poweroff-for-reboot thread 56562e4de4919dc6 Edit How about simply using Intent.ACTION_SCREEN_ON And you can then check if the service is running public static..
Android ICS native lockscreen http://stackoverflow.com/questions/10800683/android-ics-native-lockscreen with a BroadCaseReciever on these events Intent.ACTION_SCREEN_ON Intent.ACTION_SCREEN_OFF Intent.ACTION_USER_PRESENT My problem..
Listening for ACTION_SCREEN_OFF on Android http://stackoverflow.com/questions/11346958/listening-for-action-screen-off-on-android do here wasScreenOn false else if intent.getAction .equals Intent.ACTION_SCREEN_ON and do whatever you need to do here wasScreenOn true The Activity.. receiver final IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF final BroadcastReceiver..
Custom Lock Screen Delay When Wake http://stackoverflow.com/questions/13403149/custom-lock-screen-delay-when-wake super.onCreate IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF BroadcastReceiver.. Context context Intent intent if intent.getAction .equals Intent.ACTION_SCREEN_ON Intent showScreen new Intent context LockScreen.class showScreen.addFlags..
How to unlock screen programmatically? http://stackoverflow.com/questions/14352648/how-to-unlock-screen-programmatically jrkejhr keh else if intent.getAction .equals Intent.ACTION_SCREEN_ON AND DO WHATEVER YOU NEED TO DO HERE wasScreenOn true System.out.println..
android.intent.action.SCREEN_ON doesn't work as a receiver intent filter http://stackoverflow.com/questions/2575242/android-intent-action-screen-on-doesnt-work-as-a-receiver-intent-filter Context context Intent intent ... new IntentFilter Intent.ACTION_SCREEN_ON However this was performed by a long living Service. Following..
How to reveal that screen is locked? http://stackoverflow.com/questions/6186511/how-to-reveal-that-screen-is-locked is switched off IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF appBroadcastReceiver..
ACTION_SCREEN__ON,ACTION_SCREEN__OFF not working? http://stackoverflow.com/questions/7366631/action-screen-on-action-screen-off-not-working locked ACTION_SCREEN_OFF else if intent.getAction .equals Intent.ACTION_SCREEN_ON System.out.println not locked ACTION_SCREEN_ON else if intent.getAction.. locked ACTION_SCREEN_ON else if intent.getAction .equals Intent.ACTION_SCREEN_ON System.out.println User Unlocking it else if intent.getAction.. stuff else if intent.getAction .equals Intent.ACTION_SCREEN_ON other stuff For a slightly complicated example but one that..
How to find the screen is locked in android http://stackoverflow.com/questions/9002032/how-to-find-the-screen-is-locked-in-android register a BroadcastReceiver for Intent.ACTION_SCREEN_OFF Intent.ACTION_SCREEN_ON. Note that this receiver must be registered in codes and will.. the manifest. In your broadcast receiver when you receive Intent.ACTION_SCREEN_ON you can check if the screen is locked by using the below codes..
android: broadcast receiver for screen on and screen off http://stackoverflow.com/questions/9477922/android-broadcast-receiver-for-screen-on-and-screen-off Toast.LENGTH_LONG .show else if intent.getAction .equals Intent.ACTION_SCREEN_ON Log.i Check Screen went ON Toast.makeText context screen ON..
Activity handle when screen unlocked http://stackoverflow.com/questions/9747564/activity-handle-when-screen-unlocked or Service try IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF filter.addAction.. Context context Intent intent if intent.getAction .equals Intent.ACTION_SCREEN_ON if intent.getAction .equals Intent.ACTION_SCREEN_OFF if intent.getAction..
Override Power button just like Home button http://stackoverflow.com/questions/10077905/override-power-button-just-like-home-button .equals Intent.ACTION_SCREEN_OFF do whatever you need to do here wasScreenOn false else if intent.getAction .equals Intent.ACTION_SCREEN_ON and do whatever you need to do here wasScreenOn true DisableHardButton.java public class DisableHardButton extends Activity.. savedInstanceState super.onCreate savedInstanceState setContentView R.layout.main IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF BroadcastReceiver mReceiver new ReceiverScreen registerReceiver mReceiver filter..
How to get Boot_Complete intent in HTC when i use 'poweroff' for reboot? http://stackoverflow.com/questions/10411731/how-to-get-boot-complete-intent-in-htc-when-i-use-poweroff-for-reboot http groups.google.com group android developers browse_thread thread 56562e4de4919dc6 Edit How about simply using Intent.ACTION_SCREEN_ON And you can then check if the service is running public static boolean ServiceRunning Context cx ActivityManager manager..
Android ICS native lockscreen http://stackoverflow.com/questions/10800683/android-ics-native-lockscreen WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD with a BroadCaseReciever on these events Intent.ACTION_SCREEN_ON Intent.ACTION_SCREEN_OFF Intent.ACTION_USER_PRESENT My problem is that i want my activity to be shown with the lockscreen..
Listening for ACTION_SCREEN_OFF on Android http://stackoverflow.com/questions/11346958/listening-for-action-screen-off-on-android .equals Intent.ACTION_SCREEN_OFF do whatever you need to do here wasScreenOn false else if intent.getAction .equals Intent.ACTION_SCREEN_ON and do whatever you need to do here wasScreenOn true The Activity public class ExampleActivity extends Activity @Override.. extends Activity @Override protected void onCreate initialize receiver final IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF final BroadcastReceiver mReceiver new ScreenReceiver registerReceiver mReceiver..
Custom Lock Screen Delay When Wake http://stackoverflow.com/questions/13403149/custom-lock-screen-delay-when-wake right away My code for the service @Override public void onCreate super.onCreate IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF BroadcastReceiver powerReceiver new PowerReceiver registerReceiver powerReceiver.. return null and the receiver @Override public void onReceive Context context Intent intent if intent.getAction .equals Intent.ACTION_SCREEN_ON Intent showScreen new Intent context LockScreen.class showScreen.addFlags Intent.FLAG_ACTIVITY_NEW_TASK context.startActivity..
How to unlock screen programmatically? http://stackoverflow.com/questions/14352648/how-to-unlock-screen-programmatically screen_state wasScreenOn context.startService i System.out.println jrkejhr keh else if intent.getAction .equals Intent.ACTION_SCREEN_ON AND DO WHATEVER YOU NEED TO DO HERE wasScreenOn true System.out.println SCREEN_ON wasScreenOn And its entering to a service..
android.intent.action.SCREEN_ON doesn't work as a receiver intent filter http://stackoverflow.com/questions/2575242/android-intent-action-screen-on-doesnt-work-as-a-receiver-intent-filter new BroadcastReceiver @Override public void onReceive Context context Intent intent ... new IntentFilter Intent.ACTION_SCREEN_ON However this was performed by a long living Service. Following sage advice from CommonsWare I have elected to try to remove..
How to reveal that screen is locked? http://stackoverflow.com/questions/6186511/how-to-reveal-that-screen-is-locked to register it and you'll start receiving events when the screen is switched off IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF appBroadcastReceiver new AppBroadcastReceiver yourActivity registerReceiver appBroadcastReceiver..
ACTION_SCREEN__ON,ACTION_SCREEN__OFF not working? http://stackoverflow.com/questions/7366631/action-screen-on-action-screen-off-not-working .equals Intent.ACTION_SCREEN_OFF System.out.println locked ACTION_SCREEN_OFF else if intent.getAction .equals Intent.ACTION_SCREEN_ON System.out.println not locked ACTION_SCREEN_ON else if intent.getAction .equals Intent.ACTION_SCREEN_ON System.out.println.. .equals Intent.ACTION_SCREEN_ON System.out.println not locked ACTION_SCREEN_ON else if intent.getAction .equals Intent.ACTION_SCREEN_ON System.out.println User Unlocking it else if intent.getAction .equals Intent.ACTION_BOOT_COMPLETED this to indicate that.. final Intent intent if intent.getAction .equals Intent.ACTION_SCREEN_OFF stuff else if intent.getAction .equals Intent.ACTION_SCREEN_ON other stuff For a slightly complicated example but one that shows how the BroadcastReceiver and Service interact see CheckForScreenBugAccelerometerService..
How to find the screen is locked in android http://stackoverflow.com/questions/9002032/how-to-find-the-screen-is-locked-in-android is unresolved and could help other googlers. First you must register a BroadcastReceiver for Intent.ACTION_SCREEN_OFF Intent.ACTION_SCREEN_ON. Note that this receiver must be registered in codes and will not work when declared in the manifest. In your broadcast.. be registered in codes and will not work when declared in the manifest. In your broadcast receiver when you receive Intent.ACTION_SCREEN_ON you can check if the screen is locked by using the below codes KeyguardManager km KeyguardManager getSystemService Context.KEYGUARD_SERVICE..
android: broadcast receiver for screen on and screen off http://stackoverflow.com/questions/9477922/android-broadcast-receiver-for-screen-on-and-screen-off Check Screen went OFF Toast.makeText context screen OFF Toast.LENGTH_LONG .show else if intent.getAction .equals Intent.ACTION_SCREEN_ON Log.i Check Screen went ON Toast.makeText context screen ON Toast.LENGTH_LONG .show android screen broadcastreceiver..
Activity handle when screen unlocked http://stackoverflow.com/questions/9747564/activity-handle-when-screen-unlocked intent filter receiver In Activity or Service try IntentFilter filter new IntentFilter Intent.ACTION_SCREEN_ON filter.addAction Intent.ACTION_SCREEN_OFF filter.addAction Intent.ACTION_USER_PRESENT BroadcastReceiver mReceiver new.. extends BroadcastReceiver @Override public void onReceive Context context Intent intent if intent.getAction .equals Intent.ACTION_SCREEN_ON if intent.getAction .equals Intent.ACTION_SCREEN_OFF if intent.getAction .equals Intent.ACTION_USER_PRESENT share improve..
|