Android :: Way To Keep Service Alive Till Phone Switched Off?
Nov 23, 2010
Once we call the startService() method, can we keep the service alive until its explicitly stopped by the user? I want my service to stay alive until the phone is switched off. How can i do this? The idea is that when I receive an incoming call, I want to start recording and once the status changes to idle, I want to stop the recording. I am doing this inside my service. It does work sometimes and sometimes it doesn't. How can I implement such a thing in a service? Can someone help me with this?
View 2 Replies
Jul 19, 2009
Is it possible to keep service alive even if the foreground app does not run anymore? My app consists of a foreground app (UI) and a service that should keep running in the background until it is being explicitly stopped by the user (similar to a music player). The problem is that if the user opens other apps, my foreground app is being killed by the system (makes sense) but then also the service is being killed by the system (does not make sense).
View 16 Replies
View Related
Jun 30, 2009
How do I make my service always alive?? If my service gets killed because of an exception or if the VM kills my service on low memory, How do I make sure that my service is always running?
View 14 Replies
View Related
Oct 10, 2009
I am starting a service from an activity. Once the services starts, the calling activity loses focus and blocks till the service is completed. Why is this and is there a way around it to return the control to the calling activity while the service runs in the background?
View 6 Replies
View Related
Apr 7, 2010
The default way configuration changes (i.e., rotates) are handled is to destroy the activity & recreate it with a new one. What is the recommended way to handle these changes in an activity that binds / unbinds to a service (that is possibly heavy/slow to start)? When the activity gets destroyed, it unbinds & causes the service to be destroyed. When the new activity is created, it binds & recreates the service.
The only choices seem to be:
-- override onConfigurationChanged in the activity. Feels ok, but non - conformant.
-- explicitly start the service & only stop it when the last activity gets an onDestroy that's not due to a config change (i.e., there was no call to onRetainNonConfigurationInstance). Feels icky.
-- explicitly start the service & don't stop it until some amount of time after the last unbind. Ickier.
On a related note, what happens between activity switches within a process, where the first activity (A) starts the next activity (B) & then calls finish() -- is there a guarantee that B.onCreate is called before A.onDestroy? If not, and the activities share a service, the same issue of keeping the service alive during this window exists, but with only the icky workarounds.
View 7 Replies
View Related
Sep 16, 2009
The app widget documentation indicates that the "widget provider"being a receiver of a broadcast service may not exist (the process) beyond the completion of the call.If I want to maintain state between two broadcast events, such as say widgetProvider.onUpdate(), can I start a local service and leave it hanging there until my widgets are disabled? If I didn't explicitly stop that service will it be loaded again and resumed when the device wakes up.
View 4 Replies
View Related
Jul 28, 2010
Can anyone please give me code or links or concept for running an android application on android device automatically.. whenever the device is switched on, application should start on its own, with out the interference of the user.
View 1 Replies
View Related
Jun 1, 2010
My application requires to be started everytime the phone is switched off and switched on i.e it should start running automatically like an anti-virus software on start up. Is it possible?
View 1 Replies
View Related
Jan 20, 2010
i last week took a HTC hero out on contract and switched from my iphone 3g, which i loved dearly reason being i wanted to use spotify to its full potential without having to shutdown etc.It's definately the best decision i ever took, i absolutely love the android platform and would recomend anyone else thinking of doing the same. A few question thought i have about the Hero;
1) battery life, seems pretty short? can i buy a better battery without having ot change the back cover? I like the idea of being able to carry a spare?
2)When on the internet/browser it always opens pages zoomed in, i find it pretty hard to use compared to the iphone, can i set it so that it open the page like a normal pc/iphone?
3)And how do i know i'm getting a 3g signal ?
4)Upgrade for Android? How do i get them? I read there is a better version but how do i upgrade it?
View 17 Replies
View Related
Sep 20, 2009
Soon to get the Magic. When you set an Alarm at night for work in the morning, then switch the Phone off, will the Alarm sound in the morning whilst the Phone is off?
View 4 Replies
View Related
Sep 29, 2009
Am I the only one having this problem? I'm quite new to this handset, but I can't see what I'm doing wrong. the alarm only goes off if the phone is left switched on. Any ideas?
View 41 Replies
View Related
Sep 16, 2010
It's just that all my other Sony phones, the alarm worked (and calendar reminder) when the phone was switched off, to wake me up ect. Is there a way to activate this so that it will work, or does the phone have to be switched on to use this facility?
View 3 Replies
View Related
Nov 1, 2010
When I charge my phone I'm unable to switch it off? If I switch the phone off and then plug it in, this turns the phone back on again? Is there a way to charge the phone when the phone is switched off?
View 11 Replies
View Related
Sep 15, 2013
My Samsung Galaxy S Duos GT-S7562 is having many problems. First of all it is taking a lot more time to charge the battery and it gets very Hot while charging.
Wifi is also Disabled. I am not able to turn the Wifi on. And Phone is getting switched off Automatically. It won't even turn on until and unless I remove battery and insert it back. Tried to do Factory reset but no dice.
View 8 Replies
View Related
Oct 19, 2010
In my new Sony X10 mini pro (android 1.6), ALARM do not work if the phone is switched off? 1. Is this normal in this model? 2. Do we need any other software to make alarm work when the phone is switched off?
View 9 Replies
View Related
Jul 21, 2010
As far as I'm aware the standard alarm clock will not alarm when the phone is switched off. Does anybody know an alarm clock that will alarm when the phone is switched off ...? (preferably free)
View 2 Replies
View Related
Sep 24, 2010
Firstly I am new to android so please forgive any ignorance below. My Questions are; I really need a phone upgrade (iphone 3g being a proper drag!) and the HD looks great, but with 3.0 scheduled (from what I have read) to come out around xmas I am tempted to hold off till then. Can anyone shed light on when the next HTC uberphone would be expected to come out? I can probably wait till Xmas before upgrading, and maybe a little longer, but otherwise I'll go for the HD in October.
View 1 Replies
View Related
Feb 8, 2010
I have an app which declares a BroadcastReceiver, the receiver gets the broadcast, does what it needs to, then ends ensuring that everything is tidied up as needed. When I examine the system through the DDMS view in Eclipse the process for the application is still running after the receiver has completed. I've even boiled it down to a simple test case which gets a shared preferences instance from the context, checks a random setting, and then exits, and, when run on the 1.5 emulator (which is the minimum supported OS level) the process is still hanging around.The reason this is an issue is memory usage (which shows under DDMS as around 2MB).I've had queries about why the application still uses up memory even when it's not doing anything, so, my question is; Is this behaviour normal, or have I missed something that would make the process exit?
View 9 Replies
View Related
May 4, 2009
Is there anyway to block the UI Thread till the .mp3 file completes (or in general blocking UI thread till perticular action in the b/g thread completes).
I had used following code but not got the expected result.
COD:.................
View 3 Replies
View Related
Jun 19, 2010
I have read all I can about using the Inc overseas and am confused. If the phone is switched to WiFi in a WiFi spot, can you use the phone? I have read that Verizon put some sort of restrictions on it, but I'm not savvy enough to understand it all. My daughter is in the Coast Guard and we both have DInc's. She goes to places like Star Bucks in other countries that offers WiFi and we would LOVE to be able to text each other with our phones. Any advice would be greatly appreciated!
View 10 Replies
View Related
Apr 14, 2009
I just wondered which frequency is OK to send whitespace keep alive packets onto a TCP connection to keep it alive on a T-Mobile 3G connectivity (the use case is to maintain an idle XMPP session alive). On SFR in France, we are disconnected if idle for 3 minutes, but I guess T-Mobile's timeout is lower. By the way there is a bug in the Smack library, the "keep alive" setting is not enforced, e.g. if you set it to 30s, in the worst case the whitespace will not be sent until the double of this time (60s).
View 4 Replies
View Related
Oct 22, 2010
is there any way to keep my connection alive when the screen goes off? my xmpp connection is disconnected due to ACTION_SCREEN_OFF event,
View 3 Replies
View Related
Jul 13, 2010
I am writing an application to do fileobservation which can be done. Is there any way I can make the application to run in the background without killing it? Unless user restart the phone. Is there any way to do it?
View 9 Replies
View Related
Dec 7, 2009
am developing an app that needs to track incoming calls. I have set up a phonelistener which is launched form a service like so
TelephonyManager tm = (TelephonyManager)getSystemService (TELEPHONY_SERVICE); tm.listen(mPhoneListener, PhoneStateListener.LISTEN_NONE);
This seems to work for a while but then fails to fire after - say an hour. I have tried relaunching the listening in a timertask every 60 seconds but this does not seem to work. Is there a way of keeping a listener alive for a long period of time. I can only assume the system is garbage collecting it.
View 2 Replies
View Related
May 27, 2010
I've been waiting and waiting and now I'm not going to be able to get my coveted EVO til the beginning of July. Spent the money on signing my children up for summer activities instead. Yeah, yeah, I'm af*cking martyr and all that. Damn schools for getting out in the summer and children needing exercise and entertainment!
View 8 Replies
View Related
Dec 10, 2009
I want my service keeps network connection alive even if user presses the power button to shutdown the screen. As I have tested, socket will return exceptions and through CONNECTIVITY_ACTION intent, i know EXTRA_NO_CONNECTIVITY is true. So can current Android keep connection not closed when screen is off?
View 3 Replies
View Related
Sep 13, 2010
Trying to understand the Android framework model. I have an application that needs to have several threads running. On thread gets GPS fixes, another picks up GPS fixes and pushes them to server, and yet another occasionally polls a server for dispatched orders. Some of these threads update status Views as well.
Since I am new to Android, the application framework model hasn't clicked for me. Where are these threads started? Right now I start the threads in the initial Activity, but if I understand it right, once that Activity goes invisible it is stopped. Furthermore, I have to track GPS and network statistics so that I can have a View which may (or may not) be the active View.
View 1 Replies
View Related
Nov 23, 2009
Is there a way to keep an Activity in memory after the user hits the back button on it?ActivitySearch is used frequently in my app, however after the user starts it up, then hits the back button, it's destroyed, and the next visit to it requires it be built from scratch again.If after its first construction, I could just request it be paused instead of destroyed on the back button, then I could reuse it. Is there a sensible way of doing this?The only way I could think of reasonably doing it is to combine ActivitySearch with ActivityMainMenu into a single activity, and simply switch views when the user chooses search, but this is probably a bad design.
View 6 Replies
View Related
Nov 26, 2009
I want to check whether the process is still alive or not through programmatically ,Can i do that i am trying to do it by process name in onCreate method but the issue is that the onCreate method is called always .When i check that in onCreate method i always get the process name and i can not kill the current app and switch to previous one.
View 3 Replies
View Related
Nov 3, 2010
If it is possible to keep an Air for Android application alive during sleep, how can it be done? I know how to prevent sleep and lock but this course is not preferable to some users.
Update
The reason in this case is to keep the video streaming from the phone to a server.
View 2 Replies
View Related