Android : Event Wake Up
Jun 8, 2009
I would like to know the way to know when the user are using his phone.There is intent Boot_completed, but it's just at beginning. I have to know when user take it's phone, press a key to use it.Any idea?
View 2 Replies
Mar 2, 2010
I was investigating the issue of setting up a delayed activity/event, that will occur and trigger even if the phone is in sleep mode (wake up, do what you need to do, go back to sleep). I was thinking of the following methods: 1. sendMessageDelayed 2. Timer 3. AlarmManager.The basic requirement is to be able to set a triger in the future, and be sure that this trigger wakes up the system if it is sleeping,perform the task, and go back to sleep.A partial wakup is required (no screen flickering). Currently i'm using the sendMessageDelayed, and i keep a wake lock held for the timeout period (bad practice).
View 8 Replies
View Related
Apr 12, 2009
I use onLongClick and onClick events of a button to get user inputs. Whenever; the user long click and triggers onLongClick event, the onClick event is also triggered. I couldn't find my problem. The code of two methods are shown in below: Code...
View 2 Replies
View Related
Dec 15, 2009
I hope there is a way to resolve this or bye bye hero.
View 10 Replies
View Related
Sep 4, 2010
Im looking for a wake-up app that speaks messages, preferably notes or arrangments from google calendar. It should say something like "good morning <name> You have an appointment eight o'clock in the lab according to google calendar".
View 1 Replies
View Related
Feb 18, 2009
I need to cause the display to light up programmatically. Is there an established way of doing this?
View 4 Replies
View Related
Mar 18, 2010
I have a requirement to wake up my application upon receiving a particular formatted SMS or App directed notification from server.My application is in dead state. Whenever the device receives a event may be a SMS in a particular format OR some notification(eg app directed notification from server), android OS will start my application.Its possible in Windows Mobile and BREW.Please let me know if its possible in Android and how.
View 11 Replies
View Related
Aug 6, 2009
I have an application with notification. I want my notification can wake the device up when it goes off but the device is asleep. Could anybody tell me how to do by some code?
View 4 Replies
View Related
Jun 13, 2009
I need to use a wakelock to hold the screen active while its required. I was recommended to use a service which I have been trying but on the onDestroy I am getting "wl cannot be resolved".
Code below:
CODE:...............
View 9 Replies
View Related
May 17, 2010
Looking for a great app that will allow me to selectively turn off anything that would beep or ring during the night but perserve at least two things:
1. Phone - in case the family has an emergency.
2. Alarm - so I do not lose my job.
Facebook, tweets, reminders, etc. need to be turned off.
View 1 Replies
View Related
Mar 29, 2010
Often my mobile network is turned off and I just use a Wi-Fi hotspot.
If the phone is not plugged in, the Wi-Fi connection will go to sleep after some length of inactivity.
I could be wrong, but a call to ConnectivityManager.getActiveNetworkInfo().isConnected() does not wake the connection.
So, what is the best way to wake the connection?
In general, I'm looking to write an isConnected() method which will return true/false, optionally blocking returning until a wakeable internet connection is awoken.
View 3 Replies
View Related
Jun 14, 2010
I'm developing an app in which i need the TCP connection to stay alive. I've implemented a kind of ping/pong system to do this. It works perfectly when the screen is on, but when it goes of the phone stops responding to the pings after a while. I've created a Wi-Fi wake lock but i'm still experiencing still the same problem. Code...
View 1 Replies
View Related
Sep 15, 2009
When I use wake lock to screen at the specific time on the device as follows code. But every time I release this wake lock, the screen will force to close. I think it must to release the wake lock, or screen will always on. It's wasting power. Does anyone knows how to release the screen wake lock and don't need to close the screen?
View 2 Replies
View Related
Oct 14, 2010
I am using the factory Alarm Clock on my Inc. It works okay but if my phone is off, the alarm will not wake up the phone and sound alarm or at least the alarm going off would work for me.
On my BB Curve even if the phone was off the alarm would go off at the set time and the phone would turn on. Kinda nice, only downfall is only had 1 alarm where as Inc has a few.
With the marginal battery life on this thing I sometimes turn it off to charge when going to sleep at nite and do a few bumps in the morning. Problem is the alarm doesnt go off if the phone is off.
IF the factory phone alarm does not do this does anyone know of one that does? Perhaps in Market?
View 6 Replies
View Related
Dec 20, 2009
Is there a program like sms popup that wakes up the screen to alert you to an email?
View 1 Replies
View Related
Sep 30, 2009
When the application has a PARTIAL_WAKE_LOCK, the CPU stays turned on, but what about the cellular antenna? Does the PhoneStateListener not receive any change in state from the antenna when the PARTIAL_WAKE_LOCK is acquired?I have an application that needs to continuously read the signal strength while the user isn't using the phone.I suspect I need a FULL_WAKE_LOCK to do that. Is that true?
View 5 Replies
View Related
Aug 26, 2010
I have an app that needs to send a periodic heart beat to a server, but when the phone goes into standby mode the background heartbeat thread dies. Is there anyway to wake the phone from standby, send the heartbeat and then go back to sleep programmatically? I want to avoid using PARTIAL_WAKE_LOCK if possible.
View 1 Replies
View Related
Dec 18, 2009
I have a question about alarms used with services with regards to wake locks. The documentation explains the behavior using BroadcastReceivers, a wakelock is held during onReceive(), but doesn't describe the behavior for alarms starting services with the RTC_WAKEUP flag. What is the behavior in this case?
I have an app implementing this, an alarm is created with the RTC_WAKEUP flag that starts a service. The service onCreate() then starts a thread to do some network activity. It seems to work just fine but I just want to make sure that I don't need to explicity hold a wakelock myself.
View 4 Replies
View Related
Jun 9, 2009
My app requires alerts at certain events, which are very likely to happen while the screen is off. It captures those event perfectly, however, I'm struggling to hide the T-Mobile screen lock after I've acquired wake lock from the PowerManager. I've tried broadcasting Intent.ACTION_CLOSE_SYSTEM_DIALOGS, however, that seems not to work.
View 2 Replies
View Related
Aug 29, 2009
I'm acquiring a wake lock and apparently, it gets garbage collected in my app at some point with the following error;
code:...........
What is the recommended approach to overwrite the finalize to force releasing the lock or -better- force the GC not to release the lock ?
View 2 Replies
View Related
Aug 18, 2010
I would need to wake up my camera when i click a button on my App. After that it takes a picture and save it to the sdcard and display the path of that image as Toast? How can this be done?
View 1 Replies
View Related
Sep 1, 2010
I need to wake my sleeping android device up at a certain time.
Any suggestions?
P.S. Wake up: turn display on and maybe unlock phone
View 3 Replies
View Related
Jan 28, 2010
I have a service which holds on to a wakelock and the code is similar to this,
public class WakeLockService extends Service {
PowerManager.WakeLock wl;
@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub return null;
} public void onCreate() {
PowerManager pm = (PowerManager) getSystemService (Context.POWER_SERVICE);
wl = pm.newWakeLock (PowerManager.PARTIAL_WAKE_LOCK, "My Tag");
wl.acquire();
} public void onDestroy() {
wl.release();
}
For past two days, my phone has been restarting randomly. Today it was worse, it kept restarting until I uninstalled the app. I tried to search about this behaviour online and found that too many wakelocks may coz the phone to restart. Can there be any other reason? Is the above code right? Should make wl as a final variable? Does the service call onDestroy method when phone shuts down? I am using a broadcastreceiver to start my service at boot up as well.
View 8 Replies
View Related
Jan 20, 2009
The accelerometer turns off when the screen is off. I'm guessing this is a bug but I haven't seen it logged. Am I missing something?
Perhaps the power management features need some improvement - the ability to specify what components are needed during a partial_wake_lock so that power can be conserved as efficiently as possible.
BTW, there is a bug logged noting that onSensorChanged() continues to be called for the orientation sensor (during sleep) but the values are not being updated.
View 6 Replies
View Related
Jun 16, 2010
I have a timer that schedule a task to run every 5 minutes. This task send a request to a server, so I need to be sure that CPU is on so that wifi or 3g can be used.
So the first thing I do in my run() method is :
CODE:.........
And the last thing I do in the run() is : wl.release() ;
I would like not to release here to be sure my service will run in the next 5 minutes :
The question is : if the device is already in a sleep state, can I wake up it with my wl.acquire() ?
View 3 Replies
View Related
Mar 17, 2010
I noticed that if the Android phone is listening on a ServerSocket on the 3G network, and is then put to sleep with the power button, it no longer listens for incoming connections. The incoming TCP connection does not wake up the phone. Is this there a way to enable waking up a sleeping phone on incoming Server Socket connections, the way that incoming data on a regular Socket does?
View 2 Replies
View Related
May 23, 2009
My app seldom needs to put the device (or screen) to sleep. That is - programmatically imitate user pressing on red stop-call button. According to docs PowerManager.goToSleep() does just that, but requires android.permission.DEVICE_POWER, which is never granted to apps!
(A) What on earth should I do to get this working?
(B) How can I programmatically wake up the device.
just to clarify - I'm not interested in a wake lock solution.
View 2 Replies
View Related
Oct 4, 2010
I'm having a couple of problems with an alarm app I am developing.
The first thing that I think is a bit weird is that when an alarm goes of and wakes the phone up. These things happend.
oncreate
onresume
onpause
onresume
Why are they run in that order? The last two should not be called? And this is what's causes me big trouble, because when i press home or back on the phone, onPause is run, which I want to call finish() from. And that part works as it should, but that does not work when the phone wakes upp from sleep bacause of the onPause call...
View 2 Replies
View Related
Aug 13, 2010
I have a problem. I am trying to make a broadcast receiver acquire a wake lock so my alarm will wake the phone from sleep mode.
In the broadcast receiver below, the program crashes with "source not found" on line "sCpuWakeLock.acquire(); when the class "AlarmAlertWakeLock" is called by AlarmReceiver.
Any idea what's going on? Is there a better way to do what I'm trying to do?
In one file:
CODE:..............
In a separate file:
CODE:......................
View 1 Replies
View Related
Jan 8, 2014
I have a specific problem that has persisted through multiple android devices, through all ROMs and builds. Currently I am on a Verizon galaxy nexus with cyanogen 10.1 (background in case it's more relevant than I believe).
When a timer or alarm goes off on my device, or when I receive a call or text, my screen wakes automatically. I think this may be considered a "feature" in android. However, since my phone is nearly always in my pocket, it means that the screen turns on and often receives enough of a false signal in my pocket to disable an alarm or decline/accept a call. It is very inconvenient and would be alleviated if I could specify that I want my device to turn on the screen ONLY when I press the power button.
I know that others have the same problem from searches on xda and elsewhere, but I don't see solutions (except what looks like a registry hack on some specific devices)
How to get a cover to stop screen interactions while in my pocket, nor do I want to hear about a more elaborate lock screen to keep said interactions from interfering with alarms/calls. The problem is simply that the screen comes on at all with seemingly no way to change the behavior.
View 2 Replies
View Related