Android :: Keep Connection Alive When Screen Goes Off?

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,

Android :: keep connection alive when screen goes off?


Android :: Keep FTP Connection - Or Any Connection Object - Alive Between Activities

Oct 27, 2010

I'm coding a very basic FTP client on top of my application and I have 2 activities. The first one is the file explorer and the second one is the image viewer. Once I click on the image filename on the explorer, I want to pass the connection to the other activity to handle extra stuff. Basically, I want to keep the same org.apache.commons.net.ftp.FTPClient object (which handles the connection) alive in-between the 2 activities. I know I can't pass an object inside an intent so I don't know what my best bets are.

View 1 Replies View Related

Android :: How To Keep Mobile Network Alive Even If Screen Is Off

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

Samsung I7500 :: Wifi Connection Lost After Screen Lock And Can't Regain Connection After Unlock

Sep 7, 2009

If my screen locks while I have a wifi connection, then the connection is lost when I unlock the phone.First, is this perhaps deliberate, to save power? Also, either way, when I unlock the screen and go into wifi settings, I see that the phone is trying to make a wifi connection, but it never succeeds, even though it's my home network and I'm in the same room as the router. It just states 'Obtaining address.

View 10 Replies View Related

Android :: Are Processes Kept Alive When Nothing Is Being Done?

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

Android :: How To Keep Service Alive?

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

Android :: TCP (XMPP) Keep Alive And TMobile

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

Android :: Force Application To Alive?

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

Android :: Phonestatelistener Dies After While - Kept Alive?

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

Android :: Make Service Always Alive?

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

Android :: Keeping Service Alive Across Configuration Changes

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

Android :: Keep Threads And Views Alive Between Activities

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

Android :: Keeping An Activity Alive Instead Of Destroying It?

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

Android :: Want To Check Whether Process Is Still Alive Or Not Through Programmatically

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

Android :: Droid Air - Keep Application Alive During Sleep?

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

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

Android :: Make Sure Activity Is Alive Before Firing Intent?

Feb 24, 2010

I am currently firing an Intent to a Broadcast Receiver which in turns starts an Activity.

Then from the same Service another Intent is fired to a Broadcast Receiver thats in the Activity.

The problem is that the Activity isn't getting the Intent meant for it because it is fired before it is alive and the Broadcast Reciever is registered.

I was wondering is there anyway to make sure an Activity is alive before sending an Intent?

View 1 Replies View Related

Android :: Activity Switching Won't Keep State Of View Alive Even Using Saveinstancestate() / Why?

Aug 31, 2010

I just started working on android(beginner). I'm stuck in the activity state complexity. I created two activitys(activity1 and activity2). wen i move from the activity1 to 2 and then back to activity1 using a button(back of activity)the values(states) of the views are not restored. here is the code...

View 1 Replies View Related

Android :: Keep Broadcast Receiver Process Alive / By Creating Service That Stays Around?

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

General :: How To Keep App Alive In Background

Apr 2, 2012

I have a ics tablet, and I am getting really frustrated with Opera mobile keep reloading while I'm in another app or two. my tablet has 1gb ram. I tried autokiller memory optimizer, and auto memory manager to keep opera alive, but its not permanent. and V6 supercharger sounds wayy to complicated for me. and this tablet doesn't have a recovery (its rooted though), so the instruction sounds more complicated to me. so I saw one post in xda somewhere, that I can modify build.prop to set oom priority and it will be kept permanently.

View 5 Replies View Related

General :: Keep Flash On Browser Alive While In Background?

Aug 3, 2012

As of ics when you move browser in the background, that is switch from browser to another app, the flash content on the web page gets paused, like the waiting seconds countdown on a file sharing website, it simply means you can't multitask, So is there a app that can prevent the browser from being dead in the background, or a floating browser will do the trick

View 9 Replies View Related

Samsung Captivate :: Randomly Shutting Off - Keep Alive Application

Oct 23, 2010

There seems to be a solution for the random shut-down problem with Captivate: Captivate Keep Alive app. This was just posted, and it really seems to work! Give it a try. So far I've been up for more than 24 hours without a shut down event.

View 5 Replies View Related

Samsung Epic 4G :: Keep Touch-Sensitive Buttons ALIVE

Nov 10, 2010

I got pretty good guessing the touch buttons one they time out, but still annoying as I did miss sometimes.Well just now, I decided to do something about it.A real quick poke through the phone revealed a very easy fix.The path is here.Settings[Sound & Display[Keyboard timeout[Same as Screen timeout my screen timeout is 1 min.As we all know, and I verified this. The keyboard backlight only turns on when the slider is open. Now the touch-sensitive buttons will infact stay lit as long as you would need them, while the screen is on .Life just got a little easier B)

View 4 Replies View Related

General :: How To Change Alive Timeouts In Native SIP Application

Dec 21, 2011

I would like to change the Keep Alive Timeouts in the native SIP Application. I'm using a Nexus S with ICS. But I always get this error

Code:

I/ActivityManager( 152): START {act=android.intent.action.MAIN flg=0x4000000 cmp=com.android.phone/.CallFeaturesSetting} from pid 1745
E/MenuItemImpl( 1745): Can't find activity to handle intent; ignoring
E/MenuItemImpl( 1745): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.phone/com.android.phone.CallFeaturesSetting};

have you declared this activity in your AndroidManifest.xml?

That's what i did:

-Check out Android Source with repo, Tag 4.0.3
-Edited frameworks/base/voip/java/com/android/server/sip/SipService.java
-lunch full-user
-make
-Copied the resulting Phone.apk and Phone.odex from out/target/product/generic/system/app/ to my Phone and fixed permissions.

View 3 Replies View Related

Android :: Cancel/abort Connection From ThreadSafeClientConnManager Connection Pool

Oct 14, 2009

I'm using ThreadSafeClientConnManager to manage a pool of client connections, because my application has several threads, which are simultaneously connecting to a webserver.

Abstract sample code:

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

Now lets say on of this threads is downloading a large file, but then the user of my application is switching to another activity/screen. Therefor the file is needless and I'd like to abort this download connection.

In ThreadSafeClientConnManager I found this method: public ClientConnectionRequest requestConnection (HttpRoute route, Object state) Returns a new ClientConnectionRequest, from which a ManagedClientConnection can be obtained or the request can be aborted.

So far I've been using:

CODE:.........

Now from what I understand, I've to use:

httpclient.getConnectionManager().requestConnection(HttpRoute route, Object state);

And that's the point where I'm stuck. I assume that for the route I can just use new HttpRoute(new HttpHost("10.0.0.1")) or whatever my server is, but what to put in for Object state?

And second, as soon as I've the ClientConnectionManager I can call getConnection(long timeout, TimeUnit tunit). But then from there, how I do I execute my HttpGet httpRequest = new HttpGet(URL_TO_FILE); as I did before with HttpResponse response = (HttpResponse) httpclient.execute(httpRequest);?

I've been gone through the documentation and tried out quite a few different things, but I wasn't able to obtain a working solution. Therefor any suggestions and/or code examples are more than welcome.

View 1 Replies View Related

Android :: Popup When No Connection Default Connection Failed Dialog

May 12, 2010

Whenever a application needs internet and connection fails, I get a message dialog

Connection failed
This application requires network access. Enable mobile network or Wi-Fi to download data.

and two buttons, Settings, Cancel.

How do I detect there is no internet connection?

How do I popup a same dialog in my application?

View 3 Replies View Related

Motorola Droid X :: Usb Connection - Reboots And Goes To Logo / Eye Screen And Hangs

Jul 31, 2010

when i plug in the usb charger or connect it to my car dock. When i plug it in, the phone reboots and goes to the droid logo/droid eye screen and hangs there. I have to pull the battery to turn it off and back on again. Once it reboots it doesn't seem to have a problem connecting, but after that and a f ew hours of usage it happens again when i plug it back in. I installed a lot of apps using appbrain recently and i feel like it started doing that after i installed them.

View 2 Replies View Related

HTC Hero :: Data Connection Turns Off After Few Minutes When Screen Lock Comes On

Apr 30, 2010

My mobile data connection turns off after a few minutes when the screen lock comes on. I have checked both "always on mobile data" and "mobile network" on. The data connection will stay on with the screen lock only if I have an IM logged on. I have changed my sim card and have done a factory reset....

View 2 Replies View Related

Android :: Able To Have Voice Connection And Data Connection Simultaneously

Jul 23, 2010

What's the technical term for being able to have voice connection and data connection simultaneously? Like AT&T was promoting heavily for a while.Apparently, the new T-Mobile Vibrant has this capability. A friend got one and was accessing the web while talking to me, double jealous now.I have benn lusting after the Verizon version, Fascinate, and wondering if there is any chance it will as well.

View 2 Replies View Related

Sony Ericsson Xperia X10 : WiFi Connection In Screen Safe Mode

Jul 11, 2010

I connect to wifi at home. however, when the phone goes into screen safe mode, the wifi icon is not there. only after i swipe the phone to get back to the menu, then i see the wifi icon.

does it mean wifi is disabled when the phone is in screen safe mode? it appears i do not always get notification for new text when the mode is in screen safe mode. it's sporadic.

View 4 Replies View Related







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