Android :: Eclipse MAT Does Not Appear To Show All App's Objects / How To See It

Feb 4, 2010

I have created an hprof file by inserting the statement Debug.dumpHprofData("/sdcard/myapp.hprof"); in my app's code; I have then run the hprof file through hprof-conv and opened the converted file in Eclipse.

Following the advice of the MAT "Cheat Sheet" I have obtained an analysis of my app's memory usage by going to "Leak Identification -> Component Report" entering "com.prepbgg.*" and hitting Finish.

I know that my app is consuming large amounts of memory: in particular at the stage where I called dumpHprofData it had a one megapixel bitmap object and a canvas that must have consumes several hundred KB. (I also suspect that it is leaking significant amounts of memory because performance degrades severely after the screen has been rotated a few times.)

However, the Component Report for com.prepbgg.* shows total memory of only 38.7KB. The Histogram view shows for android.graphics.Bitmap (presumably this is the total of all apps including mine) 404 objects and Shallow Heap 12,928. Is that 12,928 bytes?

Clearly, my app consumes more than 38.7KB and the Bitmap far more than 12,928 bytes. Where am I going wrong? How can I see the total memory consumed by my app?

Android :: Eclipse MAT does not appear to show all app's objects / How to see it


Android :: Pass Objects Around Activities Using A HashMap Of WeakReferences To Objects?

Oct 26, 2010

The FAQ mentions a method of passing objects around activities. (It is not clear to me): "A HashMap of WeakReferences to Objects. You can also use a HashMap of WeakReferences to Objects with Long keys. When an activity wants to pass an object to another activity, it simply puts the object in the map and sends the key (which is a unique Long based on a counter or time stamp) to the recipient activity via intent extras. The recipient activity retrieves the object using this key.".................

View 7 Replies View Related

Android :: How To Filter Objects To Display Onscreen Objects On Map?

Jun 15, 2010

I have an application that have a Google map on Google Android 1.5 since we have been working on the application for a long time, we are not in stage of upgrading to the newest framework, so we are using 1.5. Now, I have map locations that are dynamically generated and drawn on the map at run-time to visualize some streams, Up to this point the application is working fine, Now my problem is that I am trying to filter the objects ( addresses) to visualize only the on-screen ones. I do NOT want to visualize the addresses that are off-screen. The way I am trying to do this is to check the screen-coordinates of each object (address) before visualizing it, then it the coordinates (x,y) more than (0,0) and less than (320, 460). I should visualize it. I am trying to use this approach, but it is not working for some reasons, I have tried many posts but could not understand why, there must be something missing somewhere that I am not aware of.

View 11 Replies View Related

Android :: ADT Plugin Doesn't Show Up In Eclipse

Sep 16, 2010

I'm using Windows 7 and installed the 64 bit version of Eclipse 3.5.2. I then installed the Android ADT plugin, but when I try to configure it in the Windows > Preferences dialog, the Android Plugin doesn't show up in the left pane. Instead I see DDMS. This prevents me from specifying the location of the Android SDK (unless there is another way) to give me the appropriate templates and such.

View 1 Replies View Related

Android :: Get HTC Eris To Show Up As Device Target On Eclipse 3.5 Running On Mac OS X?

Feb 16, 2010

My Motorola Droid shows up just fine in this configuration and appears as a deployment target. Works like a snap. How do I get the HTC Eris Droid to show up as a deployment target? Is there some special driver needed for the Eris?

View 1 Replies View Related

Android :: Not Able To View SDCard Folder In FileExplorer Of Droid Eclipse / Show It?

Sep 29, 2010

I am not able to view SDCard folder in FileExplorer of DDMS in Android.
But I was able to view SDCard folder when I used adb command from command prompt like below:
androidsdk ools>adb shell
$ ls
I am able to view list of folders when I typed ls in which I can see sdcard folder from the list of folders .my doubt how can we view the sdCard option in Eclipse using FileExplorer.Also I want I want to delete or insert some files in sdcard.How can this be possible for me.can anyone hel me in sorting out this issue.

View 1 Replies View Related

LG Spectrum Won't Show Up In DDMS Or Eclipse

Jun 25, 2012

I just upgraded from my old Droid X to a LG Spectrum.

Now whenever I connect it to USB, for some reason it won't show up in DDMS or Eclipse. I downloaded the USB driver from LG, and tried every kind of USB mode on the device. And yes I have USB debugging on.

View 2 Replies View Related

Eclipse Doesn't Offer To Add Import Or Show Functions

Jan 28, 2012

Somehow I've screwed up my Eclipse installation. Used to be if I added a new instance of an Android object (say a TextView) and I right clicked on the error, it would offer to add the import. Also if I had an Android object and typed it followed by a period, it would show me all the allowed functions. Now it doesn't do either, just shows me java info. Don't know what I did, since this used to work. I updated everything, but still no joy.

View 6 Replies View Related

Android :: Show Method Definition - Eclipse Recognizes Warning On Method

Nov 22, 2010

In Eclipse, when I mouse hover over a built-in method, it displays a method definition including stuff like what the method does, input objects, return objects etc. If I have a yellow line (warning) under the method I'm trying to use, I can't get the mouse-over to show the definition. If I try hitting F3, I get a "The Jar of this class file belongs to container "Android 1.6" How do I show the definition of the method I am using when there is a warning?

View 1 Replies View Related

Android :: How To Manage Objects ?

Sep 8, 2010

I am new to Android development. I want to know how you all manage objects. For eg we make object as A a = new A(); and then manage that object. But, here, we call A.class; My concern is that i don't want to call on Create(),nor do i want to push UI screen I just want to make 1 static object for 1 screen;and want to manage it throughout my application. that is, instead of calling A.class; can i call A a = new A(),and manage that object without pushing,and whenever i need i push that screen. Is there someway?

View 1 Replies View Related

Android :: Passing An ArrayList Of Objects

Nov 12, 2010

Is there a way to pass an Array List of objects between activities? The myObject implements Parcelable and I'm able to successfully pass the objects around individually, but that means I need to have an exact amount of "myObjects" coded. I want this to dynamically grow/shrink by what the user does with the app. I have seen some posts on the web about doing:

Activity A
ArrayList<myObject> myObjArray = new ArrayList<myObject>();

Then when passing this into the intent I would use:
intent.putParcelableArrayListExtra("myObjArray", myObjArray);

Activity B
ArrayList<myObject> myObjArray = new ArrayList<myObject>();
Bundle extras = getIntent().getExtras(); myObjArray = extras.getParcelableArray("myObjArray");

However, the myObjArray always gets filled with "null". How can I achieve this?

View 3 Replies View Related

Android :: Pass Objects Between Two Activities?

Aug 30, 2010

I want to pass an object from Activity B to Activity A. Scenario:
- Activity A calls Activity B
- User selects item in Activity B
- Activity B passes an object to Activity A

How do I accomplish this? And in which method do I read in the passed object in Activity A?

View 2 Replies View Related

Android :: Persistance Of Dynamic Objects

Aug 7, 2009

I am new to this android stuff and SQLlite etc.I am going to log some numbers at a certain interval, and will put them into a dynamic histogram, by dynamic i mean that there will be a maximum number of samples in the histogram, the histogram and age stuff should be persisted either in db or plain file.For simplicity, I would like the samples to be stored in a blob type datafield, but i cannot se if this is possible. Alternative i could have another table with the samples Or I could simply have files with filename = name and content = samples.my concern might be unclear by now, but put simply, what is most effecient regarding power usage?

View 3 Replies View Related

Android :: Storing An Array Of Objects

Mar 31, 2010

I have an array of 5 Timer objects in my app, some of wich have been scheduled with a TimerTask. I need to be able to store and load these 5 Timers; is there a way to save Objects? Maybe storing the address of the array would be enough? How could I do that?

View 8 Replies View Related

Android :: How To Draw 3D Objects On A MapView?

Oct 20, 2009

I have been able to draw a map using 'MapActivity' class. Am unable to render 3D graphics on the Map. Is there any way to draw something on the foreground with the Map as the background?

View 2 Replies View Related

Android :: Getting Current On Screen GUI Objects

Mar 19, 2009

Is there any way for an Android application to retrieve some sort of Collection object that contains references to all of the GUI elements which are currently on the phone's screen? This could be very useful for testing purposes and so on. If I have overlooked a well-known class or library, please let me know.

View 3 Replies View Related

Android :: How To Add Objects To Sqlite Database?

Nov 18, 2009

I have a class like class My data{ String name; int data; Location[] locality.

View 8 Replies View Related

Android :: How 3D Objects Get Touch Events?

May 31, 2009

I am writing a game using OPENGL, there are several 3D objects in my surface view. My question is: Should each 3D object implement view in order to get touch events? Or there is other way to do this?

View 5 Replies View Related

Android :: Writing Objects From Thread

Jul 22, 2010

I have a game object that I save like this in OnPause()try {final ObjectOutputStream os = new ObjectOutputStream(openFileOutput(gameName + ".sav", 0)); os.writeObject(gameObject); os.reset();} catch (final Exception e) {e.printStackTrace();This works fine except on some of the older or slower phones it can sometimes take too long to complete. I end up getting a ANR (Activity Not Responding) error. I would like to move this to a thread to prevent blocking the UI. However when I try this I run into multiple problems.First openFileOutput is only available in my activity. I worked around this by passing the ObjectOutputStream to the thread. After that I could save the object but later when I tried to reload I get a java.io.EOF Exeception. does anyone have a good pattern for writing objects to a file from a thread?

View 1 Replies View Related

Android :: How To Send Objects Through Bundle?

Nov 22, 2010

I need to pass a reference to the class that does the majority of my processing through a bundle. The problem is it has nothing to do with intents or contexts and has a large amount of non-primitive objects. How do I package the class into a parcelable/serializable and pass it to a startActivityForResult?

View 4 Replies View Related

Android :: Correct Way To Add Objects To An ArrayList

Aug 19, 2010

I am trying to add an object to an arraylist but when I view the results of the array list, it keeps adding the same object over and over to the arraylist. I was wondering what the correct way to implement this would be.

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

I have double checked my JSONArray data and made sure they are not duplicates. It seems to keep adding the first object over and over.

View 2 Replies View Related

Android :: Pass Objects From One Dialog To Other

Oct 27, 2010

I am trying to design an activity in Android which consist in a ListView with a button to add items to the List.

When the button is clicked, it opens a chain of Dialogs to configure the new item (each Dialog configures one attribute of the item Object). When the last Dialog is validated, the item is added to the list.

I was thinking of creating a new item Object when the first Dialog opens and using a setXXX() method on each Dialog validation to configure the object, but how am I supposed to pass the object from one Dialog to another?

I got it working using final objects, but it doesn't look clean to me at all. Plus I would have liked to use the activity Dialog manager methods such as onCreateDialog() and showDialog() to manage the Dialogs.

What is the cleanest way to do this?

View 1 Replies View Related

Android :: Eclipse Download Link At Https://dl-ssl.google.com/android/eclipse/ Broken

Jun 22, 2010

I want to get started with an Android application but can't download the plug-in.

Anyone know where else I can get this?

View 3 Replies View Related

Android :: Bundles And Serializable Objects - What Is Actually Stored?

Mar 24, 2009

was wondering about the behavior of Bundles and serializable objects. If I put a serializable object into a bundle, what is serialized then, the reference to the object or the object itself? I always assumed that the object itself would be serialized to a byte stream when calling putExtra() and re-created from that representation when calling getSerializableExtra(), but I recently stumbled upon a piece of code that put an entire view into a Bundle in thread A, retrieved it from that bundle in thread B, performed a modification on it and this modification actually became visible. This can only happen if the reference to that view was stored, not the view itself, right? Otherwise, the modification had been applied to a copy of that view and would be meaningless.

View 3 Replies View Related

Android :: Pass Complex Objects Between Activities

Oct 18, 2009

I am trying to pass a user defined object to another activity Bundle bundle = new Bundle(); bund.putSerializable("myData", myData); intent.putExtra("bundle", bundle); where myData class implements Serializable interface. I am getting following error: java.lang.RuntimeException: Parcelable encountered IOException writing serializable object how to pass complex objects between activities?

View 7 Replies View Related

Android :: Unmarshalling XML Files Into Java Objects

Aug 29, 2009

I'm making use of an API on the internet that is marshalling objects to XML files. Given that the XSD files are also available I'd like to be able to unmarshall them back in to Java objects once I've downloaded the files.After looking around it looks like JAXB is the default library for doing this in Java, but as I'm developing a mobile app the extra 8.6MB dependency just isn't acceptable. I also found XStream, but it still weighs in at 7.9MB.Poking around the Android SDK it looks like the only real XML parser available is SAX.

View 6 Replies View Related

Android :: How To Drag Marker Objects In A MapView?

Jun 4, 2009

Hey Is it easy/possible to drag marker objects in a MapView?

View 10 Replies View Related

Android :: Sharing Domain Objects Between Activities

Jan 11, 2010

I have written my application logic in domain objects (to enable multiple user interfaces and porting to other platforms), and am now lookng at implementing Activities for the user interface.

Considering that each activity needs to serialise its state, what is the best way to ensure my domain objects are only serialised once?

View 1 Replies View Related

Android :: Download Multiple Objects From Same Server

May 5, 2010

How can I utilize Connection: Keep-Alive option, re-use connection and download multiple objects from the same server? HTTP connection consists of opening a socket, sending request and then readign response. For Keep-Alive option open the socket connection needs to be done only once. However I could not find in Android Java classes how this can be accomplished. URL.openConnection returns new instance of HttpURLConnection implementation for every request so HttpURLConnection cannot be cashed for reusing on multiple requests to the same server, URL object is also new for each request and also cannot be reused.

View 2 Replies View Related

Android :: Parse Data - Multiple Objects

Oct 29, 2010

i need to parse this response in android using the android json parser but the thing i cant find the answer to anywhere is: how do i parse the data if for example "itineraries" can contain one or sometimes more objects of the type itinerary? if it contains one than it is returned like this but if it contains more it is returned with [] with this example "itinerary" cannot be placed into a JsonArray becouse obviously it is not an array. (not placed in [] right?)

how do i parse this? any examples?
{
"plan":{
"date":"2010-10-20T00:00:00+02:00",
"from":{
"name":"Булевар Партизански Одреди",................

View 1 Replies View Related







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