**** BEGIN LOGGING AT Tue Nov 18 02:59:56 2008 Nov 18 14:13:32 hi ... An intent launched with startActivityForResult could return an object of type "IBinder"? ... thanks Nov 18 14:37:37 something isn't clear to me about service lifecycle... Nov 18 14:37:46 I have a service that I want to continue once the GUI has disappeared Nov 18 14:38:05 so my activity starts, and binds to teh service, and unbinds when it terminates Nov 18 14:38:18 that calls onDestroy on teh service... what is the correct thing to do to keep the service running? Nov 18 14:39:53 duncanfoo: consider to call Context.startService(...) Nov 18 14:41:03 ^^ Nov 18 14:41:10 I guess it would be similar to a mp3 player type service.. GUI starts, starts playing a series of MP3 files Nov 18 14:41:12 and then termiantes Nov 18 14:41:22 the service should play those mp3's until they are all complete, and then terminates Nov 18 14:41:29 duncanfoo: http://code.google.com/android/reference/android/content/Context.html#startService(android.content.Intent) Nov 18 14:41:30 I did actually exactly an MP3 player Nov 18 14:41:38 you start the service like filosofico says Nov 18 14:41:47 the service can determine whether anyone has bound to it or not Nov 18 14:41:59 so ... the workflow is: activity -> onCreate() -> startService() -> bindService(). onDestroy() unbindService() Nov 18 14:42:00 and it can check this when it finishes playing all of the music Nov 18 14:42:02 and the service self stops? Nov 18 14:42:09 no Nov 18 14:42:15 the service will need to either kill itself Nov 18 14:42:18 or you will need to kill it later Nov 18 14:42:26 isn't that what I said? :) Nov 18 14:42:37 no, you said the service self stops Nov 18 14:42:45 well, ok, I suppose it sort of is Nov 18 14:42:51 but the service needs to tell itself to die Nov 18 14:42:57 it won't happen automatically Nov 18 14:43:05 duncanfoo: read the link I have posted ... the lifecycle using starService(...) is explained there Nov 18 14:43:13 how is that different? :) "the service will need to either kill itself" <- call stopSelf() Nov 18 14:43:29 I read the link, however, it wasn't clear to me if I was supposed to use it in this way :) Nov 18 14:43:41 ie: the call flow I outlined above Nov 18 14:45:23 if you call a service with startService() the service will survive untill some one calls stopService() or the service calls stopSelf() Nov 18 14:45:38 ok, that's what I want. great! Nov 18 14:46:09 or until the OS decides that it needs to reclaim memory, and kills it I guess also Nov 18 14:46:17 yes Nov 18 14:46:27 the onServiceConnected callback occurs in the UI thread? Nov 18 14:48:53 binding a service or starting a service using an intent are two different situations ... onServiceConnected is "callbacked" only if you call bindService() because in this you pass the ServiceConnection object. Nov 18 14:51:46 I realize that... I need to bind to the service so I can call on it. Nov 18 14:51:57 my question is whether the callback is in the UI thread (guaranteed to be so) Nov 18 14:52:59 good question, don't know Nov 18 14:53:22 it appears to be :) Nov 18 14:54:01 seems that onServiceConnected is called within the thread has created the ServiceConnection object (the one you pass in bindService(...)) Nov 18 14:54:18 ok, the UI thread then :) Nov 18 14:54:44 it depends on what you are doing ^^ Nov 18 14:54:52 actiivty.onCreate() :) Nov 18 14:55:22 what is a bit annoying is that the activity cannot really do anything until onServiceConnected is called Nov 18 14:55:30 so it makes it a bit indirect to setup the activity correctly. Nov 18 14:58:52 yes Nov 18 15:05:14 there is here someone has developed the android Alarm framework? In which process runs the AlarmManagerService? Nov 18 15:11:46 09:59 < vol> So, anyone who has done C library debugging with android, have you tried integrating arm-eabi-gdb with Eclipse CDT, or any other visual tools? Or do you all just use arm-eabi-gdb from the command line? Nov 18 18:03:47 duncanfoo: i have a strategy for that. i avoid calling setContentView in onCreate and then i hide my entire view in onStop and restore it again in onResume or when the service connects Nov 18 18:04:18 it works nicely not to display a UI until the service is available, intended for activities which legitimately can't do anything without the service around Nov 18 18:05:22 another strategy i have used is to schedule a service connection in onCreate, but then implement a timed wait for the service to become connected whenever you need something from it. like if the user clicks something Nov 18 18:05:58 that way you're relying on the user's own natural delay in looking at the information presented and choosing what to do with it, in that time the service has likely connected but if not it will just block for some small, determinate length of time Nov 18 18:06:43 another approach would be to use a second looper thread which blocks until the service connects, and schedule all your work there Nov 18 18:06:43 so that the main thread doesnt block Nov 18 18:14:55 i didnt know that onServiceConnected came from the main thread tho. that doesnt make sense to me Nov 18 18:23:28 hmm, it does seem to though, looking at other source code google wrote Nov 18 18:24:24 that is interesting. i guess i can get rid of those handlers i use there :) Nov 18 18:45:03 Unless somebody else speaks up I'm going to rename this to #android-jasta. Nov 18 18:45:41 haha Nov 18 18:45:46 i was just leaving a message for duncanfoo :) Nov 18 18:45:59 thanks ;) Nov 18 18:45:59 its better than all the hacking talk in #android Nov 18 18:46:13 in my case since the service starts very quickly I'm basically ignoring that problem Nov 18 18:55:32 michaelnovakjr: agreed Nov 18 18:55:46 :) Nov 18 20:55:05 hola Nov 18 20:55:36 hiho Nov 18 20:57:12 how goes vol? Nov 18 20:58:59 oh, it goes. Nov 18 20:59:08 If you know anything about integrating eclipse CDT with arm-eabi-gdb, I'd love to hear about it Nov 18 21:00:12 I know one of our devs use Eclipse CDT to do visual debugging Nov 18 21:00:13 he showed me once how to do it Nov 18 21:00:13 I don't remember Nov 18 21:00:48 if you can poke him and ask him if there's a simple setting somewhere or whether it involves writing a swath of xml, I'd appreciate it, because at this point I'm seeing "swath of xml and a steep learning curve" Nov 18 21:07:08 greetings Nov 18 21:07:10 sgniteerg Nov 18 21:07:48 how can i join Irc using telnet on my g1. can someone give me the settings Nov 18 21:08:06 http://code.google.com/p/connectbot/ Nov 18 21:08:09 no idea about telnet. You can use the ConnectBot application to ssh into a shell, and run irssi there. Nov 18 21:08:13 or does connectbot do telnet? Nov 18 21:08:31 i think it does Nov 18 21:08:34 i take it connect bot is better than the telnet application? Nov 18 21:08:52 I didn't realize there was a telnet application. Nov 18 21:09:10 Anyway, telnet is pretty bad to use given that you're passing your username and password in plaintext Nov 18 21:09:11 along with everything else Nov 18 21:09:25 that said, there's significant overhead with using ssh, so it's going to eat your battery life if it's not plugged in Nov 18 21:09:26 that good to know based on im new to all this Nov 18 21:09:26 (I get like 3-4% drain/min) Nov 18 21:10:57 that's pretty intense. Nov 18 21:11:41 3-4% per minute is rediculously high, what do you have running Nov 18 21:11:45 it's also 3G, so that may be part of it. I haven't tried EVDO. Nov 18 21:11:45 so using the connectbot would be a litle safer Nov 18 21:11:53 it would be a lot safer Nov 18 21:12:55 im not understanding the log in process im using irc.freenode.net:6667..... could you share with me anything i may be missing Nov 18 21:14:55 gododr: you don't use connectbot directly for irc Nov 18 21:15:02 you use it to connect to a shell account somewhere, and then run irssi from there Nov 18 21:15:07 or whatever irc client you so prefer Nov 18 21:15:16 I don't think that there is an IRC client for android yet Nov 18 21:15:43 ok Nov 18 21:17:22 are you saying id basically need remote access to my pc to use IRC on my android currently? Nov 18 21:17:53 probably not your PC, unless you're running linux and understand how to setup sshd. Nov 18 21:18:07 (or have sshd running under windows somehow) Nov 18 21:21:14 any good irc webchats i can access on the g1 Nov 18 21:21:14 mibbit.com Nov 18 21:22:18 vol: i find that a little hard to beleive that you get less than an hour of browsing with the G1 at 3-4% per minute. Nov 18 21:22:39 unix_lappy: ssh + irssi = near constant 3G network connectivity Nov 18 21:22:39 plus computation Nov 18 21:22:49 I can feel the heat on my phone Nov 18 21:23:15 thats still wicked high. although i think connectbot by itself sucks down a ton (i notice heat also) but i can do a ton of stuff including irc and not lose that fast Nov 18 21:23:24 irc over wifi, or a ton of stuff over 3g i mean :) Nov 18 21:23:32 I get more than an hour browsing because browsing does not involve spending the entire time using network Nov 18 21:23:55 i've seen people get around 2+ hours on their iphone playing games. Nov 18 21:24:04 maybe I'm highballing it. Probably closer to 2% then. Nov 18 21:24:17 It's still a very clear loss of battery. Nov 18 21:24:18 It'd be cool if someone did an automated test of battery life: things like gps vs. non-gps, network activity (1 second ping, etc...), cpu spinning, gpu fill load, etc... Nov 18 21:24:28 sitting on irc all day is not feasable with this phone Nov 18 21:24:43 yea battery and no 3.5mm has been the greatest drawback for me thus far. Nov 18 21:24:44 drips and drabs of data (irc, ssh) vs intermittant big downloads (web) are fairly comparable Nov 18 21:25:35 the up and down arrows never seem to go away when I'm using ssh + irssi Nov 18 21:26:22 next time I go somewhere boring as fuck I can try it out with a fully charged phone and do a more scientific test Nov 18 21:26:27 heh Nov 18 21:26:52 do it over wifi and sniff it, see if its really doing a ton of data or if something else is going on Nov 18 21:26:57 have you heard of Cometd Nov 18 21:27:21 cometd chat Nov 18 21:27:55 no, and I'm sure it's fine for your purposes. Nov 18 21:28:44 lol Nov 18 21:29:09 i was just curious what it offered Nov 18 21:29:27 that and not being able to use flash storage to run apps :-P Nov 18 21:29:57 : ( Nov 18 21:29:57 that's annoying Nov 18 21:30:06 I also don't like the hideous camera Nov 18 21:31:08 i wonder if somone is working on video capability for the g1 Nov 18 21:31:46 the camera doesn't support video iirc Nov 18 21:31:46 so it shouldn't be possible. Nov 18 21:32:01 i heard they made it happen with the iphone Nov 18 21:32:03 or one of them apple devices Nov 18 21:33:17 Not sure I understand what it means for a camera to not support video, FWIW. Framegrabbers are framegrabbers. "Video" is what you do with the frame after it's in main memory. Nov 18 21:33:43 eh. Nov 18 21:33:51 I looked at this briefly, and it seems the core limitation is that the C++ API only has the notion of fetching single photos at a time. There's no "here's a buffer, fill it and wake me when it's done" notion. Nov 18 21:35:14 be interesting to see hardware framerate limitations. Nov 18 21:36:47 That seems to be hidden, AFAICT. The driver for the camera device on the G1 isn't part of the source release. All I found is a register mapping. Nov 18 21:39:41 http://code.google.com/android/toolbox/apis/media.html Nov 18 21:40:06 There is mention of video recording in the third paragraph. I think it must be a software limitation at this point. Nov 18 21:40:40 still image and video modes are done differently in hardware, iirc Nov 18 21:40:46 how are you dave et al.? Nov 18 21:40:49 any progress on your project Nov 18 21:40:53 Well and you? Nov 18 21:41:12 not well, slipping slightly Nov 18 21:41:12 but will survive Nov 18 21:41:27 slipping app wise I hope not health or anthing like that. Nov 18 21:41:32 I have taken some lumps on my app. Nov 18 21:41:51 yes app-wise Nov 18 21:41:56 I have been checking for PedNav out there. Nov 18 21:42:16 i've been using it secretly already Nov 18 21:42:18 It's not on the app store is it? Nov 18 21:42:23 not yet Nov 18 21:42:38 Bet it is kick ass. Nov 18 21:43:15 well i drive more than i ride transit, so working on some non-public transit features Nov 18 21:43:44 any interesting news on the G1 front? any rootkits or custom firmware images out? Nov 18 21:43:53 i haven't been keeping up past couple of weeks.. Nov 18 21:45:08 im curious what good is going to relase at the beginneing of the yr as far as apps Nov 18 21:45:27 f00f-: PedNav? Nov 18 21:45:30 is that your project? Nov 18 21:45:37 I hope a working version of the Android Market. Nov 18 21:46:00 lol Nov 18 21:46:18 hah Nov 18 21:47:44 iit would be cool if the hooked up some more widgets Nov 18 21:47:52 Yeah, I agree Nov 18 21:47:56 we definitely need more widgets Nov 18 21:49:40 haha dave Nov 18 21:49:40 yeah vol Nov 18 21:50:01 i guess my favorite game is the brain puzzle thingy Nov 18 21:50:10 Digging through the source is worth every minute in that respect. Nov 18 21:56:54 has tmobile found a way to keep users away from the root access Nov 18 21:57:09 accessing the root Nov 18 21:57:39 gododr: no, and a simple google query would tell you how to get it Nov 18 22:00:06 i understand the idea of it but i wouldnt have the slightest idea on what to do as the root user other than really messing up some things Nov 18 22:03:22 wait, is there a root exploit for rc30? Nov 18 22:05:01 vol: no. Nov 18 22:05:08 but it'll just happen again... ;) Nov 18 22:06:09 hey guy hope to chat with you later Nov 18 22:06:31 ... ta/. **** ENDING LOGGING AT Wed Nov 19 02:59:57 2008