Android :: Way To Check Phone Is In Standby From A Service
Feb 11, 2010
Anyone know how my service can check if the phone is currently in standby mode? And if I can trigger an event within my service when the phone comes out of standby mode...
View 3 Replies
Sep 28, 2010
I have a service that spawns a thread which runs a task every 3 seconds.My service runs fine when my phone is on, but when my phone is on standby, the service is often not responding.Any clues as to how I can ensure my service is running while on standby?
View 1 Replies
View Related
Jun 23, 2010
I searched and couldn't find this. How do I check my time without service (tws) on my EVO?
View 1 Replies
View Related
May 23, 2009
I'm trying to log the phone's cell movement. So I created a PhoneStateListener that is being called when the CellLocation has been changed. Then it informs a logging service to write that new cell information to a log file.
This works as long as the screen is on. But when the screen goes off, the logging stops.
I have two classes:
The PhoneStateListener gets loaded on boot time public class CellStateListener extends PhoneStateListener { public void onCellLocationChanged(CellLocation location) {...this is the logging service which is informed when the cell location changes listener.onCellChanged(mcc, mnc, lac, cid); ... }
View 3 Replies
View Related
Nov 13, 2009
how to check that the service with some name is running once? also if i go out from my activity then my service is running & when i come to my activity the onCreate method is called so my service is created again in this case or running service will be attached again?
public class ServiceExampleActivity extends Activity { Intent intent; Button start,stop; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); intent = new Intent(this, ServiceExample.class); // service example is service class Log.i("-----service------", "Service Created"); }
View 2 Replies
View Related
Mar 1, 2009
How do I check if a background service (on Android) is running? I want an android activity that toggles the state of the service -- lets me turn it on if it is off and off if it is on.
View 5 Replies
View Related
Apr 6, 2010
Sorry for the newbie question, but does anyone know how I can check whether an IntentService is already running? I'm starting an IntentService from onCreate within a normal Activity, and that means that if the user minimises and maximises the application, it gets called twice. I'm wondering if I need to use something like the solution here http://bit.ly/du3VW5 or whether there's a simpler way.
View 3 Replies
View Related
Aug 19, 2010
I have an app that starts a service, then starts another activity previously selected by the user. Everything works on my app except I'm trying to get the service to kill itself, after it leaves the other activity without it having to come back to my activity. I've looked everywhere to see if anyone knows how to peek() search() the Activity Stack from a Service. Another way of wording is to check the foreground process from a service.
View 2 Replies
View Related
Sep 30, 2010
How do I check whether the local service inside my application is running?
View 1 Replies
View Related
Jun 29, 2010
I want to create an Android service, which notifies the main activity whenever disconnects and when internet reconnects again. I have following function for checking internet connectivity:.
CODE:...........
But I want to know, how to use it in a service.
View 1 Replies
View Related
Nov 12, 2010
Iam connection to services trougth my app, I woul like to check if the connections gets broken, alert a message than.
Or is this taken carre of in android? If not, How should I take care of it? is there a timer?
View 1 Replies
View Related
Aug 20, 2010
Does anyone know how to, or if it's even possible to check the (foreground process/top of the activity stack) from a service?
View 20 Replies
View Related
Sep 6, 2010
I have a service that is running within the context of my application. It gets invoked at the start of the activity and then gets update when new data is inserted or deleted from the database. The problem is that everytime I start the activity , it restarts the service. As you may have guessed - not a very intuitive design. Therefore I was wondering if there is a way to determine if the service is already running before starting it. I know I can bind to the service but I do not want that since the main activity needs to exits after the database operation is completed. I know for system services, you can get the service details from the application context. How do you do it for user defined service?
View 3 Replies
View Related
Mar 1, 2012
I wanna background service which is looking every minute for the location.
So I created a service and created a broadcast receiver connected to the alarm service.
That works generally fine.
Now I wanna check the Location in that Service, I have a Service which is looking first for "gps" and if not available then for "network" location. That works fine!
Now my confusing case: If I am at home and connected to the WLAN the Location is found every minute and give me an notification in android bar all is fine!
But if I am on street and go around it doesnt work. The Service is just running when I touch the screen and make it active, then the service starts and gives me the location.
Why the service just works at street when I have the screen active? And at home in my WLAN it works always even the screen is not active.
View 1 Replies
View Related
Aug 9, 2010
i'm programming an app that reads sensors values, and I need that it continue saving data while the phone goes standby (the screen go black after 1 minute).
View 2 Replies
View Related
Oct 19, 2010
I've looked through the other SMTP threads on here also, but didn't see anything that seemed to fit. I have a Desire and I use it over a WiFi link in my home, fine for surfing and reading mail, but when I try to set up an outgoing mail account on my 'usual' mail account I run into a problem. Because I travel a lot I use a service called authsmtp to provide me with an smtp address wherever I am, works fine, annual fee is low (not a recommendation, works for me).
However, in order to work it needs an SMTP address of the form mail.authsmtp.com and a password. I can enter the mail.authsmtp.com ok but it always says it cannot check the account. Is this 'cos it cannot check the smtp or is it something else? All the other data seems to be ok.
View 34 Replies
View Related
Jun 1, 2010
When I deactivate my Android phone, I push the power button, and the screen then shows nothing more, i.e. it looks deactivated. But when I push back the power button, say, 2 hours after, it directly notices me that I have a new message, if so. How can it know this, if it was shut down? Is the whole device in some standby mode when you turn it off like that? So, does the antenna still works in this case? Is it the right way to use an Android phone? I.e. if somebody calls me, will I be noticed of this call if I deactivate my phone as mentioned above? Or should I let it always turned on for real (i.e. with screen acting, etc.)?
View 8 Replies
View Related
Jan 8, 2010
I've used blackberry's for a long time now and love one feature of it. The Standby mode that you can put the phone into and the only notification that will pull it out is the alarm clock. I've found a few alarms that will disable notifications, except calls. Well I don't want any notifications through the night. Only the alarm waking me up in the morning. Is anyone familiar with an existing app that puts the phone in a low energy sleep that only wakes it up for the alarm clock?
View 3 Replies
View Related
Aug 7, 2010
Which one is sleeping? I feel like my phone is not sleeping when i press the lock key... it says phone standby uses 27% power and phone idle is 4%
View 1 Replies
View Related
Aug 24, 2010
I have an android application that I want to always be running in landscape mode.
I have the following code implemented to keep the app in landscape mode all the time:
inside my activity in the Application Manifest
android:screenOrientation="landscape"
This seems to launch and keep the application in landscape view for the whole duration of the application. Perfect!
However, if I have the app running on my HTC Aria (Android 2.1) and the phone locks, if I unlock the phone, I see the application for probably half a second and it's in portrait orientation and then quickly switches back to landscape mode. It is quite frustrating because all of my views are jumbled around and it looks unprofessional as you can imagine. This happens in both the emulator and on my real phone.
Does anyone know how to stop the application from temporarily rotating when the phone is unlocked?
I have tried overriding onConfigurationChanged() but with no success.
I have also tried putting setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); into the onResume() but the app still shows as the incorrect orientation for a split second when the phone is unlocked.
View 3 Replies
View Related
Sep 13, 2010
There has been almost no variation from that. Every now and then Display or Wi-Fi would show up as about 2% each, then disappear after a while. That's all.Last night my battery reached 10%, I turned off the power, charged it overnight for 12 hours, unplugged it, and turned the power back on. I noticed two things:
1. My Battery Use list changed drastically. I assume this is actually a better representation of what the list should look like than what I had been seeing for two weeks, but the other thing I noticed was
2. My battery was draining a lot faster than it ever had during the previous two weeks, even during idle periods.My battery had consistently been draining at around 1% per hour idle until today. Now I'm seeing it drop 5% in LESS than an hour while idle (idle meaning the screen shuts off and I don't use it).
So my question is, what do Cell Standby and Phone Idle mean? Previously they had both been 2% and my idle battery use was excellent. But today they both shot up to the 20-30% range and I'm thinking this may account for the excessive battery drain even while the phone is sleeping.Why would these two things be so high? Nothing changed between yesterday and today except that I turned off the phone and turned it back on. I almost feel like I messed something up by simply turning it off!
View 2 Replies
View Related
Jun 11, 2010
What is the difference between the two?
View 1 Replies
View Related
Feb 5, 2010
Having come from an iPhone I find it somewhat annoying that I can't use the lovely trackball to wake my nexus one from standby.I realize it could be a problem if you pressed it in your pocket as it sticks out but I'd like to have the option to do it.Does anyone know if it is possible?
View 48 Replies
View Related
Jul 1, 2010
Is there a specific way to activate it?
Btw im sorry for putting out in the topic my hero auto changed it when i posted it this morning.
View 2 Replies
View Related
Sep 10, 2010
I need to made an activity (without layout) that on start check if a service is running. if it is true it starts Activity2, if it false it starts Activity1.
I tried with this code:
CODE:............
Enter code here
But when I check, in the onCreate method, if serviceConnect!=null I receive sometime a NullPointerExcption.
I tried also to insert the operation in the method onCreate in an Async Task:
CODE:............
View 2 Replies
View Related
Jun 22, 2010
i just got a htc desire 5days ago i moved over from a iPhone 3G. I have a big problem with it. Battery lasts for about 4-5h i have read forums and googeld for 2 days now.So far i changed my Background to a black one i made wifi turn off after 15min no Bluetooth etc.I think the problem is that my phone never goes in to sleep mode.when i go setting > about phone > battery the up time and awake time is the same.I downloaded advance task killer but the only program i can see running is Smart Keyboard Pro and Amazon. I kill amazon and it stays dead for sometime i cant kill smart keyboard pro it restarts it self straight away.I have had the phone on charge for about 6h now and the battery seams stuck half way and don't relay increase or its increasing very slowly.
View 13 Replies
View Related
May 4, 2010
Is it normal to have phone idle around 31% and cell standby around 34%?
View 4 Replies
View Related
Aug 6, 2010
Just yesterday my phone was getting more than 14+ hours of battery. Now it's draining really quickly even when I'm not using it (I left it on while I was asleep). It's not facebook because I already downloading the fix and rebooted. My "time without signal" is 0% so I don't think that's the problem. I did download Quickpedia yesterday but a quick search tells me that's not the problem either.
The only other thing I did differently was switch from ADW to LauncherPro yesterday, but if that was draining the battery wouldn't it be under Android System and not standby or idle? Regardless, I switched back to ADW just to see if that works
View 10 Replies
View Related
Nov 10, 2009
From what I can tell, if you turn on WiFi the phone never sleeps even in standby mode. Is this a known issue or has anyone else noticed this. I noticed this using Spare Parts and turning off and on things until I saw it was wifi that keeps it awake.
View 4 Replies
View Related
Oct 2, 2010
The screen is off, with the phone left in standby mode. Is it normal for it to die that fast.
View 17 Replies
View Related