**** BEGIN LOGGING AT Sat Jan 10 02:59:57 2009 Jan 10 04:17:38 Hrm, I define the version of the code in the AndroidManifest . Is there a resource that will get me that data? Do I have to move the version into res/values/strings.xml ? (If that's even possible.) Jan 10 04:19:24 Does anyone in here have any experience with Intent-based tabs? I can't seem to get mine to work. Code seems to check out just fine, however it just crashes. Jan 10 04:20:30 I've tried all of the online tutorials, even copied source from the ApiDemo to a new project. Still wouldn't work for me? Jan 10 04:20:56 ITechJunkie, I don't, but the stack trace might help us. Jan 10 04:21:09 sure, one second. Jan 10 04:22:04 ITechJunkie, Pastebin, please. Jan 10 04:22:40 sure thing Jan 10 04:24:52 CardinalBiggles: I've got the "console" tab open in eclipse. There are no errors. Am I looking in the right spot? Jan 10 04:25:02 Please bear with me, i'm new to eclipse Jan 10 04:26:03 ITechJunkie, I don't know Eclipse at all, so I can't help. I use 'adb logcat' while the emulator is running. Jan 10 04:26:16 okay, that helps Jan 10 04:26:22 If you haven't seen this, then you're close to answering your own question. :) Jan 10 04:28:17 alrighty, I have lots of stuff in logcat... one sec, lemme grab the useful stuff Jan 10 04:30:12 Okay, Here is my logcat output. http://pastebin.com/d30e104bb Jan 10 04:31:22 it looks like I need to declare one of my classes in the manifest Jan 10 04:32:10 :) Jan 10 04:32:41 CardinalBiggles: thanks bro, I didn't know about logcat. Jan 10 04:34:27 Careful, ITechJunkie. Give me another few days and I'll have you abandoning Eclipse altogether and using your favorite text editor and ant. Jan 10 04:34:35 Dang. Bed time. Jan 10 04:34:50 CardinalBiggles: i'll hold you to that :) Jan 10 10:25:03 is there any way to get the browser to NOT report as the android browser Jan 10 10:25:16 but just as a generic Mozilla 4.0 or something ? Jan 10 10:25:59 or if I hae Jan 10 10:26:12 *have a web view, do i have to do anything with the context? Jan 10 10:26:31 the reason is I have an app that when you load it, the first action is to authorise the app with oAuth Jan 10 10:27:03 so I invoke a webkit view, which comes up fine and asks me the username and password. But when i click login, it invokes another window and takes me to the mobile site Jan 10 10:27:07 (for Brightkite) Jan 10 10:27:20 which doesn't let me authoise the app Jan 10 10:30:56 it's al Jan 10 10:31:20 *ignore last line Jan 10 11:23:46 * gcinzh pokes his snout out from under an alpine rock and squints at the bright light. Jan 10 11:30:53 hey gcinzh Jan 10 12:08:29 Is there a way to find out if a listview is scrolled all the way to the bottom? (like some event?) or do i need to do it manual by comparing the computeVerticalScrollRange() with the current position?) Jan 10 12:11:50 hrmm, anyone used WebSettings with a WebView before? Not sure if I am using it right Jan 10 12:12:01 and it's still invoking another webkit window when i try log in :| Jan 10 15:15:23 http://www.anddev.org/viewtopic.php?p=16204 is anyone can help??? Jan 10 15:17:45 hi! has anyone tryed to compile the koolu-android source? Jan 10 15:22:17 not me, ive tested the image tho. Jan 10 15:36:07 Is there a way to set a different color for the "disabled" state of a TextView? Jan 10 15:37:58 i try to compile the android source for my freerunner ... i did the step by step guide from trac.koolu.org but when i try to "make TARGET_PRODUCT=freerunner" / i always get this error: build/core/product_config.mk:141: *** No matches for product "freerunner". Jan 10 15:39:41 chaos_, try #android. This channel is more for app development. Jan 10 15:40:53 he did crosspost ;> Jan 10 15:42:54 ok, sorry! Jan 10 15:43:15 ;) Jan 10 15:43:22 eldenz: punishment? Jan 10 15:44:24 fish slap? Jan 10 15:46:59 trout? Jan 10 15:50:11 : ) Jan 10 15:51:57 hi Jan 10 16:03:02 SWEET! Finally fixed my issue Jan 10 16:03:12 this helped: http://www.anddev.org/force_browsing_activities_to_stay_in_original_webview-t2530.html Jan 10 16:06:03 Is there a reference for the tags that go in styles.xml? (ie, the different types of ) ? Jan 10 16:07:56 I'm trying to see if there's a property for the disabled state of a TextView Jan 10 16:10:27 savid, http://code.google.com/android/reference/android/R.styleable.html Jan 10 16:10:56 strip the `ClassName_' Jan 10 16:16:48 eldenz, hmm.. ok, so I see "state_enabled", but I'm not sure how I'd use that within my style: http://pastebin.com/m72169abb Jan 10 16:17:53 (actually is says "enabled" is deprecated and to use "state_enabled") Jan 10 16:18:58 just not sure how to make it use one color when it's enabled, and a different color when it's disabled... Jan 10 16:19:56 i don't know but the Theme_textColor* properties look promising Jan 10 16:21:46 yeah, I know how to set textColor, but the problem is getting it to use a different color when the TextView is in the disabled state Jan 10 16:22:10 that's what the wildcard `*' was for Jan 10 16:22:23 oh.. Jan 10 16:22:25 * savid looks Jan 10 16:22:25 there are many other color properties that i assume might be used instead if you disable it Jan 10 16:22:52 or you could look in the source which color is used while disabled Jan 10 16:27:15 hmm Jan 10 16:27:27 It's kind of confusing Jan 10 16:28:17 I mean, it's got Theme_textColorSecondaryNoDisable , which says "Dim text color", but it says "This does not differentiate the disabled state. " Jan 10 16:28:26 I have no idea what it means by that :-P Jan 10 16:29:00 tried grepping through the source.. can't seem to find where the default disabled style is defined Jan 10 16:35:35 oohhh.. I think I see. Jan 10 16:36:02 I think I need to do: Jan 10 16:37:01 or not Jan 10 16:37:25 hmmm Jan 10 16:42:29 Looks like all the instances of "state_enabled" in the source are used within tags.... wonder if that's what I need to use Jan 10 16:46:06 Ahh, perhaps I make a , and then point textColor to that? Jan 10 16:46:12 * savid tries it Jan 10 16:54:20 ugh Jan 10 16:54:52 got runtime exception Jan 10 16:59:11 Ah good, got it to work :-) (just mis-spelled the tag) Jan 10 17:08:49 not a lot of traffic over here, eh? Jan 10 17:09:02 everyone just uses #android? Jan 10 17:09:18 ErnestoGuevara, this channel is for app developers Jan 10 17:09:40 though i see app questions on #android.. and never on here Jan 10 17:10:06 ErnestoGuevara, then you haven't hung out here long enough :-P Jan 10 17:10:21 but if there are active humans here... has anyone seen their app sometimes take 800ms to load and sometimes 50000ms? Jan 10 17:10:30 i'm super-stumped Jan 10 17:10:41 http://www.anddev.org/viewtopic.php?p=16210#16210 Jan 10 17:11:06 50000 ms? that's like 50 seconds, right? Jan 10 17:11:11 precisely Jan 10 17:11:16 yikes Jan 10 17:11:22 all my logging says that my app is ready to go in under 3000ms, always Jan 10 17:11:48 but then the magic line from android "Displayed activity com.android.slots/.SlotsAndroid: xxxx ms" takes arbitrarily long to show up Jan 10 17:12:02 and my app is unresponsive/doesn't draw to the screen until that line comes up Jan 10 17:12:13 never seen that. Does the slowdown occur before your main activity initializes? Jan 10 17:12:14 ErnestoGuevara: not seen that myself Jan 10 17:12:30 ErnestoGuevara: and yeah this channel is quieter. i think everyone guesses #android and then doesn't find out about #android-dev. that's what happened for me Jan 10 17:12:35 ..even my onDraw is getting called within 3000ms, but it doesn't have an effect on the screen Jan 10 17:12:38 :-( Jan 10 17:12:57 TD: For appdev-specific stuff, do you think more chat happens there or here? Jan 10 17:13:27 *shrug* lurk in both. what really matters is, where are the people who can answer your questions? and they seem to also be in both Jan 10 17:13:47 nod. I just hate to double-post questions if it's not necessary Jan 10 17:14:00 and it does sort of seem like this channel is a subset of the lurkers on #android Jan 10 17:14:05 eldenz, I just realized I could use @android:primary_text_dark. Kind of went the roundabout way of figuring it out, but hey, I learned something about how 's work :-) Jan 10 17:15:36 how do you do the profiling - is there any tool for it? Jan 10 17:18:00 uscheller: I'm just inserting a bunch of Log.d messages based off System.currentTimeMillis() Jan 10 17:18:08 hrhr Jan 10 17:18:18 hr what? Jan 10 17:18:33 there's traceview Jan 10 17:18:35 thats what i did with my app also Jan 10 17:18:41 oh, right Jan 10 17:18:42 http://code.google.com/android/reference/traceview.html Jan 10 17:18:46 i'll have to look into that Jan 10 17:18:57 me too :) Jan 10 17:19:38 says traceview not so good with threads, though :-/ Jan 10 17:31:14 is there a way to see why certain processes die? i mean, get insight into the resource management decisions of the device Jan 10 17:31:20 i guess it's controlled by the system server or something Jan 10 17:34:51 i see this whilst testing my app Jan 10 17:34:52 I/ActivityManager( 51): Process android.process.acore (pid 1564) has died. Jan 10 17:34:52 I/ActivityManager( 51): Low Memory: No more background processes. Jan 10 17:35:00 which sounds bad. but, i don't get it - my app isn't especially memory intensive Jan 10 17:35:04 all it does is open a web view Jan 10 17:39:26 TD, you're aware of the basic process-culling strategy? Jan 10 17:39:32 beyond that, I couldn't help you. Jan 10 17:40:07 yeah, i know the theory. just trying to figure out why my phone is so badly out of memory already Jan 10 17:40:22 then i'm no use to you :-/ Jan 10 17:43:23 system_server has a VSS of 214mb! Jan 10 17:43:27 what the .... Jan 10 17:43:42 VSS? Jan 10 17:43:47 virtual set size Jan 10 17:43:49 is that its memory use? Jan 10 17:44:07 well "memory use" in any modern os is sort of hard to quantify. the closest would be rss Jan 10 17:44:43 in which case system_server is still in the lead, pinning ~18mb into ram Jan 10 17:45:04 although weirdly, streamfurious still has a 12mb process running, i guess for its music playing service. but i don't have streamfurious currently open Jan 10 17:45:18 com.android.music is also running, although i haven't used the music app since yesterday Jan 10 17:46:07 i guess the music activities never explicitly shut down their services and so when ram gets free again, the system restarts them Jan 10 17:46:21 i may be out of my depth here, but can't those things run as services even if the activity is killed? Jan 10 17:46:29 right Jan 10 17:47:02 yes, that's the whole idea. i assumed the music players would shut down their services when not actually playing music Jan 10 17:47:08 apparently that assumption was flawed Jan 10 17:47:22 yeah that doesn't seem like very good citizenship Jan 10 17:47:43 it's like running a windows box with 30 different quickstart services, each of which thinks its doing you a favor Jan 10 17:48:26 yeah. well. i haven't figured out yet if the explicit lifecycle android uses is better or worse than traditional virtual memory. Jan 10 17:48:35 i suspect better. but can't quantify why :) even so it's lame that this crap is still running. Jan 10 17:48:46 i mean it puts extra load on the cpu to constantly spin them up and down Jan 10 17:49:46 well it pretty much totally avoids paging that way, right? Jan 10 17:50:24 which as I understand it would just not go over well at all on the devices (not like goes "well" on desktop OSes either) Jan 10 17:51:43 like I think the android licecycle will even kill off the active process if it ends up paging for more than an instant Jan 10 17:51:47 *lifecycle Jan 10 17:52:03 there's no swap so it can't page out the heap. the only paging that takes place is loading/freeing code pages i guess. Jan 10 17:52:32 and yeah, i expect forcing apps to save only the data they really need out to storage results in less IO than swapping out the heap transparently Jan 10 17:52:38 PITA for developers of course :) but for the best Jan 10 17:54:41 though there's a certain elegance to IoC sort of frameworks Jan 10 17:55:19 kind of nice to already have things chunked out in "call me when you feel like it" segments rather than controlling it all yourself Jan 10 17:59:39 IoC? Jan 10 18:01:04 Inversion of Control Jan 10 18:01:14 ah, i ee Jan 10 18:01:16 where some other higher power is calling your methods Jan 10 18:01:17 see Jan 10 18:01:20 like Spring, etc Jan 10 18:01:42 yes. they have their disadvantages though. i have not yet figured out a nice way to catch all exceptions my code generates (eg for error reporting) Jan 10 18:01:50 i think that'll have to be a framework feature Jan 10 18:04:11 I'm gonna lose my mind with this loading problem. Jan 10 18:04:31 traceview doesn't seem to reflect any sort of delay Jan 10 18:04:40 gonna have to get into the source code i think :-( Jan 10 18:05:16 do you know if there's a way to get source for an XP box? The stuff I found before said you need *nix or mac Jan 10 18:08:58 not off hand, sorry. does git not run on windows? Jan 10 18:09:36 http://code.google.com/p/msysgit/ ? Jan 10 18:09:47 or you could just browse it using gitweb Jan 10 18:10:47 i wish there was something as nice as Interface Builder for android Jan 10 18:10:55 the eclipse layout designer is pretty rudimentary Jan 10 18:11:04 oh, if there's a gitweb, I think that's what I'm looking for Jan 10 18:11:09 I don't think git will run on windows Jan 10 18:11:46 have you looked at droidraw? Jan 10 18:12:59 the applet in the web page? Jan 10 18:13:06 i tried it, but it didn't seem much better Jan 10 18:13:26 my problem is i have a lot of widgets that start with no content in them. so they are invisible in the designer. Jan 10 18:13:29 not very helpful Jan 10 18:13:40 nod Jan 10 18:14:56 ErnestoGuevara: btw, are you sure your app should be under com.android? Jan 10 18:15:08 isn't that reserved for stuff from the android team? Jan 10 18:15:26 hm you have a point Jan 10 18:15:37 i started with lunarlander Jan 10 18:15:50 and haven't removed all traces of it yet Jan 10 18:15:53 ok Jan 10 18:15:57 the general idea is to put it under a domain you control (i.e., if you have ErnestoGuevara.name, you would make it name.ErnestoGuevara.foo) Jan 10 18:16:28 ErnestoGuevara: so your issue is that the initial methods, onCreate and onDraw are called very fast, but then you don't actually see the stuff you drew in onDraw for a long time? Jan 10 18:16:47 if you post your code somewhere i'll take a look Jan 10 18:17:38 just refactored the package name.. Jan 10 18:18:34 TD, I appreciate it, though I think I'd want to clean it up a bit before letting it see the light of day Jan 10 18:18:48 ok, no problem Jan 10 18:19:39 but yeah, the problem is that my activity, view, and drawing thread are all ready in an acceptable timeframe, but then android doesn't say its ready for a long time, and it's not actually responsive or actually hitting the screen buffer until then Jan 10 18:20:02 even though profiler is telling me that during that time I'm spending 90% of my time or so in my onDraw method Jan 10 18:20:04 * gcinzh solicits suggestions for how he can cause a CPU to max out, easily ... Jan 10 18:20:39 (I have two G1s, one with an extended battery, and I want to run identical routines on them while testing how long they last Jan 10 18:20:43 ) Jan 10 18:20:48 gcinz do you think "do {327984.3245/3487.345} while (true);" would do it? Jan 10 18:20:58 well, I have: Jan 10 18:21:05 you'd need to hold a partial wake lock Jan 10 18:21:06 while (true) { Jan 10 18:21:06 iteration++; Jan 10 18:21:06 Log.d(this.toString(), "This is a log message: " + Long.toString(iteration)); Jan 10 18:21:09 num = Float.floatToIntBits(num + r.nextLong() / r.nextLong()); Jan 10 18:21:10 } Jan 10 18:21:17 hmmm. damn paste ... Jan 10 18:21:32 and it is using 0% cpu Jan 10 18:21:44 num = Float.floatToIntBits(num + r.nextLong() / r.nextLong()); Jan 10 18:22:13 (in its own thread) Jan 10 18:22:22 that's peculiar Jan 10 18:22:37 and I print a Chronometer, so I know it's running ok Jan 10 18:22:48 and logcat shows no indication that the runnable thread died Jan 10 18:23:08 come to think of it ... Jan 10 18:24:04 y'know ... I'm a dumbass. Jan 10 18:24:07 nm ... ;-) Jan 10 18:24:51 ok, it's working now Jan 10 18:25:41 what happened? Jan 10 18:25:44 Any idea whether/how an app can get the % CPU it's using ? Jan 10 18:26:04 EG: actually *running* thread.start() helps .. Jan 10 18:26:06 Jan 10 18:26:12 ohhhhhhhhhhhhh Jan 10 18:26:13 yeah Jan 10 18:27:04 any idea how I can get %cpu used programmatically ? Jan 10 18:28:45 * gcinzh decides to try threadCpuTimeNanos Jan 10 18:29:43 wow, TD: I just ran my app after changing the package name, and it 5 tries it hasn't taken longer than 2 seconds to fully load Jan 10 18:30:06 gcinzh: no idea :-/ Jan 10 18:30:06 weird! maybe you have some garbage left on the emulator? Jan 10 18:30:24 how do you mean? I mean i've had this problem across emulator restarts Jan 10 18:30:25 TD: yeah, there's loads of garbage..... (everything *I* wrote :-P ) Jan 10 18:30:41 ErnestoGuevara: not sure why renaming it'd do that then .... Jan 10 18:30:48 yeah I have NO idea Jan 10 18:31:02 unless there's reflection going on that treats com.android classes differently Jan 10 18:31:18 i mean, we don't run our classes ourselves, it's the fancy loader thinger.. could do whatever it wants Jan 10 18:32:16 yawn Jan 10 18:32:56 jasta you just made 6 different lurkers yawn Jan 10 18:34:57 bbl. kids' bath+bed Jan 10 18:35:41 hey can anyone help me with an sd card question? Jan 10 18:36:03 cartoonmonkey: I just created one and used it, but that's about all I know Jan 10 18:36:15 there Jan 10 18:36:24 for emulator, that is Jan 10 18:36:41 I've moved my browser cache over to sdcard, as well as apps / appscache.. Jan 10 18:36:54 and now sdcard is "read only filesystem" Jan 10 18:37:59 egads Jan 10 18:42:14 Can someone tell me the right way to enable/disable GPS/Wifi ? Jan 10 18:50:29 hmmm Jan 10 18:50:35 imageswitching images of different sizes is pretty ugly Jan 10 18:50:49 the reflow happens async with the animation, so it animates, then pops to the center Jan 10 18:53:09 ugly Jan 10 18:54:18 presumably i can fix that and ship my own imageswitcher though Jan 10 18:56:54 mib: sure, I'll give you a question. Jan 10 18:57:16 mib: you promise to help me with an answer ;) Jan 10 18:57:31 mib: (ie. Just ask, and if someone can help with your specific Q, perhaps they'll chime in) Jan 10 19:01:57 gc, he did.. after he switched to a different nick Jan 10 19:02:16 EG: indeed. Jan 10 19:02:42 in-deed Jan 10 19:03:05 Ernest: just saw your post to the list Jan 10 19:03:31 did you also see followup post? Jan 10 19:03:43 yes Jan 10 19:03:57 it's very peculiar Jan 10 19:04:27 but i'm currently loading happily Jan 10 19:05:25 Cool Jan 10 19:05:49 * gcinzh realises from TDs signoff msg, that he works with him Jan 10 19:12:56 hrmm, when I'm in an activity, how do i exit the app? I have this: http://paste.ifies.org/224 but when finish() is called, it doesn't exit the app, it goes back a screen Jan 10 19:13:28 When you fire an intent, you can specify not to put it on the history stack Jan 10 19:13:57 ahh. well i really need to work out my app workflow then Jan 10 19:14:25 So if you know you don't need to go "back" to the caller, then do something like: Jan 10 19:14:50 since my app on first run needs to invoke a web view to authorise the app, then once thats done it's not needed again, except from a settings page Jan 10 19:15:05 on all future runs, the app will just loads up. I'm also thinking of having it as a background service Jan 10 19:16:14 http://pastebin.com/d28c290f1 Jan 10 19:16:25 but the only java example of oAuth i can find is out of date :| Jan 10 19:21:26 if anyone fancies trying to help me figure it out, i'll make it up into a tutorial Jan 10 19:22:58 gcinzh: thats cool, but it still goes back to my first screen before it exits Jan 10 19:23:05 to i have to exit again Jan 10 19:25:10 digi: I don't see you starting a new Activity anywhere in that src Jan 10 19:26:25 hold on a sec Jan 10 19:27:31 http://paste.ifies.org/225, http://paste.ifies.org/226, http://paste.ifies.org/227 Jan 10 19:27:43 thats the activities in the order they are processed Jan 10 19:36:39 Does someone know how we can easily disable GPS and Bluetooth (and perhaps 3G) ? Jan 10 19:37:02 I found Wifi but I can't find sth about the other ones. Jan 10 19:38:00 it is possible, it;s in the toggle settings app Jan 10 19:38:20 I know that :) Jan 10 19:38:29 But I can't find how. Jan 10 19:39:18 3G is only possible via settings thats what I know but the other ones can be disabled via code the question is how :) Jan 10 19:40:25 is there no sql demos in the 1.0 sdk? Jan 10 19:40:35 i can't find any, and online i can only find old demos Jan 10 19:51:25 digital, the notepad tutorial on the main android site uses some sql Jan 10 19:53:45 ahh, thanks Jan 10 19:57:45 http://code.google.com/intl/de-DE/android/reference/android/provider/Settings.System.html <- This is just for information right? I won't be able to change something in this provider right? Jan 10 20:31:37 oh fine we have to use hardware test to change the screen brightness instantly Jan 10 21:45:05 Someone kowing how we could access the sync settings ? Jan 10 21:45:14 the permission is available: READ_SYNC_SETTINGS Jan 10 21:45:31 but I can't find the way to change it. This part is missing in the sources. Jan 11 01:59:13 can you programatically change the icon of an application? **** ENDING LOGGING AT Sun Jan 11 02:59:57 2009