Android :: Detect / Intercept Screen Turning Off

Nov 27, 2009

Is there any way where I can detect that the screen is about to turn off, so I can do some work *before* it happens?I need this to work around bug 3755: OpenGL apps sometimes crash when the screen gets turned off because they don't get surfaceDestroyed /surfaceCreated() events. Simply put, I need to shut down OpenGL before the phone has a chance to detach the GPU. The only events I seems to be getting when the screen turns off are onPause() and onWindowFocusChanged both of which turn up *after* the GPU detaches, by which time it's too late.

Android :: Detect / intercept screen turning off


Android :: Intercept Home Button - How To Detect User Pressed?

Jul 30, 2009

In an activity, how do detect the fact that the user pressed the home button?

View 6 Replies View Related

General :: Tasker Task For Turning Screen Off While On Lock Screen

Oct 4, 2013

A Tasker task that when I'm on the lockscreen, I can tap or double tap to turn the screen off. I've looked in the Tasker tasks and I'm unable to find anything for this. I already use the Nova gesture+ScreenOff app to turn the screen off when I'm unlocked and at the homescreen, which works perfectly. The only thing Nova can't do it turn the screen off from the lockscreen.

View 1 Replies View Related

Android :: Detect Any Tap On Screen?

Aug 2, 2010

I am looking for a way in which I can detect any tap on the screen (not just in my app), I don't mind not having the information of what the tap was (control/letter), just the fact that a tap was made will suffice for me for now. Is there any possible way to achieve this?

View 4 Replies View Related

Android : How To Detect When Screen Is On?

Apr 4, 2010

As mentioned in a previous question, I am having difficulty intercepting all android.intent.action.SCREEN_ON events without a long-lived service (discouraged). I may be able to work around the need if I can simply work out when the screen is on at any given time, in the service.

View 3 Replies View Related

Android : How To Detect Screen Is On / Off?

Mar 29, 2010

How can I detect the screen is on or off?

View 3 Replies View Related

Android :: Detect Screen Backlight On / Off

Jul 31, 2010

I am trying to detect Screen backlight On / Off.

I've found android.intent.action.SCREEN_OFF related its event.

But I don't know how to use this.

Can you suggest me about how to detect screen backlight on / off ?

I missing some example or sample code.

View 2 Replies View Related

Android :: How To Detect That Wi-Fi Turns Off While Screen Is Off

Apr 18, 2010

I recently bought a HTC Desire which I've become exceedingly fond of.I've read (and been told by a colleague who owns a HTC Legend) that wifi should automatically turn off while the screen is off to conserve battery. I have the impression that I should be able to see the wifi icon turn on as I turn on the screen and unlock the phone. However, I haven't noticed that happening: The icon seems to just be on always.I have then tried observing my router's DHCP table when the the screen is off, but I haven't observed the entry for my phone disappearing (and I don't really know how much time has to pass before the table not showing my phone.Are there any settings that can cause this behaviour? What about programs? I current use smart monitor to log data usage as well as locale (using a SSID plugin and not the locale "location" condition). The only services I can see apart from those I think are OS services, are the ones for locale, smart monitor lite and the SSID plugin.

View 5 Replies View Related

Android :: How To Detect If Widget Is On / Off Screen?

Sep 28, 2010

I'm writing a customized view similar to Grid which will be used to hold a large amount of images. I'm using ImageButton to display the images, and I only want to load images onto the buttons once they are on the screen (and just display a static background image when they are not). The reason for it is that I'm fetching images from some back-end service and I only want to fetch them when the buttons are on the screen.To do that, I'd like to know if the widget is on the screen. Is it possible to detect if a widget like button is on/off screen? If not, any suggestions on how to achieve what I'm trying to do?

View 1 Replies View Related

Android : Way To Detect Screen Size?

Mar 19, 2009

How do I get the current screen resolution (width and height)?

View 10 Replies View Related

Android : Detect Finger Going Off Screen?

Jan 3, 2010

I have a motion listener to detect finger down, finger drag, and finger up. I start my action at finger down and finish my action at finger up. When the action is finished, I store it in a stack for allowing undo. My problem is that if I don't get a finger up event, I can't finish my action to add it to the stack for undo.

How can I detect that the user's finger has left the screen?

I tried using the emulator to see if getEdgeFlags() ever returned anything useful, and the result was always 0.

Basically, if a finger leaves the screen, then nothing is touching the screen anymore and I would like to detect that as a finger up event. How can I do this?

View 3 Replies View Related

Android :: Turning Off Screen

May 19, 2010

I'm writing a program that processes SensorEvents.It needs to keep running and keep processing events even when the user isn't directly working with their phone (i.e. when it's just sitting in their pocket).To make that work,I need to prevent the phone from turning off.On the other hand,I don't want to waste power unnecessarily, so I don't want to prevent the screen from turning off.Looking at the documentation, it seems that a WakeLock of type PARTIAL_WAKE_LOCK should do exactly what I want. But it doesn't work: as soon as the screen turns off, my program stops running (or at least onSensorChanged() stops getting called).If I instead use a lock of type SCREEN_DIM_WAKE_LOCK, everything works as expected and my program keeps running.But then the screen stays on (although dimmed), which is far from ideal.

View 5 Replies View Related

Android :: Detect Where On Screen OnTouchevent Happened

Jul 27, 2010

I've got an onTouchEvent boolean on a Surfaceview, I've got openGL objects drawn on the view and I'm wondering is there anyway to detect where on the screen the onTouch happened? e.g (x,y) co-ordinates.

View 1 Replies View Related

Android :: How To Detect Home Screen Sliding?

Jan 14, 2010

I've checked the WallpaperService.Engine class and don't see anything.What's the best practice for detecting home screen sliding?

View 3 Replies View Related

Android :: Detect Screen Not Belonging To App Comes Into Visibility?

Aug 26, 2010

I have an application that has many screens. Is it possible to detect if the screen NOT belonging to the application (not defined in my android manifest) comes into visibility?

View 1 Replies View Related

Android :: Wakelock Is Not Turning On Screen?

Sep 11, 2010

I have a signal that puts my app to sleep for a given number of minutes (using AlarmManager) and then wakes it back up.Everything is working except the screen doesn't ever come on.I then release the wakelock when I'm sure that my app is up and running and connected again. However, the screen never comes on! The app only actually comes back to life when I hit the power button to wake up the screen manually.I'm developing on an HTC Hero.

View 1 Replies View Related

Android :: Detect If Screen Is Locked (Live Wallpaper)

May 9, 2010

I'm currently implementing a live wallpaper. This is also visible, when the device is locked. Now I want to show different content, when it is locked but can't find a way to detect this. PowerManager can only change the settings and the wallpaperEngine only gives me a general onVisibiltyChanged() method, which triggers every time you return to the home screen.Dos anybody know a way to detect if the device is locked?

View 2 Replies View Related

Android :: How To Detect User Has Screen Unlock Pattern?

Feb 15, 2010

Is there a way, some API one can call to detect if the user has set a screen unlock pattern or not?

View 2 Replies View Related

Android :: Programatically Detect Foreground Application / Screen?

Aug 20, 2009

Is there any way for a backfround task to programmatically detect or recognize by learned id which application or screen (different package) is showing?

View 5 Replies View Related

Android :: Detect Current Screen Vertical Or Horizontal?

Jun 3, 2009

I need to set different content view after rotating device screen. Is there any method to detect the direction of current screen is vertical or horizontal?

View 6 Replies View Related

Android : How To Detect Phone Unlock Event / Not Screen On?

Aug 10, 2010

Is there a way to detect when a user unlocks the phone? I know about ACTION_SCREEN_ON and ACTION_SCREEN_OFF, but these seem to be fired when the screen switches on/off on pressing the power button, but not actually when the phone gets unlocked on pressing the Menu button...

View 2 Replies View Related

Android :: Detect Touch Screen Devices With Javascript?

Oct 20, 2010

In Javascript/jQuery, how can I detect if the client device has a mouse?

I've got a site that slides up a little info panel when the user hovers their mouse over an item. I'm using jQuery.hoverIntent to detect the hover, but this obviously doesn't work on touchscreen devices like iPhone/iPad/Android. So on those devices I'd like to revert to tap to show the info panel.

View 4 Replies View Related

Android :: How To Detect Orientation Change In Home Screen Widget?

Mar 15, 2010

I am writing a home screen widget and want to update (modify) the home screen widget when the device orientation changes from portrait to landscape or the other way. How can I make it? Currently, I tried to register to CONFIGURATION_CHANGED action like the code below ...

View 3 Replies View Related

Android :: Programmatically Turning Off The Screen And Locking Phone

Jan 31, 2010

As we know that Android phone gets locked after screen timeout. But I want to lock the phone on demand as well. i.e. without waiting for screen timeout to occur.. As in nexus android phone there is hard button on top for making screen turn off and lock the phone. i have to do same functionality but by using soft key i.e. in a programmatic way. What are the APIs or routines that can help me ? Can someone point me for getting this functionality?

View 5 Replies View Related

Android : Detect Screen Size Group (normal,large, Small)?

Dec 6, 2009

I am trying to detect if the screen size is normal, large or small. I am using

Configuration conf =view.getResources().getConfiguration();

(conf.screenLayout&Configuration.SCREENLAYOUT_SIZE_MASK) == Configuration.SCREENLAYOUT_SIZE_NORMAL

When testing with the emulator this works for screen sizes normal and small, but large (480x800 & 480x854) returns that it is normal...

I have found very little information on using the configuration to detect the group, has anyone got any experience with this?

View 3 Replies View Related

Android :: Unique Uses For Locale - Turning The Ringer Down - Turning GPS/Bluetooth/wifi

Nov 17, 2009

I see another thread on Locale, but it seems to be focused on it technical shortcomings. I thought a thread about how people are using this app would be helpful.

Now... I use Locale for the following:

- Turning the ringer down when I get to work (obviouse one)
- Turning GPS/Bluetooth/wifi on when I plug it in the phone (think car dock)
- Turn on Wifi when I get near my known hot spots.
- Turn off GPS/Bluetooth/wifi off and turn down brightness when my battery is low.

And the last one is a good one for me...

- I have a GV number. When I call my phone from that number, it turns the ringer volume all the way up and it turns on wifi and GPS. This is my "lost phone aid". It turns on the locating features so I can see where the phone is using iGoogle and Latitude, and I can hear the phone if it is "in the cushions" on vibrate.

Anyone else get creative with Locale?

View 47 Replies View Related

General :: Screen Will Not Detect Touch?

Dec 3, 2012

I was using my phone (droid 3) and the app I was using force closed, my phone lagged for a few seconds and then I just put it down so it could catch up. While waiting the screen timed out and when I went to use it I could not unlock it. I can press the button on top and it will turn the screen on or off, and if I hold it it will bring up the power off menu. I tried to call it, and it went through. I got the normal screen to answer it, but I could not answer it. After I hung up I got the notification for a missed call. Everything seems to be working, my screen just does not respond to a touch. What should I do?

View 4 Replies View Related

Android :: Detect When User Drag Finger From Any Place In Screen To Inside Of ImageView?

Nov 18, 2010

I've an ImageView in a LinearLayout, how can I detect when user drag his finger from any place in the screen to inside of ImageView?

View 1 Replies View Related

Android :: Turning Location Updates Back On After Turning Them Off

Oct 2, 2010

I am developing on 2.1 and location updates will not resume after removing them and adding them again.Is this an issue with the system?

View 2 Replies View Related

HTC Desire :: Turning Screen On

Jul 3, 2010

My question is: is it only the power button on top of the phone that activates the screen from sleep mode?Also, how do i get the weather widget location to update to my current location as i move around the county/country?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved