**** BEGIN LOGGING AT Thu Aug 13 02:59:59 2009 Aug 13 03:03:15 romainguy: any chance i can talk you into taking a look at http://code.google.com/p/android/issues/detail?id=3453 ? Aug 13 03:05:17 itp: buy him a beer :) Aug 13 03:05:49 * itp will buy him many beers if someone can finally address this issue, honestly Aug 13 03:06:56 he may not be around; it's after 8pm here after all Aug 13 03:07:55 i don't suppose you have a rooted phone? Aug 13 03:08:15 i do; my wife doesn't Aug 13 03:08:15 (or an ADP1 stock build, i.e. root-capable from the outset) Aug 13 03:08:18 oho! Aug 13 03:08:19 why? Aug 13 03:08:37 okay, first something that may not need root Aug 13 03:08:45 adb bugreport > slow-system.txt Aug 13 03:08:55 i've done a few of those already Aug 13 03:09:11 oh, just not attached to the bug? Aug 13 03:09:12 tsk tsk :) Aug 13 03:09:29 before this bug, i mailed it directly to SanMehat, who was talking to me about it Aug 13 03:09:30 is the phone in this state right now? Aug 13 03:09:32 ah, okay Aug 13 03:09:41 the adb bugreport output doesn't (beyond the top output) show anything Aug 13 03:09:51 huh Aug 13 03:09:57 you mean it's empty? Aug 13 03:10:01 i just rebooted my wife's phone (system_server was using 75% CPU at idle) Aug 13 03:10:02 or you mean it just doesn't seem to convey much info? Aug 13 03:10:05 ack Aug 13 03:10:11 no, not empty -- nothing anamolous in the output Aug 13 03:10:24 i'll be the judge of that :) Aug 13 03:10:34 i can very easily recreate a phone in this state -- well, not 70% + CPU, but non-0 CPU utilization Aug 13 03:10:38 oh! Aug 13 03:10:39 how? Aug 13 03:11:20 enable "Use wireless networks" Aug 13 03:11:26 turn on Latitude in Google Maps Aug 13 03:11:34 wait Aug 13 03:11:51 system_server CPU utilization will slowly start to creep up Aug 13 03:11:54 and never drop back down Aug 13 03:12:09 at the same time, if you fire up DDMS and start tracking allocations Aug 13 03:12:19 even after you back out of maps/latitude? Aug 13 03:12:24 yep Aug 13 03:12:36 if you look at the two DDMS screenshots i attached Aug 13 03:12:45 there's an allocation that begins to show up more and more Aug 13 03:12:50 as in, multiple times a second Aug 13 03:12:57 hmmmmmm Aug 13 03:13:04 the backtrace points back to... one sec Aug 13 03:13:13 handleMessage Aug 13 03:13:14 method of LocationWorkerHandler Aug 13 03:13:15 SystemProperties.getInt() Aug 13 03:13:21 android_frameworks_base / services Aug 13 03:13:22 java / com / android / server / LocationManagerService.java Aug 13 03:13:25 itp: the fix proposed by lockwood was checked in today Aug 13 03:13:38 yeah, okay, that's just the primary request queue of the Location Manager Service Aug 13 03:13:41 this is in Cupcake, right? Aug 13 03:13:47 but I highly doubt this is the root cause Aug 13 03:13:52 romainguy: exactly Aug 13 03:14:03 romainguy: was it checked in to donut, or just to master? Aug 13 03:14:10 hmm master I think Aug 13 03:14:13 or maybe donut Aug 13 03:14:14 lemme check Aug 13 03:14:25 i think his fix will eliminate the unnecessary allocation, but Aug 13 03:14:42 that doesn't explain why you see the number of objects creeping up Aug 13 03:14:45 right Aug 13 03:14:47 ctate: master Aug 13 03:14:47 even through GCs Aug 13 03:14:51 romainguy: what i thought. meh. Aug 13 03:15:10 ey i have 1 activity and i create another activity and from the new activity i want to have refernce to the first activity object so i can chanage his members Aug 13 03:15:16 how can i do such thing ? Aug 13 03:16:13 itp: do you have your phone handy on adb? Aug 13 03:16:20 can do Aug 13 03:16:45 i don't have a cupcake phone handy Aug 13 03:16:52 any help pleaseee.. Aug 13 03:17:28 ctate: what would you like me to do with it? Aug 13 03:17:35 itp: adb shell Aug 13 03:17:39 then Aug 13 03:17:47 $ procrank Aug 13 03:17:50 and see if you get output Aug 13 03:18:00 i forget what facilities are parts of which builds Aug 13 03:18:18 i have that Aug 13 03:18:21 (what version(s) of Android are you running, btw?) Aug 13 03:18:29 how do i change the textsize and color of a textswitchers text Aug 13 03:18:30 do you need me to get my phone in a borked state first? Aug 13 03:18:35 yeah, b0rked state please Aug 13 03:19:01 i have mostly cyanogen builds available right now; i can also get my wife's phone to go a bit nuts if it'll help Aug 13 03:19:05 oh! Aug 13 03:19:38 not as much as a root-capable phone Aug 13 03:19:44 yeah, there's the rub Aug 13 03:19:52 but using a cyanogen build really introduces a lot of uncertainty Aug 13 03:20:06 yeah, i know Aug 13 03:20:42 i was hoping the consistency of the failure between stock and cyanogen builds would be convincing enough ;) Aug 13 03:21:05 fixed it myself +> Aug 13 03:21:15 so the repro instructions for a stock build are the same? Aug 13 03:21:39 yeah Aug 13 03:22:01 you can really speed up the rate that things degrade if you install e.g. locale with a location condition Aug 13 03:22:18 the more things make use of location service, the higher system_server cpu climbs Aug 13 03:22:58 it's as if (please pardon my total lack of specific familiarity with android internals) there's a queue of location service requests that never gets shorter, and system_server is pinging them all Aug 13 03:23:56 hmm Aug 13 03:24:09 okay, on your rooted phone Aug 13 03:24:13 with an adb shell running Aug 13 03:24:29 do a 'ps' or soemthing to find the pid of the system_server Aug 13 03:24:37 ok Aug 13 03:24:39 then Aug 13 03:24:43 (as root) Aug 13 03:24:48 kill 3 that_pid Aug 13 03:27:03 hrm Aug 13 03:27:08 do you want me to do that now, before getting system_server to climb a bit? (what does system_server do with SIGQUIT anyway?) Aug 13 03:27:45 itp: thanks for reporting that problem Aug 13 03:28:01 actually that may not do what i want Aug 13 03:28:26 hang on a sec Aug 13 03:28:35 ok, hanging Aug 13 03:29:33 itp: you are running something based on cupcake, right? Aug 13 03:30:16 yeah Aug 13 03:30:19 well, i *thought* it would do what a bugreport does, and dump the process's dalvik stack state to a file Aug 13 03:30:33 but on this phone here, it just kills the system_server and restarts the runtime Aug 13 03:30:38 maybe the kill 3 trick only works on userdebug or eng builds? Aug 13 03:31:10 well, i'm trying it from the adb shell command line on a donut eng phone Aug 13 03:31:14 and it's still not doing what i expect Aug 13 03:31:15 so wtf Aug 13 03:31:28 oh, you said you have procrank, right itp? Aug 13 03:31:33 yep Aug 13 03:31:39 so, given what the system_server process pid is Aug 13 03:31:40 what bout Aug 13 03:31:48 # showmap -t pid Aug 13 03:31:48 ? Aug 13 03:32:15 (procrank doesn't require root. showmap does.) Aug 13 03:32:50 WARNING: Format of /proc//smaps has changed! Aug 13 03:32:57 and some useless-looking output Aug 13 03:35:22 argh Aug 13 03:35:38 i wonder whether that's a cyanogen problem Aug 13 03:35:47 he's been fiddling with which kernels are involved, no? Aug 13 03:35:49 could be Aug 13 03:35:50 yeah Aug 13 03:35:58 i'm assuming it's a format change to .29 Aug 13 03:36:31 i can absolutely flash anything required to make this easier Aug 13 03:36:52 well, i just flashed a stock cupcake build Aug 13 03:37:00 so i'll try your instructions to repro Aug 13 03:37:22 and absolutely thanks a ton for the report Aug 13 03:37:31 hah! well Aug 13 03:37:43 you can imagine what it does to battery life to have system_server using that much CPU Aug 13 03:37:43 if you can get a bugreport on either phone when it's in the really bad state, that'd be good to have despite what san says :) Aug 13 03:37:49 so i'm getting it from my wife Aug 13 03:38:15 sure thing Aug 13 03:38:43 i'll see if i can grab a bugreport tomorrow after it's spent the night churning Aug 13 03:39:10 itp: so you are running cupcake on 2.6.29? Aug 13 03:39:49 itp: so it's a slow degradation, right? Aug 13 03:40:36 itp: oh, and do you have GPS enabled when you do this? Aug 13 03:40:39 mikez5: the build i have is 2.6.29, yeah, my wife's phone has whatever stock OTA t-mobile G1 firmware runs (.27?) Aug 13 03:41:02 ctate: yes, it's somewhat slow -- my wife's phone had system_server idling at 75% CPU after 312 hours uptime Aug 13 03:41:08 zomg Aug 13 03:41:09 neither of us have GPS enabled Aug 13 03:41:10 OK - I'll try to reproduce on a cupcake build. Aug 13 03:41:19 just wireless network location Aug 13 03:41:23 okay,g ood Aug 13 03:41:30 I fixed a lot of stuff in donut, but I don't know if it is related to this. Aug 13 03:41:42 ctate: i have an adb bugreport output from a few days ago -- not as bad as hers was, but system_server was at 23% when the bugreport was taken Aug 13 03:41:47 ctate: want me to send that your way? Aug 13 03:43:04 yes please Aug 13 03:43:12 attach it to the bug with a little description of that Aug 13 03:43:17 please send to lockwood@android.com too Aug 13 03:43:53 ok, one sec Aug 13 03:44:23 oh is that you. :) Aug 13 03:44:24 o/ Aug 13 03:44:45 oh you thought I was some random mike? Aug 13 03:45:08 i was glossing over Aug 13 03:45:10 ;) Aug 13 03:45:53 that was sneaky of you :p Aug 13 03:46:16 someone already had lockwood on freenode, so I am using one of my old handles Aug 13 03:46:16 z5? he's obviously IRCing from his car Aug 13 03:46:36 hah Aug 13 03:46:39 No, Z5 == Samsung YP-Z5 MP3 player Aug 13 03:46:47 * mikez5 worked on that previous job Aug 13 03:46:49 heh Aug 13 03:47:31 attached/sent Aug 13 03:47:53 thanks! Aug 13 03:48:50 thank you guys Aug 13 03:50:32 ack gzipped :) Aug 13 03:51:25 this was from your cyanogen phone, itp? Aug 13 03:53:01 yes Aug 13 03:54:03 and yes, gzip -- i grew up doing all of my hacking on unix systems, i never think to zip things :P Aug 13 03:54:13 what is nitroid again? Aug 13 03:54:26 oh wait Aug 13 03:54:31 does that report have nitroid? Aug 13 03:54:36 currently running, yes Aug 13 03:54:43 that's the wife's phone, then Aug 13 03:54:51 whatever latest ota is Aug 13 03:54:55 also twitdroid Aug 13 03:55:01 nitroid is, uh, the exchange app Aug 13 03:55:05 ahh Aug 13 03:55:06 right Aug 13 03:55:16 augh procrank didn't work on her phone Aug 13 03:55:24 heh Aug 13 03:55:28 that's unfriendly Aug 13 03:55:41 * ctate | execv /system/xbin/procrank returned -1 Aug 13 03:57:55 com.aws.andriod - is that one of the weather apps? Aug 13 03:58:56 looks like weatherbug Aug 13 03:59:04 The thread snapshot shows the LocationManagerService stuck deep in some HashMap code. Aug 13 03:59:20 mikez5: i believe that's Weatherbug Aug 13 03:59:40 what i want to know is why there are 35 window tokens known to the window manager, but apparently only about 7 app processes live Aug 13 04:00:01 (compare the 'activity' dumpsys with the 'window' dumpsys' Aug 13 04:00:37 itp: when you say turn on wifi, do you mean enable + connect to some network? Aug 13 04:00:53 or do you mean something else by "wireless networks" Aug 13 04:00:54 ? Aug 13 04:01:15 ctate: sorry, not wifi, just "Use wireless networks" in settings -> security & location Aug 13 04:01:20 aha Aug 13 04:01:21 cell tower triangulation Aug 13 04:01:29 roger Aug 13 04:01:34 okay, yeah, this is a stock build running CRC1 Aug 13 04:02:34 itp: so after turning on latitude... i just leave it on the friends page, or what? Aug 13 04:03:34 do whatever Aug 13 04:03:55 i return to the home screen, but i don't think it matters much Aug 13 04:04:47 via 'Back' or via Home, or doesn't matter? Aug 13 04:05:07 i don't believe it matters Aug 13 04:06:38 k Aug 13 04:06:43 in theory, if you fire up DDMS after a few minutes, select system_process, allocation tracker Aug 13 04:06:57 start tracking, give it ~10 seconds, then get allocations Aug 13 04:07:19 k Aug 13 04:07:19 you'll see a ton of java.lang.String allocations, and char[] allocations Aug 13 04:07:24 all from the same thread_id Aug 13 04:07:32 all with the same backtrace Aug 13 04:07:47 hm, i wonder whether it matters that i don't actually ahve any Latitude friends... ;) Aug 13 04:08:17 anyway, i'll keep an eye on it Aug 13 04:08:18 thx Aug 13 04:08:24 it makes it look like LocationWorkerHandler.handleMessage is being called multiple times a second with msg.what == MESSAGE_HEARTBEAT Aug 13 04:10:06 how many times a second? Aug 13 04:10:07 i know this must be a frustrating bug report to try and deal with, so thanks for all your help Aug 13 04:10:16 mikez5: one sec Aug 13 04:10:18 It should be once a second in cupcake. Aug 13 04:10:38 itp: you just helped me find another useless memory allocation. Aug 13 04:10:50 Java people certainly love defensive copying :-( Aug 13 04:12:08 mikez5: because it usually doesn't matter with a generational gc :( Aug 13 04:12:50 embedded java == don't allocate memory unless you are going to use it for a while. Aug 13 04:14:10 mikez5: captured over 10 seconds, it looks like LocationWorkerHandler.handleMessage was called ~180 times Aug 13 04:14:23 (with msg.what == MESSAGE_HEARTBEAT) Aug 13 04:14:32 how did you measure that? Aug 13 04:16:27 using allocation tracker in ddms; the number of times that String was allocated in android.os.SystemProperties tracing back to LocationManagerService Aug 13 04:16:51 cool - good detective work. Aug 13 04:17:06 after a clean boot i do see something close to your 1/sec Aug 13 04:17:19 OK that is very good news Aug 13 04:17:28 by the time i was seeing system_server around 20% it was counting thousands of that exact same allocation per second Aug 13 04:17:35 that MESSAGE_HEARTBEAT event no longer exists in donut :-) Aug 13 04:18:02 hah! Aug 13 04:18:05 I'll look at the cupcake code to see how that could have happened. Aug 13 04:18:26 in donut the locations are all pushed, rather than polled via that heartbeat event. Aug 13 04:18:40 some major cleanup between cupcake and donut there. Aug 13 04:18:49 makes sense Aug 13 04:19:06 but I still want to know how that could have happened. Aug 13 04:19:24 yeah, let me know if you see anything jump out at you, if you'd be so kind Aug 13 04:20:21 It could be one of the apps is using the API in a way that kicks off a latent bug in the code. Aug 13 04:20:51 that would be moderately ironic if it's google maps Aug 13 04:20:51 but yeah, too many heart beats would eat CPU and generate a lot of garbage Aug 13 04:23:25 well, thanks to all of you guys, and hit me up on irc or shoot me an email if you find anything or need any other data points Aug 13 04:23:51 i just noticed it's after midnight here, and i think my boss is going to want me back debugging my own code without falling asleep tomorrow Aug 13 04:24:35 itp: thanks for tracking this down! Aug 13 04:27:12 yawn Aug 13 04:34:31 mikez5: didn't you work on the Media provider? Aug 13 04:34:49 yes, but not recently Aug 13 04:35:31 if I want to store additional data about songs, what should I use to refer to them? is it safe to assume that song ID's will not be reused? Aug 13 04:36:51 The IDs should stay the same unless the database gets rebuilt. Aug 13 04:37:32 are there any conditions where that could happen? Aug 13 04:37:37 We cache databases for up to 3 SD cards, but if the user uses more then 3 then we lose the least recently used SD card db Aug 13 04:37:48 ah Aug 13 04:37:49 or of course if the user does a factory reset Aug 13 04:37:57 interesting... Aug 13 04:38:08 any suggestions of alternatives to using ID? Aug 13 04:38:09 but then all the rest of your apps data will get lost too. Aug 13 04:38:29 the 3 SD card limitation seems like you can't depend on song id Aug 13 04:38:53 I guess you could use the file path, but you would need to be able to tell the difference between different cards. Aug 13 04:39:47 ok Aug 13 04:39:52 early on we kept the sqlite database on the SD card itself, but we had problems with that so it got moved into /data partition Aug 13 04:40:08 I see Aug 13 04:40:26 mikez5: really, what problems? Aug 13 04:40:33 this is what i was going to move my app to doing Aug 13 04:40:53 we had a lot of corruption issues due to the card not getting unmounted properly. Aug 13 04:41:08 we were also concerned about what would happen if we ran out of space Aug 13 04:41:25 I think you'd be more likely to run out of space on internal flash than on SD Aug 13 04:41:41 and finally, if an exploit was discovered in sqlite, reading a database file from the SD card could provide a method of attack. Aug 13 04:42:05 hmm, reasonable Aug 13 04:42:39 we were hoping most people would have <= 3 SD cards :-) Aug 13 04:43:38 for each sd card you create a new database file right? so there would be a song with id = 1 on all 3 database files? Aug 13 04:43:53 mikez5: so, having worked on providers maybe you will be able to answer my curiousity... Aug 13 04:44:05 where exactly do databases get closed? :) Aug 13 04:44:18 SQLiteDatabase has a finalize that closes, but prints a warning which i had never seen Aug 13 04:44:33 likewise, the low memory killer wouldnt give it the chance to run Aug 13 04:44:52 heh, I've been wondering about this too Aug 13 04:44:52 so it is really true that for at least the common case of providers, databases are never explicitly closed? Aug 13 04:45:09 I'm guessing the finalize() message is just a warning that you forgot to close it properly. Aug 13 04:45:19 mikez5: right, but my point is: i've never seen it. Aug 13 04:45:30 so i'm sure it's not actually running. Aug 13 04:45:37 and as i said, the low memory killer wouldn't let it run. Aug 13 04:45:47 if the provider had to die for that reason, it seems like nothing would actually close the db handle. Aug 13 04:46:09 which may or may not be dangerous depending on how sqlite implements writes of course Aug 13 04:46:13 can someone develop dasher for android? it's open source and everything! Aug 13 04:46:26 that is, if close is only necessary to release resources and not ensure a clean shutdown of the database files Aug 13 04:46:32 The media provider explicitly closes it when the SD card is unmounted. but you are right - in most cases they are left open indefinitely. Aug 13 04:47:14 So they will likely stay open until the kernel OOM killer kills the process. Aug 13 04:47:25 how dangerous that is depends largely on sqlite's design Aug 13 04:47:34 but i certainly hope someone actually thought this throw and determined it was safe Aug 13 04:47:48 through* Aug 13 04:47:55 yes, I'm sure someone thought about that. Aug 13 04:48:13 sqlite uses transactions, so you can control when things get written to disk. Aug 13 04:48:25 I'm not that sharp on the details of that though. Aug 13 04:48:31 hmm, so i suppose the resources used by the open database handle are negligible enough that you can safely leave it open until the low memory killer wants you gone Aug 13 04:49:07 mikez5: yes but consider that the low memory killer can nuke the process while it's in the middle of something. Aug 13 04:49:25 with not fully committed writes to disk Aug 13 04:49:29 and the process just dies Aug 13 04:49:36 sqlite probably doesnt handle this case well Aug 13 04:49:51 making disaster merely unlikely, not impossible :) Aug 13 04:50:53 but this is not exclusively a sqlite problem i suppose Aug 13 04:50:54 if sqlite wrote it to the file system but not flushed to the flash yet, the kernel would not lose the changes when the process is killed. Aug 13 04:51:02 you would need to pull the battery or something like that. Aug 13 04:51:21 mikez5: yes, that's true. i wasn't thinking about the problem in enough detail Aug 13 04:51:34 and even then hopefully it has good commit/rollback support in its file format. Aug 13 04:51:57 i suppose a reasonable database engine would not require you to close open handles merely to ensure data consistency Aug 13 04:52:05 * mikez5 assuming whoever wrote it knows what they are doing :-) Aug 13 04:52:30 so that must be why most providers just let it dangle -- only close to release resources, not to ensure data consistency Aug 13 04:52:42 and the low memory killer does a plenty good job of releasing resources on its own :) Aug 13 04:56:43 Lieutenant: instead of telling people over and over again to implement dasher (whatever that is), do it :) Aug 13 04:57:46 What's dasher? That input method where the letters grow? Aug 13 04:57:52 kroot, yeah, IIRC Aug 13 04:58:05 where they scroll right-to-left and you draw the line Aug 13 05:02:21 how do you intercept browser urls? Aug 13 05:03:34 i'm trying oauth with twitter and get back to activity.. but the activity never intercepts the final success page Aug 13 05:04:59 Aug 13 05:05:13 that doesn't seem to work Aug 13 05:07:03 is there a command to see all intents being fired by the browser in logcat? Aug 13 05:11:02 how did you define the exactly? Aug 13 05:14:44 inside an intent filter with action, category and data as shown above Aug 13 05:14:52 what category? Aug 13 05:15:08 Aug 13 05:15:24 what's the action? Aug 13 05:15:26 VIEW? Aug 13 05:15:53 yes Aug 13 05:16:01 then try to prepend a / to your android:path Aug 13 05:16:16 ok, i'll try Aug 13 05:16:57 android ==> appenginer server ==> twitter ==> (call back) to appengine server ==> (intercept in) android activity Aug 13 05:17:02 that's the flow i'm shooting for Aug 13 05:17:08 ah Aug 13 05:17:10 everything happens smooth, except the interception Aug 13 05:18:32 logcat stops intent logs after it hits twitter authorise page Aug 13 05:18:54 no logcat for callback intents even though the browser is handling them correctly Aug 13 05:19:25 withotu knowing what you do on the app server that still sounds kinda dubious :) Aug 13 05:19:43 app server collects the token, redirects to success page Aug 13 05:19:57 success url is what i'm trying to intercept in android Aug 13 05:20:11 yeah we got it Aug 13 05:20:18 have you tried adding a / at the beginning of the path? Aug 13 05:20:29 trying it right now.. 1sec Aug 13 05:23:31 nope, still the browser is handling success Aug 13 05:24:04 there's no trace of activitymanager in logcat.. it doesn't even seem to be in picture Aug 13 05:24:55 may be i should just put everything in the 'host' Aug 13 06:02:43 how do i receive android keyup and keydown events whenever the user pushes the keys on the device? Aug 13 06:06:46 <_ala> where is there phone-state-machine introduction on android? Aug 13 07:25:36 anyone know how to fix charset issues in the browser? im trying to browse to url http://sää.fi/ which is valid Aug 13 07:25:58 but apparently the input charset differs from the one the browser users to read the input Aug 13 07:26:07 Does layout_centerHorizontal work with Checkbox? Aug 13 07:26:52 Or, if not, is there some way to center a checkbox, or a general recommendation from users on the preferred method to implement a 'Remember Me' toggle Aug 13 08:18:39 yo , does anyone know how to install .apk ? Aug 13 08:30:49 Can anyone help me with implementing L2CAP connection? Aug 13 09:00:06 Can anyone help me with implementing L2CAP connection? Aug 13 09:02:12 I/DEBUG ( 551): signal 11 (SIGSEGV), fault addr 00436a3c Aug 13 09:03:02 .data:00036A3C DCB 0 Aug 13 09:03:17 that address is in the data segment, why in the world would it crash here? Aug 13 09:03:43 the offending instruction is: Aug 13 09:03:44 .text:00005DCC STRB LR, [R12,#0x24] Aug 13 09:03:57 R12 has the value 00436a18 Aug 13 09:04:04 LR has the value 1 Aug 13 09:04:12 oh right. -that- instruction.. Aug 13 09:04:22 wlfshmn: what? Aug 13 09:06:24 just saying I'll be supprised if someone will be able to provide answers based on there beeing a store executed against a random memory location Aug 13 09:12:52 wlfshmn: the store is against an aligned memory address inside of the .data segment Aug 13 09:13:51 and hence the sigsegv Aug 13 09:15:08 ? .data is writable Aug 13 09:19:37 maybe i can't trust the crash state Aug 13 09:20:54 ok i figured it out. Aug 13 09:40:32 Anyone worked on Bluetooth here? Aug 13 10:37:54 yawn Aug 13 10:42:31 Hey everyone, does anyone know if it is possible to open a port on Android to get a constant stream on data? Aug 13 10:43:26 receiving port? Aug 13 10:44:01 Gaunt: hmm, your question is a little vague, can you elaborate? Aug 13 10:45:51 hey deebo and jasta, I basically want a server to be able to send data to the device rather than the device polling the data from the server Aug 13 10:46:31 I'm just trying to get a set of data as up-to-date as possible between the phone and the server for a short period of time Aug 13 10:46:32 Gaunt: in general, wireless carriers implement their network in a way which prevents this. Aug 13 10:47:06 so could it be done over a wifi connection only? Aug 13 10:47:08 the sorts of services you describe are typically referred to as "push services" in the industry, because they appear to push data from the server to the device rather than the device polling the server Aug 13 10:47:47 but those push services are usually implemented with a persistent connection from the client to server, which idles for the most part. the server is built in such a way that it can suddenly communicate new events as they happen Aug 13 10:47:57 for instance, when a new e-mail is received Aug 13 10:48:40 other designs use binary SMS to delivery new event notifications to the device, but these solutions are typically only possible through partner agreements and tend to be very expensive overall Aug 13 10:49:14 gmail, for example, uses the former method id escribed. if you run netstat on your device you will see a connection always prsent to google's servers for this purpose. Aug 13 10:49:48 Well how about this example: Aug 13 10:50:06 keep in mind, however, that your app should do this sort of thing only by the user's preference as it can put a significant drain on battery and must be implemented _very_ carefully to be as efficient as possible Aug 13 10:50:25 on a website a user is sliding a slider up and down and I want to show the percent of up and time as quick as possible, what would be the best way to get it as close to real time as possible? Aug 13 10:50:57 yeah I understand Jasta, I just want this for a short period of time, it won't run in the background or anything like that Aug 13 10:51:30 Gaunt: oh, those aren't push services at all then. for this why dont you just have the phone connect to a server which is feeding data from the website events? Aug 13 10:51:57 im not sure what you mean by real-time though. you do understand that wireless data connections are typically very slow, right? Aug 13 10:52:12 latency on the order of 2-300ms. Aug 13 10:52:23 sometimes much worse Aug 13 10:52:56 jasta yeah I know, and this is what I mean, what is the most efficent way? because I seems wrong to make the phone constantly ping the server for information, or is that the easiest way? Aug 13 10:54:06 Gaunt: the phone wouldn't need to constantly ping. you could design a server protocol where the phone merely must connect to the service and, if anything is happening, the server will inform the client. Aug 13 10:54:14 a sort of dialog like this: Aug 13 10:54:24 client says "HELLO", server acknowledges. Aug 13 10:54:32 client says "WAIT FOR EVENTS", server acknowledges. Aug 13 10:54:38 connection becomes "idle". Aug 13 10:54:46 [ time passes ... ] Aug 13 10:54:51 server says "EVENT OCCURRED" Aug 13 10:55:16 when the phone application closes, and you are no longer interested in events, you would simply close the connection Aug 13 10:55:32 id say in a mobile enviroment its just easier to poll :) Aug 13 10:55:42 and this wouldn't be affected by the carriers at all? Aug 13 10:55:49 Gaunt: how could it be? Aug 13 10:56:18 the only thing the carrier would do to this design is eventually time out the connection when idle, which is why you would also need to implement a sort of application layer keep alive message Aug 13 10:56:31 but doing this is sensible for other reasons Aug 13 10:56:42 its not just there to work around the carrier Aug 13 10:57:03 Yeah no thats makes alot of sense Aug 13 10:57:23 this type of protocol design is typically what allows push services to exist as well Aug 13 10:57:34 for instance, the IMAP protocol for receiving email has a feature like this Aug 13 10:57:43 you can connect, get all your mail, etc, then when done execute the command "IDLE" Aug 13 10:58:13 which causes the connection to just sit there with no communication occurring. if a new message is received (or some other event happens), the server will tell the client so it can exit IDLE mode and get the message Aug 13 10:58:17 then go right back into it Aug 13 10:58:40 youre designing a protocol with a similar type of communication -- you need a mode whereby the server will talk when events occur Aug 13 10:58:44 otherwise, no talking is happening. Aug 13 10:59:27 thats alot of help Jasta, I'll have to look into how to right protocols oin java next, I did a little work on this a while ago in C, any tips on sort of things I should Google? or just Java network protocols and see where I get lead? lol Aug 13 10:59:55 hmm, well, remove java from your searches Aug 13 11:00:04 protocol design is language agnostic, and so should you be. Aug 13 11:00:51 that said, you need to think logically about where your component will live first Aug 13 11:01:07 for instance, you need a server somewhere which can bridge between "the website" and the mobile client. Aug 13 11:01:29 perhaps it runs on the same system as the website, and perhaps it even uses HTTP, but you still need to think about it as a separate component Aug 13 11:02:34 one thing i would caution you against is using an HTTP paradigm called Comet. carrier networks typically implement HTTP via proxies and intermediates that dont let Comet work properly Aug 13 11:03:03 so you'll probably want to just define a new port number, and new protocol. Aug 13 11:03:18 unless you can find an existing protocol specification which is more-or-less what you're looking for, but i doubt that. Aug 13 11:03:54 Gaunt: designing your own application layer protocol is not difficult, it just means that you will have to work directly with socket apis in java rather than some much higher-level facility. Aug 13 11:04:39 just think of it as two streams on each side, one in, and one out, and they are both connected to one another. you can write whatever you want to the streams, just so long as you have matching handlers/parsers. Aug 13 11:04:44 Ok, thanks for the help jasta, been really useful, I think I just have alot of thinking to do about how best to approach that with hosting etc Aug 13 11:05:13 yeah I'll go away and do alot of reading because I need to brush up on my networking skills anyway Aug 13 11:05:29 good idea, and remember: do so as much outside the context of java as possible Aug 13 11:05:45 it is a crippling way to learn to try to force all the information you receive through such a tiny hole :) Aug 13 11:06:29 and dont try to reinvent the wheel :P Aug 13 11:06:51 Yeah I know, I'm happy learning C, Java, Haskell etc and then happy taking the methodologies to each language, but yeah I admit Java is a very easy to just get something working without appreciating how its working Aug 13 11:07:12 debbo always a good idea :-P Aug 13 11:07:15 (or how it will break in the future) Aug 13 11:09:39 On an unrelated note - anyone played with app engine? Aug 13 11:10:01 some, just to get a simpel app going and some testing Aug 13 11:11:17 Gaunt: i meant learn about networking in a general context. it is a general concept, and has no affinity with a particular language Aug 13 11:12:31 yeah jasta I got that - I'm just bad at getting whats in my head across :-P I've got a load of uni notes I need to read up on and a Nice networking book to go with it Aug 13 11:15:51 great, im glad to see youre taking initiative :) Aug 13 11:16:28 jasta: on the whole I'm quite comfortable with how netwokring works, the problems with it from a quite low level, my main problem is I dont have any experience of implementing any of it and using any of it and I think that's why I'm aimed more at the language side than I should be, like you pointed out Aug 13 11:17:18 well for that sort of reference, just the socket apis in javadoc should be enough Aug 13 11:17:34 its fairly straight forward, and the api is almost identical in spirit tot he BSD socket APIs for C Aug 13 11:17:51 at least for blocking I/O. non-blocking sockets in java start getting a little weirder than BSD Aug 13 11:18:13 but for your purposes, i doubt that you need NIO Aug 13 11:18:36 (NIO is the API in java for doing non-blocking I/O) Aug 13 11:19:04 ooo ok, well I'll go away and have a play, till then I can ask all the questions under the sun when a simple google would answer them for me Aug 13 11:19:21 well, enjoy :) Aug 13 11:19:36 ooo I will :-) Aug 13 11:19:49 now for me to start thinking about going back to bed :) Aug 13 11:20:21 lol well thanks for all your help jasta Aug 13 11:20:25 been sooo useful Aug 13 11:22:57 np, glad to help Aug 13 12:05:44 hi. Does anyone know where the dictionaries for the different supported languages/locales can be found? Aug 13 12:12:25 are they included in the source when checking out the latest development branch? Aug 13 12:32:06 aVirulence: a sample dictionary is included Aug 13 12:32:27 jasta: do you happen to know where? Aug 13 12:32:35 packages/inputmethods/LatinIME/dictionaries Aug 13 12:33:12 jasta: thanks a lot! Aug 13 12:35:06 somehow that stuff gets compiled into res/raw/main.dict i think Aug 13 12:35:15 i dont fully understand how though, just looking at it for the first time now Aug 13 12:35:29 Android.mk looks interesting too, seems to tell aapt not to compress that file. Aug 13 14:50:46 Is there a way to use the Gallery's image viewer on an image my app downloaded? Like a view-image intent? Aug 13 14:51:04 I just need to be able to show a larger-than-screen image and if I can avoid it I don't want to reimplement zooming/scrolling Aug 13 15:29:44 Hi, I'm attempting to make my first android game (actually, my first game for any platform) using Canvas. I started using lunar lander, and I'm trying to make it so that I don't have to draw the background for my game on every frame, so I changed it so that I'm only drawing the background during startup, but now the background flickers like crazy. Why might that be happening? Aug 13 15:36:11 Saburai, maybe you should do your game with opengles? Aug 13 15:36:29 instead.. Aug 13 15:36:34 err Aug 13 15:36:36 savid, even Aug 13 15:39:50 ante_, yeah, I thought about that... but I currently know nothing of opengl, and I think my game should work fine on Canvas. I just wasn't sure if there was a way to not have to re-draw my background every time on Canvas Aug 13 15:40:58 savid, dont know :) Aug 13 15:41:29 i am sure you can find a few opengles examples for android to get you started Aug 13 15:41:44 why don't you want to redraw your background every frame? Aug 13 15:41:51 savid, Aug 13 15:42:05 for OpenGL, you have to redraw it Aug 13 15:42:07 what if you draw a black canvas at the current location before drawing at the new location? Aug 13 15:42:09 because OpenGL has buffering Aug 13 15:42:27 or something Aug 13 15:42:28 hehe Aug 13 15:42:46 zfoone_, it just seems like it's not necessary to re-draw it... Aug 13 15:42:50 you can kinda half-way hack around it by drawing the background twice Aug 13 15:42:57 so that it's on both buffers Aug 13 15:43:13 but then you end up with some triple-buffering implementation or something :P Aug 13 15:43:14 ante_, I guess I don't understand how to draw a canvas at a current location.... my current understanding is that there's just one canvas that covers the whole screen :-P Aug 13 15:43:19 and it stops working again Aug 13 15:43:30 savid: well, if you're not redrawing the whole buffer you'll need to redraw parts of it in order to prevent streaking Aug 13 15:44:37 zfoone_, yeah when you guys start talking buffers my eyes glaze over Aug 13 15:44:44 I'm such a noob Aug 13 15:45:13 I'm sure it's simpler than I'm making it out to be Aug 13 15:45:20 try just redrawing it every frame Aug 13 15:46:05 savid, what if you have two layouts Aug 13 15:46:11 zfoone_, I current am redrawing everything on every frame.. that is, the background essentially "clears" the canvas Aug 13 15:46:16 you draw to one, then setContentView to that Aug 13 15:46:29 then draw to the other (which now is not visible), then setContentView that Aug 13 15:46:31 the phone can push enough pixels to display full motion video, it can definitely handle drawing your background image repeatedly Aug 13 15:46:33 and flip back and forth Aug 13 15:46:33 ? Aug 13 15:46:51 I suppose Aug 13 15:47:04 maybe thats a stupid idea? Aug 13 15:47:06 :-P Aug 13 15:47:21 everything would happen off screen so to speak Aug 13 15:47:24 perhaps less flicker :) Aug 13 15:47:44 time to walk the dog Aug 13 15:47:44 brb Aug 13 15:47:45 ante_: if he's getting flicker it probably means it is already double-buffering his drawing Aug 13 15:47:51 The main reason I'm asking about all this is that my game seems like it's beginning to slow down.. just looking for the best way to optimize, and I read somewhere that drawing a full-screen bitmap every frame is a resource hog Aug 13 15:47:52 if you did that you'd get quad-buffering Aug 13 15:48:26 zfoone_, I only get flicker when I draw the background once at the beginning Aug 13 15:49:22 savid: it's pretty standard practice in OpenGL to draw the whole frame very time, fwiw Aug 13 15:49:31 hmm Aug 13 15:49:48 I guess perhaps I'm misunderstanding what I've been reading :-P Aug 13 15:50:02 it's not standard practice for 2d methods. Aug 13 15:50:11 it's an OpenGL thing :/ Aug 13 15:51:04 Here's the article that got me started: http://www.rbgrn.net/content/54-getting-started-android-game-development Aug 13 15:51:21 In it, the guy says: " For LightRacer, I had to optimize the way I have everything drawn or else the framerate would be drastically lower. I drew the background to a Bitmap only once which was when the view is initialized. " Aug 13 15:51:45 that is that, this is this Aug 13 15:51:52 I think that means he's rendering the background once (ie, his background isn't just a picture, it's a sequence of primitives) Aug 13 15:52:06 then he just blits that cached background Aug 13 15:52:14 but it still gets drawn every frame Aug 13 15:52:26 just as a simple copy instead of a bunch of drawing calls Aug 13 15:52:56 zfoone_, if you take a look at lunar lander, that's pretty much how I'm doing it. The background is just a big 320x480 PNG image drawable that's drawn every frame Aug 13 15:53:21 that image in effect "clears" the canvas so I can re-draw everything else on top of it Aug 13 15:54:01 he may not be using OpenGL at all Aug 13 15:54:12 http://developer.android.com/guide/samples/LunarLander/src/com/example/android/lunarlander/LunarView.html Aug 13 15:54:19 I'm using Canvas Aug 13 15:54:32 talking about the article you mentioned Aug 13 15:54:47 oh Aug 13 15:56:47 So basically the game thread's run() method calls doDraw() in the main loop, and doDraw() calls canvas.drawBitmap(mBackgroundImage, 0, 0, null); That's the part I'm wondering whether or not could be (or needs to be) optimized. Aug 13 15:57:19 does it need to be optimized? Aug 13 15:57:25 why do you think it does Aug 13 15:57:45 neonfreon, Heh, I guess b/c of what I've read -- but perhaps I've just misunderstood. Aug 13 15:58:04 maybe I need to stop obsessing over the background and look for other places to optimize :D Aug 13 15:58:07 anyone here interfaces with the extUSB of Android as a serial RS232 port? Aug 13 16:00:41 I watched this Google I/O presentation on writing real-time games in android. http://code.google.com/events/io/sessions/WritingRealTimeGamesAndroid.html Was very informative, but I think I may have missed some stuff due to my newbness Aug 13 16:01:12 It talked about using DDMS, which I'm looking at right now... but I don't think I understand completely what I'm looking at... guess I have to do more self education :-( Aug 13 16:01:54 I do understand that GC can be a major cause of slowdowns, so I'm trying to see if my app is causing a lot of GC calls Aug 13 16:02:52 It'd be nice if I could somehow see only the GC calls that were caused by my app -- not sure if that's possible Aug 13 16:05:51 wrap gc() around a custom class and use only the second Aug 13 16:10:21 Hi trying to flash the source build according to this guide: http://source.android.com/documentation/building-for-dream but fastboot gives me the error "error: could not load android-info.txt" Aug 13 16:18:24 Where can I get the "Dev Tools" app that's talked about here? http://developer.android.com/guide/developing/debug-tasks.html Aug 13 16:23:34 savid: AOSP development/apps/Development Aug 13 16:24:27 cretin45, ah, thanks Aug 13 16:26:08 neonfreon, zinx: Here's one thing that makes me feel like I should not be re-drawing the background every frame. The dev tools app has a "Show Screen Updates" tool that "Flashes a momentary pink rectangle on any screen sections that are being redrawn. This is very useful for discovering unnecessary screen drawing. ". Aug 13 16:29:56 neonfreon: yo Aug 13 16:31:26 sup SanMehat Aug 13 16:36:46 I'm having complaints from users with non-standard SD cards Aug 13 16:37:10 neonfreon: not much, workin Aug 13 16:40:46 cretin45, is there a way to get just the app itself w/o having to download the entire android source tree? Aug 13 16:43:53 savid, not sure Aug 13 16:55:45 Hey guys, I'm having an issue with reading bytes from a raw resource: InputStream is = getResources().openRawResource(R.raw.myfile); byte[] buffer = new byte[2]; is.read(buffer,0,2); The IOException occurs on the read. The weird thing is that if I do two sequential is.read() operations (single byte reads) it works fine.. it just seems to throw the IOException when doing multibyte reads. Any ideas what could cause this? Aug 13 16:57:21 I'm seeing a lot of R. in the sample code and documentation but what exactly is R. Aug 13 17:00:49 Cancel, stuff in your resourse folder Aug 13 17:00:52 resource Aug 13 17:01:58 i figured as much, the documentation it seem is sparse Aug 13 17:01:59 thanks Aug 13 17:03:54 Any way to close the Touch Keyboard on a certain key press Aug 13 17:04:01 Like, enter will close the touch keyboard Aug 13 17:05:53 hi Aug 13 17:06:07 do android Phones have a DSP or FPU? Aug 13 17:06:25 i have a floating point impl of a codec wand was wondering whether it would run properly Aug 13 17:07:41 Check the phone specs Aug 13 17:07:48 i know most of them dont have a FPU Aug 13 17:07:54 from what i've seen reading specs Aug 13 17:08:53 so if i have a floating point implementation, will it work on the normal ARM processor? Aug 13 17:09:55 Yes, but probably slower than on a device with a FPU Aug 13 17:09:56 is my guess Aug 13 17:10:06 okay...thanks Aug 13 17:12:53 how do i get rid of the title bar that's on top of my window? Aug 13 17:13:46 one more question..... Aug 13 17:13:56 is there anyone out there who has done speech codec work for android? Aug 13 17:15:33 is there a backup url for installing the eclipse ADT plugin? Aug 13 17:15:42 http://dl-ssl.google.com/android/eclipse/ is giving me a 404 Aug 13 17:16:34 android is growing on me Aug 13 17:18:27 so, can I not get log statements in ServiceConnection functions? For some reason when I bind to a service, it returns true, but I never see any logs printed out that I have in my service connection's functions Aug 13 17:18:38 ludde: requestWindowFeature(Window.FEATURE_NO_TITLE); Aug 13 17:19:17 Has anyone ever run into IOExceptions during AssetInputStream.red()/AssetManager.readAsset ? Aug 13 17:30:48 Is column '_id' required for SimpleCursorAdapter? Aug 13 17:33:03 skyred: i believe so, yes. Aug 13 17:33:29 it uses it as the return value from getItemId and because of this it returns that the adapter has stable ids Aug 13 17:33:35 which is in turn used for some other purpose which im not familiar with Aug 13 17:35:11 jasta: thanks a lot for the explaination. Do you also happen to know the link of the documentation for this requirement? I'd like to read more about this Aug 13 17:35:34 no, but the source is available :) Aug 13 17:35:51 i see Aug 13 17:36:01 rnx: thank you man Aug 13 17:39:20 can someone please point me a the right direction to go (you can just tell me what to google) to begin writing an android app that has some 2d graphics (very non-intensive) mixed with jpegs and text? would just a "View" be the way to go? I'm a total n00b at android dev. Aug 13 17:41:10 eddified: just google for some hello world tutorials to get a basic idea of how an app is written. then add in 2d and images Aug 13 17:41:17 hey, does anyone know any web resource with good description of xml defined drawables? Aug 13 17:43:12 nemik: i've already done a basic hello world app. was wondering if there was a special view to use. i've seen some code that extended a class called "View" and also heard about extending a more specialized class in the API that also extended View.... Aug 13 17:43:26 wasn't sure which way to go on that. Aug 13 17:45:52 ok here's another question unrelated to my last. i kind of understand where R.string.whatever is generated from, and where R.layout.blah is generated from, but where does the info in R.id.bar come from? Aug 13 17:47:30 ok, weired, so when I restarted my emulator, it would actually start running through my ServiceConnection.onServiceConnected, but before, it would say it was bound but never run through that or onServiceDisconnected Aug 13 17:48:18 R.id.bar comes from android:id="@+id/bar" which is typically used in layout file Aug 13 17:52:50 the id you assign an item in layout Aug 13 17:53:00 oh pskink beat me Aug 13 17:55:29 i'm trying to set the icon of a tab and getting a drawable seems to take an id not a name. how can I get it by name? Aug 13 17:55:36 itp: ping? Aug 13 17:56:07 Cancel: it wants R.drawable.foo Aug 13 17:56:14 which is an integer, and that is probably what is confusing you. Aug 13 17:56:35 yes I know id is an int how do I figure out what int the resource is? Aug 13 17:56:45 R.drawable.foo. Aug 13 17:56:55 really that's it R.drawable.namegoeshere Aug 13 17:57:01 every value in R.java is an integer. Aug 13 17:57:03 yes. Aug 13 17:57:15 sweet easy thanks Aug 13 17:57:20 Cancel: the integer resource IDs are defined in the R.java that was created from your resource definition .xml files Aug 13 17:57:47 I'm still hunting for the R. documentation that has all this Aug 13 17:57:56 Cancel: all your resources get compiled into a binary format and R.java is generated as a way to access records in that format. Aug 13 17:57:56 this is an optimization. Aug 13 17:58:19 if by "optimization" you mean "this makes it all non-glacial" :) Aug 13 17:58:23 can someone please explain the "dip" unit of measurement? Aug 13 17:58:29 Cancel, arent you using ADT and Eclipse? :) Aug 13 17:58:33 device-independent pixels Aug 13 17:58:33 like i recommended... Aug 13 17:58:38 it generates those things for you Aug 13 17:58:48 eddified: dip is a unit which scales by the device's DPI Aug 13 17:59:01 eddified: 1dip == 1px where the device has 160dip, which is what the G1 is calibrated at. Aug 13 17:59:07 eddified: when you specify dimensions in dips, the layout will scale properly to devices whose displays are different dimensions / densities Aug 13 17:59:07 160dpi* Aug 13 17:59:20 ante_: this it will have to do it by hand even pasting in the sample code from google results in nullpointerexception Aug 13 17:59:20 jasta, ctate: tthanks. Aug 13 17:59:25 if you had a device with higher dpi (a more dense screen, in other words), 1dp would be greater than 1px. Aug 13 17:59:33 ante_: no problems by hand just need to be pointed right direction Aug 13 17:59:37 eddified: ==jasta too Aug 13 17:59:48 eddified: in other words, always use dp. your layouts will automatically scale to display properly on all devices. Aug 13 17:59:58 yeah, don't ever use absolute pixels Aug 13 18:00:18 especially once QVGA / WVGA devices ship, your app will be very sad Aug 13 18:00:58 ante_: the google sample code for HelloTabWidget for example Aug 13 18:01:16 how would one create a dynamic resource? such as an image from the web. Aug 13 18:01:50 if it's dynamic is it a resource? Aug 13 18:01:57 ctate: ack Aug 13 18:02:27 Cancel: i dont know. but i would need an id for it to pass to api calls expecting a resource id integer. Aug 13 18:03:02 itp: you'll be overjoyed to hear that after sitting in Latitude overnight, my stock Cupcake phone here has a system_server Uss mem footprint of... Aug 13 18:03:14 ... 10 MB or so, just like it was last night. Aug 13 18:03:32 Repro: fail. feh. Aug 13 18:03:55 hmm, i never saw excessive memory use myself Aug 13 18:04:02 just CPU churn Aug 13 18:04:37 where in the world is this R. getting defined or is this just some system magic Aug 13 18:04:38 oh yeah, hmm Aug 13 18:04:56 Cancel: it's generated at compile time Aug 13 18:05:11 so magic Aug 13 18:05:15 itp: system_server is also using 0% cpu. *FEH*. Aug 13 18:06:31 that's oddly unfortunate Aug 13 18:06:48 the original reporter on http://code.google.com/p/android/issues/detail?id=3453 seems to have been using stock firmware, and disabling location services entirely resolved it for him Aug 13 18:06:55 itp: here's an idea. on a phone for which you can reproduce this, install the "Solitaire" app from Market that is by, um, lemme look it up Aug 13 18:07:41 it seemed like lockwood accepted that the heartbeat was happening way too often, but i thought you'd have been able to reproduce Aug 13 18:08:07 i think my system_server was up around 4% this morning before i toggled both location providers off and all CPU use went away Aug 13 18:08:15 hrm Aug 13 18:08:24 4% isn't a lot. if it were 70% that would be more useful :) Aug 13 18:08:35 hah Aug 13 18:08:40 anyway, there's a solitaire app on Market that has a bug that causes it to wedge and ANR. Aug 13 18:08:54 well, i had the wife turn things back on last night, so her phone should be crawling in a few more days Aug 13 18:08:55 *That* is handy because it forces a dump of the sytsem stacks, at least on a dev phone. Aug 13 18:09:04 and possibly on stock phones as well Aug 13 18:10:08 once it ANRs, if you pull an adb bugreport it will have all those stacks in it at the moment of ANRN Aug 13 18:10:10 -N Aug 13 18:10:40 and if the system_server is using a lot of CPU, this may happen to catch it doing something, and show what the hell it's up to Aug 13 18:10:45 ok, i'll see what i can do Aug 13 18:10:48 also! Aug 13 18:10:50 i know what it's up to, though Aug 13 18:11:01 it's spinning on location stuff? Aug 13 18:11:32 (having actual stack traces is really useful for us finding out where to find the specific bug, though) Aug 13 18:11:40 i can give you repro instructions for the ANR once you have the app; it's easy Aug 13 18:11:51 well Aug 13 18:12:05 i'll pull the bugreport for you later tonight, no prob Aug 13 18:12:05 but Aug 13 18:12:06 or you can write an app that just does an infinite loop in onTouchEvent() or something Aug 13 18:12:52 we know from ddms, by (ab)using the unnecessary allocation down the stack, that we can figure out how often LocationWorkerHandler.handleMessage is being called with msg.what == MESSAGE_HEARTBEAT Aug 13 18:12:54 ctate: where in GOOG are you located? Aug 13 18:13:00 [while i think of it: cyanogen says that he updated all of the xbin tools like showmap in his latest build, 3.9.9.1, so if you ever flash that, you'll be able to run showmap. that's for mem analysis, though, and you're describing a cpu-load issue] Aug 13 18:13:04 ewon: main HQ Aug 13 18:13:12 mountain view? Aug 13 18:13:15 yup Aug 13 18:13:24 and we know it's being called way more often than the once/second that lockwood says it should be Aug 13 18:13:25 what's your opinion of the area? Aug 13 18:13:28 that is to say Aug 13 18:13:31 initially it's called once/second Aug 13 18:13:40 but as time passes that code is executing much more often Aug 13 18:13:46 but because that's an async callback method Aug 13 18:13:54 ewon: how big an area? Aug 13 18:13:56 :) Aug 13 18:13:57 i'm not sure what you're going to get out of a stacktrace caught at a random time Aug 13 18:14:01 itp: ah, i see Aug 13 18:14:06 because what you're really trying to track down is Aug 13 18:14:08 ctate: mountain view itself Aug 13 18:14:17 _somewhere_ in LocationManagerService.java (one assumes?) Aug 13 18:14:18 itp: okay, that's good to know too. mikez5 / lockwood is really the guy for the location stuff. Aug 13 18:14:37 ewon: i lived in Mountain View for 15 months or thereabouts when i first came to California. I moved out. Aug 13 18:14:47 it's better now than it was, but IMO it's still suburban wasteland. Aug 13 18:14:50 how long is your commute? Aug 13 18:14:54 too effing long Aug 13 18:14:56 there's a logical error that's either failing to remove the event or adding another instance of it Aug 13 18:15:01 i live up north of Oakland now Aug 13 18:15:05 in berkeley Aug 13 18:15:29 anyway, i'm grab the bugreport tonight after happy hour if her phone is sufficiently angsty :) Aug 13 18:15:50 in the south bay / peninsula, i would probably rather live in san mateo than any of the other towns, but i don't like any of it very much as a place to live Aug 13 18:16:23 itp: yeah, gotcha. i note that the location code has changed enormously in donut, so whatever we find in cupcake is probably no longer relevant. :( Aug 13 18:16:30 in the meantime, the workaround to just disable all location providers once a day keeps a phone happy (from reading LocationProviderService.java, within 1000 ms all heartbeat events will have woken up, noticed there are no enabled providers, and removed themselves, leaving a quiet, happy phone Aug 13 18:16:40 I work in Santa Monica, but I live relatively close to work Aug 13 18:16:40 ante_: so any ideas why adt shows nullpointer exception: null even on googles examples for tabwidgets? Aug 13 18:16:49 yeah, he mentioned that donut moved from heartbeat event polling to a push notification for location Aug 13 18:17:33 so it's unlikely the bug survives in donut, but... it doesn't look like we can backport location services from donut for cyan's build right now because of the coupling with telephony that requires the unavailable (to the unwashed masses) new closed drivers Aug 13 18:17:53 so a patch against cupcake would at least be able to fix the issue for people who are building their own roms from cupcake code Aug 13 18:18:34 Cancel, did you add a Layout before placing views on it? Aug 13 18:18:35 (i found a description of this same bug dating back to December of 2008, btw, so it's a longstanding issue) Aug 13 18:18:58 yes, I copied and pasted the google example verbatim Aug 13 18:19:48 ante_: this bit right here http://developer.android.com/guide/tutorials/views/hello-tabwidget.html Aug 13 18:19:53 konks it right out Aug 13 18:20:26 ctate: if you follow this thread (http://markmail.org/message/ptz2polkea6r4i3m), you'll see that people were reporting the same slowdown in system_server last year Aug 13 18:20:36 they quasi-correctly blamed it on locale back then Aug 13 18:21:03 because latitude wasn't in the picture, and locale was the only widely used app that regularly looked for location info Aug 13 18:21:50 but i feel quite confident in asserting that it's the same underlying problem, an async callback that is out of control Aug 13 18:22:12 why do I get this when I run 'adb install' ? Failure [INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES] Aug 13 18:23:06 Cancel, no idea why that is Aug 13 18:23:15 i just know it gives you that null error Aug 13 18:23:23 of there's no layout first Aug 13 18:26:48 ludde: are you installing a new version of an app that was already installed? Aug 13 18:26:53 yes Aug 13 18:26:58 ludde: it sounds like you're doing that, and they're signed with different certs Aug 13 18:27:10 uninstall the app, then you will be able to install the new one Aug 13 18:27:15 ah ok Aug 13 18:27:23 that makes sense, cause i use 2 different machines for developing Aug 13 18:27:59 yep, that will do it unless you copy the signing cert from one machine to the other, rather than generating a new one on the second machine. Aug 13 18:50:32 itp: belated, the specific Solitaire game that i know how to force an ANR with is the one called "Solitaire" by Ken Magic Aug 13 18:52:02 ante_: hah it's a filed bug already 2021 adt layout editor can't handle tabwidget which makes it very useful for my tabwidget app Aug 13 18:53:05 hahaha Aug 13 18:53:10 Cancel, nice..... Aug 13 18:53:21 just when I was warming up to this here android Aug 13 18:53:29 http://code.google.com/p/android/issues/detail?id=2021 Aug 13 18:53:45 one step forward, two steps back Aug 13 18:54:08 well at least it's been assigned to an "engineer" Aug 13 18:56:05 if the data of an array changes underneath will the adapter automatically update the listview ? Aug 13 18:59:41 ctate: heading out for several hours, but if you could just msg me the details to ANR it, i'll grab a bugreport tonight Aug 13 19:01:12 Cancel: you have to call notifyDatasetChanged() Aug 13 19:01:27 i'm keeping 3453 updated with whatever information i can dig up (plus my best guesses as to what's going on from reading code) so i'll attach the bugreport there Aug 13 19:01:31 Cancel: you don't have to use the ADT layout editor btw Aug 13 19:01:55 romainguy__: of course I don't cause it doesn't work with the tabwidget Aug 13 19:03:27 that part is done now Aug 13 19:03:30 Cancel: I wouldn't expect it to Aug 13 19:07:49 herriojr: why not? Aug 13 19:14:38 Hmm, i am having trouble closing the softkeyboard Aug 13 19:14:39 InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); Aug 13 19:14:39 imm.hideSoftInputFromWindow(edit.getWindowToken(), InputMethodManager.RESULT_HIDDEN); Aug 13 19:14:59 Anyone see anything weird with this code? Aug 13 19:18:58 http://www.pastebin.org/8836 Aug 13 19:19:01 here's some code Aug 13 19:19:11 When enter is pressed i want to close the softkeyboard Aug 13 19:19:23 the EditText is single line Aug 13 19:19:33 the softkeyboard seems to work Aug 13 19:19:42 but not when pressing enter on a keyboard Aug 13 19:19:56 it just jumps down to the button below the edittext Aug 13 19:21:05 I'm trying to create a PopupWindow inside of an ExtractEditText with no success. I do the same thing with a TextView and it works fine, but in the fullscreen keyboard it doesn't work. I get the backtrace http://bnovc.pastebin.com/m692f34d0 ... I'm guessing its somehow related to the fact that the ExtractEditText is owned by an InputMethodService instead of an Activity that the TextViews are on Aug 13 19:21:39 but I thought you should be able to make it/any other View as long as you have any Context Aug 13 19:22:01 bnovc, PopupWindow, like a Dialog with your own content? Aug 13 19:22:27 i'm putting a LinearLayout inside of it Aug 13 19:22:40 not really a dialog, just some stuff floating on screen Aug 13 19:23:13 i think the problem is that I don't understand some part of the relationships with the keyboard/input managers or something with context/activity/inputservicemanager Aug 13 19:23:40 bnovc, cant help you then :) Aug 13 19:23:50 i used a Dialog with a chosen content Aug 13 19:23:52 as a popup Aug 13 19:24:00 and it worked fine for me :-P Aug 13 19:24:05 inside an ExtractEditText Aug 13 19:24:06 ? Aug 13 19:24:13 nah, it appears on the middle of the screen Aug 13 19:24:35 ah, well my code works fine when its a TextView, but when its an ExtractEditText it doesn't Aug 13 19:24:52 so theres some difference between TextView and ExtractEditText, probably related to their Context, that I'm not getting Aug 13 19:25:21 bnovc, you should paste all your code into pastebin Aug 13 19:25:25 maybe someone can help Aug 13 19:25:26 probably not me Aug 13 19:25:59 theres quite a bit of code involved, but i can try to narrow it down to what I think is related I suppose Aug 13 19:29:38 http://bnovc.pastebin.com/m26ddddf6 - i think thats the important information Aug 13 19:30:07 the way the PopupWindow is done is a little hacky, but I'll fix that up later... I think the problem is just the context in TextView or something Aug 13 19:35:40 just so i'm crystal clear when you have this in main.xml android:id="@+id/listview1" some black magic is creating and instance of that object for you with that id? Aug 13 19:36:53 Using AssetManager to load a 1 meg file works fine, but a 1.5 meg file throws an exception .. is there some kind of restriction on the size of assets? Aug 13 19:36:56 Cancel: when the object/view is called in code it gets inflated by the framework (black magic part) Aug 13 19:37:15 djayc: check where the exception is thrown? Aug 13 19:37:46 bnovc: so I thought list views needed adapters where is that black magic? Aug 13 19:38:12 djayc: yes, 1 MB Aug 13 19:38:42 Cancel: you can set their value in the xml as well, and it would get read from the res/values file and populated by the framework also Aug 13 19:39:01 interesting Aug 13 19:39:23 romainguy: ideas on my question? :) you answered a question with the same exception on a mailing list, but I think it was a different cause Aug 13 19:39:40 trying to backtrack through ViewRoot atm Aug 13 19:39:57 you're creating your window too early Aug 13 19:40:00 or too late Aug 13 19:40:50 romainguy: Is that documented somewhere? Aug 13 19:41:17 I don't know about that. That's what you wrote in your answer to the post I read also, but my code doesnt change in TextView and only breaks in the full screen keyboard Aug 13 19:41:34 or maybe the InputServiceManager goes away after the ExtractEditText is created or something like that Aug 13 19:44:43 i think that exception message isn't accurate either Aug 13 19:44:48 shouldn't it be "is your context running?" ? Aug 13 19:50:31 romainguy__: As far as the asset size goes.. it's a binary file containing packets, I really just need to read byte groups.. I don't need to allocate the entire file into memory.. is there a way to open an asset in a suitable way to bypass the size restriction? I'm able to have an MP3 that is over 3mb as an asset and it works just fine (although I'm not attempting to open it with an InputStream and use reads()) Aug 13 19:52:30 I've got a little problem. I am trying to close the SoftKeyboard programatically when ENTER is pressed. Aug 13 19:52:39 it works when enter is pressed on the softkeyboard Aug 13 19:52:51 but not when enter is pressed on my real keyboard Aug 13 19:53:06 it just jumps down to the button below the EditText... Aug 13 19:53:13 and the softkeyboard remains on the screen Aug 13 19:53:16 any ideas why that is? Aug 13 19:53:26 http://www.pastebin.org/8836 Aug 13 19:58:09 I noticed that shift and alt, at least, are different on physical keyboards. Are you just getting a different keyCode from the physical keyboard? (try Log'ing every keyCode and see what it is) Aug 13 19:58:09 are you sure onKey() is called? Aug 13 19:58:49 SuD, its called in both cases Aug 13 19:59:04 i tried putting some text in a TextView just for fun Aug 13 19:59:20 to verify that it was called Aug 13 19:59:59 thats why i am confused to as why its not working when the actual keyboard is used Aug 13 20:00:00 ... Aug 13 20:00:11 did you specifically verify that the "if(keyCode == KeyEvent.KEYCODE_ENTER)" gets satisfied ? Aug 13 20:00:22 (probably not!) Aug 13 20:00:51 since R.id.blah returns an int how do I get the real object? Aug 13 20:01:03 in this case a listview who's adapter I want to set Aug 13 20:01:34 SuD, i did, check my pastebin url Aug 13 20:01:39 http://www.pastebin.org/8836 Aug 13 20:01:51 oh, because of the edit.setText(""); Aug 13 20:02:43 SuD, hold a sec Aug 13 20:04:03 Cancel: findViewById Aug 13 20:04:35 so I can do ListView myListView = findViewById(R.id.blah); ? Aug 13 20:04:45 yes Aug 13 20:04:48 sweet Aug 13 20:04:50 thanks again Aug 13 20:05:01 bnovc: if I ever finish this app you get a free copy Aug 13 20:05:06 cool :) Aug 13 20:05:07 is there a contact-picker or something? same as when you compose a sms message, that you can select receivers? Aug 13 20:05:09 Cancel, you might have to cast that Aug 13 20:05:23 oh true, may need (ListView) findBy.. Aug 13 20:05:24 no problems I'm sure eclipse will yell if i don't Aug 13 20:05:32 yeap, like bnovc said Aug 13 20:05:52 probably just returns a View by default Aug 13 20:05:57 as the name implies Aug 13 20:06:14 gah i give up on this error for now....ExtractEditText is obnoxious :( Aug 13 20:07:57 SuD, pressing enter on my keyboard does not fire a KeyEvent.KEYCODE_ENTER Aug 13 20:08:02 SuD, any idea why that is? Aug 13 20:09:00 maybe the VK intercepts the key and doesn't pass it through ? Aug 13 20:09:14 this is in the emulator btw Aug 13 20:09:25 and i am pressing enter on my computer keyboard Aug 13 20:09:43 figured it would work the same as if someone had a physical keyboard on their mobile phone Aug 13 20:09:52 and if you press enter on the emulator keybard? Aug 13 20:10:20 ante_: does it fire any key event though... you get no keyCode? Aug 13 20:10:29 im betting you get a keyCode but its just a different # or something Aug 13 20:11:58 or android virtual keyboard intercepts key strokes and decides whether to pass it to your app or not Aug 13 20:12:08 it fires a key event Aug 13 20:12:13 just not KEYCODE_ENTER Aug 13 20:12:37 can you get the number of the key code? Aug 13 20:12:40 hold Aug 13 20:13:49 and check against the list of keycodes http://developer.android.com/reference/android/view/KeyEvent.html Aug 13 20:14:45 i bet 6, 83 or 84 Aug 13 20:15:35 SuD, didnt get anything..... Aug 13 20:15:44 * ante_ ponders Aug 13 20:15:54 it's an int, it must have a value Aug 13 20:16:13 doing an Aug 13 20:16:13 else Aug 13 20:16:14 { Aug 13 20:16:14 tv.setText(getString(keyCode)); Aug 13 20:16:14 } Aug 13 20:16:20 comes up empty Aug 13 20:16:32 uh wait Aug 13 20:17:37 String.valueOf(keyCode) Aug 13 20:17:57 thanks Aug 13 20:18:02 also a noob at java Aug 13 20:18:04 btw Aug 13 20:19:09 20 Aug 13 20:19:40 no wait Aug 13 20:19:44 this is totally wrong Aug 13 20:19:47 KEYCODE_DPAD_DOWN Constant Value: 20 (0x00000014) Aug 13 20:20:01 when i press enter it jumps down to the button below Aug 13 20:20:40 imho, if it jumps to a non-text-editable field, keyboard should be hidden by system automatically Aug 13 20:22:51 SuD, is it possible that the emulator is not doing what it should? Aug 13 20:23:02 i mean, is it better to work on a real android phone Aug 13 20:23:02 heh Aug 13 20:23:03 ? Aug 13 20:23:21 not for this kind of stuff Aug 13 20:23:42 well, imho emulator works at hardware level, so it's not probably about emulator Aug 13 20:23:44 Emulator is generally very good. Aug 13 20:24:04 the emulator just runs ARM machine code and provides a low-level HAL Aug 13 20:24:10 I think its weird that the ENTER key on the real keyboard is firing a DPAD down Aug 13 20:24:19 agreed? Aug 13 20:24:20 the code it's running is the actual ARM system image from a phone build Aug 13 20:24:48 the same thing happens when i click the keyboard to the right of the emulated phone Aug 13 20:24:59 which should represent a physical keyboard on a phone Aug 13 20:25:19 huh. okay, now i want to see what happens on the device :) Aug 13 20:26:58 If I understand this problem I'm having, I think the exception message should be changed :\ Aug 13 20:27:10 its misleading! Aug 13 20:27:32 if a popupwindow is given a view with a context that isn't an activity, it should say so, instead of saying the activity is null Aug 13 20:28:18 ctate, going to verify it once more Aug 13 20:28:22 dont want to make a fool of myself Aug 13 20:28:38 try disabling all virtual keyboards too Aug 13 20:32:46 the problem is that you don't have a parent window Aug 13 20:35:29 SuD, ctate, its actually firing 66 in both cases Aug 13 20:36:04 writing the keycode to logcat Aug 13 20:36:05 66 is KEYCODE_ENTER Aug 13 20:36:06 at all times Aug 13 20:36:08 yeah.... Aug 13 20:36:20 so, why isnt the softkeyboard closing when i use the real keyboard? :P Aug 13 20:36:32 but works when i click the enter key on the touch screen Aug 13 20:38:02 ok debugging, looks like I Just can't set a breakpoint in eclipse Aug 13 20:38:22 Cancel, right click to the left of the row Aug 13 20:38:25 and toggle breakpoint Aug 13 20:38:31 man I did that Aug 13 20:38:45 Well Aug 13 20:38:46 but I bet it helps if I pick debug instead of run. doh!! Aug 13 20:38:52 yeah Aug 13 20:38:55 my next suggestion Aug 13 20:38:56 :) Aug 13 20:39:03 i'm not a newb to eclipse just android Aug 13 20:40:20 ctate, also tried this Aug 13 20:40:21 //InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); Aug 13 20:40:21 //imm.hideSoftInputFromWindow(edit.getWindowToken(), InputMethodManager.RESULT_HIDDEN); Aug 13 20:40:23 its commented now Aug 13 20:40:28 tried forcing a close Aug 13 20:40:34 when KEYCODE_ENTER was fired Aug 13 20:44:02 didnt work Aug 13 20:44:58 brb gotta walk the dog Aug 13 20:50:50 what's the difference with this method hideSoftInputFromInputMethod() ? Aug 13 20:54:17 SuD, sec Aug 13 20:57:09 SuD, no difference Aug 13 20:57:20 it still jumps down to the button below the EditText Aug 13 20:57:51 and what if you replace HIDE_IMPLICIT_ONLY by 0 ? Aug 13 20:58:06 you mean RESULT_HIDDEN? Aug 13 20:58:20 yes Aug 13 20:58:53 testing Aug 13 20:59:17 mmm... according to docs only legal value for that flag is either 0 or HIDE_IMPLICIT_ONLY Aug 13 20:59:44 RESULT_HIDDEN is for result Aug 13 21:00:40 SuD, that solved the problem Aug 13 21:00:42 thanks mate Aug 13 21:01:41 What would be the best way to cache graphics? I'm currently using a bitmap object but it's kind of awkward to use. Aug 13 21:01:42 too many defined int's Aug 13 21:02:18 i should read the docs more carefully next time Aug 13 21:02:21 :-P Aug 13 21:02:48 if it is for a kind of game, they mentioned opengl-es for fast graphics Aug 13 21:02:50 romainguy: yea... that's what I figured... just not sure how to get one from there, yet Aug 13 21:03:30 SuD, Well regardless what I use, I have a large object that takes a while to draw but only needs to be updated once in a while Aug 13 21:03:57 I was thinking maybe I'll try something hacky like getting the context from the TextView, send it to the InputServiceManager, and then send it through to the ExtractEditText, but that seems too roundabound to be the best way Aug 13 21:04:15 i'm assuming theres some way to get an activity from an ExtractEditText that i'm just missing Aug 13 21:06:41 bnovc, cant you just use the this-pointer? Aug 13 21:06:49 if its in your Activity class Aug 13 21:07:05 wild guess......... Aug 13 21:07:33 don't think so. I'm creating a View, so it requires a Context, but the view is going in a PopupWindow which requires the view's context to be an activity Aug 13 21:07:38 (as i am beginning to understand it) Aug 13 21:08:08 So you're trying to get an activity from... what again? :P Aug 13 21:08:19 OEP: bitmap is just fine to cache graphics Aug 13 21:08:38 OEP: I'm trying to get an activity inside of an ExtractEditText (which is inflated from InputMethodService) Aug 13 21:08:42 i think Aug 13 21:08:52 You need the context? Aug 13 21:08:59 nope. i have a context, but its not an activity Aug 13 21:09:17 the context of ExtractEditTexts is InputMethodService Aug 13 21:10:00 romainguy, ok I'll keep at it. I was hunting down a NullPointerException and it encouraged the thought there might be a better way Aug 13 21:12:52 I don't really understand why Dialogs require just a Context, whereas PopupWindow requires an Activity Aug 13 21:13:39 well, probably because Dialogs are broken and should require an Activity :) Aug 13 21:14:00 the whole reason you use showDialog(...) to display dialogs is so that the dialog can be controlled by activity lifecycle Aug 13 21:14:04 popupwindows probably are controlled by it Aug 13 21:14:12 they're not Aug 13 21:15:00 you're being very cryptic, romain :| Aug 13 21:15:16 alas, I will eventually figure this out.. just a lot of framework code to pick up in a day Aug 13 21:15:30 well, damnit :) Aug 13 21:16:12 Well this runs beautifully with the graphics cached, but it takes forever to recache them... Aug 13 21:16:15 i could be completely wrong on everything I'm guessing and the error is from something else though Aug 13 21:18:08 ooo that's interesting. PopupWindows that contain ImageViews work but not those that contain LinearLayouts Aug 13 21:19:04 I guess I could just make my LinearLayout an ImageView ... heh Aug 13 21:19:44 bnovc: ooo that's interesting. PopupWindows that contain ImageViews work but not those that contain LinearLayouts << this does not make any sense Aug 13 21:20:24 if it made sense to me, then I wouldn't be here Aug 13 21:21:48 I guess this leads to a follow-up question: is there a better way to paint to/create bitmaps than setPixel/setPixels Aug 13 21:22:01 OEP: you're using setPixels?? Aug 13 21:22:07 if so, yes there is a much better way Aug 13 21:22:15 Canvas c = new Canvas(theBitmap); Aug 13 21:22:22 then use the canvas to draw on the bitmap Aug 13 21:22:36 hooray! Aug 13 21:22:57 Have some broccoli Aug 13 21:26:05 romainguy: when it says "is your activity running?" does it really mean that an activity is required? or is a context supposed to be sufficient, but I'm doing something else wrong somewhere? Aug 13 21:26:18 I told you several times Aug 13 21:26:20 you need a window Aug 13 21:26:34 hehe Aug 13 21:26:36 it happens that activities have a window associated with them Aug 13 21:27:27 ls Aug 13 21:27:31 doh Aug 13 21:29:23 romainguy: so a popupwindow gets the context from the view that it is supposed to display and then tries to get the window from that? so in my case that window isn't available? Aug 13 21:30:33 oh, btw, when I mentioned yesterday that reloading with framework modifications was really slow, the command you gave did help, but there was some bug in my emulator causing it to be much slower than normal apparently. I rebooted and it is fairly quick now Aug 13 21:30:53 anyone using Galileo on OS X and noticing an extremely slow rendering editor? Aug 13 21:31:18 when scrolling it 'tears', isn't too conducive to a smooth working process Aug 13 21:31:25 when i build my project, i get a java heap space error.. how do i allocate more memory to ecllipse? Aug 13 21:31:38 cliffstah: fine for me Aug 13 21:31:40 fangus: command line, can't remember the details sorry Aug 13 21:31:49 search for 'eclipse command line memory' I guess Aug 13 21:31:58 cretin45: hm, I wonder if it's my workspace Aug 13 21:32:15 did you choose carbon or cocoa? Aug 13 21:32:20 cocoa Aug 13 21:32:24 me too Aug 13 21:32:29 though I should double check that. Aug 13 21:32:37 what machine you on? Aug 13 21:32:48 MBP 2.8 ghz Aug 13 21:33:20 hm ditto, 2.53 Aug 13 21:33:24 late mbp Aug 13 21:33:40 3.5, right? Aug 13 21:34:03 yeah Aug 13 21:34:06 which did you choose, 32 or 64 bit? Aug 13 21:34:17 i mean, cocoa or cocoa/x86_64 Aug 13 21:34:36 just cocoa Aug 13 21:34:43 didn't see the other Aug 13 21:34:43 * bnovc wishes DDMS would at least stop crashing, too. Aug 13 21:35:09 k, I chose 64, so there's at least one discrepancy Aug 13 21:35:15 * cliffstah redownloads Aug 13 21:35:43 i'm on the pulsar distro, too Aug 13 21:37:20 hmk, I'm going vanilla Aug 13 21:37:57 don't think it will matter Aug 13 21:38:10 no me either Aug 13 21:38:18 thanks, gave me some clues Aug 13 21:38:22 np Aug 13 21:39:02 hoping to get my head back into android this evening, finish off my Campfire client and start planning my work project Aug 13 21:58:09 How do I build an app that's in the android source tree (specifically the dev tools app) ? Is there a command I can run, like make or something? Aug 13 21:58:25 Or do I just need to pull it into eclipse... Aug 13 22:16:37 savid: ant debug Aug 13 22:19:16 bnovc, it's saying build.xml does not exist Aug 13 22:19:43 I'm in development/apps/Development Aug 13 22:21:43 i don't have a directory named that, but you could try using `android update` on it firsts Aug 13 22:21:46 *first Aug 13 22:23:22 savid: you can try bringing it into eclipse, but it probably uses private apis Aug 13 22:23:46 Hey all, has anyone worked with the Signpost OAuth library that might understand why I'm getting the following error: oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Received authentication challenge is null Aug 13 22:23:50 if that is the case, then you need to build the tree Aug 13 22:24:07 or have somebody who has it built give you the apk Aug 13 22:28:04 hm, i didn't even realize that the framework source doesn't come in the sdk :\ Aug 13 22:28:23 do companies have to pay for the source to that? Aug 13 22:28:42 bnovc: android source Aug 13 22:28:43 er no Aug 13 22:28:45 source.android.com Aug 13 22:28:46 get it Aug 13 22:28:55 build it Aug 13 22:28:57 love it Aug 13 22:29:01 oh ok. i just grabbed the sdk on this machine Aug 13 22:29:19 there are some things companies have to get certified to get, right? Aug 13 22:31:12 bnovc: you can build the entire thing minus the closed source apps Aug 13 22:32:05 bnovc: http://www.opensource.org/licenses Aug 13 22:32:44 hum, didn't realize the source was so large. on second thought maybe i'll just wait until i go back to work tomorrow to continue being frustrated w/android Aug 13 22:35:05 cretin45, I'm just wanting to use the app, is all... is there somewhere I can get it pre-built? Aug 13 22:35:40 do you have a place I can drop you a copy? Aug 13 22:36:26 omploader.org Aug 13 22:37:08 cretin45: http://yep.it/brx3f9 Aug 13 22:37:38 cretin45: seems it's a cocoa vs carbon issue on some machines Aug 13 22:37:51 downloaded the carbon copy (no pun intended), works perfectly Aug 13 22:38:01 looks like http://code.google.com/p/android/issues/detail?id=2788 was what i was struggling w/earlier Aug 13 22:38:27 savid: http://omploader.org/vMjVkcQ Aug 13 22:38:36 ahh, thanks :) Aug 13 22:38:50 thanks loomsen_ Aug 13 22:39:24 :) Aug 13 22:40:06 cliffstah: weird. cocoa works for me Aug 13 22:40:22 what display adapter do you have? out of curiosity Aug 13 22:40:52 NVIDIA GeForce 9400M Aug 13 22:41:19 hm, same Aug 13 22:41:20 oh well Aug 13 22:41:26 * cliffstah shrugs Aug 13 23:23:02 hey guys - anyway i can have a very large image and instead of fiting it all on the screen allow the user to scroll around it? Aug 13 23:43:24 hey guys - anyway i can have a very large image and instead of fiting it all on the screen allow the user to scroll around it? Aug 13 23:45:51 anyone Aug 13 23:46:39 Anybody know what's up witb ADC2? Seems to be a bit less than organized at this poiny... Aug 14 00:13:31 hey guys - anyway i can have a very large image and instead of fiting it all on the screen allow the user to scroll around it? Aug 14 00:15:21 AndyArmstrong: pulling from a remote server? Aug 14 00:15:38 you might consider chunking it into various zoom levels, since you probably cant decode it all in a single bitmap Aug 14 00:15:59 ala map tiles Aug 14 00:16:17 nah its all local Aug 14 00:16:48 its not that big an image Aug 14 00:16:51 but its dimensions are large Aug 14 00:16:54 its a games map Aug 14 00:16:58 and i wana be able to scroll around it Aug 14 00:17:07 at a fairly high level of zoom Aug 14 00:17:12 can u show me how to do that Aug 14 00:21:02 AndyArmstrong: you probably want to start by looking at the Camera app, since it zooms and pans photos on the device Aug 14 00:21:05 http://android.git.kernel.org/?p=platform/packages/apps/Camera.git;a=blob;f=src/com/android/camera/ViewImage.java;hb=cupcake Aug 14 00:21:35 do you really need control over the whole process? otherwise you could just launch an intent and the camera app would provide the rest Aug 14 00:21:55 how do you mean contorl over the whole process Aug 14 00:22:34 like, do you need to handle zooming in a specific way, or would the normal photo zoom-and-pan that comes with the platform work? Aug 14 00:22:42 emmm Aug 14 00:23:13 for example, in the google i/o app, we showed maps of the conference center by just launching an intent with about 5 lines of code Aug 14 00:23:24 the camera app took care of all the zooming and panning for us Aug 14 00:23:24 http://code.google.com/p/googleio2009/source/browse/trunk/googleio2009/src/com/example/googleio/AppUtil.java#71 Aug 14 00:23:36 i might need to zoom in on a specific part of the picture Aug 14 00:23:40 is that possible using the camera intent Aug 14 00:23:48 and i dont need the buttons at the top - gallery set as share tec Aug 14 00:23:51 oh, start zoomed? i dont think it supports that Aug 14 00:24:02 not necessarily start zoomed Aug 14 00:24:06 but say i had a method Aug 14 00:24:13 i dont think this intent causes the set-as buttons to show up Aug 14 00:24:14 which tells it to zoom in on a specific locaiton of the picture Aug 14 00:24:22 worth a shot, since its only a few lines of code Aug 14 00:24:46 ok so waht would i do Aug 14 00:24:48 *its worth tryign the intent method to see if it works Aug 14 00:24:52 i linked to code above Aug 14 00:24:55 bare in mind i need to be able interact with the image Aug 14 00:25:25 ok jsharkey Aug 14 00:25:28 i presume i want this bit Aug 14 00:25:28 Intent intent = new Intent( Intent.ACTION_VIEW); Aug 14 00:25:29 intent.setDataAndType(Uri.fromFile( f), "image/jpg"); Aug 14 00:25:29 context.startActivity(intent); Aug 14 00:25:31 if i do this Aug 14 00:25:41 can i still interact with user interacitions like touches etc Aug 14 00:25:55 never done this bit before Aug 14 00:31:42 AndyArmstrong: no, you wouldnt get touches in that case Aug 14 00:31:48 since it lives in another process at that point Aug 14 00:32:03 AndyArmstrong, I would suggest dropping the bitmap on a big canvas and handling touch events to scroll what part of the image is on the canvas. Aug 14 00:37:32 jsharkey: what's up? when's the adc2 judging app available? Aug 14 00:38:21 muthu: adc2 site says aug 31 so maybe mid october Aug 14 00:38:43 haha, true Aug 14 00:38:59 i'm sure goog will extend the deadline Aug 14 00:39:26 my app roadmap depends on it :) Aug 14 00:40:01 mid october lol Aug 14 00:40:40 will give me time to finish lol Aug 14 00:40:57 yeah you could release your own judging app by then Aug 14 00:41:12 oo yeah I might Aug 14 00:41:24 i would love to work for good, coz you don't have to care about deadlines ;) Aug 14 00:41:30 s/good/goog Aug 14 00:43:04 I am sure they are just very busy prepping huge market improvements :) Aug 14 00:43:58 haha Aug 14 00:44:13 market will keep em busy for this decade.. hehe Aug 14 00:45:51 or they are prepping sholes huh wimbet? Aug 14 01:35:57 meanburrito920 what do you mean by a big canvas... Aug 14 01:36:21 AndyArmstrong, every view has a underlying canvas object that you can directly draw upon Aug 14 01:37:35 actually not quite Aug 14 01:37:42 all the views in a given window share the same canvas Aug 14 01:38:42 ok... Aug 14 01:38:50 so meanburrito920 how would you go about trying to do what i wana do Aug 14 01:39:47 AndyArmstrong, well, the onDraw() method of Activity passes in the canvas to be displayed. You can do all kinds of manual drawing of the canvas, from blitting shapes to images to 3d graphics, etc. Aug 14 01:47:12 Hello, can anyone offer me some advice? Aug 14 01:48:49 Can anyone point me in the right direction for application development for the android for complete beginners (Only knowledge i have is basic c++), like where to start, what i need to learn, good websites or books? I would greatly appreciate any advice Aug 14 01:53:57 head over to #java and get some recommendations for some general java programming books for a start Aug 14 01:58:02 after that just read what the android developer site has, play with the examples and watch the talks Aug 14 01:59:00 Does anyone know how to disable debug logging? eg. when I deploy the device out to the field, I don't want to incur the performance and memory penalty of some of my logs Aug 14 02:17:18 hmm Aug 14 02:17:27 does the ondraw method get called again - and again and again and again Aug 14 02:17:28 or not Aug 14 02:19:38 AndyArmstrong: only when somethign causes an invalidate() Aug 14 02:20:35 i ccc Aug 14 02:20:40 and once on the activitys start? Aug 14 02:20:56 so if i wanted ondraw to change what was drawn on the canvas - id need to call invalidate Aug 14 02:21:01 say - on touch? Aug 14 02:22:01 touch would change your internal parameters (like scrollx), then call invalidate(), then onDraw() uses the parameters to draw Aug 14 02:22:26 invalidate() just posts a "dirty" message to the internal queue Aug 14 02:22:41 ahh ok Aug 14 02:22:43 so if haev on touch Aug 14 02:22:47 and id set my x and ys etc Aug 14 02:22:52 then call invalidate to update my ondraw Aug 14 02:22:55 yep Aug 14 02:22:55 with new x and ys Aug 14 02:22:58 awsome cheers Aug 14 02:48:48 how do i use canvas to draw my bitmap Aug 14 02:48:55 cos i cannot specify my resource id Aug 14 02:49:00 in any of the drawbitmap calls **** ENDING LOGGING AT Fri Aug 14 02:59:57 2009