Android :: Detecting Memory Leaks In Android

Sep 22, 2010

How to detect Memory leaks in Android JNI code? I am using Froyo

Android :: Detecting Memory leaks in Android


Android :: Will Code Cause Memory Leaks?

Aug 3, 2010

Will the code cause a memory leak? Essentially I switch between various layouts in my application using setContentView(), and I have member variables of my activity that maintain references to various views (buttons/text views) on the layouts. Am I correct in thinking that if the activity class has a reference to a button and then changes layouts the layout wont be garbage collected because it will still hold a button reference? If this is the case, can I just null the button variable before changing layouts?

View 3 Replies View Related

Android :: How To Find Where Memory Leaks In Activity?

May 20, 2010

When start Activity A, I found the memory usage of application is about 5MB. Then start Activity B from A via startActivity. In Activity B, I created a thread, and traverse file system in this thread, after traversing completed, call finish() and to return to Activity A. At this time, I found the memory usage of application is about 8MB (GC is forced before check memory usage). How to find Where memory leaks? By the way, I checked the memory usage with DDMS.

View 5 Replies View Related

Android :: List View And Memory Leaks

Oct 23, 2010

I have a very simple application which has a problem with getting ListViews to be freed by the GC. i have a ViewGroup which has a ListView. When the page with the ViewGroup no longer has any references to it, and I force a GC, the ListView is not freed. The project in question is quite small and can be found at http://gabysoft.com/download/MemoryLeak.zip. If you run it, the first page has a button and a ListView (which has no items so you cannot see it). When you press the button it switches to a second page which has just a button. When you press the button on the second page, it creates a new ViewGroup and ListView and sets that as the current view. Thus, every time you switch pages, a new ViewGroup/ListView is created, and all references to the old one go away. Hence the old one should be GC'd. However if you switch views 20 times and then force a GC you will see that the ListViews are never freed (i.e. their finalize method (which is logged) is not called). Now here is the really weird part. This happens ONLY if I build my project using Eclipse. If I use Ant to build and install the project, the ListViews are all freed when I do a GC as you would expect. Why would the Eclipse version exhibit this behavior?

View 7 Replies View Related

Android :: Memory Leaks With List View

Oct 20, 2010

I have a class 'GListView' which extends ListView and acts as it's own adapter. It is declared thus: public class GListView extends ListView implements List Adapter In it's constructor, I set it's adapter to itself

View 2 Replies View Related

Android :: Register Callback Leaks Memory?

Mar 5, 2010

I was trying to find out were my apps memory was being leaked and was able to discover that when calling registerCallback(...) it would lead to a memory leak after a screen orientation change. What could be some possible things that are causing the leak? I've tried many things. And I do have a unregisterCallback(..) call.

View 20 Replies View Related

Android :: References To A Context And Memory Leaks

Jul 27, 2010

I've read that it is a mistake and a source of memory leaks in Android application to keep a long-lived references to a Context.

But I don't understand if it is ok to create an class that looks like this one:

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

And call it from an Activity:

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

View 2 Replies View Related

Android :: 'Avoiding Memory Leaks' Article In Blog

Apr 10, 2010

I just read the article 'Avoiding memory leaks' in android blog written by Romain Guy. http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.

View 4 Replies View Related

Android :: Trace Memory / Window Leaks In Droid?

May 17, 2010

How to trace the Memory Leaks in Android Development? I am working on eclipse IDE to develop the application. i cant find out how to rectify the memory or window Leaks Exceptions? Any Idea.

Mainly the Window Leaked error raises the Illegal Argument Exception? how to rectify both og this.

View 1 Replies View Related

Android :: AppWidgets - Reusing RemoteViews Instance Leaks Memory?

May 21, 2009

I'm writing a widget. Currently, I'm have a simple ImageView, and calling RemoteViews.setImageViewBitmap(). I'm using a service to do the updates.

I thought it might be a good idea to reuse an existing RemoteViews instance, so I'm only querying it the first time around, and subsequently simply call setImageViewBitmap() with the new image.

This works well initially, but after some time I first start getting "!!! FAILED BINDER TRANSACTION !!!" errors, and later, an OutOfMemory exception.

Simply creating a new RemoveViews instance every time works flawlessy on the other hand. I'm just curios why that would be, any ideas?

View 2 Replies View Related

Android :: Android Tools And Methods Work Best To Find Memory - Resource Leaks

Jul 18, 2009

I've got an Android app developed, and I'm at the point of a phone app development where everything seems to be working well and you want to declare victory and ship, but you know there just have to be some memory and resource leaks in there; and there's only 16mb of heap on the Android and its apparently surprisingly easy to leak in an Android app.

I've been looking around and so far have only been able to dig up info on 'hprof' and 'traceview' and neither gets a lot of favorable reviews.

What tools or methods have you come across or developed and care to share maybe in an OS project?

View 3 Replies View Related

General :: How To Find Which Apps Cause Memory Leaks

Apr 22, 2013

Any user friendly android app which can effectively show which apps cause memory leaks on a phone?

I can only find developer tools to detect memory leaks within apps like Eclipse MAT. Sadly I'm not a developer so I would rather prefer just a list of apps to uninstall and not the exact cause of memory leak within a specific app.

View 6 Replies View Related

Android :: Android Application Memory Leaks

Dec 23, 2009

I am using kind of results search engine, problem is to remember the searching criteria i made singleton static class which keeps only one instance.In my application there are lots of class level private variables, lots of public static variables, a big util class which contains only static final methods.problem is my application get crash any time any where any spot and interesting thing is crash code always surrounded by try{} catch(Throwable e){} block but never catch, i think it may be memory full issue. I want to discuss one sample case, on the result page i also display result related image, i download image from web and using drawable i place image in the imageview, i created static hashmap to reuse images, some time after downlaod 5 images application crash some times click on a result get user to new detail screen get crash and all code surrounded by try catch block, i am new to mobile program this thing has become night mare to me. Last thing, On emulator hardly application crash but when i try to test the application on device, i am using samsung glaxy android supported to test the application it goes smoth and suddenly it start getting crashed, and after crash android relaunch the activity that throws null pointer exception on every click and caught by try{}catch{} block i think after crashing android dealocate all objects only keep the UI objects thats why when after crash i auto launch the activity clicking causes null pointer exception.how can i stop relaunching crashed activity?

View 1 Replies View Related

Android :: How To Identify Memory Leaks In Android?

Aug 12, 2010

I have developed a simple application before testing it i want to check whether any memory leaks are there in the application. I don't know how to identify the leaks in Android. I am using Eclipse IDE for development. Is there a good introduction into finding memory leaks in Android apps somewhere?

View 2 Replies View Related

Jelly Bean :: Memory Card Not Detecting When Connecting Via USB?

Mar 14, 2014

I have been facing this issue from two days, whenever ii try to connect my android device via USB to PC...memory card is not detected and when i disconnect it and try to access card on phone i am unable to do that.

And when i restart my device everything is fine, and when connect it everything goes same as mentioned above.

View 2 Replies View Related

General :: Internal Memory (SDCard) Not Detecting After CyanogenMod

May 3, 2012

I followed this simple steps [URL] ..... and installed cyanogen mod on my samsung vibrant.

The problem i am facing is that its not detecting my internal 14GB memory.

When i go into clockwork recovery mod, there i am able to mount my memory and its visible in my pc.

How to make it usable in phone?

I tried with different cyanogenmod rom's nothing make the sdcard (internal memory) detect after phone starts.

One thing is its not cracked, because i am able to access it from recovery when i mount the usb storage using clockworkmod, it displays the contents in computer.

Also I was thinking if can i use external SD card to save my camera pictures ? It does not have camera menu options as storage location.

View 2 Replies View Related

Motorola Droid :: Where Are RC 2.2 Leaks?

Jun 19, 2010

Is it just me, or does it seem like it's been, what, a couple months since the last Froyo RC leak? Ok, maybe more like several days, but aren't you guys starting to jones hard for a newer 2.2 leak? When the first couple came out so quickly one after the other (along with the multiple new baseband versions) it seemed like it was going to be raining Froyo leaks (that sounds odd, doesn't it?) on an almost daily basis. I'm running well on BB Froyo v.2.0 plain vanilla, but looking forward to the next 2.2 RC to stumble out of Moto/Verizon's castle so we can continue the informal beta testing for them.

View 15 Replies View Related

Android :: Detecting Where Has Been Touched

Jul 7, 2010

I have a single bitmap with several individual pictures in (each one is an option) and I would like to detect when the user touches these pictures. I am using the event.getX and event.getY to detect where is pressed, I know the top left X Y and bottom right location of each of the pictures. What is the best way of detecting which one is pressed? (i.e. tieing up the event press and which picture has been pressed?

View 2 Replies View Related

HTC Droid Eris :: New Hboot For 2.1 Leaks

May 23, 2010

I have been messing with my eris. I held the power and send button and as usual it checked the leak file and asked if I wanted to update. At this time I noticed a list from one to four., one thing that was listed was bootloader and another was hboot My question would there be a way to get into the 2.1 leak file and some how switch the hboot and bootloader in it with the hboot and bootloader that is on the official ota file or some other jnoot or bootloader. Then convert it back to a zip file and reinstalling it like out was a v4 leak. Sorry if this was a stupid post but just trying to help leak users or devs brainstorm a little.

View 5 Replies View Related

HTC EVO 4G :: Light Leaks On Ebay Phone

Jul 2, 2010

I bought an EVO off of Ebay about a week or so ago and just noticed my light leakage is getting pretty bad. I have sprints insurance on it so I was wondering a few things.

1. Will it be a pain to turn it in for a new phone, and what do I have to pay to do so...I'm guessing they will send me a new one then I'll mail mine back to them>?

2. Would it be the smarter thing to do to wait just a little bit to see the new builds? I'm using a 0003 with a nova screen.

View 4 Replies View Related

Android :: Detecting Hardware Capabilities

Jun 3, 2009

There are return values and such that allow handling if SensorManager sensors and location providers aren't available, but what about the camera and microphone for audio recording? Is there a way to detect those in software, or are we just to assume that every device running Android (even the rumored set-top box) is going to have a camera and microphone and try to use them?

In the case of the camera, it would seem that Camera.open() returning null would indicate the lack of hardware. I don't know if that assumption is valid or not, though, considering it isn't documented as such.

In the case of the microphone, though, I don't see anything that could possibly be checked. The same goes for the camera if you're wanting to do video with the MediaRecorder class.

View 2 Replies View Related

Android :: Detecting When Launched By An Alias

Sep 2, 2009

I'm trying to figure out how my Activity can detect if it was launched by an alias as opposed to by the main icon.

Is it possible to do this?

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

alias1 and alias2 appear as expected in the Launcher, but I don't see any way in multipleEntryPointTestActivity to tell which of these icons launched the application.

View 2 Replies View Related

Android :: ScaleGestureDetector Not Detecting Gesture End

Oct 31, 2010

I have hooked in a ScaleGestureDetector to an OnTouchListener as instructed in Android documentation. For some reason the ScaleGestureDetector does not always detect end of a pinch gesture. This happens mostly when pinching fast from large to small.

The effect is that after I have released both fingers the detector does not fire the gesture end event. If I touch the screen with one afterwards it still thinks I'm continuing the scale gesture (keeps firing onScale events). I have to do another gesture to get the detector to fire end event.

I have added logs to the OnTouchListener and when the scale gesture gets stuck I still get motion events normally when using one finger and event.getPointerCount() is 1.

I have made sure that I don't have any other listeners intervening. View that has the onTouchListener is not the only view on screen but this effect happens also when I'm very careful to begin and end the gesture inside this one view.

Is there any way to improve the end detection?

Or if there a way for me to manually set the ScaleGestureDetector to fire onScaleEnd and change scaleGestureDetector.isInProgress() to false?

View 1 Replies View Related

Android :: Detecting Which Drawable Folder Was Used

Nov 26, 2009

Is there a way to detect whether a image was pulled from the folder res/drawable or res/drawable-hdpi?I am trying to save space and have a program that is using some hdpi bitmaps and some mdpi bitmaps. When an image is placed in drawable-hdpi it automatically replaces the mdpi version. I need to know when this happens beacuseI am using bitamp.resize() to fix the image sizes.The problem is that the getDensity() method (in the if statment after the && ) returns the screen density and I need the original bitmap density. This allays matched the screenDPI and returns false. I have a lot of artwork and do not want to duplicate everything for every size screen. I am trying to just create hdpi bitmaps for the ones that don't look good when re-sized.

View 2 Replies View Related

Android :: Need Detecting Area Code

Oct 20, 2010

I'm trying to find out if the user is still within range of his own area code. Detecting roaming doesn't solve the problem since the user may still be in the same network with a different area code. I thought about getting the user's coarse location to find the city he's is in but this approach needs Internet access and might not be fast enough (this is done as the user is making a call and needs to finish before the call is made). Is there any way I can do this with just the info from the cellular network?

View 7 Replies View Related

Android :: Detecting Outgoing SMSs

Jun 6, 2009

I am writing a Security-oriented application for Android that is supposed to detect abuse of SMS sending.

In my work I encountered the problem of not being able to detect outgoing SMSs sent not through the use of conventional applications, i.e. merely by using SMS Manager's sendTextSMS method.

The conventional SMS applications add the contents of the sent SMS to the SMS Provider after they send it but I can assume that malicious applications will not do that... and neither will they provide the pending intents to the sendTextSMS method to be broadcast upon sending/ delivery.

My question is, is there any way I can detect the sending of the SMS without relying on the SMS provider?

View 2 Replies View Related

Android :: Detecting When Outgoing Is Accepted

Oct 16, 2010

As far as i know there is no way to detect when an outgoing call is accepted at public API level. I can detect incoming calls (with PhoneStateListener), outgoing calls by NEW_OUTGOING_CALL intent, but i can not find a way to distinguish the dialing and connected phone states.

View 4 Replies View Related

Android :: SQLite - Detecting Limit Hit?

Oct 11, 2009

I have an SQL which uses something like "LIMIT 100". If the cursor returns 100 rows, is there an efficient way of distinguishing between whether the LIMIT caused it or not? I suppose I could just call LIMIT 101 instead but I was hoping for a nicer way.

View 2 Replies View Related

Android :: Detecting Incoming Calls

Aug 27, 2010

I was trying to come up with an app that works on the call that a user gets on his phone. For this I wanted to know whether it is possible for me to get intimated when a call comes to the phone and is it possible to intercept the same.I tried to go through quite a few forums but could not get conclusive evidence on how to achieve this.Does anyone have an idea whether this is feasible and if so then how?

View 2 Replies View Related

Android : CTS Not Detecting Device After Restart / Way To Fix

Feb 18, 2010

I am testing an android device with eclair using the 2.1 CTS version. When CTS completes a set of tests and restarts the device a "device disconnected" messages appears on the CTS console. However after the device completes the restart to the android home screen CTS does not detect that the device is back online. I have to physically disconnect the USB cable and re-connect it. Do you think this is a device side issue or a USB driver issue on the Ubuntu machine (intrepid) where I am running the CTS?

View 2 Replies View Related







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