**** BEGIN LOGGING AT Sun Mar 01 02:59:57 2009 Mar 01 03:02:57 say i wanted to execute a local binary on the system from an dalvik application, what java library/call can do it ? Mar 01 04:02:50 wmealing_: you can't Mar 01 04:05:44 hey romainguy, I recall you saying your UserTask class was added to the API during one of the updates. do you know where I can find that? Mar 01 04:05:52 it's un cupcake Mar 01 04:05:58 and it's called AsyncTask Mar 01 04:07:43 thanks, I remember you mentioning it but I forgot it was included in cupcake. guess I'll have to wait to use that Mar 01 07:56:16 ddms shows my app's heap size at under 4megs. I keep getting logcat errors indicating that I can't allocate things in the 1-2 meg range, though. Shouldn't the VM increase my heap size before an allocation fails (up to the 16meg limit, of course)? Mar 01 07:58:03 Or is it that DDMS doesn't show all of the heap that my application is actually using? I don't see, for example, allocations for my relatively large drawables that I know exist. Mar 01 08:07:39 DDMS might not be showing the native memory usage Mar 01 08:07:44 which includes bitmaps Mar 01 08:18:36 I'm having a hard time figuring out where my memory usage is going. I do some Drawable.createFromStreams, and some loading of drawables into views, etc. Occasionally I get an outOfMemoryError. Right now I'm swallowing them and moving on to the next image which seems to work. I can often load a larger image right after a smaller one fails. Mar 01 08:19:05 Is there a better method/tool of debugging where my allocations are happening, what I'm holding onto (via drawable refs back to views, etc) and where things are being freed? Mar 01 08:19:23 if you run DDMS, the standalone version, not the one in Eclipse, you can use the memory allocation tracker Mar 01 08:19:40 ah. I didn't know there was one outside eclipse. Mar 01 08:19:41 you can also search the Android groups for messages from Andy McFadden Mar 01 08:19:54 he explained how to dump the heap Mar 01 08:20:02 and analyze it with tools like hat, MAT, etc. Mar 01 08:20:27 awesome. Thanks. Mar 01 08:20:56 it could very well be that you are holding onto a Context for too long somewhere Mar 01 08:21:15 that usually makes you leak (temporarily or not) all your views and resources Mar 01 08:21:33 http://android-developers.blogspot.com/2009/02/track-memory-allocations.html Mar 01 08:21:35 and Mar 01 08:21:41 http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.html Mar 01 08:23:23 I've been using getApplicationContext for anything I think will be hanging around for any amount of time. Is that Bad? Mar 01 08:23:52 cryptyk: Use SharedPreferences Mar 01 08:24:32 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); Mar 01 08:25:47 cryptyk: it depends, it can actually be bad Mar 01 08:25:58 cryptyk: the problem with Drawables is that they keep a reference to the View they're attached to Mar 01 08:26:02 until you reattach them to another view Mar 01 08:26:10 and a View has a reference to its Context/Activity Mar 01 08:26:16 and therefore to all other views and resources Mar 01 08:26:28 it kinda sucks, but keeping such a Drawable for a long time makes you leak a lot of stuff Mar 01 08:27:21 I don't want my buttons to be selected (i.e. the orange color mode). How do I do it? Mar 01 08:28:59 right. I'm careful to setCallback(null) on my drawables when switching orientations, etc. That seems to detach them from the view. I think I'm just running up against my 16 meg limit. I'm trying to avoid tiling my images (during panning) to reduce memory usage, but it looks like I'm going to need to do that Mar 01 08:34:14 louzer: why? Mar 01 08:35:04 my boss says buttons getting highlighted everytime a user accidentally presses the DPAD is distracting while using the application Mar 01 08:35:31 that doesn't make any sense Mar 01 08:35:38 that's the only way to use the dpad navigation Mar 01 08:35:46 or to be compatible with non-touc screen devices Mar 01 08:35:49 can i disable DPAD for buttons? Mar 01 08:35:56 and use just touch? Mar 01 08:35:58 but if that's what you really want, use setFocusable(false) Mar 01 08:36:04 I STRONGLY advise against this though Mar 01 08:36:07 it limits the user's options Mar 01 08:36:14 it makes your app inconsistent with the rest of the system Mar 01 08:36:22 and it makes it incompatible with possible future devices Mar 01 08:36:42 so it sucks for you as a developer and worst of all, it sucks for the user Mar 01 08:36:48 the app is a game. Mar 01 08:37:07 still :) Mar 01 08:37:08 everything on the screen doesnt get highlighted when dpad is pressed Mar 01 08:37:16 only the buttons do Mar 01 08:37:17 you can also override the onKeyDown and disable (or override behavior of) dpad events Mar 01 08:38:12 hmm ok Mar 01 08:40:35 the DDMS icon is very... odd.... Mar 01 08:41:29 romainguy: android;focusable="false" doesnt work. the buttons still get highlighted. focus is not same as select.. Mar 01 08:41:39 cryptyk: im trying your method Mar 01 08:42:01 louzer: then be more specific Mar 01 08:42:14 you can make it clickable=false Mar 01 08:42:19 but then touch won't work either Mar 01 08:42:23 yup Mar 01 08:42:41 i want touch to work and it shudnt highlight when dpad is moved Mar 01 08:42:51 moving dpad == focus Mar 01 08:43:14 i did focusable=false Mar 01 08:43:23 and moving dpad still does a highlight Mar 01 08:43:37 are you using buttons in a listview? Mar 01 08:43:43 no Mar 01 08:43:52 im using buttons in a linear layout Mar 01 08:43:58 then I don't know why it doesn't work Mar 01 08:44:13 ok im going write my own view Mar 01 11:53:41 Hi, I want to make sure that my application shutdown when either back or home button are pushed. (So when it is not visible) I thought I could do a finish() in onStop(). However, this has the nasty drawback of closing the application when the keyboard is pulled out. How could I fix this? Mar 01 11:58:09 I haven't gotten started yet... :) Mar 01 12:00:21 Woops, wrong window xD Mar 01 12:06:04 I don't think you'll get banned for that, and thanks :) Mar 01 12:06:06 ARGH Mar 01 12:06:10 * Joushou stabs IRSSI Mar 01 12:06:29 * Joushou can't see if #Android is active, or #android-dev Mar 01 12:06:32 <[RiS]> x'D Mar 01 12:06:58 Full-HD on 17" makes the text very small ;) Mar 01 12:08:51 Anyway, i believe the activity is destroyed and recreated when you switch from landscape to portrait, and it runs onStop before onDestroy... (correct me if i'm wrong) Mar 01 12:09:33 Heh, then he quits, after so much trouble of switching to the right window :'D Mar 01 12:09:37 Ah, he's back Mar 01 12:09:49 Anyway, i believe the activity is destroyed and recreated when you switch from landscape to portrait, and it runs onStop before onDestroy... (correct me if i'm wrong) << wrote that before you quit Mar 01 12:36:17 Yeah, I actually read that (just now), but that is indeed what goes wrong. But how to fix it? Mar 01 12:37:55 I new why it went wrong, but don't really know how to fix it... Mar 01 12:38:57 Don't know eiter :P Mar 01 12:39:06 *either Mar 01 12:39:28 :) but thanks for thinking along Mar 01 12:42:29 Heh :P Mar 01 12:42:31 ARGH Mar 01 12:42:34 * Joushou kills himself Mar 01 12:42:41 (Wrong window... again) Mar 01 12:46:44 <[RiS]> you should buy a bigger screen xD Mar 01 12:49:43 Or increase the font size maybe? Mar 01 12:49:43 * Joushou goes over in the corner, crying Mar 01 13:14:18 hi Mar 01 13:18:27 Hi Mar 01 17:56:30 Is it possible to connect to a bluetooth serial port with 1.0 firmawre? Mar 01 18:58:02 AakashPatel, no Mar 01 18:58:25 tauno: was that no to my question like 30 mins ago? Mar 01 18:59:33 I'm trying to build the homescreen/Launcher app. I'm aware you can't do it using the SDK, but having checked out the git repo, how do I configure eclipse to use the framework source files? Mar 01 19:23:25 AakashPatel, yes :) Mar 01 19:23:35 tauno: damn Mar 01 19:23:37 lol Mar 01 19:23:49 I'm a bit slow today Mar 01 19:29:07 does anyone know the preferred sound format for soundpool? is it ogg? Mar 01 19:47:28 does anyone know how i can reset the DhcpInfo.gateway int? Mar 01 22:11:57 Is there an easy way to detect when the phone is shaked? Mar 01 23:00:42 Pupeno: I was adapting my iPhone code for that. Mar 01 23:01:19 the iPhone code in question is up at http://stackoverflow.com/questions/150446/how-do-i-detect-when-someone-shakes-an-iphone/159610#159610 -- simplistic but good enough **** ENDING LOGGING AT Mon Mar 02 02:59:57 2009