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.)

Android :: Instantiating activities into new tasks / processes


ADVERTISEMENT

Android :: Share Files With Different Activities Running / In Different Processes In Application

Mar 16, 2010

I would like to share a cache file across activities, which are running in different processes but in a same application.So, is there any way to make it thread safe (probably not "thread safe", should we call it "activities safe" or "process safe" ?

View 2 Replies View Related

Android :: Activities And Tasks ?

Jul 3, 2009

I had a question regarding this concept. Suppose i have an application that defines a task. This task has some activities that belong to another Android application. The Dev guide says, that to maintain a uniform user experience, Android will maintain such 'distributed' activities as part of the same 'task' even if they belong to different applications.

I refer to it from here: http://developer.android.com/guide/topics/fundamentals.html

Some lines later, the Dev guide says and i quote: * * *"**Suppose, for instance, that the current task has four activities in its stack — three under the current activity. The user presses the HOME key, goes to the application launcher, and selects a new application (actually, a new task). The current task goes into the background and the root activity for the new task is displayed. The current task goes into the background and the root activity for the new task is displayed. Then, after a short period, the user goes back to the home screen and again selects the previous application (the previous task). That task, with all four activities in the stack, comes forward. When the user presses the BACK key, the screen does not display the activity the user just left (the root activity of the previous task). Rather, the activity on the top of the stack is removed and the previous activity in the same task is displayed."*

I think "three under the current activity" should be "four under the same task".

I think this paragraph i quote above has nothing to do with activities distributed across applications..and belonging to the same task. This para is maybe talking about two applications, that share a common application launcher and each application has defined its own tasks (stack of activities).

The user is simply toggling from one application to another, thus demonstrating that all activities (of a task) move together. However, the "three under the current activity" phrase is confusing me.

View 3 Replies View Related

Android :: Relationships Among Apps - Tasks And Activities

May 2, 2009

I am trying to understand the interactions among apps, processes, activities, and tasks. After reading 'Application Fundamentals' many times, I wrote a tiny piece of code with three different activities.

Here's my manifest file:

CODE:....

The AppRootActivity starts ChildActivityOfRoot which in turn starts SingleTaskActivity.

Since 'SingleTaskActivity' is marked with 'singleTask' launchMode I expected two different tasks with the following activity sets: Task1 --> AppRootActivity - ChildActivityOfRoot Task2 --> SingleTaskActivity

However, I was surprised to see all three activities running in the same task. This doesn't change even if I use Intent.FLAG_ACTIVITY_NEW_TASK flag in the intent used to activate 'SingleTaskActivity'. I use the getTaskId() to determine the task the activity is running.

IMO this behavior is not at all apparent from the documentation.

View 6 Replies View Related

Android :: UI Subtree In Xml / Instantiating It More Than Once?

Feb 2, 2010

Just getting started with developing for Android, so apologies if there's an obvious answer. I'm working on an application in which it's necessary to pro grammatically change the entire structure of the UI. What I would like to be able to do is specify a subtree of the UI in xml, and then instantiate that multiple times as required throughout the tree. For instance, if I need the user to set a numerical value, I'd like to use xml to define all the widgets involved, increment and decrement buttons for instance, and then reference this same file whenever I need a UI of that sort.

View 4 Replies View Related

Android :: Instantiating A Layout Defined Via XML At Runtime

Oct 18, 2010

I have a ListView that I want to populate with objects whose layout is defined via XML. Is there a way to instantiate a layout at runtime, editing stuff like the Android layout ID, etc., and then load the new layout into the list?

View 5 Replies View Related

Android :: Instantiating A Layout From An Xml File / Resource Id

Jan 28, 2009

I'm interested in instantiating a LinearLayout object from an xml file that has a LinearLayout file configuration. I want to do this within a method of my Activity. I tried findViewById() but that returned null. I've made sure that the LinearLayout id is the one I'm passing. Note that this layout isn't part of my screen, it's stand-alone, so I want to build a LinearLayout object from the xml.

View 3 Replies View Related

Android :: Need To Bypass Constructors When Instantiating Objects

Jun 25, 2010

Do Android have any way to instantiate objects without calling any of its constructors? In Java, Sun have sun.reflect.ReflectionFactory.getReflectionFactory().newConstructorForSerialization(), in .Net we have System.Runtime.Serialization.FormatterServices.GetUninitializedObject() but I was not able to find anything like that in the Android platform.

View 3 Replies View Related

Android :: Android List View Filtering Without Repeatedly Instantiating Array Adapters

Aug 5, 2010

I have a ListView filled with twitter tweets. I made a custom Tweet class so I could store a special type number. So, I have the Tweet class and custom ArrayAdapter: Code...

View 1 Replies View Related

Android :: Switching Activities / Passing Data Between Activities

Jun 30, 2010

how to call BarCodeScanner, and return the value to a field.so now, i have a toast that says "successful scan" and then i want to pass the result to a new activity. when i comment out my intent, everything works (minus the passing of data/switching of screen, obviously) but when i run my project as is, it FC's no errors reported by eclipse in code or xml. any insights?

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

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.

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

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

Android :: Post Messages Across Processes By Using Handler?

Aug 13, 2010

I have to post messages from one process to another process by using handler .

I am using Handler.post/Handler.sendMessage but i am not getting those messages in another process. I am not getting any exceptions also.

Is it possible to sent messages across processes using Handler?

If it is the case how can i do it?

View 5 Replies View Related

Android : Get Hprof Dump For Other Processes From App Code?

Jun 16, 2010

In my application , i have an option to capture the hprof dump. I used

android.os.Debug.dumpHprofData (String fileName)

Initially i though the hprof data generated by the method above is for the entire device , which is not so . The hprof data generated is only for my process.

Now i am trying to generate hprof data for other process as well. I need to get the Hprof dump for all the running processes from application code.

from adb shell i tried "kill -10 <pid>" , This command will generate the hprof file for the corresponding process in the data/misc folder.

Now the problem is this command is working perfectly from the adb shell prompt , but i am not able to embed the command to mycode.

My code is like

Runtime.getRuntime().exec("chmod 777 /data/misc") Runtime.getRunTime().exec("kill -10 <pid>")

No exceptions are thrown , but somehow it is not working. The same code above is capturing Hprof dump for my process, when i give my process ID.

I tried with "android.os.Process.sendSignal (int pid, android.os.Process.SIGNAL_USR1) ;" also.Getting the same problem.It is capturing Hprof dump for my process. For other processes it is not working.

Do we need to have any special permission to kill other process from our process ? Or is it a built issue ? can you please suggest some possible way to get Hprof dump for other processes from application code?.

View 2 Replies View Related

HTC EVO 4G :: Can Somebody Tell Me What These Processes Are For?

Jul 22, 2010

I rarely play music on myphone, but i do have a few songs on my SD card. Using battery history it shows that MEDIA uses the most internet usage. Was wondering if its safe to put these on autokill and turn off in startup manager

View 1 Replies View Related

Android :: Check Memory Consumption Of Each Running Processes Individually With SDK?

Apr 7, 2010

I would like to check the memory consumption of each running processes individually, cat /proc//statmis ok, but opening a shell for each check is time consuming, and maybe not the best way. any advices how to do it with the SDK?

View 1 Replies View Related

Android :: Game Doesn't Work Due To Thread Background Processes

Mar 8, 2010

I have written a very simple game with some simple animations, but I've noticed that when the phone checks email, or several other apps are running, the animations that update in my thread start behaving slowly or choppy. This is a problem as the game mechanic requires some careful timing of your screen touches based on the animations. So if it starts behaving erratically, the game doesn't really work well - and isn't much fun.
Is there a way to prevent this? Can my threads have a higher priority when they need to run?

View 3 Replies View Related

Android :: Anti-Task Killer To Keep Droid From Closing Processes?

Aug 23, 2010

I subscribe to the church of not using a task killer but what I really would like is an app that I can select programs I don't want android to kill.

An example of why I want this: theres 3 to 4 websites I view for the most part on my phone. I like to open my browser and get it all set up in tabs on Dolphin. However, if I don't use it for while, I re-open the browser to find it had been closed and I have to repeat.

I'd use this in conjunction with the app that monitors CPU use (forgot what it was) and gives a notification if an app rises over a customized threshold in case the app started getting too hungry.

View 1 Replies View Related

LG Eve :: Want To Kill Application / Processes

Sep 27, 2010

After searching, I was unable to find any post that deals with my particular problem, and I don't know if it's a problem or something I have to deal with. On my LG Eve (unlocked, not yet rooted), when I run Task killer, I notice that there are two items in the list that look like configuration files (window with a gear in front of it):
com.tni.Task killer:Captain Obviously, the first one is linked to Task killer and if I kill the configuration file, it kills the Task killer process. When I try to kill beware.com, though, it does nothing. The file remains in the list and is also visible in the Task killer widget. (Speaking of the widget, when I kill Task killer, the icon for the 2 configuration files usually remain, even if I auto kill everything.) Doing a little searching on the tubes, I found that beware.com are the developer for Quick Settings. I don't think I downloaded that app yet, but I might have and subsequently deleted it. Is it possible that the configuration file remains after I un install an app? If so, how do I remove that con fig file?

View 1 Replies View Related

Android :: Debug Live Running Apps To See What Processes Are Taking Alot Of Cpu Time?

Jan 30, 2009

is there any way to debug live running apps to see what processes are taking alot of cpu time? I see the options in DDMS but they are not really live. I would just like to see what processes took alot of time so I can dig into the code to optimize it

View 2 Replies View Related

Samsung Galaxy S :: How Many Processes Should Be Running?

Aug 14, 2010

I have advanced task killer on my phone but am amazed at the numbers of processes it seems to kill. I have the ones I know I need set not to close down like adw launcher the HTC keyboard etc however it regularly reports its closed down 40 + processes when I run it.The I run it a few moments later, not having launched anything, and it reports shutting down another 20 or so.Is this right?Could this be the cause of the lagging? I am currently running JM5 firmware which seemed amazing to start with but now seems as laggy as it was before.

View 5 Replies View Related







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