Android :: Out Of Memory Resuming Application

Feb 22, 2010

My application uses a single activity to switch between different views. I premise I'm loading a good amount of bitmaps in one of this view (say the gamescreen view) constructor but I recycle everything on the onDetachedFromWindow method.All the Bitmaps are static and most of them loaded with BitmapFactory. decodeResource method.Furthermore I'm using a gallery wich content is a simple layout with eight imagebuttons.I know all the complications using this widget and all the risks of using static bitmaps, but, I guess my problem does not entail them because my application is running well if I try to switch between these two view (and I've tried to do it about 30 times without crashes!!!) but when I pause and resume the application two times (pause->resume->pause->resume) I run out of memory, and often without the crash message (it just stays on the actual view).

Android :: Out of Memory resuming application


Android :: Restoring Active Activity While Resuming Application

Apr 7, 2009

I have two activities running: MainActivity and ChildActivity. Whenever the user clicks in the button in MainActivity, the ChildActivity is launched. What I want to do is this:When the active activity is the ChildActivity and the user clicks the home button then relaunch the application (like opening from the beginning), I want to see the ChildActivity instead of MainActivity that is launched. However; This is happening only when the user clicks from recent activities window. (the window opened when you long press the home button).I had some suggestions actually work arounds and I tried to manipulate onStart, onRestart, onResume, onStop, onDestroy events. But, they didn't fully solve the problem. There should be a smart way out there.

View 8 Replies View Related

Android :: Restoring Active Activity / While Resuming Application

Apr 7, 2009

I have two activities running: mainActivity and childActivity. Whenever the user clicks in the button in mainActivity, the childActivity is launched. What I want to do is this:When the active activity is the childActivity and the user clicks the home button then relaunch the application, I want to see the childActivity instead of mainActivity that is launched.I had some suggestions actually work arounds. I tried to manipulate onStart, onRestart, onResume, onStop, onDestroy events. But, they didn't fully solve the problem.

View 3 Replies View Related

Android :: Android Intent / Resuming Application Home Activity

Jul 10, 2010

I have an application that I have running a media player and I want to resume the activity from my applications home activity. I can successfully do this by adding the following flags to the startActivity Call:
myIntent.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP | Intent.FLAG_ACTIVITY_CLEAR_TOP);
I am worried that this is not an ideal way to do things since it took me a long time to find it. It made me think that no one uses it very much. Are there any pitfalls to using this method?

View 1 Replies View Related

Android :: Difficulty Resuming SurfaceView

Apr 24, 2009

I am stuck.My main activity creates and starts a SurfaceView.My app needs to access a listview via the options menu to change properties of the items shown in the view.Two strange things occur:

1.) When I scroll the listview quickly, the list sometimes gets farklempt.Words overlap each other.

2.) When I select the item and the app returns to the main activity, the thread is no longer alive.

If someone out there can offer help I will post the code.This will take a little effort.My code is loosely based upon LunarLander and the GLSurfaceView examples.If there is a good example (more recent example) someone can point me to, that would be boss.

View 8 Replies View Related

Android :: Resuming An Activity From Notification

Mar 5, 2010

I have a notification in the status bar for my app.The problem with this is that when you press the home button from the app (pushing it to the background) then press on the notification in the list accessed from the status bar, it starts a fresh copy of the activity. All I want to do is resume the app (like when you longpress the home button and press on the app's icon). Is there a way of creating an Intent to do this?

View 1 Replies View Related

Android :: Suspending And Resuming Threads

Nov 17, 2009

We are developing an application that needs to suspend and resume threads like a debugger (meaning in a non-safe way like Object.wait() and Object.notify()).In the Java SDK the methods Thread.suspend() and Thread.resume() are deprecated but we can still use them. Also there is the Java debugger API which allows one to do that if you connect to the VM as a debugger. Is there some API for android we can use? Is there a published Java Debugger API we can apply for Android?

View 2 Replies View Related

Android :: Pausing And Resuming Tutorial

Apr 7, 2010

I'm having some difficulty figuring out the best ways to pause and resume my application. Is there any comprehensive tutorial or something similar that would help me make sure that I'm not missing any important steps?Mostly I'm just worried about not dealing with the memory being used by my application. There's a few apps I own that when you minimize them slow down the rest of the phone to a stand still and I want to make sure to avoid that.

View 1 Replies View Related

Android :: Resuming Large File Download

Sep 17, 2009

I am trying to implement the functionality to resume a large file download, but have not found how to start downloading from a position that is not at the beginning of an InputStream.I am currently using the InputStream.skip() method to go to the position where I want to resume the download, but have found that this method actually reads all the data over the network and then throws it away.I would appreciate some help in learning the correct way to start reading from the resume offset of the internet file being downloaded, so that I can avoid wasting the phone network bandwidth, and also avoid the extra time delay caused by re-downloading all the data that was already previously downloaded.

View 2 Replies View Related

Android :: Home Button Not Resuming Last Activity

Sep 23, 2010

I am trying to solve an issue sort of similar to what was done here (link text)Except in my case where Activity A, started Activity B, started Activity C, when the user resumes the app after pressing the home button - I want C, the last Activity, to be displayed. Instead what is happening is I am back to A.Also on a side note I have discovered that even when I exit the application, if I hold down the Home button, my app is still listed as an active app even though in the LogCat I can see that it exited OK.Also, in case it matters, I did recently add android:launchMode ="singleTask" in order to make some notification logic work correctly. I was seeing the Home button behavior before that though.

Activity B actually has several Activities that it chooses from (it has a list of Intents) to display based on input it receives but launches them all the same way as Activty A launched B. Once the first Activity is displayed the user swipe the screen to navigate to the left or right screen. When the user swipes left or right, the current activity puts info in its return Intent that Activity B uses to display the next Activity. Also since logic outside of the user's control could prompt a change in the screen displayed, each Activty calls finish on itself in onStop to avoid back-button issues.

View 2 Replies View Related

Android :: Broken OpenGL Texture Output After Resuming App

Jul 28, 2009

I've run into a very strange problem regarding OpenGL texture outputs, which only occurs when the app is resumed (particularly when leaving after pressing Home, and going back into the app).I'm not sure how or why, but it appears to be that it's reading bitrate of the pixels incorrect, or something else entirely. Furthermore, this issue only occurs on the device itself (testing on my G1/Dream), not on the emulator.Code as well as example screenshots in the zip file show exactly what I'm talking about. And to completely replicate the issue I've included the 2D sprite object framework I've developed for OpenGL so the situation is exactly the same as what I've run across when developing my game, so if it's somehow an issue in my framework you may be able to spot it.

View 6 Replies View Related

Android :: Pausing / Stopping And Starting / Resuming Java TimerTask Continuously?

Jan 20, 2010

I have one simple question regarding Java TimerTask. How do I pause/resume two TimerTask tasks based on a certain condition? For example I have two timers that run between each other. When a certain condition has been met inside the task of first timer, the first timer stops and starts the second timer, and the same thing happens when a certain condition has been met inside the task of second timer.how do I pause timer1 while running timer2 and vice versa while timer2 is running? Performance and timing is my main concern as this needs to be implemented inside another running thread. By the way I am trying to implement these concurrent timers on Android.

View 4 Replies View Related

Android :: Allocate Memory To My Application?

Jan 25, 2010

I am getting a "bitmap size exceeds VM budget" error. I have read that there is a 16MB memory limit. In this thread Romain Guy says that "you can only allocate 16 MB of memory for your entire application".

However, my app must be running out of memory long before it reaches that limit. So my question is: how do I allocate memory to my application ... how can I get the allocation to my app increased (within the 16MB maximum)?

View 3 Replies View Related

Android :: Memory Profiling An Application

Jul 7, 2009

How do we profile an android application's memory ?

View 2 Replies View Related

Android :: How To Do Memory Profiling For An Application

Oct 4, 2010

Can you please tell me how can I do memory profile for an android application? I want to find out how are the objects created and where did those created.

View 1 Replies View Related

Android :: Why Application Has Less Heap Memory Than Others?

Nov 18, 2010

My question may look naive but I do not know how to formulate it more correctly. The problem is that I create and use large simple type arrays in my application.

And I get errors like: ERROR/dalvikvm-heap(1763): Out of memory on a 7907344-byte allocation.

Yes, it's big enough but task management tools claim that my application is using only 30MB of memory, while other at the same time use 50MB and even 110MB (have seen once) and there is still 190MB of free memory in the system (not system applications, just other ordinary applications I have installed). If all applications are provided with the same heap size at startup how can they grow so big?

View 1 Replies View Related

Android :: Application Download On Device Memory

Oct 8, 2010

I was trying to download application from OTA server on my device but fails as SDCard is not present in it.Is it possible to download application in device memory?

View 1 Replies View Related

Android :: Memory / Resource Leak With Application

Nov 24, 2009

I am experiencing a memory / resource leak on a T-Mobile G1 device with my application. I installed the "Task Manager" application from Android market and my memory usage is not monotonically increasing. It stays relatively flat over time. Furthermore, none of the other processes are chewing up tons of memory either (really, I can get into this state with just my app running). I am not experiencing this problem on any of the other Android phones (including Eris, Hero, and Droid).

The interesting thing is that if I kill my application, the phone is *still* very slow and sluggish. The only thing that seems to be able to get me out of this situation is a battery pull. If I run my application for about 3 hours, the phone starts to become very sluggish. Even simple operations like hitting the "home" button take many seconds. I'm not sure what to do at this point and am wondering where I can go from here.

View 3 Replies View Related

Android :: Calculates Memory Usage Of Application?

Sep 4, 2009

I have an application in Java-side, and it uses some "SO" files in native-side. How to calculates the memory usage of my application, in Java-side and native-side both? Does Android provides toolkit to calculates the memory usage of application?

View 5 Replies View Related

Android :: Application Memory Usage Monitor

Jun 8, 2010

I am trying to get the memory usage for every application at different periods of time. I have checked the docs / threads / forums, and i only found that you can get the total available memory value, but i could not find in the sdk an api call for getting the memory used by a single application. I know that one way to do this is by reading the values from /proc/ <pid> virtual file system but this is painful for the device cpu. Can you help me figure out how to solve this problem ? Or does anyone know how settings -> applications -> manager applications read the memory usage values.

View 2 Replies View Related

Android :: Discover Memory Usage Of Application?

Feb 19, 2010

how I can find the memory used on my Android application, programmatically. I hope there is a way to do it. Plus I would like to understand how to get the free memory of the phone too.

View 3 Replies View Related

Android :: What Is Maximum Memory Limits Per Application?

Aug 28, 2010

What is the maximum memory limits per application for Android 2.2?

View 3 Replies View Related

Android :: Memory Limit 16 MB Per Process Or Application?

Aug 5, 2010

Is android's memory 16MB limit per Process or Application? If the limit is by process, I can make some services remote. That means the service will be in different processes, and the limit will be 16 x N.

View 3 Replies View Related

Android :: Application - Activity's Memory Management

Mar 1, 2010

I have a problem with my application, and it's about a Virtual memory error: ERROR/AndroidRuntime(19790): java.lang.OutOfMemoryError: bitmap size exceeds VM budget

The story is like this: I have an activity (let's call it A), the user click on a button from this activity, then i will make an api call somewhere in the internet, and after the result is back i start a subactivity (let's call it B).

In the activity B i have to dinamicaly load some images from the resources folder. I load the images into bitmaps -> drawables -> imageviews. After the user click's on some buttons i have to setResult(..), finish(), and get back to activity A.

The thing is that, goes from activity A to B, then B -> A, then A -> B for a few times, my app crashes with the message above: it doesn't have enough memory to load the interface.

I can not maintain the activity B on the stack because i don't want the user to go to this activity without going through activity A first.

View 2 Replies View Related

Android :: Memory Profiling For My Phone Application?

Apr 13, 2010

I have a requiirement of finding out the max RAM usage of my application. I tried installing the Memory Profilers in eclipse but I was not able to use it with my application. Please let me know how can I find the RAM usage of my application on the 'emulator'.

View 4 Replies View Related

Sprint HTC Hero :: Downloads Getting Interrupted And Not Resuming With Dolphin Browser

May 1, 2010

I like to download podcasts to my hero which can take a while because they're pretty big files. If I get an email or text while downloading it pauses my download and says waiting for data connection. The same thing happens sometimes when it bounces from WiFi to Ev. The only way I can get it to start downloading again is to start another download. This is annoying so does anyone know a better way to resume a download or is there some setting I can change?

View 1 Replies View Related

Android :: Transfer Application Internal Memory To SD Card

Oct 17, 2010

Does anybody know how to transfer apps from internal memory to the sd card?

View 4 Replies View Related

Android :: Memory Usage Profiling OpenGL Application?

Aug 23, 2010

How do I find out how much memory my openGL application is using at any given moment, including sounds, textures, and everything else? I've been wrestling with DDMS for hours and all it seems to show me is basic object allocation counts. I must be missing something, but I haven't had any luck searching. LONG VERSION: I've got an otherwise operational beta Android game which crashes out after a while on my device (Droid X). I'm fairly sure my problem is that my textures are not being properly cleared from memory. I'd like to confirm this fact before I start blindly making changes. My game does fairly frequent level transitions. During these transitions I typically dump a texture file, wait a bit, then load a new one.

Over time the application performance degrades. After 10 or so transitions frame rate starts to take a nose dive. 10 or so more and it usually dies. Prior to dying I see log messages like this: 08-23 12:26:58.038: DEBUG/Cursor(1265): fillWindow is not executed because Cursor object is closed. 08-23 12:27:27.186: INFO/ActivityManager(1239): Low Memory: No more background processes. And then eventually: 08-23 12:27:46.952: INFO/ActivityManager(1239): Process com.thup.lunchbox (pid 4927) has died. There are no specific error messages of any sort. I've got lots of ideas for things to try to fix this (e,g, glDeleteTextures), but I really want a way to measure before I start trying to fix.

View 2 Replies View Related

Android :: Application Uninstalled Resulting Loss Of Memory

Feb 14, 2010

Ive had an HTC G1 and I now have the Samsung Behold II. Theres a problem I've noticed on both phones. Lets say I have 60mb of flash memory and I download an app that is 5mb. That would put me down to 55 if my 2nd grade math serves me correctly. Now if I were to uninstall this app, my phone will only go back up to 58mb. Even after restarting the phone 10 times, taking the battery out or doing whatever, it remains at 58mb of memory.

I want to know why does this happen? And is there any way to recover that lost storage? I just find it a bit crappy management of memory. Because this problem can be more drastic, I downloaded a 20mb app which sucked balls, to which I quickly uninstalled. I only got 12mb of the 20 back. Thats 8mb lost somewhere. Again, I'm looking for at the very least an explanation

View 18 Replies View Related

Android :: Clear Cache Memory When Application Exits Programmatically?

Aug 31, 2010

I have set of images fetched from internet and set it on gridview,here i have option to click here to view more,below the grid view and it fetches images and set it on grid with prevoius set of images,when i exit the application and run it again,the previous set of images remain in cache and grid shows images from cache,here i need to clear my application cache memory,when i exited my application.how can i get it.

View 1 Replies View Related







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