**** BEGIN LOGGING AT Wed Mar 19 02:59:57 2008 Mar 19 02:59:59 the Contacts app Mar 19 03:00:17 ok thanks Mar 19 03:00:20 jjt009: there is an example in the ApiDemos I think Mar 19 03:00:25 thanks Mar 19 03:01:35 can you use Search outside of local data on the phone? Mar 19 03:01:53 for websites? Mar 19 03:02:07 jjt009: this uses a Search object, looks like it's gone in M5 though: http://davanum.wordpress.com/2007/11/19/drawing-overlays-for-android-maps-aka-search-for-starbucks/ Mar 19 03:05:18 omg :( "Challenge is void in, and not open to residents of, Italy and the Quebec Province of Canada" Mar 19 03:07:14 sweet thanks Mar 19 03:07:15 The challenge is overrated. If you can make a killer mobile app, you can make your cash the old fashioned way. Mar 19 03:07:29 Can i win the challenge? Mar 19 03:07:44 Potentially anyone can. Mar 19 03:07:45 What are my chances? Mar 19 03:07:58 Unless you're in Italy or Quebec. Mar 19 03:08:25 how many entries do you think there will be? Mar 19 03:08:34 1bajillion Mar 19 03:08:46 i'm guessing 700-800 Mar 19 03:09:10 That's like trying to guess how many jellybeans are in the jar. Mar 19 03:09:41 if i just port an app from wm(WINMOB) to android, do i have a chance of winning? Mar 19 03:09:53 yeah, I wouldn't dwell on how many entries there will be, I'd just look at it as a goal to work to rather than a competition Mar 19 03:10:03 true, ture Mar 19 03:10:05 true Mar 19 03:10:22 25,000 is some good money Mar 19 03:10:50 One thing I do know is that there will be a LOT of duplicate entries, partly because of a lack of vision, partly because Android lacks certain functionality, and partly because the current bugs keep entries from working. Mar 19 03:11:14 er, 'certain' entries that is. Mar 19 03:11:27 the lack of a working prototype is really annoying Mar 19 03:11:37 an emulator just cant match the real thing Mar 19 03:11:52 and who knows if android will turn out to be a flop Mar 19 03:12:13 then our development was for nothing Mar 19 03:12:14 Then again, I wonder if you can you submit a 'theoretically' working entry... Mar 19 03:12:37 well, all apps are theoretically working Mar 19 03:12:37 There will be a lot of people out there working to make an application that will grab some free attention. Lots of students with a lot more free time than anyone else, companies making a good pitch to enter at the bottom rung, also entries from less privileged areas. Mar 19 03:13:07 I've been on job web sites where people bid on work for like $10 Mar 19 03:13:56 If 25,000 is at stake plus the opportunity to learn a new skill, I'm betting that it won't be much of a secret between eager developers Mar 19 03:14:56 good point chaosvoyager. there will definitely be lots of duplicate entries Mar 19 03:16:24 and a lot of low-quality ones as well Mar 19 03:16:39 chomchom: Man, I use to trudge the software bounty websites and see things like that too. Mar 19 03:17:07 things that don't make good use of android functionality Mar 19 03:17:11 it's quite an unknown tho, the quality and quantity of the entries.... Mar 19 03:17:30 I would bank on high quality. Mar 19 03:18:00 I hate to say the current quality of Android is a big limiting factor. Mar 19 03:18:07 i'm unsure whether google is doing this just to get a bunch of working apps in order to be able to quickly hit the market Mar 19 03:18:18 with actual devices Mar 19 03:18:34 then the phone's unique functionality wouldn't really matter Mar 19 03:18:41 and it's an odd position for a developer to be in.. working for months on a project for phone that's not out yet, for a prize you may or may not win. :) Mar 19 03:19:00 I have NO idea why Google is doing this. Mar 19 03:19:32 yep, so many competitors like symbian and wm that are already established in the market Mar 19 03:19:43 i don't see what's so great about android Mar 19 03:19:50 linux phones have been out for a while Mar 19 03:19:56 and have found little success Mar 19 03:20:48 symbian is already highly developer oriented Mar 19 03:21:05 android is really just trying to find a place in a niche that other companies have already filled Mar 19 03:21:36 i don't really agree with that... Mar 19 03:21:39 Symbian is a PITA to dev for. Mar 19 03:22:14 i haven't really developed much for it Mar 19 03:22:28 there's been a lot of interest in mobile devices in the last year or two.. i think it's only going to garner more interest and innovation as people develop apps for android and the iphone Mar 19 03:22:31 Android is making more developpers aware of the new technology available on all kinds of handsets, Mar 19 03:22:49 true Mar 19 03:22:54 thereby attracting new ideas, and a wider vision of development potential Mar 19 03:23:01 i'm still waiting for the source Mar 19 03:23:03 i think Android is more hoping to change the landscape of the industry than to just earn google some short-term profits. Mar 19 03:23:06 chaosvoyager: isn't it obvious? :) they want to be able to have a develoepr base to make apps for the OEM phones that will come out :P Mar 19 03:23:13 plus phones are getting more powerful, data plans and faster data access on phones is getting more ubiquitous.. Mar 19 03:23:14 Android is a very potent way to get more people thinking about smartphones, and more importantly: internet access. Mar 19 03:23:29 but frankly, i could have used 25k to invest in some backbone servers for my killer app :( this is disappointing Mar 19 03:23:33 and that benefits google in the long run, even more than Android as an instance of that does. Mar 19 03:23:44 the problem with symbian is that its architectural semantics were designed for phones of the 90's. Mar 19 03:24:01 Well, deja vu. Mar 19 03:24:42 that is, requiring a lot of hoops to write a Hello, world proggie even Mar 19 03:25:00 Open C is a much better alternative, but not default or standard yet Mar 19 03:25:01 that was weird. Mar 19 03:25:05 <{HelloWorld}> helppp Mar 19 03:25:07 heh Mar 19 03:25:10 Indeed. Mar 19 03:25:29 <{HelloWorld}> can anybody help me out? Mar 19 03:25:44 Possibly. Mar 19 03:25:45 <{HelloWorld}> i'm trying to create a spinner Mar 19 03:26:09 <{HelloWorld}> can't use because for some reason it throws me an IndexOutOfBoundException Mar 19 03:26:29 <{HelloWorld}> so i'm wondering if there's an alternative Mar 19 03:26:34 <{HelloWorld}> i have int within Mar 19 03:26:35 <{HelloWorld}> and string Mar 19 03:26:53 WHere and how do you use a CharSequence? Mar 19 03:27:05 <{HelloWorld}> i tried to use it just like the one in tutorial Mar 19 03:27:11 <{HelloWorld}> Spinner1 tutorial Mar 19 03:27:29 <{HelloWorld}> didn't work well, and i post something in the developer forum, but takes forever to get a response.. Mar 19 03:27:36 f00f: It always kind of blew me away how much memory things like Java and C# take to run 'Hellow World' (PS {HelloWorld} we were just discussing this right before you arrived.) Mar 19 03:28:08 chaosvoyager: well that's something out of our control :P Mar 19 03:28:21 surely it's different on mobile platforms Mar 19 03:28:29 <{HelloWorld}> romainguy: could you help me out? :-/ Mar 19 03:28:45 Well, it was one of the reasons for Dalvik. Mar 19 03:28:46 Unless you explain the problem clearly, no :) Mar 19 03:28:50 romainguy: did you get my earlier comments about SimpleCursorAdapter? i feel it should gracefully handle a null column to show no image (a blank drawable). currently, it does something odd that hangs the program for a second or two. Mar 19 03:28:57 <{HelloWorld}> btw, i'm also wondering is it a good practice to have one XML for main.xml Mar 19 03:29:01 <{HelloWorld}> then use ids within that XML Mar 19 03:29:35 <{HelloWorld}> that's what i have for main.xml Mar 19 03:29:37 jasta: like a null-column hack ... would be good? Mar 19 03:29:38 jasta: I guess it's trying to load an image with the URI null Mar 19 03:30:16 romainguy: which does what? Mar 19 03:30:30 jasta: Apparently it craps out Mar 19 03:30:34 yes ;) Mar 19 03:30:57 Actually Mar 19 03:31:07 by default I think we turn null values to the empty String Mar 19 03:31:13 I would have to look at the code Mar 19 03:31:19 (you do) :) Mar 19 03:32:55 weirder still, you guys first try setImageResource() on the value converted to an integer. Mar 19 03:32:59 then fallback to setImageURI Mar 19 03:33:03 which makes no sense to me Mar 19 03:33:03 yes Mar 19 03:33:08 ah Mar 19 03:33:12 well it makes sense to us :) Mar 19 03:34:32 well, null could still be more gracefully supported I think. Mar 19 03:35:37 I wonder how many devs are in this for the prize money... Mar 19 03:35:56 chaosvoyager: Ask on this channel :) Mar 19 03:35:57 1bajillion Mar 19 03:36:02 i know i am. Mar 19 03:36:24 obviously not for my caribbean vacation... Mar 19 03:36:33 f00f: its a good thing you are going to win then. Mar 19 03:36:43 agreed. Mar 19 03:38:10 So I'm the only one in ot for world power? Mar 19 03:38:37 well, 1bajillion is pretty much the same thing :? Mar 19 03:38:57 seriously, i'd say 5,000 to 10,000 entries. Mar 19 03:39:18 it's going to be a cesspit Mar 19 03:39:31 but after weeding out the rubbish, we'll probably have Mar 19 03:39:39 100 - 150 solid entries Mar 19 03:39:59 i'd say that's the best case scenario Mar 19 03:40:11 worst case could be, all of us in here win Mar 19 03:40:30 i think the reality is that none of us have any idea how many submissions are expected, or how hard it will be for the judges to sort through them all. Mar 19 03:40:32 that's the worst case? :) Mar 19 03:40:46 Strangely, I believe that's also close to the ration of developers who are actually participating in the Google groups and channels too. Mar 19 03:41:31 Actually, I have no idea. I hate questions like this. I never win the jellybeans. Mar 19 03:41:45 well it's fun to speculate :) Mar 19 03:41:48 neither do i, but this one is a bit more than guesswork :> Mar 19 03:42:15 If I were being serious I would say that around 8,000 - 12,000 and would guess around the same as f00f, about 100 really good ones. Mar 19 03:44:35 It reminds me of another puzzler. Awhile back, TicTac made, er, TicTacs 30% larger, but they did NOT alter the dimentions on the container. So, are you now getting more TicTac per mass now than you were before, or less? Mar 19 03:45:10 less Mar 19 03:45:26 Hit ranking analysis: http://www.alexa.com/data/details/traffic_details/code.google.com/android/adc-submit/index.html Mar 19 03:46:36 And here: http://siteanalytics.compete.com/code.google.com/?metric=uv Mar 19 03:46:38 Well, the math is a bitch and a half to back that up :) Mar 19 03:47:22 wait Mar 19 03:47:26 that is for google.com Mar 19 03:48:08 The one for compete does seem to cut it down to the base domain Mar 19 03:48:12 wtf is up with these sites Mar 19 03:48:25 they never got the memo about subdomains Mar 19 03:49:15 a good metric would be how many people download the SDK Mar 19 03:49:52 grep "android_sdk.zip" /gfs/code.google.com/access_log | wc -l Mar 19 03:51:30 http://code.google.com/android/ Mar 19 03:51:31 hahaha Mar 19 03:51:31 rofl Mar 19 03:51:34 @ Community posts Mar 19 03:52:02 Well, it would be a similar to judging how much money had been lost based on how many times a song had been dled Mar 19 03:52:39 "We, from Virtual Site, are working hard to send our project until the deadline. However, perhaps we wont have time to refine some interfaces and views." Mar 19 03:52:56 i can't find anything about "Virtual Site" Mar 19 03:52:59 <{HelloWorld}> guys Mar 19 03:53:07 <{HelloWorld}> is there CharSequence for int ? Mar 19 03:54:41 <{HelloWorld}> ehm.. Mar 19 04:00:14 <{HelloWorld}> can anybody help me? Mar 19 04:00:18 <{HelloWorld}> with this spinner? :( Mar 19 04:01:09 I'm not sure what you're asking, at least as far as CharSequence. Mar 19 04:01:14 me neither. Mar 19 04:01:32 <{HelloWorld}> alright, let me cleared it up Mar 19 04:01:37 <{HelloWorld}> i'm trying to create a spinner Mar 19 04:01:41 <{HelloWorld}> that takes integer value Mar 19 04:01:50 <{HelloWorld}> from Mar 19 04:01:54 <{HelloWorld}> how would you do that? Mar 19 04:02:04 you wouldn't, at least not directly. Mar 19 04:02:28 <{HelloWorld}> ummm... so..? Mar 19 04:03:34 so... what? Mar 19 04:03:46 also, what is the reason for requiring an integer value? Mar 19 04:04:14 <{HelloWorld}> because that's the way i specify the within Mar 19 04:04:27 no, you're specifying a charsequence. Mar 19 04:04:44 <{HelloWorld}> it throws an ArrayIndexOutOfBound for some reason... :-/ Mar 19 04:04:55 because you're using something incorrectly. Mar 19 04:05:24 <{HelloWorld}> hmmm.. Mar 19 04:05:26 <{HelloWorld}> potentially? Mar 19 04:05:33 if you could paste a small example, perhaps i could better understand what you're wanting to do. Mar 19 04:09:55 <{HelloWorld}> thanks jasta Mar 19 04:09:58 <{HelloWorld}> appreciate it Mar 19 04:33:41 <{HelloWorld}> i'm wondering if there's a way for me to do a dynamic resources Mar 19 04:33:48 <{HelloWorld}> other than writing a file.. Mar 19 04:33:50 <{HelloWorld}> :-/ Mar 19 04:34:14 what do you want to do? Mar 19 04:34:25 <{HelloWorld}> i want to have resources for years Mar 19 04:34:29 <{HelloWorld}> so depending on what's current year Mar 19 04:34:34 <{HelloWorld}> i'll take 5 more years Mar 19 04:34:39 <{HelloWorld}> so say that current year is 2008 Mar 19 04:34:51 <{HelloWorld}> then 2008 2009 ... 2013 is displayed in the Spinner Mar 19 04:35:22 ok Mar 19 04:36:19 {HelloWorld}: just make a list silly. Mar 19 04:36:33 use an ArrayAdapter with the array that you've made. Mar 19 04:36:45 <{HelloWorld}> but ArrayAdapter doesn't take lists.. Mar 19 04:36:49 <{HelloWorld}> it only takes int resources Mar 19 04:37:05 <{HelloWorld}> ArrayAdapter(Context context, int resource, int fieldId, T[] objects) Mar 19 04:37:17 <{HelloWorld}> int resource is the one that we use for the resources XML file rite? Mar 19 04:38:26 you have quite a few options here, of course. Mar 19 04:38:47 <{HelloWorld}> jasta: not really, i looked over the docs, they always have int resources Mar 19 04:38:52 <{HelloWorld}> doesn't have int[] resources Mar 19 04:38:55 you could extend a BaseAdapter as List4.java does, for example. Mar 19 04:38:59 <{HelloWorld}> so the only way is to write a file Mar 19 04:39:01 <{HelloWorld}> ? :-/ Mar 19 04:39:04 you could use a CursorAdapter and just use an ArrayListCursor Mar 19 04:39:09 <{HelloWorld}> which i thought is kind of inefficient Mar 19 04:39:14 <{HelloWorld}> hmmm... Mar 19 04:39:25 (sorry for suggesting ArrayAdapter, you are correct about that one) Mar 19 04:39:36 I was thinking ArrayListCursor, which I have personally done quite a few times. Mar 19 04:39:54 although extending a BaseAdapter is also an option, it's just a bit more code. though, more flexible. Mar 19 04:41:07 <{HelloWorld}> jasta: it's fine Mar 19 04:41:26 <{HelloWorld}> let me take a look on List4.java Mar 19 04:42:04 i'm not sure I'd recommend that approach if you're just looking to get going. Mar 19 04:42:11 ArrayListCursor would be much easier. Mar 19 04:42:27 then you could just use a [Simple]CursorAdapter and not fuss with it. Mar 19 04:42:54 <{HelloWorld}> hmmm Mar 19 04:43:00 or you could extend a cursor yourself, which ould be very efficient in your case. Mar 19 04:43:17 <{HelloWorld}> do you have some sample code that i could see? Mar 19 04:43:34 <{HelloWorld}> i learned it better by looking at codes :-/ or docs... Mar 19 04:43:34 not really, but i have personally written some public domain code that uses ArrayListCursor Mar 19 04:43:39 <{HelloWorld}> ah alright Mar 19 04:43:45 <{HelloWorld}> but it's using ArraYLiostCursor rite? Mar 19 04:44:01 http://devtcg.blogspot.com/2008/03/custom-android-list-view-widget-to.html -- this demonstration control uses an ArrayListCursor to populate the dummy data you see in the screenshot. Mar 19 04:45:09 i realize that this is a ListView, whereas you want a Spinner, but the principle and code are roughly the same for either. Mar 19 04:47:05 <{HelloWorld}> jasta: Thanks, i'll take a look at the code Mar 19 04:48:43 jasta: looks like you've been busy coding the last few days Mar 19 04:48:52 how so? Mar 19 04:48:58 not seen here Mar 19 04:49:10 oh, i'm irish, and it was st. patrick's day weekend. Mar 19 04:49:15 oh great Mar 19 04:49:17 so, that's why :) Mar 19 04:49:22 now i know Mar 19 04:49:40 but now i'm busy coding :) Mar 19 04:50:08 today i have to force myself to code something.. lately i've been a twitter addict Mar 19 04:50:18 checking out a few things on twitter.. very interesting Mar 19 04:51:18 jasta: if you had to choose, guinnes draught in a bottle or a can? Mar 19 04:51:25 +s Mar 19 04:51:36 obviously a can, that stupid rocket widget doesn't work at all. Mar 19 04:51:56 hmm, are you supposed to pour the bottle one in a timeframe too? Mar 19 04:52:03 like what is it 17.2 seconds? Mar 19 04:52:24 so do you drink it straight out of the can or pour it? Mar 19 04:52:28 does the taste differ? Mar 19 04:52:53 f00f-: Well, the only time I personally have ever drank it from a can was to make car bombs for parties, so... Mar 19 04:52:57 my opinion: either way it tastes like coffee grinds :p Mar 19 04:53:03 I mean, other than to taste it :) Mar 19 04:53:11 lol Mar 19 04:53:22 well i'd prefer tap any day, but i don't have a bar in my home Mar 19 04:53:26 which beer is the best? Mar 19 04:53:39 harp's pretty good Mar 19 04:53:58 ok.. that's a silly question Mar 19 04:53:58 it's guinness' lager Mar 19 04:53:58 imho guinness is a good food beer Mar 19 04:54:02 The King of Beers took power by underhanded means. Mar 19 04:54:09 all beer are good ;) Mar 19 04:54:19 f00f-: I don't generally drink Guinness unless I'm drinking socially, and I do most of that at bars so... Mar 19 04:54:35 But like I said, car bombs at home :) Mar 19 04:54:40 ya Mar 19 04:54:59 how do you make a car bomb? Mar 19 04:55:00 If I was being absolutely honest, I'd say that I prefer Amber beers for drinking casually. Mar 19 04:55:17 i definitely wouldn't waste a Guinness socially Mar 19 04:55:21 unless it was with a good meal :) Mar 19 04:55:27 muthu: Half pint of guinness with a shot of mostly jameson and a bit of bailey's. Drop the shot in and chug. Mar 19 04:55:46 f00f-: Waste it socially? Are you mad? Mar 19 04:55:59 Probably. Mar 19 04:56:02 Guinness is best had with friends and conversation. Mar 19 04:56:03 good to know.. i've seen pictures not tried it myself Mar 19 04:56:17 well, yeah in those terms 'socially' yes Mar 19 04:56:18 absolutely Mar 19 04:56:22 but not to get drunk or anything Mar 19 04:56:30 Ahh, ok. Mar 19 04:56:33 I meant casually as that. Mar 19 04:56:57 As in, few beers after work or whatever. For that, I much prefer ambers. More relaxing to me. Mar 19 04:57:21 we have this very delicious local microbrew called Mac & Jack's here in Seattle. Mmm, delicious :) Mar 19 04:57:54 i'm always disappointed to travel anywhere else in the US because all the local microbrewed ambers are shit :) Mar 19 04:58:00 anyone drank KingFisher? Mar 19 04:58:27 You mean there's no more left? Mar 19 04:58:40 i was never a big fan of ambers, but what do i know Mar 19 04:58:45 aren't ambers and stout kind of opposites? Mar 19 04:59:19 I dunno, in what sense do you mean? Mar 19 04:59:27 Arch enemies. Mar 19 04:59:33 Oh, well sure :) Mar 19 04:59:43 well just in terms of look and taste Mar 19 05:00:01 amber feels very aggressive in taste Mar 19 05:00:02 drinking beer everyday makes scientist less productive - a new study, read today Mar 19 05:00:10 Like those beers that played football on that one superbowl commercial. Mar 19 05:00:25 uh.. yeah Mar 19 05:00:28 beer used as a litmus test? - that was the title Mar 19 05:00:56 haha Mar 19 05:01:13 Which beer best enables me to magically enter kung-fu movies? Mar 19 05:01:16 http://www.nytimes.com/2008/03/18/science/18beer.html Mar 19 05:02:19 that's the one Mar 19 05:03:14 In spite of his study, Dr. Grim, who said he would on occasion enjoy more than 12 beers in a night, is not on a campaign to decrease beer drinking among scientists. Why not? His answer: “I like it.” Mar 19 05:03:23 :) Mar 19 05:03:29 I like the Belgian ales. Mar 19 05:03:47 Strangely, a lot of those are brewed by Monks. Mar 19 05:04:10 maybe we can reverse it muthu? Mar 19 05:04:18 that is, drink beer and then *try* to concentrate Mar 19 05:04:20 So let me get this straight, you BREW beer, but you don't DRINK beer? Mar 19 05:04:24 to work on android project for example Mar 19 05:04:32 Or do Trappist Monks drink? Mar 19 05:05:18 Scratch that, wikipedia says they do. Mar 19 05:05:40 yeah.. drink beer and code android! Mar 19 05:05:52 i've done that on many an occasion Mar 19 05:06:01 maybe that's why my questions to jasta always seem ridiculous ;) Mar 19 05:06:15 ...maybe. :) Mar 19 05:06:57 0_o Trappist monks say \ldblquote Don\rquote t drink our beer\rdblquote -> http://mondaynightbrewery.com/?p=473 Mar 19 05:08:52 hmm, it just occurred to me that my ViewBinder's are all really inefficient Mar 19 05:09:26 just the sheer number of method calls doesn't sound efficient Mar 19 05:09:33 as in number of 'callbacks' Mar 19 05:56:47 i feel like i'm missing the obvious bug in this line that is causing c = null : someone sanity check for me? Mar 19 05:56:53 Cursor c = getContentResolver().query(People.CONTENT_URI, new String[] {People._ID, People.NAME}, People._ID+"="+mThisContactId, null, null); Mar 19 05:57:35 (people being android.provider.Contacts.People) Mar 19 05:57:54 c is null, or is empty? Mar 19 05:57:58 null Mar 19 05:58:21 that i can't say :) Mar 19 05:58:25 does adb logcat say anything? Mar 19 05:59:07 jasta: oh duh, thanks Mar 19 05:59:26 uncaught remote exception, a problem with the generated sql somehow Mar 19 05:59:48 my query must not be right Mar 19 06:00:11 well, they're the ones that construct the query Mar 19 06:00:24 though are you sure that mThisContactId is not some silly string? :) Mar 19 06:01:06 jasta: yeah, it's a getLong from another cursor Mar 19 06:01:23 in this case it is 1L Mar 19 06:01:33 well, adb logcat should somewhere show you the failed query Mar 19 06:01:38 perhaps you can deduce what strangeness they have done Mar 19 06:02:28 jasta: it's a sqlite ambigous column name exc, which i feel like i've caused myself in other applications - anyway, googling seems to find others have had the same issue so i am hopeful the solution is at hand Mar 19 06:03:12 hm, someone posted to android-developers a month ago with no reply from anyone Mar 19 06:03:15 perhaps it is because they are using a projection which you aren't seeing so are requesting _id = ... where they expect p._id = .. or something? Mar 19 06:03:32 Really, Content Providers are not as abstract and self-documenting and Google would have us think :) Mar 19 06:03:36 lol Mar 19 06:03:39 or just "SELECT t1.uniqbleh AS _id ..." Mar 19 06:03:45 they are, in my opinion, Android's most serious weakness. Mar 19 06:04:02 as*, not and :P Mar 19 06:05:28 the "selection" part - doesn't look right to me Mar 19 06:05:39 this is the generatedquery: Mar 19 06:05:42 android.database.sqlite.SQLiteException: ambiguous column name: _id, while compiling: SELECT COUNT(*) FROM (SELECT people._id AS _id, name FROM people LEFT OUTER JOIN phones ON people.preferred_phone=phones._id LEFT OUTER JOIN presence ON (presence.person=people._id) WHERE (_id=1)) Mar 19 06:05:58 muthu: yeah, this is the first i've used a contentprovider, and i suspect the selection is the problem Mar 19 06:06:40 see, if you change Phone._ID to "phones._id", it will work (but that is strange, of course) Mar 19 06:06:43 muthu: i think.. that i need to construc the URI with the id Mar 19 06:06:48 and leave the selection null. Mar 19 06:07:00 yes, that would be a much better way to go, if possible. Mar 19 06:07:23 jasta: easily possible, i was just thinking of the content provider too much as a db Mar 19 06:08:51 well it is unfortunately neither a good abstraction of a db, nor is it a good interface to one :) Mar 19 06:10:00 i do something like this Mar 19 06:10:03 String selection = "name like ?"; Mar 19 06:10:03 String[] selectionArgs = new String[]{"%" + mCapsuleTitle + "%"}; Mar 19 06:11:25 from the sql.. you need to specify which _id you are talking about Mar 19 06:14:31 muthu: yeah, but i am not accessing the sqlite db, i have to go through a contentprovider Mar 19 06:15:02 anyway, i was going aobut this in the wrong way, but still the main content provider page is out of date. there were changes in the latest sdk and there's a specific example for what i should have been doing Mar 19 06:15:07 Mar 19 06:15:10 http://code.google.com/android/migrating/m3-to-m5/m5-api-changes.html#sql Mar 19 06:15:37 ContentURI.addId(id) //before uri = Uri.withAppendedPath(SOME_URI, id); //after Mar 19 06:52:51 <{HelloWorld}> jasta: the thing that you wrote doesn't use Spinner though... Mar 19 06:53:47 <{HelloWorld}> helppppppp Mar 19 06:54:05 not working? Mar 19 06:56:48 <{HelloWorld}> it's not that it's not working Mar 19 06:56:53 <{HelloWorld}> it doesn't fit to the problemn Mar 19 06:57:00 <{HelloWorld}> i'm looking a way for a Spinner to have integer values Mar 19 06:57:14 <{HelloWorld}> spinner that contains arraylist or something Mar 19 06:57:21 <{HelloWorld}> where i could store integers Mar 19 06:57:32 <{HelloWorld}> or String is fine.. Mar 19 06:58:47 i thought spinner took arraylist Mar 19 07:00:21 <{HelloWorld}> no it's not Mar 19 07:01:44 none of the adapters fit your need? Mar 19 07:04:05 <{HelloWorld}> well i just know ArrayAdapter for now Mar 19 07:04:08 <{HelloWorld}> cuz i'm new at these Mar 19 07:04:09 <{HelloWorld}> :-/ Mar 19 07:08:19 <{HelloWorld}> muthu: i need some type of direction... Mar 19 07:08:20 <{HelloWorld}> :-/ Mar 19 07:08:41 helloworld: i've used arrayadapter with spinner Mar 19 07:08:54 i was looking for some code.. but couldn't find it Mar 19 07:09:59 <{HelloWorld}> muthu: thanks, i wish i could get some code for the integer spinner Mar 19 07:10:18 <{HelloWorld}> hmm... well yeah, i used Arrayadapter for spinner that takes string Mar 19 07:10:27 <{HelloWorld}> but it doesn't work for some reason when i use integer Mar 19 07:10:34 <{HelloWorld}> that's because i used CharSequence for the String values Mar 19 07:10:42 <{HelloWorld}> that sting contains Char, while integer doesn't... Mar 19 07:10:45 <{HelloWorld}> taht's probably why.. Mar 19 07:10:55 {HelloWorld}: ugh, dude, this is not as complicated as you are making it out to be Mar 19 07:11:06 yeah.. i'm not getting it Mar 19 07:11:18 you don't have to use an ArrayAdapter, that is just the one used by the demos. Mar 19 07:11:30 <{HelloWorld}> sure Mar 19 07:12:02 including, i'm sure, CursorAdapter. Mar 19 07:12:10 and then you could use ArrayListCursor Mar 19 07:12:16 i don't know why you are making this so hard? Mar 19 07:13:42 i have to go to bed, though Mar 19 07:14:02 good night jasta, its lunch time here Mar 19 07:16:12 <{HelloWorld}> jasta: i've no clue what u're talking about Mar 19 07:16:17 <{HelloWorld}> i hope could get code Mar 19 07:30:00 <{HelloWorld}> man, nobody here could help...? Mar 19 07:30:04 <{HelloWorld}> thanks all Mar 19 07:30:06 <{HelloWorld}> :( Mar 19 07:38:25 does anyone know where I can find the relationships between UI xml for a specific element and the java code equivalent? Mar 19 07:38:56 example: android:id="@+id/name" -> element.setId(num) Mar 19 07:39:45 I have the UI xml for a progress bar but I need to create multiple progress bars dynamically so I can't really hard code them in the xml file Mar 19 07:40:28 or is there a way to apply the UI xml to multiple progress bars that are created dynamically? Mar 19 07:50:44 I've figured out all of them except: style="?android:attr/progressBarStyleHorizontal" Mar 19 08:03:26 raidfive: look in android.R docs Mar 19 08:04:07 yea I just stumbled across that ... Mar 19 08:05:00 ProgressBar(Context context, AttributeSet attrs, Map inflateParams, int defStyle) ... any idea what to pass in for AttributeSet and inflateParams? can I just pass in null? Mar 19 08:09:43 you can pass null Mar 19 08:10:38 within the docs.. there was some explanation on how to do this mapping actually Mar 19 08:10:55 i must admit its all hidden. and not easy to find Mar 19 08:11:03 yea I have no clue what they are even used for Mar 19 08:11:11 seems to be a reoccuring trend :) Mar 19 08:11:28 not too impressed with documentation so far Mar 19 08:15:24 great, progress bar isn't displaying now since I moved away from the xml layout Mar 19 08:15:32 http://pastie.caboo.se/167691 Mar 19 08:15:36 raidfive: have you looked at the apidemos? Mar 19 08:15:37 see anything wrong with that? Mar 19 08:15:58 there were some progressbar examples Mar 19 08:16:19 yea I've looked at them ... they use xml for the UI but they don't supply them :P Mar 19 08:17:46 ah yes Mar 19 08:17:50 they request window feature Mar 19 08:19:28 raidfive: do this - setProgressBarVisibility(true); Mar 19 08:20:08 that is for the progress bar in the view title bar ... Mar 19 08:20:30 ProgressBar doesn't have that method Mar 19 08:21:04 hmmm Mar 19 08:21:33 then may be its the null attributes you are passing Mar 19 08:21:55 great :) Mar 19 08:30:04 time to try to figure those out :/ Mar 19 08:30:33 good luck :) Mar 19 08:30:38 so is there no way to apply a single xml ui styling to multiple object instances? Mar 19 08:31:00 i haven't tried it yet Mar 19 08:31:16 i'm staying away from r&d for now Mar 19 08:31:28 well you have the unique id for the element, so it seem unlikely Mar 19 08:31:51 check out view inflate Mar 19 13:26:46 Any android app for call recording? Mar 19 13:26:59 Vipsy: can't record calls currently Mar 19 13:27:37 Oh.. Is it hard to develop ? or SDK doesnt support ? Mar 19 14:54:47 http://www.lacherstorfer.at/haris_blog/2008/03/ Mar 19 16:02:55 hmm, my emulator is taking 100% cpu and it's just sitting at the home screen Mar 19 16:19:50 guess you'll have to get another computer Mar 19 16:22:31 i'm trying to debug it (it's my process doing it), but i can't think of what it could be busy doing Mar 19 16:23:20 while(1); Mar 19 16:23:21 ? Mar 19 16:23:35 ;-) Mar 19 16:24:47 I *always* forget to add new Activities to my AndroidManifest file... Mar 19 16:25:00 every single time Mar 19 16:26:27 jasta: such a shame you can't use the JVM debug/profiling hooks Mar 19 16:27:05 i want to just break it and investigate the call stack Mar 19 16:27:08 but i dont know how ;) Mar 19 16:27:21 add a breakpoint? Mar 19 16:27:28 right, but where? Mar 19 16:27:50 line 123 of InfiniteLoop.java Mar 19 16:28:51 <---- Smart Ass Mar 19 16:29:10 hopefully one of the google folks can help me out Mar 19 16:29:21 because i do want to debug this; i suspect my app's not the thing that's really busy Mar 19 16:29:28 activitymanager is probably screwing with it or something Mar 19 16:29:53 You can't find a point in your code prior to where it peaks the CPU? Mar 19 16:30:07 no, i'm trying to say that it hasn't ever done this before Mar 19 16:30:14 it must have started some time during the night Mar 19 16:30:21 while i just left everything running Mar 19 16:30:35 the app isn't even running. Mar 19 16:30:46 heh ;-) Mar 19 16:30:48 (it's not visible to the user, but process is alive and using 100%) Mar 19 16:31:00 Why don't you just kill the process? Mar 19 16:31:00 jasta: I've had that happen in my app too Mar 19 16:31:14 Aetmos: because it seems like a bug in Android that should be investigated and reported. Mar 19 16:31:27 Ah, well, yes. Mar 19 16:32:29 * Aetmos understands now Mar 19 16:32:44 so you want to break the current process to see what happened Mar 19 16:32:45 got it Mar 19 16:32:50 no idea how to do that ;-) Mar 19 16:33:06 i figured out how to attach to it with ddms Mar 19 16:33:15 and i can break and resume it Mar 19 16:33:25 but it doesnt give me a stack trace or anything. no idea how to do that :) Mar 19 16:33:38 anyway, off to work Mar 19 16:33:48 cya Mar 19 16:42:28 re Mar 19 16:49:53 . Mar 19 17:03:27 romainguy_: how can I change an activity's theme after calling setContentView()? Mar 19 17:05:18 I don't think you can Mar 19 17:07:07 no way to change the theme and then invalidate everything Mar 19 17:08:15 is is the theme only read prior to inflating Mar 19 17:09:26 changing the theme could work but only for newly created views Mar 19 17:10:11 hmm, that would be useful to be able to change theme Mar 19 17:10:38 certainly not for 1.0 Mar 19 17:14:36 it works if you re-setContentView...so might be workable Mar 19 18:22:55 How would I go about resizing an ImageView? Mar 19 18:23:10 layout_width, layout_height Mar 19 18:23:46 are those parameters? Mar 19 18:23:52 * Aetmos doesn't seem them in the docs Mar 19 18:25:19 ImageView.setLayoutParams( new LayoutParams( ... ) ) Mar 19 18:25:49 I tried that, but can't seem to figure out where to import LayoutParams from Mar 19 18:26:11 Ctrl-Shift-O gives me a list of 10 packages Mar 19 18:26:15 none of which seem to work Mar 19 18:26:36 I always get "LayoutParams cannot be resolved to a type" Mar 19 18:26:36 ViewGroup Mar 19 18:27:01 ViewGroup.LayoutParams Mar 19 18:27:33 So I have this: Mar 19 18:27:35 import android.view.ViewGroup.LayoutParams; Mar 19 18:27:40 .setLayoutParams(new LayoutParams()) Mar 19 18:27:46 But I get this: Mar 19 18:27:47 addView(mTitle, new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, Mar 19 18:27:47 LayoutParams.WRAP_CONTENT)); Mar 19 18:27:57 The constructor ViewGroup.LayoutParams() is not visible Mar 19 18:28:27 Hmm...I don't think I want to add a view Mar 19 18:28:34 It's already there...I just want to resize i Mar 19 18:28:36 it Mar 19 18:28:50 try LinearLayout.LayoutParams Mar 19 18:28:56 trying... Mar 19 18:29:23 i mean whatever layout you are using.. there must be a corresponding layout params Mar 19 18:29:35 that makes sense Mar 19 18:29:50 Yeah, I'm using LinearLayout. Mar 19 18:30:13 The constructor LinearLayout.LayoutParams() is undefined Mar 19 18:30:37 well, are you passing 2 ints? Mar 19 18:30:45 I'm an idiot Mar 19 18:31:00 Yes, that works Mar 19 18:31:06 :) Mar 19 18:31:06 * Aetmos smacks his forehead Mar 19 18:31:24 THanks Mar 19 18:31:37 ViewGroup should work also as LinearLayout is a indirect child of ViewGroup Mar 19 18:31:46 okay, thanks Mar 19 18:32:33 zhobss: are you done with adc? Mar 19 18:32:42 argghhh.. sorry zhobbs Mar 19 18:32:51 I was but signed on to another project Mar 19 18:33:07 how many are you doing?l Mar 19 18:33:12 2 Mar 19 18:33:17 cool Mar 19 18:33:25 Neither of them are mine, just contract work Mar 19 18:33:31 woah Mar 19 18:33:33 great Mar 19 18:33:34 I really wish I would have had time to do myself Mar 19 18:34:12 but..contract work pays rent now, adc winnings may or may not pay later Mar 19 18:34:22 correct Mar 19 18:34:43 and you'll always be hired if you win Mar 19 18:36:15 I'm really interested in the quality of the apps that will be entereed into the adc Mar 19 18:37:16 Seems like it could go either way...50 really polished apps with really great ideas, or will there be some apps in there with interesting ideas that barely work Mar 19 18:37:45 My app will be polished, but I'm not sure it's a good idea ;-( Mar 19 18:37:59 lol Mar 19 18:38:17 you need a bit of both Mar 19 18:38:33 Aetmos: yeah one of the ones I'm working on is very standard, but will be polished/eye pleasing Mar 19 18:38:35 potential is something they'll look at Mar 19 18:38:53 aetmos: what you working at? Mar 19 18:38:59 Yeah, hopefully it will be a good idea once it's a fully fleshed out idea Mar 19 18:39:09 muthu: not allowed to talk about it... Mar 19 18:39:13 muthu: sorry ;-( Mar 19 18:39:19 hehe, no one will reveal Mar 19 18:39:26 muthu: are you working on the open intents stuff? Mar 19 18:39:32 yeah Mar 19 18:39:39 i am Mar 19 18:39:41 that's cool, how many are working on that? Mar 19 18:40:00 around 4 to 5 active currently Mar 19 18:40:14 i'm trying to get active Mar 19 18:40:29 lot of members though Mar 19 18:43:47 Here's another question: Is there any way to specify "px", "dip", "sp", etc. in LayoutParams()? Mar 19 18:44:46 Aetmos: probably with ViewGroup.LayoutParams(Context c, AttributeSet attrs) Mar 19 18:45:02 but don't know any details on that Mar 19 18:45:37 thanks. I'll take a look Mar 19 18:45:54 Any idea what the default is? "dip"? Mar 19 18:46:17 default is px i guess Mar 19 18:46:23 okay, thanks Mar 19 18:46:29 does px==dp==dip? Mar 19 18:46:41 I think it depends on the device, doesn't it? Mar 19 18:46:48 yeah Mar 19 18:47:05 what's dp? Mar 19 18:47:13 digital pixels Mar 19 18:47:17 oh Mar 19 18:47:21 I use analog Mar 19 18:47:25 :) Mar 19 18:49:07 hey romainguy, is there a difference between px,dp,dip? Mar 19 18:49:19 px = pixels Mar 19 18:49:25 dp = dip = device independent pixel Mar 19 18:49:34 oh dp == dip? Mar 19 18:50:11 yes Mar 19 18:50:27 you can also use pt, mm and in Mar 19 18:50:33 so is it generally best to use dip when drawing? Mar 19 18:50:46 yes Mar 19 18:50:54 hmm, apparently we removed dp from the next SDK Mar 19 18:51:10 I didn't see dp in the docs...maybe that's why Mar 19 18:51:17 hehe, I've been only using dp Mar 19 18:51:18 it was there in M3 Mar 19 18:51:24 zhobbs: switch to dip :) Mar 19 18:52:06 So if dip is best, why does LinearLayout.LayoutParams default to px? Mar 19 18:55:59 hmm...and AttributeSet has only getters, but no setters in the docs... Mar 19 19:03:06 yawn Mar 19 19:25:00 So, I have a TextView, and the text is at the bottom of the view, but I want it in the middle. So, I set android:gravity="center_vertical", but it's still at the bottom...why? Mar 19 19:28:30 Does gravity actually do anything? Mar 19 19:29:31 layout_gravity doesn't seem to work either Mar 19 19:31:41 Aetmos: it does, are you sure your textview is larger than the text height? Mar 19 19:32:08 romainguy_: yes, I've made the background of the textview green, so I can see it Mar 19 19:32:12 the text is at the bottom Mar 19 19:32:40 Oddly, I have an ImageView with a shape stuck to the top...gravity can't bring that down either Mar 19 19:32:59 it's weird because by default EditText uses a gravity of center_vertical Mar 19 19:33:01 and it works Mar 19 19:33:08 hmm Mar 19 20:34:27 <_avatar> is the MediaPlayer known to be a bit buggy? it seems to intermittently fail to play streamed mp3's. sometimes it works, sometimes my OnErrorListener is called with what=1, extra-0 Mar 19 22:25:46 _avatar: I'm finding MediaPlayer extremely buggy... Mar 19 22:26:06 <_avatar> ok, good that I'm not the only one... the API seems pretty straight forward Mar 19 22:26:31 I'm using it in a service and it's regularly crashing my service Mar 19 22:26:46 <_avatar> yeah, its also crashing my Activity Mar 19 22:27:16 I'm wondering if after each song I would be better off creating a new instance of MediaPlayer...I'm currently doing player.reset() and then reusing it Mar 19 22:27:44 and it seems like between songs is when it's taking me down Mar 19 22:27:47 <_avatar> don't think that'll help, i'm not recycling the old instance :) Mar 19 22:27:54 <_avatar> thats exactly where i'm dying too... Mar 19 22:28:03 hmmm Mar 19 22:28:27 <_avatar> i handle onMediaPlayerCompleted, and use it to queue up the next track Mar 19 22:28:36 yeah me too Mar 19 22:28:38 <_avatar> it appears to die calling MediaPlayer.setDataSource() Mar 19 22:28:58 so you create a new MediaPlayer object? Mar 19 22:29:11 <_avatar> yeah Mar 19 22:29:20 ...who knows... Mar 19 22:29:48 <_avatar> i doubt this makes a difference, what operating system are you using to run the emulator? Mar 19 22:29:50 sometimes it works too Mar 19 22:29:53 linux Mar 19 22:29:55 <_avatar> yeah, sometimes its fine Mar 19 22:30:03 <_avatar> linux here as well, perhaps I should try it in windows Mar 19 22:30:27 a guy I'm working with is having it happen on mac also Mar 19 22:30:53 <_avatar> hrm Mar 19 22:31:45 I guess I'm just going to have to have my activity deal with in in a user friendly manner...try to recover and give an error message "MediaPlayer is broken!" Mar 19 22:33:46 <_avatar> have you tried to use MediaPlayer.create(Context, Uri)? I doubt that'll make a difference, but I've been using the default constructor and setDataSource(). Mar 19 22:34:08 yeah, maybe I'll give that a shot Mar 19 22:34:14 haven't tried it though Mar 19 22:53:56 actually seems like MediaPlayer worked better in M3 Mar 19 22:55:14 <_avatar> hrm Mar 19 22:55:21 <_avatar> that's unfortunate Mar 19 23:11:18 <_avatar> zhobbs: fwiw, i just verified it also crashes in the windows emulator. no surprise i guess Mar 20 00:04:37 _avatar: you try the MediaPlayer.create() yet? Mar 20 00:06:21 <_avatar> not yet, i'm currently sidetracked. how about you? Mar 20 00:06:40 same :) probably get to it tomorrow Mar 20 00:07:57 <_avatar> i did look at the docs though... create() unfortunately calls MediaPlayer.prepare() for you (so you don't get a chance to call prepareAsync() yourself) Mar 20 00:08:42 <_avatar> but if it stopped the crashing i'd be willing to live with it Mar 20 00:27:28 question... how do we past data back to a calling activity if a user hits the 'back' button on the subactivity? Mar 20 00:27:51 should we always assume that the user meant to cancel his operation if he hits the back button? Mar 20 01:06:23 <_avatar> zhobbs: i just tried MediaPlayer.create(), but it always returns null for "non-local" Uris (I'm trying to stream an mp3 from my web server) Mar 20 01:06:42 <_avatar> maybe you'll have better luck **** ENDING LOGGING AT Thu Mar 20 02:59:56 2008