**** BEGIN LOGGING AT Thu Aug 21 02:59:56 2008 Aug 21 03:39:15 http://www.tmoworld.com/2008/08/everything-you-need-to-know-about-g1.html Aug 21 06:31:34 good morning guys Aug 21 06:31:36 :) Aug 21 06:32:44 morinig anno Aug 21 07:17:18 Has someone here used the WebView ? Aug 21 07:19:37 I'm using the webview with the mobile website of flickr in order to create some kind of token. In order to get this token the user has to login and can confirm that my app is using its account to upload some data. Now if I go back to the settings activity with the webview the user is still logged into the website. How can I achieve that he is not. I've cleared the cache,cookies,passwords but the webview shows still the logged in state. Aug 21 07:20:32 have you tried sniffing the data? i guess its the cookie Aug 21 07:20:32 In my database directory on the filesystem I have still a "webview.db" Aug 21 07:20:40 Yeah it is the cookie Aug 21 07:21:19 but why cant I delete the cookies from the webview. The webview has its own database. Aug 21 07:21:34 The only thing I can do is clear cache Aug 21 07:21:44 hm, sucky Aug 21 07:22:29 but giving every app access to your cookies would suck more Aug 21 07:23:03 thats true. There is just one method missing for the webview. Aug 21 07:23:12 and thats clear cookies Aug 21 07:23:37 maybe a permission ACCESS_COOKIES Aug 21 07:23:55 Well I will delete the webview.db before using the webview Aug 21 07:29:36 lol after deleting the webview.db it is still there Aug 21 07:29:44 (still logged in) Aug 21 07:29:48 whats that Aug 21 07:35:38 ok after reloading the emulator it is working now Aug 21 07:35:53 well ok not really Aug 21 07:41:16 lol Aug 21 08:08:14 anno^da_ warst du der mim httpclient (http://paste.pocoo.org/show/82790/) ? Aug 21 08:14:58 joa der war ich :) Aug 21 08:50:39 hat sich erledigt :) wollte wissen welcher client Aug 21 08:50:51 hab org.apache.http.impl.client oder so genommen (defaulthttpclient) Aug 21 08:56:50 default is der richtige ja Aug 21 08:56:52 der sollte gehen Aug 21 08:57:01 also ich hab ihn genommen und er läuft sehr fein Aug 21 08:58:14 jap, er tuts Aug 21 08:58:25 brauch ihn ja nur für eine abfrage Aug 21 08:58:49 User-Agent: Apache-HttpClient/UNAVAILABLE (java 1.4) Aug 21 08:58:52 ^^ Aug 21 09:00:51 whats the permission to read gps location? Aug 21 09:44:05 nice, seems like logging from native lib to logcat works Aug 21 09:47:26 did someone get the an Location Update ? through the LocationManager now ? Aug 21 11:17:22 hmm, http://code.google.com/android/reference/android/os/Parcelable.html seems out of date. anyone who can tell me what to return in public int describeContents()? Aug 21 11:23:17 tric: as I understand it, typically 0 Aug 21 11:23:40 indicating that you are not marshalling a special object Aug 21 11:26:49 i dont understand this "marshalling a special object", can you give me an example of when would i do this? Aug 21 11:27:32 im using a byte[] and 2 int in my Parcelable object Aug 21 11:28:23 i wonder why describeContents() needs to be implemented if there is a default case of returning 0 Aug 21 11:29:50 tric: it needs to be implemented because its an interface Aug 21 11:30:32 the obvious example of a special case is a file descriptor as indicated in the documentation Aug 21 11:31:15 I doubt if any Parcelable we define as application developers will have any special status Aug 21 11:32:24 It's presumably necessary for the framework to properly manage system resources Aug 21 11:35:34 can i set the position of the icons on the android home screen somehow? Aug 21 11:46:58 tomgibara: ah true, thx Aug 21 11:47:37 ligi: the user can drag those icons, long click on it and you can drag them Aug 21 11:48:24 tric: ah thanx a lot - i tried everything but long click ...-) Aug 21 11:49:17 tric: Note that I could be very wrong about that assumption Aug 21 11:49:41 Has someone here managed it to get some geo location update through the LocationManager in 0.9? I've tried everything from pushing locations from the DDMS, setting a mock location in code, setting all the permissions and activating the mock location provider. But the LocationListener doesnt get invoked. :( Aug 21 11:49:51 since had that been me designing the API to do that, I would have defined an internal interface that extends Parcelable and used an instanceof check to look for special resources Aug 21 11:51:44 they haven't done that, so perhaps there is a role for application developers to parcel up objects with "potential special significance" Aug 21 11:57:14 tomgibara: well. it seems like i can pass now a array of parcelable objects created in a native lib via jni to a service, and pass a ArrayList of it to an Activity. pretty nice Aug 21 11:58:51 tomgibara: but this special significance needs to be documented somewhere. but anyway, jni isnt documented or supported and passing parcelables via AIDL is not supported in eclipse plugin... Aug 21 12:10:17 hi! Aug 21 12:10:35 i've a question.. Aug 21 12:11:18 questions are forbidden here Aug 21 12:11:29 ah.. Aug 21 12:11:44 where can i post my question? Aug 21 12:12:14 echo it to /dev/null Aug 21 12:12:17 cyber5tar86: Zohan jokes Aug 21 12:12:22 :D Aug 21 12:12:30 i try to compile the new SDK Aug 21 12:12:31 Only meaninful answers are forbidden Aug 21 12:12:40 but i've got an error from the installer Aug 21 12:13:16 ./build-emulator.sh: line 30: ./android-configure: No file or directory Aug 21 12:13:42 cyber5tar86: I think you are best off putting that question on the forums Aug 21 12:13:59 http://groups.google.com/group/android-developers Aug 21 12:14:04 can you give me the link? Aug 21 12:14:24 ok Aug 21 12:14:30 thnx XD Aug 21 12:14:46 i think i read it somewhere in one of the groups today Aug 21 12:15:26 ok Aug 21 12:16:30 Can I set the SD card for the emulator starting from Eclipse? Aug 21 12:17:11 hmm, you append emu options, so i guess you can Aug 21 12:17:19 I know that its -sdcard name but can I set these settings somewhere in eclipse Aug 21 12:17:21 edit launch config for your project Aug 21 12:18:14 another question: android run on Armv4T processor? Aug 21 12:19:06 I don't know, search http://groups.google.com/group/android-internals/ Aug 21 12:19:11 ok Aug 21 12:19:15 thnx Aug 21 12:19:33 where do I find the launch config (hmm perhaps a silly question but I cant find the settings for the upstarting emulator in eclipse) Aug 21 12:20:14 got it Aug 21 12:20:15 :( Aug 21 12:20:16 sry Aug 21 12:21:44 cyber: the current SDK emulator images are built for v5t Aug 21 12:22:35 I'd suspect getting the system v4t clean would be 1-4 weeks of work, depending on the people involved. change compiler flags, hunt down places where assembly (static or dynamic) assumes v5t, etc Aug 21 12:27:42 damn...i want to run Android on my HTC Trinity...i've to wait yet :( Aug 21 12:28:47 it'll be a ton easier to port to existing stuff once the source release happens Aug 21 12:29:50 given how well people have done at lashing together prototypes from the sdk emulator images, I expect to see a lot of porting to various existing platforms happen rapidly once sources are released Aug 21 12:53:15 what the heck are the US relay team doing? Aug 21 12:53:39 disaster! Aug 21 12:54:50 Whats up guys? Aug 21 12:55:39 Did anyone here see the rumors that the HTC Dream will NOT have GPS? What's the deal with that? It would be a HUGE mistake Aug 21 12:56:31 yeah, heard that Aug 21 13:05:49 muthu: don't you think GPS is kind of... crucial? Aug 21 13:06:01 oh yeah Aug 21 13:06:03 especially considering half of the apps utilize your GPS location? Aug 21 13:06:10 yes Aug 21 13:06:30 this whole thing is going to be somewhat of a trainwreck with no GPS, IMO Aug 21 13:06:44 lot of features goes missing Aug 21 13:06:49 what else? Aug 21 13:06:56 video recording i saw wasn't there... Aug 21 13:07:00 that sucks but not a big deal Aug 21 13:07:04 gps, gtalk, bluetooth, video recording Aug 21 13:07:07 i could see some cool life streaming apps though Aug 21 13:07:26 gtalk and bluetooth WILL be on the phone Aug 21 13:07:32 its just that developers wont have access Aug 21 13:07:35 to use their APIs Aug 21 13:07:38 in their own apps Aug 21 13:07:39 does anyone else have problems with managedQuerys? Aug 21 13:07:41 i'm pretty sure at least Aug 21 13:08:00 i always get an exception when resuming to an activity with a managed query: Aug 21 13:08:02 java.lang.IllegalStateException: attempt to acquire a reference on a close SQLiteClosable Aug 21 13:08:02 has someone tested the music app and can tell me if it can run in the background. Aug 21 13:08:23 ok only streaming music doenst work in the background Aug 21 13:09:06 inZane-_: don't do a manual close Aug 21 13:09:37 now thats the point Aug 21 13:09:40 i dont call close Aug 21 13:10:29 Cursor messages = managedQuery(pContentUri, projection, null, Messages.DEFAULT_SORT_ORDER); Aug 21 13:10:34 thats all im doing Aug 21 13:27:49 looks like you are calling close too many times Aug 21 13:31:04 anno^da_: it streams music in the background and automatically pauses when a phone call comes in Aug 21 13:31:59 yeah but not when I open some stream from the browser and leave the music application Aug 21 13:32:11 after that the stream stopped. Aug 21 13:32:31 Playing music located on the sd card in the background works fine. Aug 21 13:35:44 Can someone help me with that thread: http://groups.google.com/group/android-developers/browse_thread/thread/a819adc5c38fe5b3# ? Aug 21 13:36:46 is the default gps provider back? I know they killed it for a while Aug 21 13:38:09 anno^da_: yeah but not when I open some stream from the browser << What do you mean by that? Aug 21 13:39:16 Well I'm opening a remote mp3 file ( www.yxyyx.de/source.mp3) , after that the music player gets started and starts playing. After hitting the home button the music application stops playing. Aug 21 13:41:40 zhobbs: I'm testing now a different name. Thanks for your input. Aug 21 13:44:11 anno^da_: to play music in the background you need to use a service Aug 21 13:46:21 Oh I dont need that just testing the applications on the emulator at the moment. :-) Aug 21 13:47:25 Ok the different name for the location provider wasnt the error. I think the LocationListener cant get the result because I'm blocking the thread with my while loop. Aug 21 13:56:20 hmm, how to center a text in a textview from xml? android:layout_centerText="true" or something like that? Aug 21 13:58:09 i think it's android:gravity="center_horizontal" Aug 21 13:59:27 gravity = center if you want it 100% in the middle of the TV Aug 21 13:59:48 and Miek_ 's if you want it just centered horizontal Aug 21 14:05:47 anno: thx Aug 21 14:36:54 If someone is familiar with the Location API and could help me I would be happy. :-) I'm stuck on that :/ Aug 21 14:54:37 i cant get the location on sdk 0.9 Aug 21 14:54:44 worked fine on r5 Aug 21 14:56:13 have you checked the documentation... its possible the api had changes Aug 21 15:06:10 it seems to be a permission problem Aug 21 15:06:25 Zohan: have you looked at the Location exmaple ? Aug 21 15:06:34 provided in the Groups Aug 21 15:06:45 no Aug 21 15:06:51 do you have a link for zohan? Aug 21 15:06:55 anno^da_: are you playing that mp3 in an activity or a service? Aug 21 15:07:27 http://groups.google.com/group/android-developers/files Aug 21 15:07:56 jasonchen: I'm playing that mp3 in the normal music activity provided with the SDK Aug 21 15:08:21 (not my own application) Aug 21 15:08:34 oh Aug 21 15:09:27 I've just tested the sample apps ;) and tried playing a mp3 on a website in the browser app. Aug 21 15:09:44 from that point the music app got opened Aug 21 15:09:53 nm, then. thought you were trying to do so from within your own app Aug 21 15:10:01 no :) Aug 21 15:10:48 thank you anno Aug 21 15:11:40 np Zohan Aug 21 15:47:41 Could someone please look at this and perhaps tell me how I can manage my problem with using a Looper. I'm dont get it working. :/ ( http://groups.google.com/group/android-developers/browse_thread/thread/a819adc5c38fe5b3/09c1707a59fd1433#09c1707a59fd1433 ) Aug 21 15:47:59 why do you need a looper? Aug 21 15:49:13 this isn't telling you to use the Looper class. just that you should use it from the main thread. Aug 21 15:50:21 the Looper is just their event running class. only threads that need to process events in the Android framework need a Looper running them Aug 21 15:50:54 main threads (like UI threads) or the wrapped threads in services and stuff have loopers because they've got Android events to process. Aug 21 15:51:22 but you really shouldnt be using Looper directly unless you want to mnaually implement the event loop atop another thread, which you don't :) Aug 21 15:54:47 anno^da: can you describe your problem again to me? i can probably help you find a better design... Aug 21 15:55:14 Ok I'm trying to describe it :-) Aug 21 15:57:03 jasta - how do you like the new SDK? Aug 21 15:57:23 i like it, but there are some pieces that matter to me which i can't believe no one addressed Aug 21 15:57:47 my project still requires that i modify global files (tools/lib/framework.aidl) in order to build Aug 21 15:58:34 and the MediaPlayer threw me a curve ball a bit. I will be requird to do a lot more work than I planned originally just to implement an inefficient workaround. Aug 21 15:58:50 The activity lets the user take a picture and set some additional information. After setting the submit button a service gets started in which I'm starting a new thread. In this thread the HTTP communication is done. (accessing the flickr api etc) In this thread I need to get the current location of the device. In M5 I just called getCurrentLocation() and everything was fine. Now I have to implement that Location Listener which waits for getting Aug 21 15:59:33 And now I have the problem that on the one hand I have to wait for the Location Listener being called and on the other hand not blocking this thread. Aug 21 15:59:34 anno^da: well, you clearly don't want to do it in the worker thread of the service. Aug 21 15:59:39 you want to do this in the service's main thread. Aug 21 15:59:56 (if you had multiple worker threads of the service, would they all want to share location information?) Aug 21 16:00:11 just one worker thread. Aug 21 16:00:46 I just need the location for that one picture upload process. Aug 21 16:01:06 So with removing getCurrentLocation() everything gets more complicated for me. :-) Aug 21 16:01:11 well, you have a problem there :) Aug 21 16:01:30 first of all, you need to design this procedure so that the upload can be deferred waiting for your location Aug 21 16:02:25 My idea was waiting in the worker thread and setting up the listener in the service main thread. Aug 21 16:02:29 but as far as just getting the locationmanager to work in your design, if you truly only need this one thread to respond to location and it makes no sense to do it service-wide, just make your worker thread run a looper... Aug 21 16:02:38 and implement everything over the looper Aug 21 16:02:45 but i do recommend communicating iwth the main thread still Aug 21 16:04:48 My idea is to implement the whole Location Management stuff in the main thread of the service. And let the worker thread wait (just a simple loop) for the location to be set. Aug 21 16:06:11 That should work right ? Aug 21 16:08:59 anno^da: yes, and you can communicate any way that you wish between those two. but do realize that Android's message-passing is one directional Aug 21 16:09:16 only the Looper supported thread can receive messages. so, the main thread won't be able to send messages back to the worker thread. Aug 21 16:10:07 unless the worker thread is also supported by a Looper Aug 21 16:10:30 what you can do, however, is have the main service tryingt o get a location fix, and using a lock to wait. Aug 21 16:10:46 notify and release the lock when you get one. Aug 21 16:11:28 have the worker thread waiting on the lock before it proceeds. when a location is found (or the process fails/times out as you see fit), you can tear down the locationmanager logic and just proceed into your main worker procedure. Aug 21 16:11:33 do you understand what i mean? Aug 21 16:12:09 implement a blocking noReallyGetMyLocationPlease() that waits on the main thread to get a location or timeout. this synchronization would be accomplished with a lock only released when the main thread succeeds or times out (and thus fails) Aug 21 16:12:29 I understand what you mean. Aug 21 16:12:52 bleh Aug 21 16:12:54 so the main thread would not block: it would just be listening with a LocationListener and releasing those resources once it gets what i wants. Aug 21 16:13:05 heat: ? Aug 21 16:13:13 I'm trying to implement that now. (lets see if my Java ecperience lets get the whole thing working :) ) Aug 21 16:13:21 just a general bleh Aug 21 16:13:37 jasta: Thanks for now. I will come back later and tell you if it's working, Aug 21 16:13:52 be careful to avoid a condition where the worker thread can accidentally hold the lock first. Aug 21 16:14:07 because then you'd deadlock your main service thread Aug 21 16:14:24 ok. Aug 21 16:15:09 i would implement this with a simple monitor lock. lock it on the main thread before you start your location-sensitive worker, then start the worker thread and get the main thread trying to get location Aug 21 16:15:31 then in the worker thread implement some loop that waits on the monitor lock originally locked by the main thread... Aug 21 16:15:42 in the main thread, release that lock once location is known, or timeout has been reached. Aug 21 16:16:03 or possibly you could have a timeout implemented in the worker thread. Aug 21 16:16:43 Yeah ok I will try that right now. Aug 21 16:17:08 i'm not sure how you'd do it in the worker thread though. you'd need a more sophisticated lock. Aug 21 16:17:40 oh no, Object#wait(long) would let you do that ;) Aug 21 16:21:55 Oh and I promise when that application is running I will read the Java book. My half knowledge is driving me mad. Aug 21 16:27:08 fyi: if you simply new up a Handler, it will automatically be set up with a Looper for the current thread Aug 21 16:27:17 so you can new one up in a worker thread Aug 21 16:27:26 if you do want to use a similar message passing mechanism Aug 21 16:30:14 krosaen: uhm. Aug 21 16:31:07 i don't think that's true. creating a Handler will not be possible unless the current thread has a loop associated with it. Aug 21 16:31:37 and even then, you must actually let the looper run your entire thread (block it with Looper.loop()) Aug 21 16:32:41 jasta: ur right, you need to have called Looper.prepare(), my bad Aug 21 16:34:00 krosaen: a monitor lock seems like the best way to implement his logic just because he wants the thread to block waiting for location anyway Aug 21 16:34:18 he doesn't want a multiplexing environment Aug 21 16:36:44 i'm not quite sure i understand the situation entirely, but if it's a service, why not just do the work on the main thread if it needs to block anyways? Aug 21 16:36:59 since services have their own main thread separate from the ui thread Aug 21 16:37:03 well, first of all you can't block the main thread of a service Aug 21 16:37:16 if you do, new service connections won't work Aug 21 16:38:06 second, the "work" in this case is already asynchronous. he's trying to move the asynchronous design of LocationManager to a blocking design so that he can more or les operate as the old getCurrentLocation call used to Aug 21 16:38:22 so his worker thread can say "get my location, tag it to a picture, then upload picture." Aug 21 16:38:58 so he's just turning an asynchronous call to a synchronous one within the worker thread Aug 21 16:38:59 the location piece is no longer blocking, but he wants to block waiting for a suitable location to be found. so he can implement that asynchronous "get my location" piece in the main thread (non-blocking), but then arbitrarily introduce a blocking layer waiting for a lock to actually flag that the location has been found by the main thread Aug 21 16:39:10 under that situation, the lock is released and the blocking worker thread has the location and can proceed Aug 21 16:39:57 so for that, i recommend just a simple monitor lock held initially by the main thread, then released to the worker. Aug 21 16:40:15 this deisgn also assumes that only one worker thread can be doing this at any given time, but he asserts that is the case always. Aug 21 16:41:02 it wouldn't be too tough to extend that though. you'd just unlock when the main thread knows a reasonable last location, and lock it when it doesn't. Aug 21 16:44:56 i wrote something like that Aug 21 16:44:57 http://rafb.net/p/u2SwjY35.html Aug 21 16:45:09 i did not test id yet tho Aug 21 16:48:29 oh boy :) Aug 21 16:48:31 yours is all wrong :) Aug 21 16:48:47 you have an idle sleep of 1s, so you can starve threads unnecessarily here. Aug 21 16:49:01 i ususally test code before posting :) Aug 21 16:49:08 you really want to use some type of lock and object notification. Aug 21 16:49:48 yeah, if you do want to make a blocking call, you need to wait and notify rather than sleep and poll Aug 21 16:49:49 im going to use it in an broadcastreceiver Aug 21 16:50:05 i dont care if that thread is blocked Aug 21 16:50:19 well, there is no reason to design this way. Aug 21 16:50:27 you haven't gained anything, but you have lossed something. Aug 21 16:50:28 But with the thread blocked you wont get the listener invoked Aug 21 16:51:07 doesn't the listener run in a different thread? Aug 21 16:51:14 inZane-_: no. Aug 21 16:51:17 well feel free to correct my code :-D Aug 21 16:51:39 No it doesnt that was my problem. Thats why I'm trying to change that now :) Aug 21 16:52:03 inZane-_: if you block in a BroadcastReceiver, you will trick an ANR Aug 21 16:52:12 anno^da: i can code this up for you if you require. but i can't do it now ;) Aug 21 16:52:20 even if you don't block long enough to trigger an ANR, you will still freeze the application UI Aug 21 16:52:45 BroadcastReceivers run in the same thread as View and Activity updates and local Service bindings Aug 21 16:53:13 jasta: At the moment I'm trying it myself but I will come back to your offer later on. :-) Aug 21 16:54:09 At the moment I've packed everything to gain the location in my main service thread and get "08-21 18:44:37.005: ERROR/AndroidRuntime(179): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()" again :/ Aug 21 16:54:22 im going home, l8er dudez Aug 21 16:55:44 anno^da: are you sure you're in your main service thread? that sounds like you're not :) Aug 21 16:56:08 the main service thread only runs code in onStart, onCreate, onDestroy, etc. in the binder stub that you implement, you aren't in the main service thread. Aug 21 16:57:08 Well I'm not in the binder stub.. :) Aug 21 16:57:35 I'm just sending a message to the handler of my main thread from the worker. Aug 21 16:57:53 And let the handler start the getting location Aug 21 16:59:38 anno^da: right, but where idd you create the handler? Aug 21 16:59:45 new Handler() is what fired that log message you see. Aug 21 17:06:29 well if it wouldnt be in the main thread it couldnt set notifications. (I'm using the handler not only for starting the geo search) Aug 21 17:06:42 i tested my code Aug 21 17:06:48 and it returns the location Aug 21 17:06:49 :-D Aug 21 17:07:02 the activity thread is blocked Aug 21 17:07:07 and thats what i want Aug 21 17:10:41 jasta: it is working now Aug 21 17:10:43 :) Aug 21 17:11:05 http://www.flickr.com/photos/26487290@N07/2783892375/ :P Aug 21 17:18:56 Is it possible that the handler drops messages ? Aug 21 17:20:33 anno^da: It shouldn't be, otherwise many things won't work. Aug 21 17:20:38 anno^da: Handlers are supposed to be reliable. Aug 21 17:20:57 that is assuming they are implemented right :) Aug 21 17:23:14 ok. Then I have to search my bug. The handlers worked quite fine untill I implemented the one handler message sent for starting the location search. :) Aug 21 17:25:27 anno^da: remember, only a looper'd thread can receive messages. Aug 21 17:25:35 this by default is any main thread of a service, activity, etc. Aug 21 17:27:11 jasta: Yeah I know that. :) I'm in the right thread. Just got an error in the handling of the incoming messages in the Handler Aug 21 17:30:03 get a good book on threaded programming :) Aug 21 17:31:08 :-) Ah well everything was working till that lovely Location :D Aug 21 17:31:19 But you're right I neeeeeeed that :D Aug 21 17:31:48 what's wrong with Location? Aug 21 17:33:36 anno^da: what are you trying to do? Aug 21 17:38:08 Well I'm sending messages from my worker thread to my main thread of the service. (with the handler :) ) It receives every message. Just one message is left out and I dont really know why. I'm sending it the same way I send the other messages. It is just crazy. Aug 21 17:39:12 what are the messages? Aug 21 17:39:51 just some handler.sendMessage(handler.obtainMessage()) Aug 21 17:39:59 swetland, SanMehat, romainguy, romainguy_: greetings! Aug 21 17:40:05 you know you can use handler.obtainMessage().sendToTarget() (fyi) Aug 21 17:40:41 ttuttle: hey man Aug 21 17:40:48 yo Aug 21 17:40:50 the vague description is not helping anno^da Aug 21 17:41:00 michaelnovakjr_: I know that ;) Aug 21 17:41:10 one message getting dropped doesn't ring a bell without knowing what you are doing Aug 21 17:41:16 SanMehat: How's it going? Aug 21 17:41:25 ttuttle: another day in paradise Aug 21 17:41:37 SanMehat: you live in paradise? Aug 21 17:41:42 what's it like? Aug 21 17:41:44 :) Aug 21 17:42:05 michaelnovakjr_: The brochures make it out to be better than it is :) Aug 21 17:42:08 :) Aug 21 17:42:24 SanMehat: isn't that always the case everywhere? Aug 21 17:42:43 michaelnovakjr_: don't tell my fiance that... we're planning our honeymoon.. ;;) Aug 21 17:42:51 same here Aug 21 17:42:59 SanMehat: the Mexican coke makes up for everything else Aug 21 17:43:18 romainguy_: hahaha Aug 21 17:43:43 SanMehat: apparently the recent hurricane has discouraged my fiance from choosing a florida honeymoon Aug 21 17:43:47 although the fridge is empty this morning Aug 21 17:43:58 michaelnovakjr_: Too many gators in florida Aug 21 17:44:00 romainguy_: :( Aug 21 17:44:12 SanMehat: that's why you grill em! Aug 21 17:44:19 haha Aug 21 17:44:23 nice Aug 21 17:44:46 we usually fry them Aug 21 17:45:06 interesting Aug 21 17:45:10 never tried it that way Aug 21 17:45:12 only grilled Aug 21 17:45:32 SanMehat: oh by the way, i totally spaced that i'll be in Ireland Sep 4th thru 20th. when were you planning to be here? Aug 21 17:45:43 whoa ireland Aug 21 17:45:45 I want to go gator hunting this year...my brother goes every year, sounds like fun Aug 21 17:45:45 bastard Aug 21 17:45:55 jasta, what part? Aug 21 17:46:02 Wow, I've totally sidetracked the channel. Aug 21 17:46:06 jasta: Hmm.. probably not then. Aug 21 17:46:11 jasta: I'll let you know though. Aug 21 17:46:13 michaelnovakjr_: driving around the entire coast (including northern ireland because my friends want to go, *shakes fist*) Aug 21 17:46:28 my family is from Moville up in Donegal Aug 21 17:46:45 really? awesome. Aug 21 17:46:50 yea, i love it there Aug 21 17:47:14 we had a big family reunion there two years ago Aug 21 17:47:29 greencastle Aug 21 17:47:37 our plan is to fly into Dublin, stay one night, then tour around the northern coast. We'll go all the way to Galway then back to Dublin to hang out there for a couple of days Aug 21 17:47:46 nice Aug 21 17:47:46 then out from Dublin around the southern coast back to Galway again Aug 21 17:47:56 (we have to do it this way because one of our friends is meeting us half way) Aug 21 17:47:59 in dublin Aug 21 17:48:02 its an amazingly beautiful country Aug 21 17:48:08 yeah, i'm so excited. Aug 21 17:48:20 my mom and dad have both been there separately, so has my brother Aug 21 17:48:22 i would "get lost" and not come back :) Aug 21 17:48:59 my dad was thinking about retiring there in the next couple of years, but unfortunately their economy has surged too much in the last 20 years to make that really viable. Aug 21 17:49:41 i am finishing up my passport process... so i'll be a dual citizen Aug 21 17:55:26 is there an easier way for identifying message than setting them a Bundle with an identifier in it ? Aug 21 17:55:32 messages Aug 21 17:55:41 anno^da: msg.what Aug 21 17:55:54 msg.arg1 Aug 21 17:55:57 msg.arg2 Aug 21 17:56:00 or something Aug 21 17:56:32 anno^da: you should try and debug first :) Aug 21 17:57:10 I know my error. Aug 21 17:59:07 I've set a global variable that gets changed before sending a message. And the handler looks at this variable. Well now I know that it isnt very intelligent. While having two messages delivered without a delay the handling with the status variable is faulty. :) Aug 21 18:11:27 so everything is working now. Aug 21 18:14:21 hehe, don't use crude status variables when dealing with concurrency issues Aug 21 18:15:21 i would use a lock and a condition variable for your situation, the more i think about it. Aug 21 18:15:25 Well thats what I've learned now in todays lesson with jasta. :) Aug 21 18:15:47 or just a volatile :) Aug 21 18:15:52 no, don't use a volatile Aug 21 18:15:56 because then you can't efficiently wait on it Aug 21 18:16:09 a lock and condition lets you wait efficiently in your worker thread. Aug 21 18:16:54 well thats what I'm reading now about. At the moment I've just a silly while(!location){WAIT} Aug 21 18:17:12 lock.lock; try { while (locationIsKnown == null) locationCond.await(); } finally { lock.unlock(); } Aug 21 18:17:25 and of course, after the while maybe you put some meaningful code :P Aug 21 18:17:42 and then in your main thread you have Aug 21 18:18:16 lock.lock(); ..registerLocationListener.. and in the location listener when you fianlly get a location you'd call locationCond.notify(); lock.unlock(); Aug 21 18:18:20 there are several tools in java.util.concurrent to synchronize threads propertly Aug 21 18:18:21 so that the waiting can be interrupted. Aug 21 18:18:33 romainguy_: yes, and i'm recommending their usage. Aug 21 18:18:33 like a CountdownLatch Aug 21 18:18:57 in a simple case like this you can also simply use a wait/notify Aug 21 18:19:27 romainguy_: he can't, though, because his locking order is controlled by an asynchronous call to an Android service Aug 21 18:19:49 he needs to lock before the call, and unlock/notify once the async call comes back with some meaningful data (in this case, his location) Aug 21 18:20:07 jasta: Ok sounds good. :-) But I'm reading now a bit more about threads. Otherwise I'm completly confused. :-) Perhaps it is not that difficult but I have to order that now in my brain. ;-) Aug 21 18:20:08 what he's trying to do is translate android's new async locationmanager interface into one that blocks. Aug 21 18:20:33 anno^da: please do. threads are a very complex topic. Aug 21 18:20:49 treating it as anything but is a disasterous mistake. Aug 21 18:20:56 them* Aug 21 18:21:27 BTW there was a spontaneous decision to try the new BigTable cafe at 11:30 today Aug 21 18:22:08 haha lol I'm having dinner now. :-) Aug 21 18:22:20 jasta: Yeah I recognized that. Aug 21 18:22:26 fadden: hey! Aug 21 18:22:36 Wow, it's like everyone from Google is here ;-) Aug 21 18:27:34 how are you guys on irc while out at BigTable cafe? Aug 21 18:27:49 you guys have an IRC android app you want to share? Aug 21 18:28:14 no rush, since we don't have any hardware yet. :-) Aug 21 18:30:26 they wouldnt be able to take an Android handset to a lcoal cafe in Silicon Valley, are you insane? Aug 21 18:31:19 maybe they are disguised as a piece of crap Samsung Instinct Aug 21 18:32:07 hmmm, damn, i cant get eclipse with android to run on this box. anyone here who is using 64bit linux and 64bit eclipse? Aug 21 18:32:52 I went into a best buy mobile a while back and the salesman asked me if I might be interested in the cool new Samsung Instinct phone. I simply replied, no, it's a piece of crap. I thought the guy was going to fall out in the floor. It was funny to see his face. Aug 21 18:34:42 jasta: maybe i'm wrong but something tells me its a cafe inside google, as BigTable is a google project. Aug 21 18:35:23 oh encrypted messages :) Aug 21 18:38:06 oh, i hadn't even thought about that :) Aug 21 18:38:38 IRC android app seems to be the HTC Dream ;) Aug 21 18:38:56 i'd much prefer a good ssh app. i irc through a screen on my home machine :) Aug 21 18:39:11 that way i dont make multiple connections all the time Aug 21 18:39:16 :-) Aug 21 18:39:23 and sucking down the battery. Aug 21 18:41:27 jasta: which book would you recommend regarding the threading topic in java ? (is there one favourite? ) Aug 21 18:42:53 anno^da: i recently read Java Threads. It was an old O'Reilly book updated for Java 1.5. It was very informative. Aug 21 18:43:39 it is written in a helpful way to give you practical tools to solve common problems Aug 21 18:43:59 but without sacrificing a good description of the problem. Aug 21 18:44:00 which i appreciate Aug 21 18:44:50 ok sounds good I will look at it. I'm ordering now some books. (I hate reading at the computer screen for a long time) Aug 21 18:45:01 don't gloss over it, though. don't simply ignore complexity you don't understand. Aug 21 18:45:16 threads are insane =D Aug 21 18:45:26 ls -la fn~xavd Aug 21 18:45:29 ah, hehe Aug 21 18:45:34 damn, im not in a shell here Aug 21 18:45:36 Well I want to understand now just a little bit of it :-) Aug 21 18:45:43 Step by step :) Aug 21 18:45:59 anno^da: just be careful... the bit you might not understand might be the bit that makes your code wrong. Aug 21 18:46:18 Yeah but I have to start at some point. :) Aug 21 18:48:51 At the moment I'm understanding nearly nothing (as it seems to me ) so the code gets even worse. :) Aug 21 18:49:43 anno^da: trust me, you don't want to incrementally learn this topic. Aug 21 18:49:54 you want to dedicate real time before writing any code to understand it. Aug 21 18:50:02 and you want to write test programs to PROVE to yourself that you understand it. Aug 21 18:50:28 and by that i mean don't just spaghetti code and tweak endlessly until something seems to work right. really try to demonstrate to yourself that you confidentally understand the topics you learned. Aug 21 18:50:40 if you can't get the design right on the first try, go back and re-read relevant topics in your book Aug 21 18:51:17 confidently* Aug 21 18:51:24 I know what you mean. But if I dont start I wont understand it. Aug 21 18:52:46 I just mean don't "start" by trying to absorb piece-by-piece into a functional project. Aug 21 18:53:02 and for the love of god don't assume that just because something appears to work that it is correct. Aug 21 18:53:29 jasta: ;-) Aug 21 18:53:31 "work" is a much larger domain than "correct". Aug 21 18:54:12 :-) Now I'm, feared of learning something *laughing* Aug 21 18:55:17 ttuttle: as someone that has been entirely "self"-taught, i can personally attest to how challenging this attitude can be. so i get why folks try to resist it, but i still just want to grab them by the shoulders and shake them vigorously :) Aug 21 18:55:19 jasta has that effect sometimes ;) Aug 21 18:56:48 don't fault my pedagogic nature :) Aug 21 18:57:39 hehe Aug 21 19:10:53 anno^da: there is a way for you to use the monitor lock in this case, by the way. but i'm not going to show you how to encourage you to buy/read a book :) Aug 21 19:11:12 :D Aug 21 19:11:32 a monitor lock and a volatile flag, as Romain initially suggested, will actually work. you just have to pay special attention to initialization. Aug 21 19:11:54 bbl, lunch Aug 21 19:12:14 wheres "jasta_" Aug 21 19:12:16 I'm back from dinner :) Aug 21 19:18:48 yakischloba_: yeah he has that effect but I know how it is meant. :-) Aug 21 19:19:21 anno^da: everyone fits into the big picture somehow :) Aug 21 19:19:34 except meoblast. Aug 21 19:20:36 Well I hope so. Aug 21 19:21:00 yakischloba_: amen Aug 21 19:21:12 michaelnovakjr_: haha I was waiting for you on that one :) Aug 21 19:21:22 :) Aug 21 19:22:05 :D Aug 21 20:03:48 hmm, anyone can help me here? Aug 21 20:03:48 debug: [echo] Packaging bin/acti-debug.apk, and signing it with a debug key... [exec] null Aug 21 20:04:26 i would at least like to know what should be executed, so i can check what went wrong Aug 21 20:05:10 tric: if you look in the ant script you will see the call to a tool called apkbuilder Aug 21 20:05:35 it packages the files (compiled resources, classes.dex, java resournces, manifest, etc...) into the apk and then signs it Aug 21 20:13:28 xavd: yes, but how is it called, and why is my ant calling null? (sun jvm 1.6 64bit linux) Aug 21 20:14:11 it's called apkbuilder, it's in the tools directory Aug 21 20:15:06 I have no idea why it shows " null". I'm going to investigate Aug 21 20:16:20 tric: can you try to launch ddms? the standalone version Aug 21 20:16:38 also try to start the following tools (from /tools): adb, aapt Aug 21 21:04:47 It's so funny to see all the beginners on android-develoeprs again :) Aug 21 21:07:13 a Aug 21 21:07:15 *Awwww. Aug 21 21:07:17 That's cute. Aug 21 21:07:36 What? Aug 21 21:08:30 n00bs learning android. Aug 21 21:08:39 It's cool. Aug 21 21:09:57 Well it's something anyway. Aug 21 21:10:35 Promising. Aug 21 21:11:38 <- beginner + n00b ;) Aug 21 21:12:04 anno^da: You're learning, though. Aug 21 21:14:51 well yeah I do :). Now my thread is waitng patiently and getting up again after getting the signal. Oh it is somehow making fun. Aug 21 21:16:10 and for today I can go to with a good feeling. Aug 21 21:16:35 could you post the code somewhere please, anno^da? :-) Aug 21 21:18:05 ohhh please remind me tomorrow inZane-_ I'm lying in bed now and hate the touchpad for navigating arround :-) . (But you will get the code !) Aug 21 21:18:37 irc in bed? Aug 21 21:19:02 well I had to learn sth about the monitor lock and conditions :) Aug 21 21:19:16 jasta's homework for today ;) Aug 21 21:19:23 anno^da: go buy the book Java Concurrency by Brian Goetz :) Aug 21 21:19:50 romainguy: I'm putting it on my list Aug 21 21:21:44 and now I have got 40 minutes battery life left untill I can go to bed. ;) Aug 21 21:21:57 you have to wait until your device dies before you can sleep? :) Aug 21 21:22:10 joking ;) Aug 21 21:29:05 so good night guys Aug 21 21:47:16 ugh Aug 21 21:47:28 this local HTTP server work-around is nightmarish to imagine how to do ranged gets for syncing Aug 21 21:47:37 we would need much more detail on how MediaPlayer implements ranged gets Aug 21 21:48:47 and how it works in general. Aug 21 21:49:04 morrildl: care to enlighten us so that we can actually even implement the workaround you guys recommend? Aug 21 22:07:45 Good evening everyone. Aug 21 22:12:49 hello :) Aug 21 22:13:18 Hows it going jasta? Aug 21 22:13:34 pretty good. thinking about some high-level design stuffs for Five Aug 21 22:13:42 i'm gonna redesign all of the services it implements Aug 21 22:13:54 heh cool Aug 21 22:14:37 i've also decided to implement the local http server hack for 1.0, however i am going to design it on the assumption that at some point i will be able to provide an inputstream to MediaPlayer Aug 21 22:15:23 i am going to implement this uber InputStream class that the local http server will use. so hopefully once the server is no longer required i can just nuke it but keep the inputstream class Aug 21 22:16:42 michaelnovakjr_: *poke* Aug 21 22:16:52 well at some point its open sourced so couldn't you submit your "patches" back to it? Aug 21 22:17:18 i wouldn't count on it :) Aug 21 22:17:45 why not? Aug 21 22:17:55 besides, that's work i really don't want to do. Aug 21 22:18:39 but isnt it what your going to do? Aug 21 22:18:41 well, Google releasing the source code has nothing to do with Google accepting patches. Perhaps they want the MediaPlayer designed this way, for example. Aug 21 22:19:41 sure but that doesnt rule it out. Aug 21 22:19:48 what do you mean? i don't want to hack google's MediaPlayer code. Aug 21 22:20:26 no i mean sure they might not want patches, but that doesnt mean they won't accept pacthes. Aug 21 22:20:38 i guess i don't understand what your doing then. Aug 21 22:20:38 lol Aug 21 22:20:42 but thats cool. Aug 21 22:20:54 the MediaPlayer needs to have the option to feed it from an InputStream. Aug 21 22:21:01 right now it can only be fed from a URL or file on disk. Aug 21 22:21:48 they probably implemented it this way on purpose, but i don't know Aug 21 22:22:10 yeah but if you write an inputstream class, couldn't you submit that back to them to implement into android? Aug 21 22:22:16 so i am creating a local http server, as they advise, which allows me to arbitrarily provide input to the MediaPlayer Aug 21 22:22:33 oh ok. Aug 21 22:22:40 so you are sort of adding a middle man. Aug 21 22:22:43 Dougie187: no, my inputstream will be highly specialized for what Five is doing. what they need to do is make it so MediaPlayer can take an InputStream as a data source. Aug 21 22:22:57 ok i get it. Aug 21 22:23:04 then i don't need the lame HTTP server. Aug 21 22:23:25 i was under the impression that you were "adding" some functionality to mediaplayer for your purposes. and i figured if you were going to do that, they should incorporate it into android. Aug 21 22:23:51 nope. just wildly hacking aroudn it. Aug 21 22:24:09 ok Aug 21 22:24:21 the real problem with my approach though is that there's no clear interface for doing this. i don't know, for example, what MediaPlayer does when seeking an HTTP stream Aug 21 22:24:32 so i don't know how to map that into my http server's design. Aug 21 22:24:44 i will just have to endlessly experiment and waste a ton of time on a temporary hack Aug 21 22:24:53 lol yeah Aug 21 22:25:17 and of course they won't give me a dialog on this topic Aug 21 22:25:48 nobody can simply tell me why there is no way to do this right now. do the engineers think it's too much work? i don't know... Aug 21 22:26:16 heh Aug 21 22:26:33 Google in its infinite wisdom still chooses to keep their engineers thoughts private. My crack about being able to submit patches was that I think they will continue to keep their engineers private :) Aug 21 22:26:49 And there really won't be much open for discussion ;) Aug 21 22:27:04 which is not entirely dissimilar to most open source projects hehe, but still *grin* Aug 21 22:27:33 sure. but if you wanted to use five just for your self. technically since it is "open sourced" you will be able to add the functionality you need to android and use it for yourself even if they don't patch it back into android Aug 21 22:27:36 right? Aug 21 22:28:11 a) this is just an optimization, so doing all that work would hardly be worth it if only you got to use it. Aug 21 22:28:22 heh Aug 21 22:28:23 true Aug 21 22:28:30 b) no one knows whether Android's entire firmware can be easily decomposed and rebuilt custom. Aug 21 22:28:44 or that the firmware will be reliable to load onto handsets natively Aug 21 22:28:49 but im talking.... "it could happen".. not ...its what you should do... Aug 21 22:29:14 so meh, i don't know what could happen :) Aug 21 22:30:18 anyway, this is the least of my worries at the moment Aug 21 22:30:24 there's so much of five that has to be remixed :) Aug 21 22:30:51 i've recent thoughts on redesigning playlist management, basic UI, services, etc. Aug 21 22:31:06 heh Aug 21 22:31:07 cool. Aug 21 22:31:11 well ill brb in a few. Aug 21 22:31:18 right nwo the content management in Five is all kind of black boxed and managed behind a service. i'm opening all that up so the cache/content stuffs is just an open API through the service Aug 21 22:31:24 letting you mung the cache all you want from the music player Aug 21 22:31:40 this is a major optimization more than anything. you need not communicate back and forth between different components to make stuff work Aug 21 22:56:37 has anybody gotten android on verizon's packaging of the htc vogue? Aug 21 22:57:42 looks like this guy has Aug 21 22:57:43 http://www.engadgetmobile.com/2008/04/20/htc-android-port-round-up/ Aug 21 22:59:54 afairley: the vogue is generally well supported, though i dont know about verizon's packaging. Aug 21 23:11:09 well good luck with your modifications jasta. Aug 22 00:06:34 hehe, my gf just sent me a scan of some doodle she did at work today Aug 22 00:06:58 it's Johnny Five (the movie robot from Short Circuit) and the Android logo jamming together. Aug 22 00:07:11 that should be the logo for Five ;P Aug 22 00:14:46 putting google's dollars to work on that geothermal huh ;) Aug 22 00:15:03 she's just an assistant there :) Aug 22 00:15:14 she's in school Aug 22 00:16:28 Oh. Thats not as cool as you make it sound! Aug 22 00:16:34 of course not Aug 22 00:16:35 hehe Aug 22 00:16:54 they're paying for her school, though, and she's going to school for geology Aug 22 00:16:56 where does she work? Aug 22 00:17:03 thats nice Aug 22 00:17:15 Dougie187: altarock energy Aug 22 00:17:20 thats cool. **** ENDING LOGGING AT Fri Aug 22 02:59:56 2008