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.

Android :: Wakelock is not turning on screen?


Android :: Timeout On Wakelock Causes WakeLock Under-locked Error

Jul 7, 2010

I have a service that acts a download manager, downloading files in the background. I have aquired a partial wake lock while the downloads are going. When the downloads finish, I manually release the wakelock. Because I am paranoid, I acquired the wakelock also with a timeout. The problem I am seeing is that if I have already manually released my wakelock, when the timeout period expires an error is presented to the user (and adb logcat shows an under-locked wakelock exception).

Is there any way to use a timeout (as backup wakelock release in case the app force closes for some reason) without getting this error?

View 4 Replies View Related

PowerManager And WakeLock - Device Does Not Turn Screen On?

Sep 10, 2010

I'm developing an sms receiver, and i have included a KeyguardManager and a PowerManager to be able to disable the keyguard and turn on the screen if user would like to. This works great, but only once.

When a message is received, the keyguard gets unlocked and the screen is turned on, and it gives out a sound and vibration. But if i don't read the message right away, but let the device power off by screen time out, and i then receive another message while the last one is not read, the device does not turn the screen on again, and it does not give out a sound or vibration, until i turn on the screen manually, then the sound and vibration comes.

If i close all received messages, then my app is able to disable the keyguard and turn on the screen and give out a sound and vibration when a new message is received.Here is my code that is run when the keyguard should be unlocked and the screen should be turned on.

Code:
private void disableKeyGuard()
{
KeyguardManager km = (KeyguardManager)getSystemService(KEYGUARD_SERVICE);
kl = km.newKeyguardLock("SMSHandler");[code].....

View 11 Replies View Related

General :: Generate Wakelock When Screen Goes Off Then Release 20 Minutes Later

Dec 4, 2013

I want to generate a wakelock when my screen goes off and then release that wakelock 20 minutes later. I can't find an app that will do this for me. Is it possible with Tasker and if so, how??

View 2 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 :: 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 / 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.

View 7 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 :: WakeLock

Sep 1, 2010

I have a problem with acquiring a WakeLock. It seems not to work. I am trying to acquire a FULL_WAKE_LOCK but neither the display gets enabled nor is my app able to perform tasks.

I am using the following permission: android.permission.WAKE_LOCK

My acquire code looks like this:

CODE:...........

What am i doing wrong?

Added another flag ACQUIRE_CAUSES_WAKEUP ... but no changes in behavior

All i am trying to do is, to play music and to wake my device up upon a certain event. The music is working perfectrly but the device stays black.

View 2 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

Android :: IntentService And WakeLock

May 24, 2009

The new IntentService in Android 1.5 looks excellent for handling AlarmManager-initiated broadcasts for scheduled WAKEUP work...except I can't see that it uses a WakeLock anywhere, either in itself or Looper/MessageQueue.

Does this implicitly hold a WakeLock that I'm not seeing? Or would I need to create a WakingIntentService that has an active WakeLock so long as there are messages in the queue?

View 2 Replies View Related

Android :: How To Get WakeLock To Work

Jan 11, 2010

My WakeLock isn't keeping my device awake.

In OnCreate() I've got:

CODE:...............

Then:

CODE:........

The screen turns off before the timer finishes, how can I make the screen stay visible?

mWakeLock is a field previously declared like so: private PowerManager.WakeLock mWakeLock;

My device uses Android 1.6. I would really appreciate any help to resolve this.

View 2 Replies View Related

Android :: WakeLock And KeyGuard

Jun 7, 2010

I'm just wondering if I do this correctly; I'm programming a notification app which can display a notification when the phone is sleeping

Disable keyguard lock. Aquire a wake lock. show notification. Set alarm for timeout and reenabling keyguard and release wakelock is the user dont touches the screen. 4.1 User touches the screen, and I disable the timer. Do nothing more. Done and done 4.2 User dont touch the screen, so reenable keyguard and release wakelock. Phone sleeps again

Basically I'm wondering about point 4.1 the most. cancel the pendingintent for the alarm, and do nothing more? or should the keyguard and wakelock that are set be dealt with in some way?

View 1 Replies View Related

Android :: Using A Wakelock In A Service 1.5

Jun 14, 2009

I am trying to use a service to control a wakelock so I can permanently leave the screen on when my application is running. I create the wakelock and activate it in onCreate() and release it in onDestroy() however I get the error "wl cannot be resolved".

Can someone explain how I can get over this? Code below:

CODE:..................

View 2 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

Android :: Prevent Phone Screen From Turning On When Volume - Camera Key Pressed?

Jun 5, 2010

I have an activity that shows up when the phone screen goes to sleep/turns off ie turns black.
For some reason, the phone turns on when the volume buttons or the camera buttons are pressed. By turns on, I mean the screen wakes up or comes back from the black screen state.

I've tried using dispatchKeyEvent(KeyEvent event) and the buttons are disabled on the activity, but they still wake up the phone.

View 1 Replies View Related

Samsung Fascinate :: How To Keep Screen From Turning Off?

Oct 4, 2010

I made a make-shift "docking" station for myself because I am too cheap to buy the one from Verizon. How do you keep the screen from turning off?I know the droid 1 used magnets but the Fascinate seems to use something else and I can't figure it out.Does anyone know?

View 2 Replies View Related

HTC Desire :: Screen Turning On For No Reason

Nov 23, 2010

Screen on my Desire occasionally lights up for 1-2 seconds for no reason then goes back to standby again. Happens once or twice every couple of days (could be more often but I don't stare at it the whole time). No notifications or calls coming in. I suspect it maybe one of the apps syncing or something, but as this happens so rarely it's hard to determine which.

View 9 Replies View Related

HTC EVO 4G :: Turning On Screen With Volume Button

Jul 20, 2010

Anyway to make this happen? Now I'm not taking about unlocking the phone, just making the screen turn on to show the lock screen.

View 3 Replies View Related

HTC Hero :: Screen Turning Off During Call

Mar 30, 2010

My main gripe, is that the display turns off during a call. My instinct has already been to push the On/Off button to turn the display back on, but this also hangs up the call.I also find it VERY cumbersome that by default the numeric keypad is not there, a ALOT of calls are "push 1.. push 2 " type automated calls.

View 20 Replies View Related

General :: Screen Keeps Turning Off As Soon As Turn It On?

Jan 26, 2014

Ive had a rooted Alcatel One Touch Fierce for about a month. Just recently a Tmobile update downloaded and i installed it. My phone rebooted and ever since then my screen turns off or goes black everytime i turn the screen on. For example when i press the lock button to wake my phone it will display for at least a second then go black but the touch is still functional so id have to navigate by guessing where everything is then pop the screen on for a second to see where i am. The only exception is when i bring up my keyboard or edit settings like when a slider pops up for brightness. I can see the android startup screen until its fully rebooted and i can see the recovery mode. Ive reformatted my data and cache. It is also not the timeout setting. I cant find anything about this issue anywhere.

View 2 Replies View Related

General :: GS4 Lock Screen Not Turning Off?

Jul 20, 2013

my gs4's lockscreen is "blinking"..

When i press the lock button on the phone which is roughly 2 months old, the lockscreen goes of for a second nd then automatically turns on stating tht swipe to unlock, life companion and etc.

View 6 Replies View Related

Android :: Network Connectivity Checking Without Wakelock

Mar 26, 2010

I have a terrible bug in my widget. The widget is waken up using an AlarmManager (the update interval is chosen by users, ranging from 30 mins to 2 hours) to grab some data from the Internet and display it on the widget. I do not hold a wakelock since if the phone sleeps, just let it sleeps. There's no way to update the information since nobody will see it. If I put the phone in the basement (has no wi-fi or cell signal) for about an hour. the phone will definitely not update anything. However, when I get it back from the basement, the cell network could never be recovered again no matter how long I have waited (it just get an X on the cell signal icon on the notification bar) that I must restart the phone. May I know if a partial wake lock must be held on checking network availability?

Find the code skeleton as below:

CODE:.................

View 8 Replies View Related

Android :: Not Using A WakeLock - Why Does The Device Stay Awake

Apr 13, 2010

I have a service which, when started, does some stuff (like downloading files) typically taking about 2-3 minutes.

If I start this service and then immediately use the power button to switch off the screen, then I would expect the phone, at some point, to fall asleep. But it never seems to fall asleep while the service is still doing its stuff. At least, not on my Nexus One.

I'm not using a wake lock (though I do use WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON in the activity that monitors the service progress).

So is it true that I don't need to use a wake lock?

View 14 Replies View Related

Android :: Activity Launch Timeout Even With Wakelock

Oct 20, 2009

I have the following code in Oncreate of my activity:

CODE:.......................

View 15 Replies View Related

Android :: Internal Data Storage And WakeLock

Oct 18, 2010

I have a service that needs to write some data to the internal storage using RandomAccessFile. Do I need to use a WakeLock to make sure the data won't get corrupted if the service process gets killed?

View 14 Replies View Related

Android : Preventing WakeLock Under-Locked Exception

Feb 4, 2010

I'm trying to implement a times WakeLock in my Application, so this is not a Service.

I want the wakelock to simply prevent screen dimming for 3 min. Looking through the docs, this seems simple enough, but I seem to randomly encounter a Under-Locked exception that I cannot pinpoint.

Here is my WakeLock-related code:

in onCreate: PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, TAG); // Adjust time to include user's setting int timeout = WAKELOCK_TIME - Settings.System.getInt(getContentResolver(), SCREEN_OFF_TIMEOUT, 0); if (timeout > 0) {mWakeLock.acquire(timeout);} ...

in onDestroy: if (mWakeLock != null && mWakeLock.isHeld() == true) { try { As you can see, I wrap the release and try to only execute it when necessary as a clean up only. I'm assuming that since I'm aquiring with a timeout, the PowerManager will handle the release in most cases when the timeout expires.

I don't have a copy of the logcat at the moment, but what seems to happen is I get the Under-Locked exception randomly, and at random times (it's not always when WAKELOCK_TIME elapses). The strange thing is that the exception does not point to my code - all the entries point to "internal" Android code.

It's hard to find examples of other people using aquire with timeouts. Any ideas what I could be doing wrong here?

View 6 Replies View Related

Samsung Captivate :: Phone Screen Not Turning Off By Itself Sometimes

Sep 13, 2010

This problem only started after I bought JuiceDefender and I think I have all the settings set up properly so I'm not sure why this is happening. In the Android settings I have it set for a 30 second timeout, but for some reason my screen will fade brightness, but never go off completely.

View 5 Replies View Related

Motorola Droid :: Screen Turning On Without Prompting

Mar 28, 2010

From a black screen, sitting on my desk, or bed...the screen would magically turn on. And not always to the lock screen. Sometimes would just turn on and be unlocked (I don't have it password locked, so it would open to the desk top without having to swipe) And if left alone, it will go to dark after 1 minute. It has cycled through this on/off 3 or 4 times, all without me touching the phone at all.If I power it down, it appears to solve this until.I don't know what, but eventually it will go through this routine again.

View 2 Replies View Related







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