**** BEGIN LOGGING AT Fri Mar 27 02:59:57 2009 Mar 27 04:07:06 hey Mar 27 08:56:23 what's a good way for a content provider to return non-table-based information? Mar 27 08:57:28 like, I want to be able to query my content provider for summary statistics (total wins, current winning streak, etc.) without having to go through row by row and add them up in the client Mar 27 08:58:20 I see that Cursor has a getExtras() method, but I can't set a new bundle.. so if sqlite returns a Cursor with an empty extras bundle, I can't put new items in there Mar 27 09:00:40 I also thought about having special content urls, like content://myapp/summary/totalwins that would return a text/plain stream, but that seems like a huge pain to implement and use Mar 27 09:57:05 hi Mar 27 11:10:28 That google search widget on the G1 desktop Mar 27 11:10:39 How do I write apps that sit on the desktop in the same way? Mar 27 11:16:38 Hmmm. A little reading suggests that it's not possible Mar 27 11:39:45 hey there, does anyone know how to work with org.apache.http.auth, or where I can find a more detailed description of it? Mar 27 11:48:26 so, what I'm trying to do is set credentials. According to the apache docs, it should be: client.getState().setCredentials(new AuthScope("myhost", 80, AuthScope.ANY_REALM), defaultcreds); Mar 27 11:48:47 however, HttpClient in de android libs doesn't provide getState() Mar 27 12:08:02 does anyone know what version of the apache library is supplied with Android? It seems that getCredentialsProvider() which should work with 0.4 does not exist either.. Mar 27 12:24:25 Is there another method to get the credentialsProvider? Mar 27 14:01:45 has anyone had any luck with gdbserver ? Mar 27 14:02:06 I always get disconnected when connecting Mar 27 14:03:20 I can use it just fine Mar 27 14:03:26 Malformed response to offset query, timeout Mar 27 14:03:29 make sure to do adb forward :> Mar 27 14:03:38 I'm running it on the device Mar 27 14:03:43 using the wifi connection Mar 27 14:03:43 oh Mar 27 14:03:47 uh Mar 27 14:03:49 :X Mar 27 14:04:04 ? Mar 27 14:04:05 malformed response when you start gdbserver, or using target remote Mar 27 14:04:12 target remote Mar 27 14:04:16 yeah Mar 27 14:04:33 all I can tell you is that that's exactly what happens when I forget to run my 'prepare' script that installs gdbserver and runs adb forward Mar 27 14:04:53 can you put that script in pastebin ? Mar 27 14:05:08 there's not much there, mostly adb push gdbserver /system/bin etc Mar 27 14:05:33 $ADB push ./gdbserver /system/bin/gdbserver Mar 27 14:05:33 $ADB shell chmod 755 /system/bin/gdbserver Mar 27 14:05:33 $ADB forward tcp:1234 tcp:1234 Mar 27 14:05:36 there's the relevant bits Mar 27 14:05:39 weird, I don't need to do that, gdbserver is already in the image Mar 27 14:05:43 (ADB is defined earlier) Mar 27 14:05:45 yeah Mar 27 14:05:53 ok, let me try the port forwarding then Mar 27 14:05:56 the only reason I have a script is because I use an emu for debugging Mar 27 14:05:59 definitely do port forwarding Mar 27 14:06:04 thats the only step you're probably missing Mar 27 14:06:48 \o/ Mar 27 14:07:32 that do the trick? Mar 27 14:08:01 yah Mar 27 14:08:12 hmm... getting a lot of other signals though Mar 27 14:08:16 SIGSTOP and so forth Mar 27 14:08:19 * bilboed-pi re-runs under strace Mar 27 14:08:20 have fun :> Mar 27 14:08:34 make sure you're using gdbserver compiled for arm Mar 27 14:08:38 and running arm-eabi-gdb to connect Mar 27 14:09:38 * bilboed-pi thinks Mar 27 14:10:12 well, if gdbserver does run on device, it's probably compiled correctly Mar 27 14:10:14 and how do you give it arguments ? Through gdbserver or the host gdb ? Mar 27 14:10:18 make sure you're using arm-eabi-gdb Mar 27 14:10:24 what I usually do is Mar 27 14:10:38 I find the process that's running my apk (since I'm debugging a shared lib) Mar 27 14:10:50 and then attach to that Mar 27 14:10:55 gdbserver :1234 --attach Mar 27 14:11:05 I can't really do that :( Mar 27 14:11:16 (unless I write a specific application) Mar 27 14:11:17 well, if you're trying to debug a bin you made, that works fine too Mar 27 14:11:25 what are you debugging? just some bin you made? Mar 27 14:11:30 gstreamer Mar 27 14:11:55 through the gst-launch-0.10 binary. (getting segfaults in some plugin) Mar 27 14:12:05 the problem is that I need to give that binary a series of arguments Mar 27 14:12:17 and... it's unclear where I should give them Mar 27 14:12:24 uh Mar 27 14:12:26 hmm Mar 27 14:12:41 I'm pretty sure you give it the arguments when you start it with gdbserver Mar 27 14:12:41 i.e. If it was standalone gdb, I'd do "gdb gst-launch-0.10" and then "run my arguments are here" Mar 27 14:12:48 ok, retrying then Mar 27 14:12:51 I don't know honestly Mar 27 14:12:59 is it possible to add a footer/header-view for a list in xml? Mar 27 14:13:16 I don't know ._. Mar 27 14:13:20 ... SIGBUS, Bus error. Mar 27 14:14:24 hmm Mar 27 14:14:34 meh, I think I know the problem Mar 27 14:14:37 there's another step we use when we do this in gdbserver Mar 27 14:14:40 most likely unaligned memory Mar 27 14:14:52 vol, yes ? Mar 27 14:15:09 set solib-absolute-prefix and solib-search-path Mar 27 14:16:37 I've pulled all of the libs from the emu/device in /system/lib and put them in /foo/bar/system/lib Mar 27 14:16:51 I then set solib-search-path /foo/bar/system/lib Mar 27 14:16:59 and set solib-absolute-prefix /foo/bar Mar 27 14:17:00 oh, well I already have all of them since I built them :) Mar 27 14:17:04 ok Mar 27 14:17:05 you can use that too Mar 27 14:17:06 er Mar 27 14:17:08 use the ones you built Mar 27 14:18:23 it's not really useful Mar 27 14:18:38 SIGBUS gets triggered... but not caught by gdb(server) Mar 27 14:18:45 i.e. the program stops, and gdb disconnects Mar 27 14:19:06 I don't know, debugging is a little touchy anyway Mar 27 14:19:07 actually Mar 27 14:19:09 this is on device? Mar 27 14:19:12 yes Mar 27 14:19:12 are you running this as root? Mar 27 14:19:18 if not, try Mar 27 14:19:28 yah, I am root Mar 27 14:19:37 ok, hmm Mar 27 14:19:41 I don't really know Mar 27 14:20:09 hmm.... I don't think it's actually working tbh Mar 27 14:20:18 it's giving me bogus addressses Mar 27 14:20:34 and I can't break anywhere Mar 27 14:21:32 if at least I could get a core dump Mar 27 14:22:05 try this on an emulator Mar 27 14:22:07 to save your sanity Mar 27 14:22:37 same thing on the emulator Mar 27 14:26:46 damnit my application got pulled from the market Mar 27 14:27:46 ... this gdbserver is really pointless Mar 27 14:29:09 tbr: what app Mar 27 14:29:15 bilboed-pi: wait until fadden pops in Mar 27 14:29:24 he can probably help you Mar 27 14:29:31 vol, good to know :) Mar 27 14:29:47 ... if only I could get some core dumps, that at least would be more useful Mar 27 14:29:49 SMSBarrage, allowed you to send from 2 to 100 mass repeated text messages to any number of people Mar 27 14:30:07 bilboed-pi: adb shell setprop debug.db.uid 32767 Mar 27 14:30:12 2 to infinity with the last update haha Mar 27 14:30:24 when you set that, when a program segfaults execution pauses Mar 27 14:30:29 allowing you to attach a debugger Mar 27 14:30:31 vol, nice Mar 27 14:30:44 tbr: yeah, that sounds slightly abusive Mar 27 14:31:01 i made it to win contests over SMS and not to spam people Mar 27 14:31:45 vol, hmm... still not helping Mar 27 14:31:51 now when i go to the Penguins games and you have to text your section to win free t-shirts, my section always wins :) Mar 27 14:33:33 bilboed-pi: bleh, go make hello world and try and debug that, so that you don't bang your head in frustration at a more difficult example Mar 27 14:33:58 tbr: the road to hell is paved with good intentions and unlimited sms plans Mar 27 14:36:58 could i make an app self updating? Mar 27 14:37:36 when you run an app it's loaded into memory so i could download a new apk over the old one right? Mar 27 14:48:58 uh Mar 27 14:49:02 maybe? Mar 27 14:49:11 try it and see :D Mar 27 14:49:19 bear in mind that you'll need permissions to do this Mar 27 14:49:25 which means pretty much running some script via su Mar 27 14:51:14 does the market application have special permissions then? Mar 27 14:51:48 market is signed as part of the system Mar 27 14:51:56 and as such gets special permissions Mar 27 14:52:09 though to be honest I think that it uses a service to do most of what it does that CAN do all of this Mar 27 14:53:45 * bilboed-pi scratches head Mar 27 14:54:03 how can I deactivate stripping of just one binary/library ? Mar 27 14:54:28 my bad, just saw the symbols are elsewhere Mar 27 14:55:36 Yeah, market has the permissions that allow it to bypass the package manager UI to install / uninstall packages. I hope someday someone implements support in the package manager for market to be able to use public APIs for this. Mar 27 15:00:46 i just don't want to leave my users in the dark and I definitely don't want them to have to download a new version manually everytime I update it Mar 27 15:01:38 bilboed-pi: find where arm-eabi-strip gets called :P Mar 27 15:01:53 vol, no, it's way easier than Mar 27 15:01:54 tha Mar 27 15:02:07 vol, the symbols are stripped ... into separate files :) Mar 27 15:03:15 interesting Mar 27 15:04:05 that's how *proper* stripping is done FYI Mar 27 15:04:39 i.e. all those -debug packages for linux distros actually contain only the symbols files (normally .debug) Mar 27 15:05:11 so you get the benefit of lightweight binaries/libraries in memory ... and the benefit of being able to get the symbols when using gdb Mar 27 15:06:44 Hi all. How can I update a ListView. The underlying lists have changed and its adapter needs to reload. What method should I use for that? Mar 27 15:08:17 actually, proper stripping is done on a pole Mar 27 15:08:19 just fyi Mar 27 15:10:44 vol, :) Mar 27 15:11:04 vol, same thing. Does she throw away her clothes ? NO ! she re-uses them when needed ! Mar 27 15:11:59 aVirulence, .notifyDataSetChanged() Mar 27 15:12:09 tauno: thanks! Mar 27 15:13:19 vol, wooot, definitely better when you specify the 'symbols' directories :) Mar 27 15:14:05 tauno: oh wait, it's undefined for the ListView and ListAdapter, on what should I call the method? Mar 27 15:14:14 vol, like... I can actually see where the segfault is now :) Mar 27 15:15:13 aVirulence, are you using ArrayAdapter? Mar 27 15:15:51 tauno: yeah, sorry, I meant that instead of ListAdapter Mar 27 15:16:03 aVirulence, ArrayAdapter has this Mar 27 15:16:24 http://developer.android.com/reference/android/widget/ArrayAdapter.html#notifyDataSetChanged() Mar 27 15:19:10 tauno: you're right, I made a mistake. Thanks again. Mar 27 15:27:09 bilboed-pi: yeah Mar 27 15:27:14 that's pretty helpful :> Mar 27 16:51:59 hmm... gdbserver --attach is usless Mar 27 16:52:09 no it's not : ( Mar 27 16:52:11 the backtraces I'm getting are completely wrong Mar 27 16:52:29 interesting Mar 27 16:53:56 vol, that's what I mean by "it's useless" : http://pastebin.com/m56314655 Mar 27 16:54:13 (1) bionic linker fuckups, (2) corrupted stack Mar 27 16:54:51 interesting Mar 27 16:55:11 I need to be able to set some break points, run it, add some tracepoints, step, etc... Mar 27 16:55:16 I dunno man, wait for fadden to pop in honestly Mar 27 16:55:21 fadden, ping Mar 27 16:56:08 *sigh*... I was more productive hacking on iPhone before the sdk was released Mar 27 16:56:12 I would seriously attempt to debug 'hello world' before attempting to deal with ffmpeg Mar 27 16:57:06 vol, ok, let me put it another way. whatever the application (whether helloworld or something bigger) I still can NOT do the gdb 101 ==> break main; run; Mar 27 16:57:28 that's pretty depressing Mar 27 16:57:35 can you ? Mar 27 16:57:37 can anyone ? Mar 27 16:57:39 yes Mar 27 16:57:49 well, I haven't tried breaking on main Mar 27 16:57:56 but I can most definitely attach to the shared lib that we load Mar 27 16:58:10 of course, that involves debugging 'dalvikvm' Mar 27 16:58:16 but things work well enough Mar 27 16:58:39 my debugging process is basically Mar 27 16:58:40 ok, try #43928432 of getting gdb to break on main Mar 27 16:59:00 adb shell ps | grep ourApp | awk '{print $2'} | xargs gdbserver :1234 --attach Mar 27 16:59:05 then, on the remote machine Mar 27 16:59:19 set solib-search-path /foo/bar/system/lib Mar 27 16:59:26 set solib-absolute-prefix /foo/bar/ Mar 27 16:59:30 target remote localhost:1234 Mar 27 16:59:38 at that point I just set breakpoints and such and then hit continue Mar 27 16:59:49 sure... for a running app... I get that Mar 27 17:00:00 I haven't tried using gdbserver to run an app flatout Mar 27 17:00:06 but I don't expect it would be altogether too different Mar 27 17:00:24 I do know that we used an arm ported version of gdb on the emulator Mar 27 17:00:30 to test hello world Mar 27 17:00:38 but that ended up being way, way too large for our lib to handle Mar 27 17:00:41 yah, let me see if I can grab a port of gdb Mar 27 17:00:54 I dunno how useful that's going to be though Mar 27 17:01:03 since it's going to take up A LOT of your already scarce memory Mar 27 17:01:08 but it's worth a shot Mar 27 17:09:13 pffff... found a gdb... that doesn't work Mar 27 17:14:26 how can I make it dump cores ? Mar 27 17:18:05 I don't know ._. Mar 27 17:18:23 * bilboed-pi checks Mar 27 18:02:42 dumping core might be as simple as "ulimit -c unlimited" Mar 27 18:02:55 You just need to get that far enough up the process chain (e.g. at init time). Mar 27 18:03:08 Haven't tried it myself. Mar 27 18:03:25 "ulimit -a" reports a soft limit of 0 on coredump size (disabling it) but no hard limit. Mar 27 18:49:43 can anyone point me somewhere I can figure out how to setup a list view and handle the click events for the items? Mar 27 18:51:57 I thought that was part of the android tutorial Mar 27 18:54:54 Its not Mar 27 18:54:58 It doesn't connect the dots at all Mar 27 18:55:17 http://developer.android.com/guide/topics/ui/binding.html Mar 27 18:55:18 is there some standard lib for scanning barcodes? Mar 27 18:55:27 or does everyone invent his own? Mar 27 18:55:28 The first example source isn't even the same source as the second example source Mar 27 18:56:38 Anyone know how to handle item click events in a ListView? Mar 27 18:58:49 not offhand Mar 27 18:59:06 stick around, someone will answer Mar 27 19:03:59 Varan: Zxing Mar 27 19:04:06 Open Source and pretty easy to use Mar 27 19:04:55 hmm owke Mar 27 19:56:55 hi, does anyone know how to invoke a subprocess and read the stdout from it? Mar 27 19:57:12 i am trying to write a crash reporter, and want to include the output of logcat Mar 27 20:01:41 ah Mar 27 20:01:45 it's a private api Mar 27 20:01:49 guess that's why i couldn't find it. great. Mar 27 20:02:04 yep. Mar 27 20:02:27 fudge Mar 27 20:02:35 don't see any alternative though. here we go .... Mar 27 20:02:57 well, i suppose i could maintain my own in-memory log Mar 27 20:20:57 TD: I keep my own log around for crash reporting Mar 27 20:22:02 yeah Mar 27 20:22:09 seems like the best way. annoying though. Mar 27 20:22:20 doesn't seem to be any way to access the android log programatically Mar 27 20:22:34 zhobbs: do you have any generic crash-logging code/setup i could reuse? Mar 27 20:22:50 yeah, I was using my own logging class anyway because I didn't want to be dumping docs for every api call I use Mar 27 20:22:55 no, it's simple though Mar 27 20:23:06 ok, np. i am 50% done with my implementation anyway Mar 27 20:23:20 so in release versions I don't dump to LogCat Mar 27 20:24:45 Yeah, we pretty much have our own logging class that supercedes logcat. It checks for the existence of a directory on the sdcard and dumps into a text file there if it exists, otherwise goes to logcat. Mar 27 20:24:53 We also have flags that specify what levels of logging to use Mar 27 20:25:56 a better logging framework would be good. in particular, one that logs binary representations instead of full strings Mar 27 20:26:46 but if wishes were ponies .... :) Mar 27 20:27:21 I thought there was a binary logging setup somewhere... Mar 27 20:28:09 seems to be a private one Mar 27 20:28:11 TD, you mean, like, the event log? Mar 27 20:28:33 yeah. but afaict that's not an exposed api Mar 27 20:29:52 Very possibly yeah. That'd be very interesting to add, though. Mar 27 20:30:26 (with some notion of registration to avoid conflicts for the event codes, and formatting to decode the binary data back into human-readable text) Mar 27 20:30:46 i'd settle for an app that just emails arbitrary people the output of "adb bugreport" :) Mar 27 20:31:32 There's a privacy concern in doing it automatically. Mar 27 20:32:50 Hello all... Is it possible to set the view's background size? Mar 27 20:33:20 don't think os Mar 27 20:33:21 so Mar 27 20:36:24 jbq, yes, i'd settle for asking people to do it. Mar 27 20:36:29 it's not so bad. Mar 27 20:36:42 it's easy for people to email you saying "it crashed", then you can say "please run the bugreport app and send the results to me" Mar 27 20:39:27 TD: you can capture uncaught exceptions and send a bug report automatically Mar 27 20:39:56 that's what i'm writing now Mar 27 20:40:03 ahh, ok Mar 27 20:40:11 it's a pain to ensure they are always captured though. you have to configure each thread you run. Mar 27 20:40:24 yeah Mar 27 20:40:29 fortunately i know the try block the crash is in, so it's not a problem for me right now. but as a general solution - awkward. Mar 27 20:40:32 still Mar 27 20:40:38 i am just happy it is not saying "Segmentation fault" :) Mar 27 20:40:45 * TD sooooo glad he is not working with objective-c Mar 27 20:40:58 yeah Mar 27 20:41:09 while you're living in javaland, everything is nice Mar 27 20:41:15 move to native c++ code though.... : ( Mar 27 20:41:26 * vol hates his shared lib sometimes Mar 27 20:41:33 what does it do ? Mar 27 20:41:43 uh, we get a pretty much useless stacktrace when things crash. Mar 27 20:41:53 awesome great about 50 lines of where you died in libm Mar 27 20:42:01 and it's not even a useful stacktrace Mar 27 20:42:04 it's just hex values Mar 27 20:42:09 for a stripped lib Mar 27 20:42:25 so you know you died in SOME lib that was calling some OTHER lib that called something else Mar 27 20:42:40 on the emulator we can at least use a debugger Mar 27 20:42:46 i meant the dso :) Mar 27 20:42:52 but yes. i know your pain Mar 27 20:42:58 ... : ( Mar 27 20:43:19 hmmm. http 417 "Expectation error" Mar 27 20:43:30 that's a new one. who knew uploading a string to a server could be so annoying :-) Mar 27 20:43:52 your server has great expectations Mar 27 20:43:57 I have never ever seen that error before :D Mar 27 20:44:04 me neither Mar 27 22:05:34 is there something i'm doing wrong with my launcher intents? for some reason, non-deterministically pressing a launcher icon on my desktop doesn't clear the backstack. it puts the first activity of the app on top, so pressing "back" does the wrong thing Mar 27 22:05:40 but i can't always reproduce it :/ Mar 27 22:11:24 TD: There are options in the manifest about how you want your activity launched Mar 27 22:11:47 i just have the defaults, i think Mar 27 22:11:48 Mar 27 22:11:48 Mar 27 22:11:49 Mar 27 22:11:49 Mar 27 22:20:18 yeah Mar 27 22:20:26 look into it, there's all sorts of exciting options for manifest files Mar 27 22:20:35 http://developer.android.com/guide/topics/manifest/activity-element.html#screen Mar 27 22:23:20 hmm Mar 27 22:23:31 is there any way to arbitrarily force an application to have a certain orientation? Mar 27 22:23:37 not just at startup but during runtime Mar 27 22:23:47 clicking button X makes you go from landscape to portrait, etc Mar 27 22:42:53 has anyone ever ran into problem with webview that says unable to open database file Mar 27 22:43:56 i am having problem with the webview where it's having problem opening the webview.db Mar 27 23:46:46 If my sub activity's view is created via XML how can I pass intent data to the view from the subactivity? Mar 27 23:49:29 Anyone got a hint? Mar 27 23:55:13 My friend said that the view gets a context which I can get the intent from Mar 27 23:55:21 but the context doesn't have anything like .getIntent Mar 28 00:05:48 Someone please help me? Mar 28 00:05:53 PING 4171061015 Mar 28 00:11:04 ew Mar 28 00:11:22 ew what? Mar 28 00:11:59 Lieu10ant, ? Mar 28 00:14:23 Someone please help me pass data to my view Mar 28 00:32:13 i got pinged Mar 28 00:32:20 it felt like i got molested. Mar 28 00:32:22 it was gross. Mar 28 00:53:10 Is there any realtime interpreter? Mar 28 00:53:33 lol this app seems real complicated... **** ENDING LOGGING AT Sat Mar 28 02:59:57 2009