**** BEGIN LOGGING AT Wed Apr 08 02:59:57 2009 Apr 08 03:21:40 hey there again Apr 08 03:23:32 I was wondering. I have a onDraw() method, which calls another method (called doDraw). if I call invalidate in onDraw() after calling doDraw, everything seems to work fine. if I call invalidate in doDraw, invalidate doesn't seem to change anything. any idea why this could be? Apr 08 03:26:25 why are you calling invalidate() in onDraw? Apr 08 03:35:03 well .. i'm not using a separate thread to draw stuff, so I draw them during onDraw. There is no interactivity int eh drawing (at least so far), really just points drawn on the canvas, and that seemed like a good way to do so Apr 08 03:35:20 but Apr 08 03:35:28 why do you need to redraw just after dawing? Apr 08 03:35:31 there's no reason to do so Apr 08 03:35:35 unless you want to use 100% of the CPU Apr 08 03:36:19 hmm .. one sec. maybe I understood something wrong. is onDraw called before or after a refresh? Apr 08 03:36:29 neither Apr 08 03:36:34 it's called when the screen needs to be drawn Apr 08 03:36:43 anyway, if I don't call invalidate, nothing gets refreshed Apr 08 03:40:04 so I suppose I really should run the drawing in a separate thread? I'm mostly modifying the API demos at the moment, I don't know how the invalidate came up in onDraw in the first place though Apr 08 03:40:17 no no Apr 08 03:40:21 you can't use a separate thread Apr 08 03:40:30 but I don't understand why you are invalidating Apr 08 03:40:34 are you animating something? Apr 08 03:40:57 yes. just a few dots moving around the screen and bouncing off the edges Apr 08 03:41:09 ok Apr 08 03:41:14 well you can call invalidate() then Apr 08 03:41:17 or postInvalidate() Apr 08 03:41:25 and calling it from doDraw or onDraw makes no difference Apr 08 03:41:30 there must be something with your code :) Apr 08 03:41:52 yeah ... there's definitely something weird with my code ;) Apr 08 03:42:45 on the other hand, I was also the guy who was able to get the source of www.google.Com but NOT of news.google.com, using exactly the code from the Androiddev site ;) Apr 08 03:43:04 maybe it's a problem with my mojo :O Apr 08 08:54:23 hi all Apr 08 09:32:14 hello all Apr 08 09:37:51 cat http://www.andyappz.com Apr 08 09:38:16 cat http://www.andyappz.com > free webspace for android devs :) Apr 08 09:38:31 I'm gonna take a Scientific Wild Ass Guess and assume that the ? replacement in all the SQLite stuff sanitizes the db, no? Apr 08 09:38:59 i wish i could help you man Apr 08 09:41:04 cat http://www.andyappz.com free webspace for android devs :) Apr 08 09:41:55 Hello andyappz, welcome to #android-dev Apr 08 09:43:16 wat :S Apr 08 09:43:36 :) Apr 08 11:19:20 Is it possible to debug a real target system over tcp/ip with ddms/eclipse? Apr 08 11:19:30 in stead of the emulator Apr 08 16:17:29 anyone know how to replace the caller id screen? Apr 08 16:21:29 not possible iirc at the moment Apr 08 16:23:30 but there are caller id apps on the market I thought Apr 08 16:23:53 There is one that shows a toast over the caller id iirc Apr 08 16:24:01 but it doesn't actually modify the screen Apr 08 16:27:47 oh that's genius Apr 08 16:28:18 totally screws me over Apr 08 16:30:32 yeah I thought that was clever too Apr 08 16:30:37 What are you trying to show? Apr 08 16:32:32 just trying to replace the current screen Apr 08 16:32:39 add some additional functionality Apr 08 16:34:19 ah, well good luck, I don't know about vol but I could definitely be wrong :) Apr 08 16:35:29 another question, can you programatically answer/hang up a call? Apr 08 16:37:17 . . . as opposed to? Apr 08 16:37:29 as opposed to pressing the green call button Apr 08 16:37:37 it's all just software. ;) Apr 08 16:37:55 doesn't mean I can tell it to answer from another application Apr 08 16:38:00 that said I don't think anyone has written anything to do that just yet. Apr 08 16:38:03 hmm, yeah dunno. Apr 08 16:39:12 I was thinking it'd be great to have something that would be 'autoreport # to dnc violations' answer, play them an ogg saying "add this number to your do not call list if you have not already' and also some skreetching sounds, then hangup. Apr 08 16:39:20 as an alternative to 'send call directly to voicemail' Apr 08 16:39:41 because the telemarketting assholes are leaving me voicemail when i do that. Apr 08 16:42:44 well I know you unfortunatly can't pipe audio into a call Apr 08 16:42:50 if you could... Apr 08 16:43:00 "I'm sorry, this number is no longer in service." Apr 08 16:43:06 goldmine Apr 08 16:43:27 heheh Apr 08 16:43:44 if I can't pipe audio Apr 08 16:43:52 it'd be fine to just blacklist/hangup based on CID. Apr 08 16:44:09 autoreport to DNC abuse would be an added bonus. ;) Apr 08 16:49:19 there might be a way Apr 08 16:49:29 it's such a hack Apr 08 16:49:42 turn off the vibrate and sound when its ringing? Apr 08 16:50:33 no, do other actions when you get a call Apr 08 16:50:43 * andrewoid puts his thinking cap on Apr 08 16:57:43 http://lolrats.blogspot.com/search?updated-max=2007-10-28T14:56:00-05:00&max-results=10 Apr 08 17:06:36 so you can make custom toasts, I didn't know that Apr 08 17:07:03 unfortunatly, you can't make custom toasts that have buttons you can press (as far as I can tell) Apr 08 17:09:23 well a toast dissapears Apr 08 17:09:33 its not a gogod idea to have an ineraction with something that dissapears Apr 08 17:09:42 you are very likely to press whatever is behind it Apr 08 17:10:24 yes, but thats the last of my problems Apr 08 17:10:31 *least Apr 08 17:11:05 andrewoid: that's not the point of a toast Apr 08 17:11:09 use a dialog to do this Apr 08 17:11:29 romain, cant. I want it to appear only when a call comes in Apr 08 17:12:26 unless I can make the activity/dialog happen after the call screen appears... hrm Apr 08 17:27:00 hm. there are alot of apps missing from android. Apr 08 17:27:02 kinda sad Apr 08 17:27:35 like? Apr 08 17:27:35 rhys: Sounds like an opportunity... Apr 08 17:28:45 blau-mikeDG, for example, grsync or a clone there of, allowing OTA syncronization of files, whatever they may be. Apr 08 17:29:15 a decent weather app that isn't made by a corporate tool. Apr 08 17:29:29 does any mobile platform have grsync? Apr 08 17:29:54 what files would you like to sync? Apr 08 17:30:01 blau-mikeDG, I may be a little bit biased here, my G1 replace a Nokia N800 internet tablet running Maemo Linux. Apr 08 17:30:46 a N800 is nearly a laptop for the number of things that are ported to it. with much better battery life, a 5 inch screen, 800x480 resolution. Apr 08 17:31:00 theres a handful of apps that provide weather Apr 08 17:31:25 id say a N800 is closer to a laptop than a mobile platform Apr 08 17:31:40 blau-mikeDG, weather channel and weatherbug? those aren't that great. Apr 08 17:32:05 simple weather, weather, imap weather, a ton of other apps have weather features Apr 08 17:32:23 andweather Apr 08 17:33:01 all of them lack features or have meh UIs. Apr 08 17:33:07 if one of those doesnt satisfy you, develop your own then Apr 08 17:33:26 http://code.google.com/p/aweather/ Apr 08 17:33:31 theres an open source weather app Apr 08 17:33:42 * ctate rather likes Weatherbug Apr 08 17:34:04 im not crazy about any of the weather apps either Apr 08 17:34:05 rhys: what's missing that you want? i'm just curious; i have no stake in Weatherbug other than as a user. Apr 08 17:34:09 obviously. I'm not complaining to the community. Not their job to please me, obviously. (ctate, thats what I currently use but I don't like the advertising). Apr 08 17:34:18 aha Apr 08 17:34:28 honestly i don't think i ever notice the advertising :) Apr 08 17:35:08 Weatherbug is actually nice, I dont like how it updates whenever it pleases, kind of shifty UI, the Ad that is downloaded at the top every time I run it. Apr 08 17:35:35 I think the Last.fm client is a beatiful example of what an app can achieve in terms of performance and usability. Apr 08 17:35:50 it updates whenever it pleases? Apr 08 17:35:50 i dont like last.fm lol Apr 08 17:36:06 blau-mikeDG, really? I love last.fm. Apr 08 17:36:27 even if you don't like the service I think its a quality made app. maybe the buttons could be a bit bigger, but meh. Apr 08 17:36:33 heres another tutorial for an old sdk with code http://www.anddev.org/android_weather_forecast_-_google_weather_api_-_description-t337.html Apr 08 17:36:36 yeah, it's pretty opaque how Weatherbug decides when to update Apr 08 17:36:44 i like the service, dont like the app Apr 08 17:36:59 gimme a few mins and ill complain about it when i reinstall Apr 08 17:37:40 they definately cleaned it up a bit Apr 08 17:37:49 i also agree that the Weatherbug UI feels like a port from another platform; uses some unusual looks and idioms, and doesn't quite handle the bottom-row buttons right [they're too short so they're hard to hit] Apr 08 17:38:00 that said, its feature set works for me, so. Apr 08 17:38:18 its actualy a lot nicer now, but i still think they make horrible use of font sizes, and do we really need giant tabs for radio and profile? Apr 08 17:39:00 blau-mikeDG, small adjustments, smaller tabs and slightly bigger buttons. The thing is, its performance of use is very high and very minimal for thought. Apr 08 17:40:14 and scrolling down to recent stations to get the now playing is weird Apr 08 17:40:28 it should be above or directly under start new station Apr 08 17:41:19 android is in its infancy, true. I honestly think the OS is in a beta1 state. but when I compare two incomplete solutions. The n8x0 ( needs GSM radio and dialer app ) vs the G1 or any android phone, (which needs better battery life and a host of apps it lacks, multi-touch, OS bug fixes [wifi!]), I think Nokia is a lot closer than Google is. Apr 08 17:41:45 what wifi bug is there? Apr 08 17:42:00 I have yet to get my g1 to connect reliably to any wifi. anywhere. Apr 08 17:42:02 rhys: yeah agreed, alas nokia doesn't seem to want to ship a maemo phone Apr 08 17:42:24 ive yet to have a wifi problem :/ Apr 08 17:42:28 part of this I blame HTC as they are nowhere near Nokia in terms of hardware design. Apr 08 17:42:44 the rest of it... I will wait. It can only get better. :) Apr 08 17:42:55 rhys: agree about the battery life (blame htc), but I've never heard of this wifi problem though... I've never had a problem connecting to any network Apr 08 17:42:56 get making a good weather program Apr 08 17:42:57 id like one Apr 08 17:43:36 rhys: has this been documented somewhere? Apr 08 17:44:33 ah. "Connect" Wifi for me always connects, as expected. No problems there. its a matter of the Apps often never know about it, or I get drop outs, our pauses. Apr 08 17:44:55 rhys: ahhh, ok Apr 08 17:45:42 this may be specific to me. I don't think I've ever connected it to a single AP wifi network. so watching the signal bounce up and down, I think its jumping AP's. Apr 08 17:46:26 My home network has 2 APs, my university network has multiple AP's, the theatre I got to try it in had multiple.. Apr 08 17:48:18 My university especially, the access points all have the same ESSID, and yet they are all subnetted differently. it is impossible to roam from one to the other. So if it jumps, it will lose connection, as its subnet is wrong. Apr 08 17:49:15 rhys: makes sense, I'm actually the opposite and have only ever connected it to a single AP Apr 08 17:49:28 rhys: sounds brilliant. Apr 08 17:49:30 rhys: what uni? Apr 08 17:50:02 Ahhh. real kicker. Look at my hostname. The Case Western Reserve University, a leader in technology! Apr 08 17:52:37 * ctate wishes to point out that the N8x0 devices are not phones, and do not have the power constraints that phones have. Apr 08 17:52:41 They have cisco routers across nearly all of campus, but because they have campus subnetted, even though you are on a vlan with a seperate IP range (172), the routers themselves have 129 addresses. go from one to the next, you won't route correctly. Apr 08 17:53:08 ctate, the GSM radio really takes that much power on Idle? Apr 08 17:53:09 hm, surprisingly small battery in the N800 though, interesting. (1500 mAh stock) Apr 08 17:53:19 rhys: especially on 3G, yes Apr 08 17:53:36 if you select 2G only on your G1, you'll see a marked jump up in battery life Apr 08 17:53:58 does tmobile even have 3g networks? (two separate radios in the phone correct?) Apr 08 17:53:58 and if you really hate your battery, go somewhere the phone will hunt for towers ^^ Apr 08 17:54:00 the N800 doesn't have GSM either, right? Apr 08 17:54:12 rhys: yes, and at least in my area its very good Apr 08 17:54:26 ctate, correct. n8x0 devices pair with phones via bluetooth for GSM, not by themselves. Apr 08 17:54:27 rhys: no, one radio that handles both, i believe. yes, T-Mobile started rolling out 3G service late last year. Apr 08 17:54:38 rhys: GSM radios also eat a ton of power Apr 08 17:54:56 a G1 with no cell or GSM radio would have awesome battery life. Apr 08 17:55:12 g1-touch? roflz. Apr 08 17:55:14 i have 3g Apr 08 17:55:30 ah. My 2400mAh battery will be here soon. I will be happier then Apr 08 17:56:31 i got 2600! Apr 08 17:57:16 30$ for 2400, 50$ for 2600. I took the cheaper. Apr 08 17:57:25 at least from what I saw. Apr 08 17:57:29 doesnt the 2400 have the crappy back case? Apr 08 17:57:40 has an extended case yea Apr 08 17:57:43 thats just a hump instead of making the full case extend Apr 08 17:57:59 no. full case extend Apr 08 17:58:09 ah cool then Apr 08 17:58:44 forgive me. http://cgi.ebay.com/T-MOBILE-G1-GOOGLE-ANDROID-EXTENDED-2400mAh-BATTERY-NEW_W0QQitemZ370182549945QQcmdZViewItemQQptZUK_AudioTVElectronics_PDAsAccessories_PDABatteries?hash=item370182549945&_trksid=p3286.m63.l1177 Apr 08 17:58:55 31$ shipped US. Apr 08 18:00:23 I haven't had a problem with battery life really, guess because it's plugged in at my desk all day Apr 08 18:00:48 and have a car charger for when using it as gps Apr 08 18:08:28 can the g1 play flac? Apr 08 18:13:54 rhys: http://code.google.com/p/android/issues/detail?id=1461 Apr 08 18:15:04 Curious only. When I wrote my sync script for the nokia, it would check for flac, and if so would on the fly encode it to 192Mp3. why do you need more for a portable? Apr 08 18:21:05 flac4lyfe! Apr 08 19:17:04 Hi everybody Apr 08 19:17:52 oh hi. Apr 08 19:19:01 Has anybody successfully compiled android for ARM and ran it under qemu? Apr 08 19:20:11 when you build the SDK that's essentially what you are doing Apr 08 19:20:14 Stephane: well, the emulator itself uses qemu Apr 08 19:20:55 What if I want to build it for an actual ARM device like a little test board Apr 08 19:21:12 can I use the content of the qemu image on that board? Apr 08 19:21:17 ahh, then you're talking about a more sophisticated project. Apr 08 19:21:27 i would suggest that you ask on the android-porting mailing list Apr 08 19:21:49 it is specifically dedicated to discussions about bringing Android up on new / different hardware platforms Apr 08 19:22:21 http://groups.google.com/group/android-porting Apr 08 19:22:37 thank you very much!! :) Apr 08 19:42:57 can you create an ImageButton with with an image and text? Apr 08 19:44:49 if you're using text, you want Button + background Apr 08 19:44:56 just image, then use ImageButton Apr 08 19:49:56 Hi all. Does anyone know how you can paste values into the android emulator? For example I want to paste a long URL into the browser text box. Every incarnation of control/command-v doesn't seem to work. I'm am on a Mac. Apr 08 19:59:39 localtone: not sure if it's possible Apr 08 20:00:31 vol: ok. thanks. I hadn't seen anything in the docs about it. too bad. Apr 08 20:09:53 another question if people don't mind - I have the exact same menu on a number of my activities. I am thinking I'll create superclass and subclass all of the activities to share this menu. However, am wondering if there is a better or shortcut way that people have done this? Apr 08 20:12:32 define the menu in an XML file instead Apr 08 20:13:16 but you still need to handle the logic for the items Apr 08 20:13:29 make a helper class Apr 08 20:13:45 but you still need to call the helper class Apr 08 20:14:11 Fast & 4ious Apr 08 20:14:19 that would have been an awesome logo Apr 08 20:15:46 the menu is defined in an xml file. was just looking at someway to share the onCreateOptonsMenu() and onOptionsItemSelectedMenu() methods since they are the same in al activities. Apr 08 20:16:00 looks like subclassing or helper is the way to go. Apr 08 20:17:17 blau-mikeDG: yeah and calling the helper class is a couple of lines of code Apr 08 20:17:18 :p Apr 08 20:21:05 thanks romainguy_ and blau-mikeDG Apr 08 20:21:49 np Apr 08 20:22:27 romain: are you aware of anything dangerous when messing with the calendar provider Apr 08 20:22:29 arggh Apr 08 20:22:36 like what? Apr 08 20:22:46 ah thought you missed that Apr 08 20:22:55 i broke syncing while attempting to insert a new calendar Apr 08 20:23:43 i probably wasnt doing it right, and i got a warning, and the phone wound up deleting the calendar when it tried to sync, but then when it "completed" syncing it restarted to the glowing android screen Apr 08 20:23:47 and did that repeatedly Apr 08 20:23:55 i hate to wipe everything Apr 08 20:25:37 im hoping not to have any other surprises like that Apr 08 20:42:16 blau-mikeDG: anything interesting in logcat? Apr 08 20:42:43 also, not sure if there is an issue if the calendar provider doesnt match the signature of the rest of the system stuff Apr 08 21:25:54 can someone help me figure out why this crashes when i press the button? http://pastebin.com/m57a5a15c Apr 08 21:30:21 ? Apr 08 21:33:07 the class called is basic "hello world" so i dont know what is going on Apr 08 21:33:23 what's the output of logcat? Apr 08 21:33:42 my money is on that you didn't declare the activity in the manifest Apr 08 21:33:55 let me check Apr 08 21:35:04 what is class Blah? Apr 08 21:35:12 and e.g. is it public? is it instantiated at that moment? Apr 08 21:35:32 I assume Blah is the containing Activity Apr 08 21:35:46 it is the containing activity Apr 08 21:36:15 in the manifest i have "Blah(Activity)" Apr 08 21:36:47 I'm talking about ServerConnect Apr 08 21:36:50 also ==zhobbs -- what is actually crashing? logcat will tell you Apr 08 21:36:51 you have to declare that Activity Apr 08 21:37:11 oh Apr 08 21:37:17 ok i didnt do that Apr 08 21:37:20 LogCat will tell you that Apr 08 21:37:27 that's the first place you should look Apr 08 21:37:30 where is logcat Apr 08 21:37:35 you using eclipse? Apr 08 21:37:38 yes Apr 08 21:37:56 it's a View in eclipse Apr 08 21:38:00 oh Apr 08 21:38:01 i found it Apr 08 21:38:01 oki Apr 08 21:38:08 it's in the DDMS perspective by default Apr 08 21:38:21 DDMS perspective is helpful for all kinds of stuff Apr 08 21:38:41 yea i found it lastnight Apr 08 21:38:44 after suffering Apr 08 21:39:31 DDMS r0xorz Apr 08 21:39:44 ok thanks im going to try to fix it Apr 08 21:43:45 Hi, I belive that we found a bug or a not well documented feature in layout_weight when the parent has orientation=vertical. Apr 08 21:44:30 ok it worked, thanks a bunch Apr 08 21:47:56 If creating a LinearLayout with orientation=horisontal the space is divided so the child with highest weight gets most space, but if we use vertical orienatition the child with lowest weight gets most space.. Apr 08 21:52:57 CompBrain: they work the same Apr 08 21:52:59 but Apr 08 21:53:15 if the sum of the dimensions of the widgets exceed the dimensions of the LinearLayout Apr 08 21:53:24 the weight is used to find out how much to *subtract* from each widget Apr 08 21:55:14 s/CompBrain/Coper/ ? Apr 08 21:57:33 CompBrain: but should this make the linearlayout ontop the largest? http://pastebin.com/m13c8c415 Apr 08 21:59:50 ouch Apr 08 21:59:53 don't use fill_parent Apr 08 22:00:03 fill_parent & weight doesn't mean anything Apr 08 22:00:11 you are doing what I was describing: subtracting space Apr 08 22:00:15 give them a height of 0dip instead Apr 08 22:00:24 romainguy_: okey that's a solotion too. :) Apr 08 22:04:16 but it feels like a bug to me. Apr 08 22:09:01 Which configuration file auto-starts the com.android.startupwizard ? Apr 08 22:09:57 Why do none of hte methods have exception specifications? Apr 08 22:27:31 most of the Android exceptions are unchecked anyway Apr 08 23:03:26 LogCat is telling me this: "04-08 23:02:16.672: INFO/dalvikvm(430): Ljava/lang/NoClassDefFoundError;: IndexOutOfBoundsException" Apr 08 23:12:04 thats pretty nifty Apr 08 23:13:02 Is my android.jar messed up, I wonder. Apr 08 23:13:06 I didn't tamper with it. Apr 08 23:13:51 shouldn't that be java.lang.IndexOutOfBoundsException or something Apr 08 23:18:52 * emmby has a n00b question Apr 08 23:19:55 I'm trying to return two strings to a parent activity from a sub-activity i launched using startActivityForResult(). The way to do this seems to be to create a new intent with a Uri as its payload. But to construct the URI, I seem to to have to use a Uri.Builder to construct a complete uri (with made up scheme, path, fragment, authority, etc.). If I leave any of those out, I get a NullPointerException in android.net.Uri$Hier Apr 08 23:20:07 It seems like a lot of overhead to return two simple strings. Apr 08 23:20:16 Is there a better way? Or do I really just have to make up gibberish for the scheme, path, fragment, etc. Apr 08 23:22:41 why as a Uri? setResult() supplies an Intent that contains the result Apr 08 23:22:49 just stick the strings directly into the Intent Apr 08 23:24:03 (via intent.putExtra("string1", first_string); intent.putExtra("string2", second_string); or whatever data protocol you want to define) Apr 08 23:24:21 thank god, that's much better Apr 08 23:26:05 thanks. reading the docs for intent i came away with the impression that the only way to specify data was using a uri Apr 08 23:28:22 wtf Apr 08 23:29:21 i guess it is pretty heavy on talking about the Uri stuff because of the interactions with content providers via Intents etc Apr 08 23:30:53 it's the only thing called "data", and it's the only thing you can pass in via the constructor, and it's the only way that Meier's book shows. The docs also don't say that extras can be used to pass info back to the parent, they only mention passing it to sub-activities Apr 08 23:31:07 but anyway, that helps a lot. cheers Apr 09 01:04:37 Hi ppl! I've a question. Apr 09 01:04:37 I've an activity that extends ListActivity. I do a kind of check on all element of the list and if an element corresponds to my criteria, I would like to put the background of this element in green (by example) or to add any visual effect on this element. I don't find how I should do that. Any recommandation ? Apr 09 01:10:43 quick question, can a Parcelable object not have debug statements in it? (I'm trying to debug something during rotation) I put debug statements in the object's writeToParcel and readFromParcel, and I don't get either statements, but the data is maintained over the rotations **** ENDING LOGGING AT Thu Apr 09 02:59:57 2009