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?

Android :: Are processes kept alive when nothing is being done?

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 :: 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,

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

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.


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

Android :: MemoryFile Between Processes

Jun 22, 2009

I've been able to send data via shared memory between threads within a process using MemoryFile.I then tried to send data between a service and an activity in different processes, but the data did not get passed. The name for each call the MemoryFile's constructor was the same.Is it possible to share data between processes using a MemoryFile?

View 6 Replies View Related

Android :: How Does A Singleton Behave In Different Processes?

Mar 23, 2010

I have a singleton class and I am using it to access databases. I would like to know how it would behave if I use the same from my remote service class which runs as a separate process. Will it create a new instance in that process or will it use the instance from the other process?

View 3 Replies View Related

Android :: Background Processes Not Being CPU-limited?

Apr 19, 2010

We were told that, as of Android 1.6, background processes were put in a Linux process scheduling class that limited how much CPU they would use. A few weeks ago, I ran a benchmark test that seemed to validate this claim.I have run more tests, and I am no longer confident in my earlier conclusion. I can get a background process to significantly impact the foreground process, more than would seem to be possible if the background process was, indeed, CPU-limited.

View 14 Replies View Related

Android :: Nexus One DDMS Only Two Processes

May 1, 2010

I'm having trouble using the nexus one in DDMS on Fedora 12. It is detected fine and I can see two processes, cooliris and uploader.These are the only two that show up. The emulator shows up just fine and i can debug from there. Does anyone have suggestions on how to get the nexus to connect properly?

View 2 Replies View Related

Android :: When Is Appropriate Time To Use Separate Processes?

Nov 4, 2010

I have read all about having separate processes for different Application components, and how to use them.I am curious, what are some appropriate use cases for when an application should actually use separate processes?It seems to me, the main advantage to using separate processes is to make the different portions of your app more easily killable by the OS.

View 7 Replies View Related

Android :: DDMS Does Not List Processes

Feb 15, 2009

I've been trying to locate some excessive object creation to deal with hiccuping caused by the garbage collector (any word on upcoming improvements to this, btw?), and have discovered that DDMS is the tool for the job.I shut down eclipse and booted up DDMS, and it finds my device, but lists no processes running (no matter what I run).Initially, it did list the "powermanager" app that I had installed, so I assumed this was causing some kind of conflict and uninstalled it and rebooted my device.Now it simply lists no processes.

View 4 Replies View Related

Android :: How To Share Data In Different Processes?

Nov 23, 2010

I wrote a JAVA application with native methods, and trigger encoding program in native methods. That makes two processes, one is application process, another is encoding process.I would like to know if there is a way to get encoded data from encoding program and pass them to JAVA application.

View 2 Replies View Related

Android :: View Cpu Usage Of Processes

Oct 20, 2010

Is there a process manager or task viewer for android that shows how much CPU percentage each process or even each thread in a process takes up?

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

Android :: Two Processes Are Created On First Running Of My Application

Mar 4, 2010

Some times after installing my application and first running my application is creating two processes as follows.


View 4 Replies View Related

Android :: Instantiating Activities Into New Tasks / Processes

Jul 28, 2010

I have an application with a multi-instance activity. I would like each instance of the activity to appear in a new task and process. Any suggestions on how to do this? By manipulating the manifest I can cause all instances of the activity to appear in a specific task and
process, but I haven't found any way to cause each instance to appear in a different task and process.(The requirement to have different tasks is that we want each instance of the activity to appear separately in the task list; the requirement for different processes is that each instance of the activity is backed by a chunk of native code with global state. We can't change either of these.)

View 1 Replies View Related

Android :: Debugging System Processes In Eclipse

Jan 18, 2010

How can I debug some system process (...acore), for example, the status bar, in Eclipse ? I couldn't find any help online yet. I'm able to debug a normal application, but not system threads (windowManagerSevice etc).Also, when I open the Android source in Eclipse using the official instructions, I get build errors, is it OK ? (already executed "make" successfully)

View 2 Replies View Related

Copyrights 2005-15, All rights reserved