**** BEGIN LOGGING AT Sat Aug 23 02:59:57 2008 Aug 23 03:29:44 anybody know of a way to get a CDMA version of android for the HTC Titan? i can boot it from SD but its gsm :( Aug 23 03:31:10 ani1: CDMA version? Aug 23 03:31:53 ani1: as i known, CDMA stack does not inclued in Android. Aug 23 03:33:16 write your own cdma fabric Aug 23 03:33:48 romainguy_: what happened to the XML layout changes? Aug 23 03:34:19 showSetButton removed from DatePicker and TimePicker? Aug 23 03:36:59 and what happened to layout_toRight for RelativeLayout? Aug 23 03:37:44 toRightOf Aug 23 03:37:54 the changes overview is incomplete Aug 23 04:08:13 yo Aug 23 04:08:38 iphone costs 36k in india and its still locked!! Aug 23 04:09:00 you pay like $800 for a locked phone Aug 23 04:09:19 SHIT Aug 23 04:09:31 hope android phones don't do this Aug 23 04:12:54 sup ramadoss Aug 23 04:12:58 yeah Aug 23 04:13:03 not worth it Aug 23 04:13:11 dude, have you done any 0.9 migrations? Aug 23 04:13:28 their changelogs suck Aug 23 04:16:01 onOptionsItemSelected ???? Aug 23 04:16:05 new signature? Aug 23 04:17:11 well, what is Menu.Item now? Aug 23 04:17:12 hey f00f- Aug 23 04:17:12 MenuItem ? Aug 23 04:17:25 yes Aug 23 04:17:35 look at the api diff report Aug 23 04:17:45 their diff report is mainly unreadable Aug 23 04:17:49 hehe Aug 23 04:18:00 unless it comes in a one page summary? Aug 23 04:18:05 seems like a lot of clicks are needed Aug 23 04:18:12 yeah Aug 23 04:18:18 lot of changes though Aug 23 04:18:23 between m5 and 0.9 Aug 23 04:18:48 indeed Aug 23 04:18:53 you done porting yours? Aug 23 04:19:23 yup Aug 23 04:19:34 118 errors to go :) Aug 23 04:19:38 woah Aug 23 04:19:48 man, you should have some huge code base Aug 23 04:20:06 actually Aug 23 04:20:10 it's surprisingly small Aug 23 04:20:25 when jasta was saying his stuff is 20k lines Aug 23 04:20:28 i was like... shit Aug 23 04:20:38 i only have lik 8000 lines (at the time)... my app must suck Aug 23 04:20:43 haha Aug 23 04:21:52 it would be fun to find out a commercial application making a lot of money that has only a few lines of code Aug 23 04:22:06 haha Aug 23 04:22:13 there are a couple in the iPhone app store :) Aug 23 04:22:14 i would be bummed if someone says, hey i make 100k with my 100 lines of code! Aug 23 04:22:30 i'm sure there are some 4-line for loop patents Aug 23 04:22:40 yeah Aug 23 04:22:57 am sure there are apps less than 100 lines of code making money Aug 23 04:23:01 man i have to get rid of crap like this: startActivityForResult(intent, 1337); Aug 23 04:23:24 its painful, but pretty straight forward Aug 23 04:24:03 ugh, i forgot i have my own class called MenuItem Aug 23 04:24:11 i logged one bug, long time back in the issue tracker Aug 23 04:24:19 and now that widget is gone (zoom slider) Aug 23 04:24:21 hehe Aug 23 04:24:25 that sux Aug 23 04:33:10 f00f-: getting ready for lunch he Aug 23 04:38:28 ah Aug 23 04:38:35 i could go for some good indian food Aug 23 04:38:52 we'd be jammin with some gulab jamun! Aug 23 04:39:33 friday night party with gulab jamun :) Aug 23 04:39:49 oh shit.. Aug 23 04:39:52 f00f-: lol Aug 23 04:40:00 s/lunch/launch Aug 23 04:40:06 LOL Aug 23 04:40:32 what is up with the changes Aug 23 04:40:40 first PixelConverter wasnt good enough Aug 23 04:40:42 its disabled Aug 23 04:40:44 now PixelCalculator isnt Aug 23 04:40:55 you need to use projections Aug 23 04:41:13 Projection.fromPixels .toPixels Aug 23 04:42:55 ok Aug 23 04:42:56 thanks Aug 23 04:43:01 so there is now only onDraw(Canvas) Aug 23 05:13:55 0 errors! Aug 23 05:14:02 emulator seems faster, too Aug 23 05:14:58 E/OSNetworkSystem( 265): unknown socket error -1 Aug 23 05:20:12 re Aug 23 05:25:33 re Aug 23 05:28:07 lol wow blast from the past Aug 23 05:28:14 wasnt "re" from bbs days? Aug 23 05:28:31 I don't know Aug 23 05:28:35 we use it on french channels Aug 23 05:28:59 anyone know if there is a way to grab the current location from the browser? Aug 23 05:29:23 http://www.netlingo.com/lookup.cfm?term=RE --> "Hello Again" Aug 23 05:30:20 for me, re is re-entry ;) Aug 23 05:31:48 android cook book is a great idea Aug 23 05:32:03 have you seen the oreilley cookbooks? Aug 23 05:32:06 they are goldmines :) Aug 23 05:32:10 yup Aug 23 05:32:18 we probably couldnt compete on that level Aug 23 05:32:18 any cookbook, i buy Aug 23 05:32:41 am sure, oreily is already on it Aug 23 05:32:46 mayyyyybe Aug 23 05:32:53 the apis are still in flux ;) Aug 23 05:33:02 yeah Aug 23 05:38:13 http://androidguys.com/2008/08/23/android-set-to-deliver-on-multiple-fronts/#comment-1946 Aug 23 05:38:31 which one appeals to you? Aug 23 05:39:33 Geeks and their Tweaks + Anti-iPhone ;) Aug 23 05:42:49 nice! .apk down to 400k! Aug 23 05:43:04 removed a lot of cruft and round1 code Aug 23 07:14:43 good morning Aug 23 07:56:01 gm Aug 23 09:01:16 gm guys Aug 23 09:04:32 gm, Aug 23 10:15:39 re yo Aug 23 10:20:23 yo Aug 23 10:29:38 I got a question about onSaveInstanceState(). I'm doing some work in a bacbkground thread started from my activity. Now a call comes in while the background thread is running, onSaveInstanceState() gets called. After hanging up onRestart / onResume gets called. But what do you need onRestoreInstanceState for and why is the whole state of the UI saved (I havent set some parameter flag for my activity) and why is the background thread doing everyt Aug 23 10:29:53 (I mean the background thread is interacting with my activity) Aug 23 10:30:41 It is nice to see that the state gets restored but I dont really now why. (just like to understand it). After going so much times through the docs I dont get the point there. Aug 23 10:30:41 is the background thread a service? Aug 23 10:33:28 Well I'm starting a backrgound thread in my activity and from that point I'm binding to a service yeah. In this background thread I'm getting some pictures and set them to Image Adapter thats connected with a ListView in the activity. After every received picture I'm sending a message to my activities handler and let him notify my adapter to update. Aug 23 10:34:06 When I'm getting a call (while the downloading takes place and only 3 pictures are in the List View from 20) I can accept it and hang up Aug 23 10:34:22 After haning up all 20 pictures are in the ListView. Aug 23 10:35:10 well that s probably because you are not calling onFreeze Aug 23 10:35:14 well the new name Aug 23 10:35:23 in the sense that your app is still running Aug 23 10:35:32 yeah I know what you mean. Aug 23 10:35:44 but onSaveInstanceState (onFreeze) gets called Aug 23 10:35:52 I think it will be problematic if you have several app running Aug 23 10:36:00 then the background thread will be stale Aug 23 10:36:36 yeah thats why it would be interesting to understand the whole system and really I've tried several times but I'm getting confused now again :-) Aug 23 10:38:29 I'm just wondering why no onRestoreInstanceState is called Aug 23 10:38:53 I can not find the gif about app life cycle Aug 23 10:39:41 ok I have it Aug 23 10:40:23 have yougone throught this: Aug 23 10:40:23 http://code.google.com/android/reference/android/app/Activity.html#ActivityLifecycle Aug 23 10:40:36 it looks thought that it s not updated for 0.9 Aug 23 10:41:25 I have not used onRestoreInstance and the like so can not really comment tbh Aug 23 10:43:55 yeah I know it. In M5 I understood the whole thing a bit more but now I'm confused. Aug 23 10:44:44 In addition now you have that added flag http://code.google.com/android/reference/android/R.attr.html#alwaysRetainTaskState Aug 23 10:45:00 Which makes it even more complicated to understand Aug 23 10:47:23 so you are saying that you have the call to onSaveinstance Aug 23 10:47:26 but not the restore? Aug 23 10:50:01 Yeah I can see from my logs that onSav.. is called but after hanhing up no onRestore is called Aug 23 10:50:52 maybe the onSav is called by the onPause while the restore is for the onCreate Aug 23 10:51:12 oh yes Aug 23 10:51:22 if you look at the life cycle diagram Aug 23 10:51:38 you have the onPause() which would call the onSav Aug 23 10:51:53 if other applications need memory then it kills your activity Aug 23 10:51:58 and we return onCreate Aug 23 10:52:08 while otherwise, it is onResume that is called Aug 23 10:52:15 From what I see now it goes the following way: Aug 23 10:52:17 and I red the onrestore is called by the onCreate Aug 23 10:52:29 you should try Aug 23 10:52:44 get a call, open up several apps, and check again Aug 23 10:52:55 or stop your app Aug 23 10:52:58 and check again Aug 23 10:54:07 onCreate -> onStart // RUNNING APP with background thread running // Now incoming call -> onSaveInstanceState -> onStop gets called because more memory for call is needed -> // hanging up// -> onRestart gets called. (and no onRestoreInstanceState because onStop got called) Aug 23 10:54:31 why would onStop get called? Aug 23 10:54:35 can you see it in the logs? Aug 23 10:54:42 yeah Aug 23 10:54:45 I see it in the logs Aug 23 10:55:05 well Aug 23 10:55:19 I would say onStop -> onRestart() - > on Start Aug 23 10:55:25 from the diagram Aug 23 10:55:52 I don t think that 1 call would require enought memory for your app to get killed Aug 23 10:56:07 it s like any other app, you would need with 5 apps to see somethign Aug 23 10:56:22 well it could be beacuse I'm downloading big pictures Aug 23 10:56:52 Well I can see that onStop gets called so it is definetly the point :) Aug 23 10:57:22 well from the diagram it says that onStop is called when your activity is not visible (you receive the call) Aug 23 10:57:40 onRestart is called when your app is visible again Aug 23 10:57:45 it has not been killed in between Aug 23 10:57:57 it will get kille if the sys need memory Aug 23 11:00:36 you might want to check if oncreate is called Aug 23 11:01:19 the restore state from there Aug 23 11:03:28 http://paste.pocoo.org/show/83087/ Aug 23 11:03:46 thats what I see in my logs Aug 23 11:04:14 From my point of view onRestoreInstanceState is left because onStop got called. Aug 23 11:04:58 onPause -> onStop gets called because more memory for call is needed Aug 23 11:05:07 this is incorrect imo Aug 23 11:05:32 onStop gets called when your activity is not visible anymore Aug 23 11:05:52 it deos not kill your app Aug 23 11:07:10 ok yeah. you're right. Aug 23 11:07:37 But no onRestoreIn.. beacause of onStop seems right ? Aug 23 11:07:57 onRestore is called by the onCreate Aug 23 11:08:29 well you need to see the onStop and onRestart from a 'user' perspective Aug 23 11:08:54 like if you are playing a game, you would stop the game at that specific position in the game Aug 23 11:09:01 and restart it when the call is finished Aug 23 11:09:08 you did not kill the game while u were speaking Aug 23 11:09:26 it s not the onStop as in stoping the activity from a dev pers Aug 23 11:09:30 that s how I c it Aug 23 11:10:04 ok I got your point Aug 23 11:11:17 And now it would be interesting how this: http://code.google.com/android/reference/android/R.attr.html#alwaysRetainTaskState fits into the picture. I wasn't able to get it to work. Aug 23 11:11:56 I'm always coming back to my initial screen after going to the home screen and restarting the app. Aug 23 11:12:15 No matter if I set that parameter for my activity to be true or not. Aug 23 13:28:35 I've got two LinearLayouts nestes in one LinearLayout. The two inner elements have "android:gravity="center"" why arent they centered vertically ? Aug 23 13:29:45 In the end it looks like this: http://img.skitch.com/20080823-1t88bwxu9h2ix2ayb8y3pkrfjy.jpg (the two colors are the 2 inner Linear Layouts) Aug 23 13:32:37 ok got it. Aug 23 13:58:05 re er Aug 23 15:02:58 ugh Aug 23 15:14:16 SanMehat: greetings Aug 23 15:18:05 hey man Aug 23 15:18:07 how goes? Aug 23 15:18:11 Awesome. Aug 23 15:18:31 * ttuttle just bought groceries, and is enjoying the benefits of a RIAA-free, native-Ethernet-speed campus filesharing network ;-) Aug 23 15:19:14 haha Aug 23 15:39:19 ttuttle, anyone trading android source code on the filesharing network? Aug 23 15:39:28 davidw: Nah, not yet. Aug 23 15:39:39 davidw: (And no, I don't have any proprietary google code to share. I left it at work.) Aug 23 17:29:56 how can I connect to a listening socket on the emulator? Aug 23 17:29:59 anybody know? Aug 23 17:41:48 anybody there? Aug 23 17:50:11 can somebody refer me to Basic tutorial to write programs using Android SDK Aug 23 17:51:05 just go to the web site. Aug 23 17:51:13 there are demos and stuff on there. Aug 23 17:51:19 helloandroid.com has some too i think Aug 23 17:52:08 Dougie187: Hi Aug 23 17:52:14 hi Aug 23 17:52:26 Dougie187: i just wanted to make sure that somebody out here lol Aug 23 17:52:49 heh Aug 23 17:52:54 its the weekend so its hard to find people in here Aug 23 17:53:00 maybe later tonight it will be a bit more full Aug 23 17:53:04 but for now its going to be fairly dead Aug 23 17:53:17 hii Aug 23 17:53:27 Dougie187: i thought Weekends are full Aug 23 17:53:33 eh. Aug 23 17:53:35 boo! Aug 23 17:53:40 muthu: Hello Aug 23 17:53:43 Miek: Hello Aug 23 17:53:58 Did anybody here write cool Android App? Aug 23 17:54:05 we write android apps Aug 23 17:54:11 cool or not Aug 23 17:54:36 that's something the users need to decide Aug 23 17:54:38 muthu : send me link to at your apps Aug 23 17:54:53 hmm Aug 23 17:55:01 unfortunately most of them are closed as of now Aug 23 17:55:11 muthu: no problem Aug 23 17:55:25 there's tons here: Aug 23 17:55:27 anddev.org Aug 23 17:55:30 helloandroid.com Aug 23 17:55:59 code.google.com might also have a lot Aug 23 17:56:06 muthu: thanks Aug 23 17:56:22 xtreme: what you work on? Aug 23 17:56:32 muthu: what are your expectations on Android Aug 23 17:56:43 i have big expectations Aug 23 17:56:49 muthu: Cool Aug 23 17:56:53 like android completely taking over the mobile market Aug 23 17:56:56 lol thats a rather odd question. Aug 23 17:57:01 lol Aug 23 17:57:09 Dougie187: Iphone killer? Aug 23 17:57:12 muthu: you know that expectation is comepletely unrealistic. Aug 23 17:57:20 really? Aug 23 17:57:23 yeah Aug 23 17:57:28 100% unrealistic. Aug 23 17:57:35 you can be 100% sure Aug 23 17:57:38 can't Aug 23 17:57:39 yes. Aug 23 17:57:42 no Aug 23 17:57:43 Dougie187: what do you think? Aug 23 17:58:15 i dont even think google expects it to completely take over the mobile market. Aug 23 17:58:24 they just want to give a good alternative to the other choices. Aug 23 17:58:38 google wants to dominate mobile market Aug 23 17:59:04 i think they do advertise business on mobile phones :-) Aug 23 17:59:07 sure they want to. but they don't expect to. Aug 23 17:59:27 Dougie187: do you write android apps? Aug 23 17:59:49 not yet, but i plan to. Aug 23 18:00:06 muthu: keep in mind. there are 3 other options out there that already have pretty large followings. Aug 23 18:00:15 which 3? Aug 23 18:00:21 rim winmo and apple. Aug 23 18:00:29 WHAT? Aug 23 18:00:37 where's symbian? Aug 23 18:00:45 how many symbian phones are there? Aug 23 18:01:04 definitely more than apple and rim Aug 23 18:02:00 i dont think if you talked to a lot of people you would get a feeling that there is a large following for symbian Aug 23 18:02:14 i bet you would have a hard time finding someone who was a business man who even knew what it was actually. Aug 23 18:02:57 what does nokia run? Aug 23 18:03:04 Dougie187: i agree Aug 23 18:03:15 muthu: symbian, but how many people know that? Aug 23 18:03:26 also, how many carriers carry nokia phones. Aug 23 18:03:45 nokia has 40% market share Aug 23 18:03:45 granted, i enjoy nokia phones a lot. but i dont even think sprint and verizon have 1. Aug 23 18:03:46 they don't have market in USA Aug 23 18:03:53 yeah like nothing in US. Aug 23 18:03:59 worldwide Aug 23 18:04:19 my only point. is you can't expect it to completely dominate the market. Aug 23 18:04:34 hell, id be willing to bet you not as many people even know what it is as you would hope. Aug 23 18:04:48 i expect android to completely dominate the mobile market worldwide Aug 23 18:04:58 and that is a completely unrealistic expectation. Aug 23 18:05:02 if Aug 23 18:05:11 they can execute it right Aug 23 18:05:22 what time frame are you looking at? Aug 23 18:05:28 1 year? or 10 years? something like that? Aug 23 18:05:40 now is the beginning Aug 23 18:05:46 and there's a long way to go Aug 23 18:05:49 lol Aug 23 18:06:06 so you are saying that you expect android to dominate the mobile market at some point in the future? Aug 23 18:06:23 yes Aug 23 18:06:29 thats ridiculous. Aug 23 18:07:07 alright Aug 23 18:07:13 let's talk about programming Aug 23 18:07:15 :-) Aug 23 18:07:28 xtreme: we talk anything but android here ;) Aug 23 18:07:31 xtreme: i expect android to be a decent-great mobile os that has a lot of promise. granted that is based on how they finish it up. Aug 23 18:07:45 we tend to psychoanalyze ourselves here a lot too. Aug 23 18:08:18 so, it's not to talk about android programming? Aug 23 18:08:25 depends. Aug 23 18:08:37 about a week ago someone was getting a java tutorial in here and a lot of people got irritated. Aug 23 18:08:52 Dougie187:gocha Aug 23 18:08:55 i would say this is used for help. Aug 23 18:09:04 so try to go through the tutorials and stuff. then come here if you have questions. Aug 23 18:09:18 but again, that is my personally opinion. Aug 23 18:09:57 Dougie187: thanks Aug 23 18:10:05 np Aug 23 18:10:14 re Aug 23 18:10:40 gre Aug 23 18:28:51 O man Aug 23 18:29:01 someone here that worked with overlays ? (FrameLayout) Aug 23 18:29:06 eclipse 3.4 is rubish Aug 23 18:30:03 :) Aug 23 18:30:11 I'm guessing it crashed again ;) Aug 23 18:30:18 ;) Aug 23 18:30:23 yes Aug 23 18:30:56 oh well 3.3 crashed even more Aug 23 18:31:14 on osx 3.4 seems more stable but you have to touch it very cerafully :D Aug 23 18:31:34 not clicking to often if it's doing something :) Aug 23 18:36:30 check your JVM Aug 23 18:37:08 i run 3.4 for weeks without restarting it Aug 23 18:37:10 but that's on windows Aug 23 18:51:25 oh well support for osx is not really great so I dont mind if java things are crashing. Aug 23 19:11:03 hello everyone, this is probably a common question but why do I get 'Could not find HelloAndroid.apk!' trying to run my app? Aug 23 19:12:26 probably because it can't find it. Aug 23 19:12:31 its probably in the wrong place or something Aug 23 19:12:56 I was doing everything according to google tutorial with eclipse ide Aug 23 19:13:03 there is no such file Aug 23 19:13:21 which tutorial were you going through? Aug 23 19:13:23 but how to create it with ide? Aug 23 19:13:41 simple HelloAndroid Aug 23 19:13:43 http://code.google.com/android/intro/hello-android.html#create Aug 23 19:14:24 and how far did you get through it? Aug 23 19:14:52 That's it — you're done! Click the Run button, and the Android Emulator should start. Once it's booted up your application will appear. When all is said and done, you should see something like this: Aug 23 19:16:52 did you just copy and paste everything? Aug 23 19:17:29 I just followed the instructions, there's nothing to copy in this tutorial... Aug 23 19:28:42 ionno what to tell you. maybe ask someone who has gone through that one before. Aug 23 19:46:33 I got a problem. I'm binding to a service. Starting in the onBind.. a new thread so do some work with the service. After the work is done I'm sending from the worker thread a message to my main thread to unbind the service. Now I'm getting "service not registered all the time". Someone an idea ? Aug 23 19:52:18 hmm 08-23 19:52:00.423: WARN/ResourceType(749): Requesting resource 0x1010208 failed because it is complex Aug 23 20:02:51 hah Aug 23 20:23:58 I'm totally confused now. I'm binding to a service in onCreate, after that onServiceConnected gets called and in that method I'm unbinding. After that I'm starting a background thread and call a method in the service with the binding which should be null. And it is working. onDisconnect gets called as well. *crazy* Aug 23 20:30:50 how do I simply create an .apk file using Eclipse IDE? Aug 23 20:43:12 righ click Aug 23 20:43:16 on your project Aug 23 20:43:30 Android Tools Aug 23 20:43:37 Export Unsigned Package Aug 23 20:43:50 in order to give that package away you have to sign it Aug 23 20:43:57 signing is explained in the docs Aug 23 20:44:03 @ jaccus Aug 23 20:45:16 anno^da: failed to export ... *.apk doesn't exist Aug 23 20:45:28 the missing step is creating .apk file Aug 23 20:48:07 well after you run your programm on the emulator one time it should work Aug 23 20:48:44 but to run it .apk file should be sent to the emulator Aug 23 20:50:10 well eclipse does send that to the emulator Aug 23 20:50:18 you dont need to do that yourself Aug 23 20:50:26 but shouldn't eclipse create that file? Aug 23 20:50:42 it just compiles my project so I get some .class files and others Aug 23 20:50:47 but .apk is missing Aug 23 20:51:19 .apk is like .jar - it should be created after compilation (at least that's how I understand that) Aug 23 20:51:30 how did you compile it ? Righclicking on your project and run as android application ? Aug 23 20:52:13 thats the way you shoud do that. After that the emulator gets started and you can test your app Aug 23 20:52:31 I ran it exactly like that: http://code.google.com/android/intro/hello-android.html#run Aug 23 20:53:08 does the emulator start ? Aug 23 20:53:21 ,--8<- Aug 23 20:53:21 |[2008-08-23 22:52:32 - HelloAndroid] Android Launch! Aug 23 20:53:21 |[2008-08-23 22:52:32 - HelloAndroid] adb is running normally. Aug 23 20:53:21 `-->8- Aug 23 20:53:22 when doing it that way ? Aug 23 20:53:23 [2008-08-23 22:52:32 - HelloAndroid] Could not find HelloAndroid.apk! Aug 23 20:53:32 -sorry for scissors- Aug 23 20:54:22 yawn Aug 23 20:55:04 and no, emulator does not start Aug 23 20:55:53 ok Aug 23 20:56:13 have you setup the location of the SDK ? Aug 23 20:56:18 yup Aug 23 20:56:31 in the eclipse prefs Aug 23 20:57:03 everything according to google tutorial Aug 23 20:57:05 yup Aug 23 20:57:22 jaccus: try launching it from the command line Aug 23 20:57:39 its probably a permission thing if you're on Linux (stupid SDK distributes with zip, which doesn't preserve permissions properly) Aug 23 20:57:49 I'm Vista right now Aug 23 20:58:05 downloading linux SDK on my VM right now thought Aug 23 20:58:14 http://groups.google.com/group/android-beginners/browse_thread/thread/3490081098a43481/3a9293c7552e0d55?lnk=gst&q=HelloAndroid.apk#3a9293c7552e0d55 Aug 23 20:58:15 well still, try running the emulator manually Aug 23 20:58:30 I can run emulator without any problem Aug 23 20:58:37 that should solve it Aug 23 20:58:41 I just don't have .apk file from my project Aug 23 20:58:49 so what can I run? ;) Aug 23 20:59:04 yeah read the thread Aug 23 21:00:49 why do i get all these unbind failed messages, i wonder? Aug 23 21:00:54 W/ActivityManager( 56): Unbind failed: could not find connection for android.os.BinderProxy@43524fa8 Aug 23 21:01:50 i guess i'm supposed to unbind in onStop()? Aug 23 21:02:31 unbinding from your service ? Aug 23 21:02:36 yeah Aug 23 21:02:42 currently i bind/unbind in oncreate/ondestroy Aug 23 21:02:43 I'm getting the same Aug 23 21:02:55 i thought that was the correct behaviour, actually Aug 23 21:03:16 because when the user leaves my activity i still want the service connected and the UI state updating. or maybe i don't, actually. Aug 23 21:03:50 http://groups.google.com/group/android-developers/browse_thread/thread/c820944a82be7d4a <- thats what I got several minutes ago and dont really understand. Aug 23 21:04:27 uhh Aug 23 21:04:32 why would you unbindService() in onServiceConnected? Aug 23 21:04:57 ServiceConnection is tied to the bound and unbound state of the service. Aug 23 21:04:57 just testing Aug 23 21:05:22 the reason it probably works is because the binder permits abuse. Aug 23 21:05:33 Look at the second case why does that happen. Aug 23 21:05:35 probably kernel panic the damn thing if you keep doing it ;P Aug 23 21:06:05 i honestly don't know Aug 23 21:06:41 It is sooo wired. :) Aug 23 21:07:24 what pisses me off is that there's not a really good example of like "ok, here's really how you should manage an activity that critically depends on a service." Aug 23 21:07:50 instead of letting us just kludge together our own buggy mess every time Aug 23 21:08:31 the crazy thing is if I'm calling "stopSelf()" from the background thread and after that unbinding is working. Aug 23 21:08:49 well, stopSelf() is kind of interesting. it's like a flag basically. Aug 23 21:09:05 Yeah even onDestroy doesnt get called Aug 23 21:09:10 a service CAN'T stop/destroy until all connected endpoints (activities in this case) are disconnected. Aug 23 21:09:23 Thats right. Aug 23 21:09:28 or rather, BIND_AUTO_CREATE makes this behaviour happen. Aug 23 21:09:34 and its the proper behaviour, if you think about it. Aug 23 21:09:48 you don't want a service being finished to also disconnect. then you couldn't tell the difference between success or error easily Aug 23 21:10:03 But binding and unbinding must work :) Aug 23 21:10:16 And I dont have a clue why it doesnt. :/ Aug 23 21:10:45 what Aug 23 21:10:58 what's sos tupid is that all their examples have this paradigm where you have to click to start/bind services Aug 23 21:11:07 which is a totally unrealistic demonstration Aug 23 21:11:21 everyone else needs to bind/unbind through the activity lifecycle Aug 23 21:12:23 well I need clicking :) Aug 23 21:12:31 one click :> Aug 23 21:12:35 what? Aug 23 21:13:02 you shouldn't ever have a case where you want to start the service connection in response to a click on an existing activity Aug 23 21:13:22 because the state of the button must obviously depend on the state of the service, which you can't know until you connect. Aug 23 21:13:34 a "do work" button, for example, would be "cancel work" is work was already being performed. Aug 23 21:13:56 hmm well Aug 23 21:14:15 I'm starting the service from a click and after that the user can leave my application. Aug 23 21:14:27 The uploading is done in the background. Aug 23 21:14:56 ahh, i see it. well yes, if your service can do multiple pieces of work at a time with no ability to cancel, then that makes sense... Aug 23 21:15:21 yeah it is just one way. No possibility to cancel Aug 23 21:15:55 But I aggree with you your case is much more common for the usage of a service. Aug 23 21:16:53 anno^da: by the way, i just started tinkering to move my service connection to onresume and disconnect to onpause Aug 23 21:17:14 onServiceDisconnected() isn't called afte runbind. which i think is probably correct behaviour. helps distinguish error vs expected behaviour Aug 23 21:18:32 i created a simple little ServiceActivity abstraction to test/solidify this behaviour in my whole application Aug 23 21:18:36 onServiceDisconnected() isn't called afte runbind <- ? But from the docs it should be called or not ? Aug 23 21:18:43 it's just a convenient wrapper which "properly" binds an activity to a service always Aug 23 21:18:54 and it makes it easy to abort the activity gracefully if something goes wrong Aug 23 21:19:07 anno^da: i don't know, but it's clearly not. and i actually would expect it not to. Aug 23 21:22:22 I got another question that I ran into yesterday. The same setup mentioned in the link above. Activty bound to a service doing some work in the backrgound thread using the service. Aug 23 21:22:23 it wouldn't be helpful for it it do to that. Aug 23 21:23:47 Now the user clicks the back button. How do I nicely stop the thread without running into some exceptions like "service not registered". Aug 23 21:24:11 well that's the whole point of what i was trying to tell you earlier :) Aug 23 21:24:19 Yeah :D Aug 23 21:24:21 it's much better to bind an activity to a service permanently. Aug 23 21:24:25 I thought that :D Aug 23 21:24:28 so long as the activity is visible, the service should be there. Aug 23 21:25:03 so that way, onStop() in the activity could use the active service connection to terminate a worker thread with some API Aug 23 21:25:17 IService#stopWork(workId) Aug 23 21:25:19 something like that Aug 23 21:25:50 however, i don't think that's the right beahviour for your app anyway Aug 23 21:25:53 But when the user clicks the back button the Worker thread (backgrond thread) should end as well and how is that done ? Aug 23 21:26:01 Or do it get something totally wrong Aug 23 21:26:03 the user should be able to click "upload", then press back and i think it should still be uploading Aug 23 21:26:32 anno^da: your service obviously needs more symmetry. imagine if you wanted to create an activity which monitored the progress of all your worker threads in the service Aug 23 21:26:35 and possibly let the user cancel them Aug 23 21:26:44 Anyone at Google around? Aug 23 21:26:44 would your API be sufficiently flexible to make that possible? Aug 23 21:27:34 Yeah it could be possible but I have to think about that. At the moment it is a mess to handle that :> Aug 23 21:29:51 But now I'm recognizing what I should and should not do in a service. :) Aug 23 21:31:17 by the way, if you really intend for the background work to terminate when the user leaves an activity, maybe you don't really want a service at all? Aug 23 21:31:47 that's what I recognized now. :) Aug 23 21:31:54 the point of a service is be able to do some work totally independent of an activity. like my music player uses a service to playback audio. the user could back out completely of the app that launched the playback and they expect playback to continue. Aug 23 21:32:12 if that's not what they expect, then a background thread that you manage directly with your activity lifecycle may well be the most appropriate solution Aug 23 21:32:15 I need the service for othe things and there I really need it. But in that case your right it is tottaly non sense. Aug 23 21:32:28 the other thing to remember is that the user should always have some way to control what's happening in a service Aug 23 21:32:40 if they user wanted to cancel some long-running background task, they must be able to Aug 23 21:32:56 my system implements lots of services, and i have to give the user some way to manage all of them Aug 23 21:33:03 Yeah ok. Aug 23 21:33:40 i'm moving through my project these days trying to update stuff i do to make it textbook correct :) Aug 23 21:33:46 I'm getting very slowly into the right direction. Well it is my first real application so I'm running into this errors but it's ok. Aug 23 21:33:49 so i'm tinkering with the minutia of android dev a lot hehe Aug 23 21:36:16 by the way on monday the threading book will arrive Aug 23 21:36:17 :) Aug 23 21:36:48 good, this is an important topic to learn correctly to write good GUI programs. Aug 23 21:41:30 because I'm getting the job done but I've recognized that I'm having so much problems designing it the write way. So a good example is the leaving of threads at the moment, My design makes it so difficult to do that. Aug 23 21:46:04 lol I meant the "right" way :) Aug 23 21:46:11 getting tired now... :D Aug 23 22:02:14 i hate when code really, really seems correct...but isn't ;) Aug 23 22:02:16 somewhere hehe Aug 23 22:08:46 :) Aug 23 22:10:28 oh it is great you opened my eyes *g Now I can nicely close my threads and dont abuse the service in some situations any more Aug 23 22:11:07 do note that "closing" threads is not as simple as most beginners assume. Aug 23 22:11:26 yeah :) Well my simple threads are simple :D Aug 23 22:11:28 threads can't just be destroyed on a whim. Aug 23 22:11:59 for example, are your threads doing some type of blocking I/O? Aug 23 22:12:17 and how are you stopping them? Aug 23 22:13:32 Yeah thats a point in my case the I/O takes 10ms so you dont really recognize that. I let the thread finish its IO and he is just running out then Aug 23 22:13:48 how do you know it takes 10ms? Aug 23 22:14:00 Well thats right :) Aug 23 22:14:05 what? Aug 23 22:15:17 Hmm well I try to to explain it. My thread is just checking account data and after that some parsing and giving back if the account is valid or not. Aug 23 22:15:58 the checking (post a POST method) is instant Aug 23 22:16:09 so its accessing the external network? Aug 23 22:16:52 what would happen if, say, the network was extremely slow where the was at, to the point that it basically didn't work but android hadn't yet given up and flagged that it's totally gone. Aug 23 22:16:57 ? Aug 23 22:17:21 the connect and I/O would probably take several minutes, up to whatever timeout you have set (probably none, and i think the default is several minutes) Aug 23 22:17:46 and so if some time in that process you wanted to cancel the thread...how would you? Aug 23 22:18:08 it's blocked in some I/O somewhere. if you just wait for it to die, you could be waiting a really long time in actually a pretty common case. Aug 23 22:18:30 Ok :). You're right and I dont know how I would handle that. :-) Aug 23 22:18:33 that's why i said thread cancellation must be well understood else it isn't possible. Aug 23 22:18:45 let me show you something i wrote to help folks with this problem Aug 23 22:19:31 by the way, on a mobile phone, the safe assumption is that the network is either unavailable or EXTREMELY slow. design for those cases intrinsically. Aug 23 22:19:43 http://devtcg.blogspot.com/2008/07/interruptible-io-example-using.html Aug 23 22:19:53 Read this. And then download the sample code at the bottom. Aug 23 22:20:01 oh great Aug 23 22:20:03 thanks Aug 23 22:20:21 This represents an excellent general purpose strategy to handling blocking socket threads. The example is using HttpClient, but the concept is general. Aug 23 22:22:58 I will compare it to what I did. I did some handling for the blocked IO but the timeout is default. :-) Aug 23 22:24:20 what do you mean "handling for blocked IO"? Aug 23 22:24:42 btw, the bug that i discuss in the sample code in HttpClient#execute no longer exists on 0.9r1. Aug 23 22:29:10 Well with handling I meant handling the case that the timeout gets reached and no data connection is available Aug 23 22:30:09 anno^da: that's not what my example concerns itself with. Aug 23 22:30:37 in my example, stopDownload() will immeidately trigger the release of any blocking I/O calls, so that the thread can react quickly and die. Aug 23 22:31:27 this is a vastly superior and more general approach to cancellation of blocking threads (when sockets are involved) Aug 23 22:31:34 and it's not any more complex. Aug 23 22:32:42 lol, some dude plugged his book in my blog's comments. i took a look at his so-called similar example and it's fucking wrong Aug 23 22:32:44 Ok thats great I dont have any clue how to handle that :-). So I will read that tomorrow. Aug 23 22:32:56 But I have to got to bed now. It was a looong day :) Aug 23 22:36:45 good night guys. Aug 23 22:36:48 night Aug 23 22:57:26 how do I run my app in the emulator from eclipse? 'Run' starts the emulator with plain android text only. Aug 23 22:59:46 plain android text? Aug 23 22:59:53 is it...booting the emulator? Aug 23 23:01:01 hes trying to run the "Hello Android" example app Aug 23 23:01:13 and keeps getting a ".apk not found" error. Aug 23 23:01:20 though i dont know what gives him the error.. Aug 23 23:01:42 that problem was solved Dougie187 Aug 23 23:01:57 ohh it got solved. Aug 23 23:02:05 now what are you trying to do? Aug 23 23:02:11 I had j2ee jdk and both jre/jdk v5 and v6 Aug 23 23:02:22 so lets say a little mess with versions Aug 23 23:03:23 right now I just don't know how can I see my app on emulator, I got the apk file and emulator is visible Aug 23 23:03:46 what app are you trying to run? Aug 23 23:03:53 an example? or one you wrote? Aug 23 23:04:07 both hello android and notepad Aug 23 23:04:33 and when you hit run in eclipse the android emulator gets loaded right? Aug 23 23:04:39 yup Aug 23 23:04:44 just nothing else happens Aug 23 23:05:36 I'm guessing "hello android" is what I should see :-) Aug 23 23:05:46 i would assume so. Aug 23 23:05:51 since thats what the picture says Aug 23 23:07:17 also in tutorial there's black console screen emulator, I get red cell phone emulator Aug 23 23:07:30 not sure why ;) Aug 23 23:08:15 well maybe they changed that in the new sdk and didnt update the example. Aug 23 23:09:58 however, tv.setText("Hello, Android"); setContentView(tv); should result in this text displayed 'somewhere' Aug 23 23:11:05 <_avatar> did you check the logcat outpu? Aug 23 23:11:06 <_avatar> output Aug 23 23:11:33 oh wait, how long it takes for app to run? Aug 23 23:11:42 jaccus: uhm, setContentView may not be what you think it is. Aug 23 23:11:59 you should not be using it in a hello world, for example :) Aug 23 23:12:21 i mean, not like that. use setContentView(int) in onCreate(). and don't call it any othre place. Aug 23 23:12:25 um lmao, it looks like I closed the emulator before it started Aug 23 23:12:46 so it takes ~1 min to run this, true? Aug 23 23:14:11 <_avatar> run what? are you asking if it takes a minute to boot the emulator? probably. Aug 23 23:14:32 yes, emulator Aug 23 23:14:49 that would depend quite a lot on your computer, obviously Aug 23 23:14:59 mine takes quite a while to run. Aug 23 23:15:06 ;( Aug 23 23:15:20 c2d 2.2ghz & 2gb ram should be fine Aug 23 23:15:30 <_avatar> a minute seems reasonable, then Aug 23 23:16:23 then the problem I occured was my impatience Aug 23 23:16:33 solved now ^_^ Aug 23 23:23:39 hmm, something must have happened with Last.fm recently Aug 23 23:23:44 all my album covers are really low quality now Aug 23 23:24:32 thats too bad. Aug 23 23:25:21 they released a new version of their protocol, maybe theyre punishing apps that don't upgrade Aug 23 23:25:27 which would be lame, but whatever Aug 23 23:26:07 <_avatar> jasta: if that's the case, you can always try to grab album art from amazon.com's mp3 store. they have pretty high quality images. Aug 23 23:26:36 actually, i can't. amazon's terms explicitly mention that no mobile application can use any of their web services Aug 23 23:26:42 mentions* Aug 23 23:26:59 <_avatar> that's pretty crappy Aug 23 23:27:02 Also, it's generally a bad idea to screen-scrape stuff without asking, as it can vanish or the company can get annoyed. Aug 23 23:27:28 ttuttle: i don't think he meant to screen scrape. amazon has lots of web services for this type of thing. Aug 23 23:27:34 jasta: Ah. Aug 23 23:27:38 <_avatar> right, i meant the web services Aug 23 23:27:45 * ttuttle wonders what problem they would have with mobile apps :-\ Aug 23 23:27:46 <_avatar> i didn't know there were explicit restrictions on mobile devices tho Aug 23 23:27:47 but still, you definitely can't use them from mobile apps Aug 23 23:27:58 That's sorta lame. Aug 23 23:28:07 ttuttle: they are clearly positioning themselves to one day be able to charge into the mobile space and monopolize the hell out of their services there Aug 23 23:28:13 but they so far have done absolutely nothing. Aug 23 23:28:44 but it makes no sense. either shit or get off the pot :) Aug 23 23:28:59 <_avatar> i'm sure they will eventually Aug 23 23:29:16 yeah, probably Aug 23 23:29:29 but last.fm's data used to be good, i will just look into their new api and see what's up here Aug 23 23:29:32 i should update to the new api any damn way Aug 23 23:32:12 oh, lol, they fixed a bug. before, small, medium, and large cover art all pointed to the same large image Aug 23 23:32:18 i apparently had a bug where i just snagged the first one Aug 23 23:32:29 but now that they fixed their bug, i need to fix mine to grab large :) Aug 23 23:32:42 jasta: Oh, that's a good feature for them to add ;-) Aug 23 23:33:55 i love last.fm so freaking much Aug 23 23:34:03 * ttuttle has never really gotten in to using it. Aug 23 23:34:09 (I play my music with mplayer on the command line.) Aug 23 23:34:20 you've seen my Android app, right? Aug 23 23:34:24 jasta: Five? Yeah. Aug 23 23:34:33 I haven't run it, but I looked at the site. Aug 23 23:34:35 it will/does integrate Last.fm heavily :P Aug 23 23:34:40 nice Aug 23 23:34:47 I'll use it then, once I get an Androidphone. Aug 23 23:35:26 once i get my footing back with Five and Android 0.9r1, i am going to start working on a feature which automatically checks Last.fm for concerts posted by your favorite artists Aug 23 23:35:37 jasta: Ooh, that's cool. Aug 23 23:35:38 and throws up an android notification letting you place it on yoru calendar Aug 23 23:35:51 jasta: /me drools over the awesome level of integration. Aug 23 23:35:54 Last.fm has all this data for you. It has concert stuff, and it also of course can easily figure out what your favorite artists are. Aug 23 23:36:18 The best part is: the user does nothing. Android will figure out where they are, Last.fm will figure out what they like, etc. Aug 23 23:36:23 jasta: Heh. Aug 23 23:36:25 So they just use the app to play their music and that feature becomes available. Aug 23 23:36:27 jasta: Terrifying automatic. Aug 23 23:38:33 also, this is really important to me because i hope this type of thing can drive concert ticket sales Aug 23 23:38:58 * jasta strongly encourages concert tickets over album purchases :) Aug 23 23:39:32 every time i want an album, i look up the record label that produced it and if they don't give a high enough portion to the artists, i steal the album. Aug 23 23:39:37 then make a point to go to shows :) Aug 23 23:39:55 jasta++ Aug 23 23:41:45 music is really important to me. helping to pay for executives' third vacation home is not. Aug 24 00:11:39 damn music app sure is buggy Aug 24 00:11:47 i've broken it several times by just tinkering around Aug 24 00:12:03 maybe i don't want to use this as an example afterall :) Aug 24 00:12:53 jasta: Please report the bugs! I've got a vague "music crashes" bug that I never finished tracking down while I was there, and you might be able to help them find it. Aug 24 00:13:32 i'd track it down myself if you give me the source :P Aug 24 00:13:42 jasta: I would if I could. Aug 24 00:14:03 well then fix it yourselves hehe. i don't have any useful information on what seems to trigger it Aug 24 00:14:20 it just seems to open often to the player screen that is playing nothing Aug 24 00:14:25 jasta: Have you ever encountered a situation where it simply hangs whenever you try to actually play something? Aug 24 00:14:30 and then if you click around a bit you catch it in an inconsistent state and it crashes Aug 24 00:14:49 ttuttle: hangs as in, throws up the app is hanging dialog? Aug 24 00:15:03 i've had it just simply not do what i wanted it to do Aug 24 00:15:07 jasta: Either that, or it just sits there with a blank screen. Aug 24 00:15:11 jasta: I've had both happen. Aug 24 00:15:29 well right now, it's in this state where it claims to be playing a song Aug 24 00:15:39 and if i click to go the player, it isn't playing anything. Aug 24 00:15:42 the shuffel buttons are blank Aug 24 00:15:46 the player slider is positioned at 0 Aug 24 00:15:48 jasta: Yeah, that sounds familiar. Aug 24 00:15:57 clicking play does nothing Aug 24 00:16:06 jasta: Oh, also, there was this one build where the music app worked perfectly, except no sound came out ;-) Aug 24 00:16:21 and actually, i can't seem to choose a track now Aug 24 00:16:25 jasta: And it ran through the files faster than normal (presumably because it wasn't waiting to output anything). Aug 24 00:16:46 this just looks like service mismanagement to me Aug 24 00:17:05 service management is really a tricky topic, i think. i have spent a lot of time wrestling with just how the fuck i am supposed to critically bind an activity to a service Aug 24 00:17:32 which is why i think you guys should do the community a favor and produce some reasonable examples of this (YOU AVOID IT COMPLETELY IN ApiDemos!) Aug 24 00:17:55 jasta: Remember, ApiDemos is a bit of stuff made as demos, plus some code somebody's had a chance to clean up. Aug 24 00:18:33 whatev, i don't want to get into this conversation again Aug 24 00:18:48 jasta: Then don't complain about it! Aug 24 00:19:23 jasta: There are a bunch of people working really hard to get this done, and I don't like it when you make it sound like they're sitting around trying to ruin your life. Aug 24 00:20:12 yeah but surely someone at google must know how this is supposed to be done? a flipping hello world would take 5 minutes for that person to make. Aug 24 00:20:38 jasta: Perhaps 5 minutes to write, but then add on time for documentation, approval... Aug 24 00:21:38 jasta: Personally I don't know of a way to bind an activity to a service such that the activity automatically dies or reconnects or whatever. Aug 24 00:21:46 you honestly are trying to tell me that adding a new demo is so much overhead that it's not worth it? :) Aug 24 00:21:54 jasta: Not when there's a release to finish. Aug 24 00:22:07 well, sure, whatever. Aug 24 00:22:16 jasta: It's a good demo to have, sure, but not at the expense of bugs that go unfixed. Aug 24 00:22:34 i honestly don't think this process is even well understood at google Aug 24 00:22:51 which seems like it should be done not for the benefit of the community, but for the benefit of the internal dev team :) Aug 24 00:23:28 but whatever, i think i have figured it out for myself these days anyway Aug 24 00:28:09 hmm, a question just popped into my head... Aug 24 00:28:26 is there any way one app can replace another's launcher in the applications list? Aug 24 00:30:35 I don't think so. Aug 24 00:31:01 there is a lot of reasonable value in such a feature. like, my app will one day be a total replacement for the built-in music player. Aug 24 00:31:20 jasta: Yes, but there's no way in hell a good platform would let you pretend you're another app. Aug 24 00:31:43 jasta: It wouldn't be "okay" for you to replace Music. You could replace the functionality, but you can't just pretend you're it. Aug 24 00:31:48 every platform i can think of lets you do that. Aug 24 00:31:53 Um, no. Aug 24 00:31:57 um, yes. Aug 24 00:32:22 Linux will let you install many media players. A good package manager, though, won't let (for example) mplayer overwrite xine's executable, just because mplayer thinks theirs is better. Aug 24 00:32:30 echo "echo You stink" > /usr/local/bin/ls :) Aug 24 00:32:39 Yeah, but that's not the platform, that's you. Aug 24 00:32:49 The platform should never let another package overwrite ls. Aug 24 00:33:08 lol, do you have any idea what you're talking about? Aug 24 00:33:12 Yes. Aug 24 00:33:18 You want to replace another app's icon with your own. Aug 24 00:33:19 That's wrong. Aug 24 00:33:21 most linux package managers do not care what files you replace. Aug 24 00:33:36 you could make a deb do whatever the heck you want. you can run arbitrary scripts even. Aug 24 00:33:43 damn thing runs as root too. Aug 24 00:33:47 jasta: Portage catches them. Aug 24 00:34:09 well sure, and I'm sure Debian has some tools that try to catch them from doing something stupid Aug 24 00:34:14 but the package manager and platform don't give a shit Aug 24 00:34:30 Okay, but either way it's not something your app will be able to do. Aug 24 00:34:33 the bottom line is that you must trust the source that sent you the deb. nothing about the package manager implies that it can't deceive you. Aug 24 00:35:14 nothing about most computer platform implies that. you can happily go install things that damage your system. it's all about trust of the source, not of the platform. Aug 24 00:35:17 What if someone replaces Contacts with an app that acts like the regular one but silently sends your info to someone's website as well? Aug 24 00:35:33 jasta: Yes, but Android intends to maintain security between apps, as installed by a regular user. Aug 24 00:35:35 ttuttle: Isn't that what a Linux rootkit is? Those exist. Aug 24 00:35:57 jasta: Yes, but those exploit bugs, either in apps or in security configuration (e.g. bad passwords). Aug 24 00:36:15 Uhh, not necessarily. Aug 24 00:36:22 They can just as well exploit user stupidity. Aug 24 00:36:30 that's a bug in the configuration too ;-) Aug 24 00:36:33 "Hey click here, I am a free porn bot!" Aug 24 00:36:43 * haavi *clicks* Aug 24 00:36:51 * ttuttle stabs haavi. Aug 24 00:37:28 jasta: Nevertheless, Android will not allow apps to steal each other's icons, for many reasons (consistency, security, branding...). Aug 24 00:37:30 ttuttle: Well, your argument sucks anyway. I could make an app with the same name and icon as another. Then the user is confused and will probably launch mine. Aug 24 00:37:42 jasta: Ooh, good point. Lemme file a bug. Aug 24 00:37:52 This "feature" has nothing at all to do with security, because that security model *SUCKS*. Aug 24 00:38:15 but the whole point is that the user has to trust that the apps they install are not malicious Aug 24 00:38:31 jasta: Yes, but it's nice if they can tell them apart as well. Aug 24 00:38:32 *NOTHING* about the platform guarantees otherwise. Legitimate apps must request permissions just like malicious ones must. The user has to be able to distinguish for themselves. Aug 24 00:38:50 So why not just introduce some new permission to say "I fully replace some other app" Aug 24 00:39:00 Why? Aug 24 00:39:08 That'd be horribly confusing. Aug 24 00:39:10 for one, because it allows the user to have an easy "downgrade" path. Aug 24 00:39:18 So does simply having two different apps. Aug 24 00:39:25 most users would probably just choose to "delete" the old app Aug 24 00:39:34 and then if they delete the new one, how do they go back? Aug 24 00:39:39 Why can't Five Music simply be called "Five Music", instead of replacing Music? Aug 24 00:39:45 jasta: Why did they delete it? Aug 24 00:39:59 ttuttle: because they know it to be unnecessary. this is how users think, ttuttle. Aug 24 00:40:07 jasta: then they can get another copy. Aug 24 00:40:18 if you download a "better" contacts app, for example, you don't want to constantly see "Contact" and "Contacts IMPROVED!" Aug 24 00:40:32 jasta: Um, that's how the Palm worked, and it worked fine. Aug 24 00:40:42 Nothing about Palm works fine Aug 24 00:40:45 jasta: Plenty of people had "Date Book+" or Agendus alongside the regular versions. Aug 24 00:41:11 what would happen if i tried to delete the music app then? Aug 24 00:41:29 probably wouldn't let me, i bet. *tsk tsk* Aug 24 00:41:39 Um, that's intended behavior, if it does. Aug 24 00:41:41 if it did, how would i get it back? Aug 24 00:41:43 It's part of the system. Aug 24 00:41:59 It's used by the browser to play videos, and lots of other stuff. Aug 24 00:42:17 huh? it is? Aug 24 00:42:19 There is no reason your app should be able to override the icon of another app. That will just serve to confuse the user. Aug 24 00:42:22 Yeah, actually. Aug 24 00:42:34 (It's unintuitive, but Music ~= "Media Player".) Aug 24 00:43:24 so, all this talk that google has about users being able to "remix" all the google services off the phone is actually not true post production? Aug 24 00:43:40 jasta: Music is not a Google service. Aug 24 00:43:46 jasta: Also, that's just how it's configured so far. Aug 24 00:44:02 jasta: Anyone could replace Music when building a new ROM/flash image. Aug 24 00:44:12 that's what i meant by post production Aug 24 00:44:26 jasta: Do you mean "off the phone" as in remove them? Aug 24 00:44:33 i just mean take the icon away. Aug 24 00:44:37 jasta: I guess it'll depend on how the phone's configured. Aug 24 00:44:48 jasta: If whoever's making it decides they're permanent, they're permanent. Aug 24 00:45:05 booooh Aug 24 00:45:56 haavi: We can't stop them! Aug 24 00:46:21 jasta: Okay, here's an example. Aug 24 00:46:43 jasta: Suppose you wrote an app that created dozens of duplicates of the built-in apps. Aug 24 00:46:48 jasta: What then? Aug 24 00:48:24 ttuttle: what do you mean? then you'd just have dozens of duplicates? Aug 24 00:48:29 jasta: Yeah. Aug 24 00:48:33 jasta: That's not a very good user experience. Aug 24 00:48:39 what if i created an app that phoned your mother every night at 2am? Aug 24 00:48:48 what then? Aug 24 00:48:52 jasta: That's in the security model. Aug 24 00:48:58 jasta: Creating dozens of copies of icons is not. Aug 24 00:49:03 so why can't this be in the security model? Aug 24 00:49:33 jasta: You mean a permission like "Duplicate built-in application icons"? Aug 24 00:49:40 it's a reasonable thing to assume that folks may wish to replace built-in apps. Aug 24 00:49:46 Hmm. Aug 24 00:49:49 even if they don't really delete them, just making it seem that way. Aug 24 00:49:57 Why not just use another icon? Aug 24 00:50:09 It seems so much less confusing to me. Aug 24 00:50:14 because then you have a bunch of clutter. what if you really wanted to rebrand the damn thing without making users reflash? Aug 24 00:50:25 and what if your users knew that you would be doing this, agreed with you, and wanted their phone that way. Aug 24 00:50:41 jasta: you're forgetting one piece of the phone industry. Aug 24 00:51:10 which is? Aug 24 00:51:14 CARRIERS! Aug 24 00:51:21 they never want you to do anything fun with your phone! Aug 24 00:51:36 so, Android would currently let me go so far as to "add" brand (not rebrand). Aug 24 00:51:43 Then the users would just annoyingly not click on all the Google crud Aug 24 00:51:57 jasta: You're confusing "Android as will be released as open source" and "Android as will be configured on end-user phones". Aug 24 00:52:16 jasta: Users will have as much potential for customization as the manufacturers and carriers allow. Aug 24 00:52:22 huh? are you saying that we will not be able to add apps to our phone by our own choice? Aug 24 00:52:32 jasta: No, you'll be able to add apps. Aug 24 00:52:40 jasta: I'm talking about modifying "system-ish" stuff. Aug 24 00:53:02 this just seems like an area where android could step in to make things a lot nicer for larger customizations Aug 24 00:53:13 so the users who want that don't have to just have a ton of extra icons they never use Aug 24 00:53:37 jasta: If someone's making a phone that is likely to be customized in that way, they can do that. Aug 24 00:53:59 now you're forgetting one big thing about the phone industry Aug 24 00:54:04 jasta: Unfortunately, most carriers like to retain some sort of branding and control over their phones. Android, as will be on phones, will be a step in the right direction with the allowing-any-apps thing. Aug 24 00:54:08 jasta: WhaT? Aug 24 00:54:10 carriers and manufacturers are notoriously lazy, and barely hack the platforms they run. Aug 24 00:54:10 *What? Aug 24 00:54:21 they'd have to do a major hack job on the android code to permit this type of customizations Aug 24 00:54:25 and for that, they'll never do it Aug 24 00:54:27 jasta: Okay. Aug 24 00:54:45 why not have Google do that massive hackjob, so all android phones can do this unless somebody toggles a default off? Aug 24 00:55:16 Er, because nobody asked for it yet? Aug 24 00:55:19 there is no way in hell the carriers are going to go "out of their way" to add lots of features to Android itself. they will value-add on top of it, but they won't go in and hack the crap out of it. Aug 24 00:55:27 yoyo Aug 24 00:58:26 jasta: I'm not sure why it's Google's responsibility to add these features. Aug 24 00:58:41 why is it google's responsibility to do anything? Aug 24 00:58:54 ...they want to create a platform that users and developers like, right? :) Aug 24 00:58:56 jasta: They're trying to produce something that will succeed. Unfortunately, carriers won't like something that can be completely overridden by a single download. Aug 24 00:59:09 jasta: users, developers, *and carriers*, otherwise users will never see it. Aug 24 00:59:30 well tahts fair :) Aug 24 01:00:15 jasta: And carriers, like it or not, are not used to everything being really open. Honestly, most users aren't either, and may be confused if all of their phone can be replaced with a single download, even if they check off the "Yeah, whatever, let it run" box. Aug 24 01:03:30 yes that's true. it's a tough thing for google to balance i suppose. Aug 24 01:03:55 jasta: Exactly. Aug 24 01:05:28 but, you do have a good long term position Aug 24 01:05:55 you've just tied a dollar to a string and you get to keep tugging it every few months ;) Aug 24 01:06:09 jasta: Heh. Aug 24 01:06:25 jasta: Hopefully we'll all end up at a big pile of $100 bills at the end ;-) Aug 24 01:06:50 you know what is kind of upsetting thougH? everyone touts android's openness as being really revolutionary Aug 24 01:06:57 but like, Windows Mobile is exactly like that? Aug 24 01:07:03 not as open as your mom Aug 24 01:07:06 ohhhhh snap Aug 24 01:07:09 the only difference between WM and Android is that WM is just a crummy piece of software Aug 24 01:07:10 SanMehat: oh! Aug 24 01:07:25 but as far as politics go, it's the same old business. Aug 24 01:07:37 * ttuttle high-fives SanMehat. Aug 24 01:07:39 It's really composable by the carriers/manufacturer, totally flexible once the user gets it, etc. Aug 24 01:07:47 It's just bad, and users don't like it because it's slow/unstablke :) Aug 24 01:07:49 unstable* Aug 24 01:08:04 but still carriers seem to put up with that? maybe just because its microsoft Aug 24 01:08:13 jasta: Exchange. Aug 24 01:08:41 they put up with it because it has exchange? Aug 24 01:08:46 jasta: Yes. Aug 24 01:08:56 jasta: Corporate drones will do *anything* to talk to Exchange. Aug 24 01:09:01 well shit, Android can have Exchange. Microsoft just got pounded into the ground on the licensing royalties Aug 24 01:09:30 and open source projects (WHICH YOU ARE *grin*), are freed from patent responsibilities by their recent senility Aug 24 01:09:48 the exchange activesync protocol is partially documented as a result, and the rest of it is expected shortly Aug 24 01:10:26 jasta: Ooh, this sounds awesome! Aug 24 01:10:33 you didn't know about all this? Aug 24 01:10:39 how did you think the iPhone just got Exchange support? Aug 24 01:10:39 jasta: I personally hadn't heard about it, no. Aug 24 01:10:45 are you kidding me? Aug 24 01:11:06 Microsoft released full disclosure documentation for ALL of their core network protocols. Aug 24 01:11:20 which included Samba, Active Directory, Exchange, etc. Aug 24 01:11:53 and they got chopped off at the knees by the EU so they had to reduce their licensing and royalty fees down to "fair" levels, allowing other firms to move in and become compatible Aug 24 01:12:06 jasta: Wow, this is some great ass-kicking! Aug 24 01:12:23 they went so far as to document what shit was covered by what patents Aug 24 01:12:55 and they also claim in the license agreement that non-profit (open source qualifies!) organizations are permitted to use anything without fear of patent enforcement Aug 24 01:13:29 so if Google was crafty in their business structure, Android could be a spin-off company not making profit. Then they could just implement the shit for free. Aug 24 01:13:29 jasta: Wow! Aug 24 01:13:40 jasta: *Android* doesn't make profit now, I think. Aug 24 01:13:41 Although frankly with the reduced licensing fees, Google could just outright afford it. Aug 24 01:13:48 jasta: It's open-source -- how could we really charge for it? Aug 24 01:14:01 ttuttle: well but it would have to be its own registered company, a subsidiary of google Aug 24 01:14:05 that's M$'s rules Aug 24 01:14:11 hang on, let me find this documentation Aug 24 01:14:15 i can't believe you hadn't heard of this Aug 24 01:14:54 i've been busy Aug 24 01:14:55 http://www.microsoft.com/presspass/press/2008/jun08/06-30InteropUpdatePR.mspx Aug 24 01:15:07 i was wrong even, they are more relaxed than i thought: Aug 24 01:15:09 "It is important to note that open source developers, whether commercial or non-commercial, will not need a patent license for the development of implementations of these protocols or for the non-commercial distribution of these implementations, according to Microsoft?s Patent Pledge for Open Source Developers." Aug 24 01:15:31 this covers the recently published Exchange protocols, including ActiveSync Aug 24 01:15:36 so Android, *right now* could freely support this. Aug 24 01:15:42 and you've got all the docs to help you Aug 24 01:15:59 surely this must be well known at google? my god, i figured you guys would be chomping at the bit to implement that. Aug 24 01:16:14 it's so easy to bust into an entirely different market. support exchange, now suddenly you're "enterprisey" Aug 24 01:17:03 it's really like Microsoft has totally gone insane. but it's a good idea to take advantage of it :) Aug 24 01:18:58 jasta: Oh, yeah, we'd have to spin off. Aug 24 01:19:15 jasta: Maybe they're desperately trying to avoid getting in more trouble by (gosh, I never thought I'd say this) behaving reasonably. Aug 24 01:19:28 the EU really fucked them up good Aug 24 01:20:05 they were successfully fining them $1M per day for months. Aug 24 01:20:24 the total judgment was damn near a billion dollars in fines Aug 24 01:20:47 jasta: great! ;-) Aug 24 01:21:00 oh i was wrong :) Aug 24 01:21:02 it was more than that. Aug 24 01:21:49 total fine over the last 4 years was over 2 billion :) Aug 24 01:21:57 they really, really fucked them up :) Aug 24 01:22:27 fucking pussy american government :) Aug 24 01:22:58 http://en.wikipedia.org/wiki/European_Union_Microsoft_antitrust_case -- read this Aug 24 01:52:02 ...and, we're back! Aug 24 01:52:18 (aircon blew the circuit breaker on the surge protector running the ethernet switch I'm on. :-( ) Aug 24 01:56:42 vege steamed dumplings, beef broccoli spicy garlic sauce, mixed vegetables in black bean sauce Aug 24 01:56:57 sorry, didnt have a scratchpad open Aug 24 01:56:58 :) Aug 24 02:02:28 ;-) Aug 24 02:02:28 did you bring enough to share with the channel? :-P Aug 24 02:09:54 * jasta ponders the efficiency of passing ParcelFileDescriptors around. Aug 24 02:11:00 a ParcelFileDescriptor is a very light object Aug 24 02:12:13 there's no IPC overhead involved with each read/write on the opened stream? Aug 24 02:12:20 no Aug 24 02:12:23 ok, excellent. Aug 24 02:12:29 the ParcelFileDecriptor contains the fd Aug 24 02:12:36 on the other side you directly use that fd Aug 24 02:12:48 i wonder how the hell they hacked that. Aug 24 02:13:05 sharing file descriptors across processes? pure voodoo. :) Aug 24 02:13:13 beats me Aug 24 02:13:16 I just use it :) Aug 24 02:14:26 I added the ability to read/write fd in parcels to improve the performance of wallpapers for Home Aug 24 02:26:40 thinking about the binder, i wonder if this is just the most miserably insecure thing ever invented? :) Aug 24 02:26:53 how does it check the mapped regions, for example? Aug 24 02:27:04 how was your show jasta Aug 24 02:27:29 obviously since you guys control how software loads/runs on the phone, you can just say "No C" and not give the Java layer direct access to the binder device... Aug 24 02:27:53 but i wonder if you did conceivably have direct access to the binder what you could get away with... Aug 24 02:28:10 yakischloba: great, actually Aug 24 02:28:15 yakischloba: went drinkin after, got home around 1 Aug 24 02:28:51 jasta: cool. I should've stopped by - went out for a bit but it was boring Aug 24 02:29:29 * jasta just finished removing a now unnecessary layer of indirection in Five Aug 24 02:29:30 went swimming all day at Seward Park today. Figured I should go out as summer is dwindling fast Aug 24 02:29:48 yes. me and my buddies are planning to go backpacking when we get back from Ireland Aug 24 02:29:56 hopefully we can find a not-pooring-down-rain weekend :) Aug 24 02:30:44 Hard to do. I just posted some pics for my buddies today, from last year's August hiking trip...poured on us the whole time. Aug 24 02:31:29 romainguy_: do you know if exceptions are still not possible through aidl? Aug 24 02:31:58 this new interface i'm designing has a pretty complex set of ways it can fail and custom exceptions would be huge there Aug 24 02:32:48 fail less complexly then Aug 24 02:32:52 * heat made a new word Aug 24 02:35:35 heat: well, i think i'm just going to go with currently not telling the caller why it failed, just that it did Aug 24 02:35:41 because the user won't much care either way.... Aug 24 02:36:17 i might just communicate failures through a content provider though Aug 24 02:36:19 sucky, but meh Aug 24 02:39:57 cant you add an exception to a Parcel? Aug 24 02:45:56 meh ;) Aug 24 02:46:06 i could do it by just making my own parcel that houses some complex return type Aug 24 02:46:11 but i dont want to, and really, its not that critical Aug 24 02:46:23 the primary reason for failure is no sd card or out of disk space on it Aug 24 02:46:32 and i think the user can reasonably figure that out by guessing :P Aug 24 02:47:03 you give your user too much credit Aug 24 02:48:15 i dunno any of this framework stuff... I'm in the native world :-) Aug 24 02:48:40 well, eventually i will log the errors, and give the user a chance to check on an error console Aug 24 02:48:44 so they won't be totally lost ;) Aug 24 02:50:19 this feels really nice simplifying my stuffs :) Aug 24 02:50:28 my design was needlessly complicated before :) Aug 24 02:57:13 ooh android software positions at google http://www.google.com/support/jobs/bin/search.py?lr=lang_en&type=f&query=android Aug 24 02:57:58 did you think they weren't hiring? :) Aug 24 02:58:12 well i remember lookign awhile back and not seeing anyhting Aug 24 02:58:43 man it feels good to really start burning through code again **** ENDING LOGGING AT Sun Aug 24 02:59:56 2008