**** BEGIN LOGGING AT Tue Jan 13 02:59:57 2009 Jan 13 04:56:47 Ugh. I'm a bit disappointed at how so many things are "hidden" in the SDK. I've been digging through the source trying to find out how to access the setting to enable/disable 3G. It's completely sealed off, even from Reflection hacks :-p Jan 13 04:57:17 if it's hidden we have good reasons Jan 13 04:57:21 that means the API might/will change Jan 13 04:57:31 so even if you used reflection, your app would break in a future release Jan 13 04:57:58 yeah, I guess that's true. Jan 13 04:58:14 it's not that we don't want you to use these APIs Jan 13 04:58:23 it's just they're not ready to be supported for years Jan 13 04:58:35 hopefully the APIs you need will be made public in a future release Jan 13 04:58:49 hope so :-) Jan 13 04:58:50 feel free to file feature requests at code.google.com/p/android/issues Jan 13 04:59:05 romainguy, cool, will do. Jan 13 05:05:26 romainguy: can you explain why VelocityTracker.java allocates a pool of only 1 VelocityTracker object for recylcing? why have an array at all? is that just to avoid fiddling with the VelocityTracker instances monitor lock? Jan 13 05:06:18 probably Jan 13 05:06:18 it might also be because we felt that 1 was enough for now Jan 13 05:06:46 doesnt seem to be. the only way you reference mPool is via mPool[0], so if you did intent to grow it at some point later your usage wouldn't accomodate that either way Jan 13 05:07:07 im just curious because it looks like there might be some valuable lesson to be learned here about some JVM wonkiness ;) Jan 13 05:07:51 but i guess it does make sense to do this as a simple way to avoid fiddling with the objects monitor lock and without adding a second variable Jan 13 08:29:20 so I have a string array defined in res/arrays.xml, and now I want to bind it to my list view Jan 13 08:29:27 how do I do that? I've tried the code from List1.java and I've tried android:entries="@arrays/my-array-name", but it won't cooperate :( Jan 13 08:47:48 djc, android:entries="@array/my-array-name" Jan 13 08:49:46 indeed it's a little confusing that the filename is arrays and you reference it by array/.. Jan 13 08:50:41 tauno_: I didn't get that to work, though Jan 13 08:50:57 I mean, if I do that, what do I put in the Java code? Jan 13 08:52:03 nothing :) Jan 13 08:53:14 arrays.xml contains: TestTest and i reference it form my layout file: Jan 13 08:53:48 hmmm, let me try mine again Jan 13 08:56:42 tauno_: it doesn't work Jan 13 08:56:45 the screen is empty Jan 13 08:57:06 do I need to register the array somehow in the AndroidManifest.xml? Jan 13 08:58:24 no Jan 13 08:58:30 how did you bound your array to the list? Jan 13 08:59:30 Like tauno_ said, Jan 13 08:59:44 (that's in main.xml, in a LinearLayout Jan 13 08:59:44 ) Jan 13 09:00:14 http://pastebin.com/d7fb55665 Jan 13 09:03:12 wahey Jan 13 09:03:13 it works Jan 13 09:03:32 I do have a lot to learn, apparently Jan 13 09:06:17 tauno_: thanks a bunch Jan 13 09:16:44 np Jan 13 10:00:46 Is it possible to get the android.net.wifi.WifiInfo corresponding to an android.net.NetworkInfo (if there is one)? Failing that, is there a way to check if a WifiInfo corresponds to a NetworkInfo (so I can make sure they're talking about the same connection)? Jan 13 10:09:30 hmm Jan 13 10:12:43 jargonjustin: looks like there is a way to grab the NetworkInfo from the WifiManager Jan 13 10:12:52 EXTRA_NETWORK_INFO The lookup key for a NetworkInfo object associated with the Wi-Fi network. Jan 13 10:17:20 Right, that's the broadcast I'm receiving. I'm looking to verify the that the current WifiInfo corresponds to it. Jan 13 10:41:04 sorry. stupid question. but how do i generate a 1970.1.1 timestamp from year, month, day, hour, minute integers? Jan 13 12:11:49 unasi7, http://code.google.com/android/reference/java/util/Date.html#getTime() ? Jan 13 13:24:38 has anyone had issues with LocationListner? Jan 13 14:17:29 eldenz, thx Jan 13 15:19:52 ugh, the example code is such a turn-off to me :( Jan 13 15:22:06 have a bubble bath and sensual massage Jan 13 15:22:11 you'll be all revved up and ready to go Jan 13 15:23:16 vol: yeah, or maybe I'll work on Jython-Dalvik Jan 13 15:25:17 djc: i know what you mean Jan 13 15:25:25 i've followed a few examples that haven't worked Jan 13 15:25:49 like at the moment, I can't seem to get LocationListner to work for finding the location from teh GPS |: Jan 13 15:26:04 digitalspaghetti: that's because the GPS takes a while to actually get warmed up Jan 13 15:26:41 vol - i leave it on for ages Jan 13 15:26:48 digitalspaghetti: are you inside? Jan 13 15:26:57 do you have a clear view of the majority of the sky? Jan 13 15:26:59 i don't have the code up at the moment to show what i'm doing though Jan 13 15:27:00 or rather, does your device? Jan 13 15:27:23 although i'll double check Jan 13 15:27:25 gpsListener = new GPSLocationListener(); Jan 13 15:27:25 mLocation.requestLocationUpdates(LocationManager.GPS_PROVIDER, 1000, 0, gpsListener); Jan 13 15:27:35 where mLocation is the LocationManager Jan 13 15:27:47 oh, i'm using LocationListner, not GPSLocationListner Jan 13 15:27:52 and GPSLocationListener just implements LocationListener Jan 13 15:28:31 all that's implemented in GPSLocationListener is onLocationChanged, the rest of it is empty Jan 13 15:28:44 ahh, i didn't have my GPS on Jan 13 15:28:48 it was just using cell-based Jan 13 15:28:49 there's that too : ) Jan 13 15:28:56 i thought i did have it on Jan 13 15:29:21 should it not fall back though? Jan 13 15:29:33 (i.e if it can't find me on GPS) Jan 13 15:30:03 nice, it's working now Jan 13 15:30:16 alright, next thing i need to look at is startActivityForResult :) Jan 13 15:30:21 but i'll do that later Jan 13 15:34:19 no, it won't fall back Jan 13 15:34:26 you can always ask the location manager what devices are available Jan 13 15:34:33 and go that way Jan 13 15:34:49 or you can turn on the GPS, but that's a little ughy, and disrespects user's preferences Jan 13 15:42:47 yea, i'll have a look at it later Jan 13 15:42:56 i'm still getting to grips with java and android Jan 13 15:43:28 i need to work out next how to invoke an activity for a result, then return to the origional activity to continue and invoke another one Jan 13 15:44:42 djc: where do i know you from? Jan 13 15:45:17 ahh, #mercurial Jan 13 15:47:44 :) Jan 13 17:45:24 whoa...my app just segfaults when I run it now... Jan 13 17:47:32 works fine on my other G1.... Jan 13 17:47:47 what does it do? Jan 13 17:48:55 it segfaults! *runs* Jan 13 17:49:14 http://android.pastebin.com/d1da6811f Jan 13 17:51:29 so it works on one G1, but not on another? Jan 13 17:52:04 andrewoid: yep Jan 13 17:53:01 ok, tested it on a third and works fine on that one...so something to do with this specific G1 Jan 13 17:53:28 is it a different RC? Jan 13 17:53:40 what about conflicts with other installed software? Jan 13 17:55:35 not sure how that would be possible Jan 13 17:55:41 but, no there was nothing new installed Jan 13 18:02:52 zhobbs_: i've had that before, did you install over the top or fresh? Jan 13 18:04:09 initially tried to upgrade/replace it, but it still happens after uninstalling via adb Jan 13 18:05:36 it's scary, because I got an email from a user saying that the app wouldn't start, even if they uninstalled/reinstalled... Jan 13 18:05:59 going to try to restart the phone.... Jan 13 18:09:56 wow, restarting it did the trick Jan 13 18:13:24 yeah, i've only had it occur when installing over the top of the app Jan 13 18:40:04 I got my Android dev phone last week, and now I want to get Root access so I can replace components on it, what is the best way? Jan 13 18:40:13 on a dev phone you already have root access Jan 13 18:40:33 adb shell to the device, then type su and off you go. Jan 13 18:41:23 okey, I tried to upgrade the browser for the tilt function, but it failed due to access failure Jan 13 18:46:03 when I run "adb remount" I get "remount failed: Operation not permitted", is that related to root on my host machine our the g1? Jan 13 18:47:58 yeah, you can't do that on the G1 Jan 13 18:48:02 iirc Jan 13 18:48:26 without root anyway Jan 13 18:48:46 $ADB shell mount -w -o remount -t yaffs2 /dev/block/mtdblock0 /system Jan 13 18:48:51 that's my emu remount script Jan 13 18:48:57 you can always su on your device and run that Jan 13 18:49:11 of course, you might want to double check and make sure it's all correct there first. Jan 13 19:01:49 thanks, it worked to do remounting that way, but I had to do some pushing to /sdcard first and then use dd command to get the file to /system Jan 13 19:05:48 ick dd? Jan 13 19:05:59 use busybox ._. Jan 13 19:09:52 yeah, would make life a bit more easier. :-) Jan 13 19:11:42 I want to use a SimpleCursosAdapter to populate a List with names of the contacts. But I am having some problems. for one I don't know what should be in the layout xml. Just a Textview, or just a ListView? And also what should be where in the constructor. Jan 13 19:13:43 In the notepad application tutorial it uses only a TextView in the noteslist_item.xml Jan 13 19:14:19 You can simply use the layout android.R.simple_list_item Jan 13 19:16:19 for the second or last argument? Jan 13 19:16:34 did I mention I got a bit confused :) Jan 13 19:25:01 How do I make a one-shot "find me"? I've done this: http://paste.ifies.org/234 but it keeps updating the position Jan 13 19:26:16 you ask the location provider for the last position Jan 13 19:26:28 ok, I've fixed my problem with the listview Jan 13 19:26:37 alternately, have the LocationListener unregister updates when it gets called. Jan 13 19:28:06 if i use getLastKnownLocation, how do I get the lat/lng? Jan 13 19:28:28 oh, it returns a location, ok Jan 13 19:30:25 one-shot? once you have a Location you can shut down the listener of course Jan 13 19:36:20 What would be a good way to get a location, if possible from gps, but if gps cannot get a fix, to fall back on the network location provider? Jan 13 19:36:23 how do i shut it down? Jan 13 19:36:36 tell it you don't need the updates anymore Jan 13 19:37:18 where, within the LocationListner? Jan 13 19:38:10 removeUpdates(LocationListener listener) on the LocationManager Jan 13 19:40:14 cool, thanks Jan 13 19:41:15 Balachmar: i also have the same question (the fallback one) Jan 13 19:42:06 digitalspaghetti: what are you working on? Jan 13 19:44:23 an application using the Brightkite API Jan 13 19:45:36 basically i want to be able to let the user get their location, then check in Jan 13 19:46:08 googling brightkite... Jan 13 19:46:50 essentially twitter with location based services Jan 13 19:47:00 aah that is a creepy website, people letting everyone know when they are where... Jan 13 19:47:17 :) Jan 13 19:49:08 although being able to post pictures quickly in that website would be cool :) probably on your list :) Jan 13 19:49:13 yup Jan 13 19:49:20 i need to get the oauth sorted out first Jan 13 19:50:51 But why don't you want regular updates? just store the location in a local variable. Then if the user uploads another picture the program always has a up to date location Jan 13 19:51:17 i've got it as far as opening the browser and authing the app, but it keeps crashing trying to exchange the keys Jan 13 19:51:42 And in that case it would be as easy as just ask for updates from both providers and only store a location if it has a similar accuracy or better. Jan 13 19:52:06 I haven't done any website interaction... Jan 13 19:52:07 Balachmar: i want to eventually run it as a service Jan 13 19:52:24 but at the moment, i just want a one shot, so i can work in the oauth Jan 13 19:52:38 i need to learn about startActivityForResult Jan 13 19:52:40 digitalspaghetti, then you absolutely want to have regular updates!, aah I see just testing Jan 13 19:55:23 yea, but at the same time i am learning java, android and oauth Jan 13 19:55:51 i want to keep it quite simple for now Jan 13 19:56:05 I understand Jan 13 20:24:48 can anyone help me with startActivityForResult ? Jan 13 20:25:11 i don't think i am doing it right as onActivityResult isn't being called Jan 13 20:25:48 ApiDemos hast an example Jan 13 20:26:24 does anything get launched? Jan 13 20:26:29 i'll have a look again, maybe i missed something Jan 13 20:26:33 if no activity launches, I don't think that onActivityResult will be called Jan 13 20:26:42 yea, my activity is launched Jan 13 20:26:45 Note that this method should only be used with Intent protocols that are defined to return a result. In other protocols (such as ACTION_MAIN or ACTION_VIEW), you may not get the result when you expect. For example, if the activity you are launching uses the singleTask launch mode, it will not run in your task and thus you will immediately receive a cancel result. Jan 13 20:28:06 well all I am doing is launching a webview, the user does what they need then all i need to do is close it to continue Jan 13 20:28:32 i don't need any result from the user, just to know they have authorised the app Jan 13 20:28:42 then I can do the oAuth request access key stuff Jan 13 20:30:31 i might have it, hold on - fingers crossed Jan 13 20:31:19 w00t, it worked :) Jan 13 20:33:00 gratz Jan 13 20:35:48 now i need to do database stuff Jan 13 20:35:51 fun :) Jan 13 20:35:59 android == fun :) Jan 13 20:38:06 digitalspaghetti: you don't really need to do database stuff, unless you're keeping a database. Jan 13 20:39:08 vol, i need to store the access key securly Jan 13 20:39:20 digitalspaghetti: and? Jan 13 20:39:23 as i need to check on app start if its there, if its not thats when the app needs authed Jan 13 20:39:38 well, how else could i store it, in a plain config file? Jan 13 20:39:38 so what makes this endemic to a database? Jan 13 20:39:42 yeah sure why not Jan 13 20:39:46 each app gets its own private directory Jan 13 20:39:50 that only it is given read permission to Jan 13 20:39:52 (and root) Jan 13 20:40:12 I mean if you have root you can dump databases just as easily as you can read files Jan 13 20:40:29 i'll probably want to store a cache of a users friend list too, like twitroid Jan 13 20:41:14 but i suppose i can just start off with plain text for now Jan 13 20:42:00 is the an example in the api demos of file io? Jan 13 20:42:13 digitalspaghetti: it's standard java Jan 13 20:42:22 ^^ Jan 13 20:42:26 Look at the File class Jan 13 20:42:28 it's easy peasy Jan 13 20:42:45 digitalspaghetti: http://java.sun.com/docs/books/tutorial/essential/io/ Jan 13 20:43:00 you'll also want to see Context.getFilesDir() Jan 13 20:43:14 that provides the File reference for the private dir for that app Jan 13 20:46:31 hrmm, i've imported context, but i can't instansiate it, and it tells me it's not recognised Jan 13 20:47:00 oh, Context.this Jan 13 20:48:10 ... Jan 13 20:48:13 It's not static Jan 13 20:48:17 it's a method of Context Jan 13 20:48:22 pick something that extends Context Jan 13 20:48:26 (like your Activity) Jan 13 20:50:34 cool, thanks Jan 13 20:51:02 do you get onPause/onResume when the screen locks? Jan 13 21:06:14 hrmm, i found this: http://www.anddev.org/write_to_and_read_from_a_file-t3173.html Jan 13 21:06:25 but it doesn't seem to work Jan 13 21:07:17 zhobbs_: sorry replied in the other channel Jan 13 21:08:25 openFileOutput? the heck? Jan 13 21:08:41 ah Jan 13 21:08:59 anyway Jan 13 21:09:02 explain "doesn't seem to work" Jan 13 21:09:57 i get a NullPointerExeption Jan 13 21:10:25 digitalspaghetti: debug it Jan 13 21:10:26 do i need a permission to read/write? Jan 13 21:10:46 it's performLaunchActivity Jan 13 21:10:59 digitalspaghetti: where do you get the exception? run with the debugger Jan 13 21:11:16 http://paste.ifies.org/238 Jan 13 21:11:26 I am not a debugger : \ Jan 13 21:11:44 I also don't know what YOUR code looks like. Jan 13 21:11:50 ahh Jan 13 21:11:50 a null pointer in onCreate doesn't tell me a lot. Jan 13 21:12:10 http://paste.ifies.org/239 Jan 13 21:12:13 digitalspaghetti: get familiar with debugging Jan 13 21:12:18 you're using eclipse? Jan 13 21:12:41 sorry, the error wasn't in red, it was in orange :) Jan 13 21:13:20 File not found exception is clear enough; the file doesn't exist. Jan 13 21:13:27 you can't read before you write Jan 13 21:13:30 i made the function throw an exception though, and it's in a try/catch Jan 13 21:13:32 LEARN TO USE THE DEBUGGER Jan 13 21:13:51 if you're using eclipse, you can hit the little bug button next to the run button Jan 13 21:14:15 i know - i can debug, i admittily expected it to be red though Jan 13 21:14:18 not orange Jan 13 21:14:39 well shit, file a bug then Jan 13 21:14:40 (5 years Python, PHP, Actionscript, JavaScript, C Developer) Jan 13 21:14:56 meanwhile, get used to java debugging Jan 13 21:15:01 I've been programming a while and I have no idea what you're talking about red/orange?!? Jan 13 21:15:05 I don't mean sitting down and going "hmm" after the fact Jan 13 21:15:12 I mean stepping through the code as it's going, with a debugger Jan 13 21:15:35 zhobbs_: color coded logcat output I'm guessing Jan 13 21:15:40 orange = warning, red = error Jan 13 21:15:47 yea Jan 13 21:15:50 ahh Jan 13 21:15:59 for some reason it's all black in my eclipse Jan 13 21:16:06 (linux) Jan 13 21:17:14 lunix Jan 13 21:17:19 should be color coded there too Jan 13 21:17:21 odd Jan 13 21:17:38 yeah, it's all black on all 3 of my kubuntu boxes Jan 13 21:19:00 huh. I use ubuntu not kubuntu, shouldn't matter though of course Jan 13 21:19:15 what version of eclipse? Jan 13 21:19:38 3.4 Jan 13 21:20:02 even if I just run ddms it's all black Jan 13 21:20:21 color coded would be nice...wonder what gives... Jan 13 21:23:45 hrrm, this is a full clear stack trace from just invoking my app from the debugger: http://paste.ifies.org/240 Jan 13 21:23:58 I get the error about the file, but as you can see the app does continue on Jan 13 21:24:09 yes, it's still causing a NullPointerException Jan 13 21:24:38 and it is only showing as a warning, not an error Jan 13 21:25:34 http://paste.ifies.org/241 is my activity source Jan 13 21:25:37 digitalspaghetti: in your debugger you can set a breakpoint whenever there is an exception Jan 13 21:25:45 and you can see the variable that is null Jan 13 21:26:29 digitalspaghetti: in the debug perspective there is a "J!" in the breakpoints view Jan 13 21:26:38 click it and add NullPointerException Jan 13 21:28:12 zhobbs_: your a star, found it right away with that Jan 13 21:58:21 how do I create a ItemizedOverlay where i can pass a point? Jan 13 22:14:21 is there an easy way to make a ticker out of a TextView? or should I just extend View and do it all myself? Jan 13 22:15:31 zhobbs: sure.. setText(abc)...setText(bcd)...setText(cde)..... Jan 13 22:15:52 hi all I posted a problem onto android channel probably this is the right one. An app development problem. Jan 13 22:15:53 famast: I'm thinking that'd look choppy with non-fixed fonts Jan 13 22:16:05 zhobbs_: Probably! But it sure is easy! Jan 13 22:16:13 hehe, that's true Jan 13 22:16:34 hrrm, i'm inside and i don't really want to go outside - is there a way to time out the GPS? Jan 13 22:17:12 esses: Ask away Jan 13 22:17:14 So I've an activity with 2 listview and 1 imageview Jan 13 22:18:20 hrmm, can probably invoke a timer for 20 seconds and if not found, fall back Jan 13 22:18:29 i used an absolute layout and select item from the first then i use setVisibility(4) on it (it disappears), then select an item on the second and i use setVisibility(4) and it disappears. Jan 13 22:19:01 At the end I have to download an image according to the second item selected and show it into imageview Jan 13 22:19:50 esses: First of all when you use setVisibility don't give a raw integer. Use a constant like View.GONE Jan 13 22:20:16 yes I understand but that isn't the problem :-) Jan 13 22:20:19 ok Jan 13 22:21:27 the image doesn't appear. Then itry with a local image into res/raw folder and it appears just one time the other times I rerun app it doesn't appear. So I think I made something wrong :-) Jan 13 22:21:52 do you want to see the code onto pastebin? Jan 13 22:22:46 sure Jan 13 22:23:21 i would say yes too but i'm trying to do something else atm Jan 13 22:23:31 romainguy_: do animations pause when an activity/view is no longer visible? just wondering how safe it is to have a repeating animation? Jan 13 22:23:31 but i'll gladly scan over it when i get the chance Jan 13 22:23:48 i hope someone can help me it is a little app and probably is a stupid bug :-) Jan 13 22:23:57 http://pastebin.com/d3cc1b322 Jan 13 22:25:16 don't care about lines 42-43 i forget to comment them Jan 13 22:26:59 esses: you need to do stuff that blocks (like d/l an image) in a seperate thread Jan 13 22:27:37 extend service? Jan 13 22:27:40 no Jan 13 22:27:46 runnable? Jan 13 22:27:50 Thread Jan 13 22:28:01 yes implements Runnable Jan 13 22:28:03 http://helloandroid.com/node/243 Jan 13 22:28:56 that's not your problem in this code, but doing work in the UI thread will cause a "app is not responding" window Jan 13 22:30:24 I noticed that even a local image create problem. Do you see the errors? Jan 13 22:31:06 try using hierarchyviewer to make sure that the imageview is being displayed Jan 13 22:31:16 (must use emulator or dev phone for this) Jan 13 22:31:26 I use the emulator Jan 13 22:31:29 :-) Jan 13 22:33:41 zhobbs_: any experience with map overlays? Jan 13 22:34:13 not really...last time I played with them ItemizedOverlay didn't exists Jan 13 22:34:59 hrmm. it's throwing a null pointer exception again, but this time in Android and it's not showing me the line Jan 13 22:35:26 probably means you are passing in a null object to an android api Jan 13 22:36:24 ahh, i'm starting to get used to this debugger now Jan 13 22:39:24 gnam digitalspaghetti :-) Jan 13 22:44:12 interesting nothing into hierchyviewer too Jan 13 22:47:21 is there a reason for the fact that the first time I start the emulator the image loads and when I restart the app not Jan 13 22:47:23 ? Jan 13 22:50:10 are you opening and closing the emulator? Jan 13 22:52:12 it works when i close and reopen the emu. The second time i rerun the up from device emulated menu the imageview doesn't load image Jan 13 22:52:25 rerun the app :-) Jan 13 22:53:11 is it a bad thing? :-) Jan 13 22:57:56 can a View be wider than the screen? Jan 13 22:59:03 Oh I'm here again :-) Jan 13 22:59:12 zhobbs_: probably... Jan 13 22:59:13 zhobbs_: i don't think so, but you can put the content in a ScrollView Jan 13 22:59:27 yeah, for instance sub-views of a ScrollView are wider then the ScrollView Jan 13 22:59:39 or taller Jan 13 23:00:15 ok Jan 13 23:00:19 the imageview appears only the first time (i put a background that i don't see the second time _I rerun the app) Jan 13 23:00:24 mmmm... Jan 13 23:00:26 :-) Jan 13 23:07:23 zhobbs: animations are currently tied to the drawing code, so if the activity doesn't draw, the animation does not run Jan 13 23:08:29 romainguy_: a) can a View be larger than it's parent? b) if so, are parts of the view not shown never drawn when it's animated? Jan 13 23:08:46 yes and yes Jan 13 23:09:21 hmmm...I'm having trouble making a TextView wider than the screen show the parts cut off when I animate it Jan 13 23:09:26 (making a cheap ticker) Jan 13 23:17:05 yeah...I can't even get a textview to do horizontal scrolling in a scrollview Jan 13 23:17:57 text marqueeing is part of cupcake btw Jan 13 23:18:52 hmm, wonder if the source is the public git yet... Jan 13 23:19:00 it is Jan 13 23:19:05 you know if it's part of TextView or a separate widget? Jan 13 23:19:07 in the TextView class Jan 13 23:19:10 k Jan 13 23:20:19 that's a big onDraw if I remember correctly...should probably just create my own View Jan 13 23:21:00 you can just animate the scrollX value of the TextView to make it scroll Jan 13 23:21:09 it's basically what TextView does in cupcake Jan 13 23:22:07 hmm, I'll try that Jan 13 23:23:16 cool, that works Jan 13 23:24:56 ... Jan 13 23:27:56 romainguy_: thanks :) Jan 13 23:38:13 I found the problem : unknown socket error -1 (the first time setting internet permission into the manifest is enough, the other times not) Jan 13 23:38:25 ? Jan 13 23:42:15 it seems that my activity looses internet permissions Jan 13 23:53:59 hi all, i have a quick question Jan 13 23:54:01 i have a quick question, which hopefully someone can answer, I have a Sony Ericcson p1i, and would really like to have android running on it. is it possible please? Jan 13 23:54:49 will we get snow this year? Jan 13 23:54:59 no. try #android Jan 13 23:55:08 ok, thx Jan 13 23:55:46 lol morgan Jan 13 23:55:50 now hes back in dev ;p Jan 13 23:55:53 ehhh Jan 13 23:55:55 droid Jan 13 23:56:58 hehe Jan 14 00:05:47 i wonder if creating the classes.dex will get any optimization in the next SDK release. it is slow for me when using external jars. Jan 14 00:08:01 why would TextView.setText() be final? Jan 14 00:11:03 setText(CharSequence text, BufferType type) isn't final Jan 14 00:13:52 morgan: ahh, good point Jan 14 00:16:50 ive always hated that about Java. there should be a pragma to indicate that one function is truly just a macro translation to another Jan 14 00:17:32 this would allow you to more easily override and extend classes which have a bunch of variant calls to a single method Jan 14 00:18:32 jasta: yeah, default values for arguments would do the trick Jan 14 00:22:08 but the thing is these "macro translations" might not stay macro translations Jan 14 00:22:37 that's implementation detail that you don't necessarily want to expose in the public API Jan 14 00:23:21 right, but you should have the OPTION to make it part of the API you want to support. Jan 14 00:23:41 just make the method final ^^ Jan 14 00:23:46 or use a custom annotation Jan 14 00:23:50 or put that in the javadoc Jan 14 00:25:03 la la la @hide la la :) Jan 14 00:25:07 lol Jan 14 00:25:11 so i found an exciting new MediaPlayer bug ;) Jan 14 00:25:13 hehe Jan 14 00:25:21 ctate: @hide is our best invention to date Jan 14 00:25:28 romainguy_: ha! Jan 14 00:25:33 i think im setting a record Jan 14 00:25:41 it is true that we desperately needed it and apicheck Jan 14 00:26:03 apicheck is neat. it just freaks out if you changed the public API in some way right? Jan 14 00:26:08 and did not know how desperately until after it hit the build Jan 14 00:26:17 jasta: exactly Jan 14 00:26:20 jasta: yes Jan 14 00:26:22 the build actually breaks Jan 14 00:26:40 which means you need to get approval from a special group before you can add new public APIs Jan 14 00:26:43 that would be a useful tool for many other shops i'm sure Jan 14 00:26:54 gee if only it were open source HEY WAIT Jan 14 00:26:57 :) Jan 14 00:27:11 the nice thing is that we can also use it to keep track of what the API looked like in previous versions ^^ Jan 14 00:27:23 * romainguy_ just saw 3.xml go by in his terminal Jan 14 00:27:33 that's cupcake Jan 14 00:27:57 for YDWTK reasons it isn't 2.xml Jan 14 00:28:03 (== You Don't Want To Know) Jan 14 00:28:15 IAAIDK Jan 14 00:28:23 (== I Am Afraid I Do Know) Jan 14 00:28:24 :) Jan 14 00:28:26 hrmm, got a weird one. I am storing a key in a file on android. Just looked at it in vi under root and it's fine Jan 14 00:29:06 but in my debug output it's all malformed with lots of chars on the end Jan 14 00:29:31 use adb pull and xxd to confirm it looks like you think it should. not vi. Jan 14 00:29:43 and second, fix your reader code :) Jan 14 00:30:49 f*ck Jan 14 00:30:55 ^s Jan 14 00:30:58 are @hide-en things just stripped out of the SDK's android.jar? Jan 14 00:30:59 aapt dump doesn't list the content of res/values/ @!# Jan 14 00:31:03 morgan: yes Jan 14 00:31:06 morgan: right Jan 14 00:31:33 (and the SDK's android.jar is not actually the same as the one on the device; it's just stubs that are sufficient to link your .apk against) Jan 14 00:31:48 romainguy_: there's no aapt flag to do that? Jan 14 00:31:54 nope Jan 14 00:32:02 jasta: whats xxd? Jan 14 00:32:02 feature request! Jan 14 00:32:05 theme.xml, styles.xml, strings.xml, etc. are compiled differently Jan 14 00:32:08 how is that SDK android.jar built? are the tools out there? Jan 14 00:32:10 romainguy_: hehe, are you still trying to reverse engineer your compiled manifest? Jan 14 00:32:18 I rewrote the manifest Jan 14 00:32:23 but I also lost all my res/ directory Jan 14 00:32:26 I recreated the layouts Jan 14 00:32:30 morgan: weeeeell, you can look at how the build handles "make sdk" Jan 14 00:32:32 but the strings.xml file is annoying Jan 14 00:32:34 but it's complicated :) Jan 14 00:32:34 and the theme Jan 14 00:32:34 btw, styles.xml, etc i never did figure out how to reverse. they are definitely different Jan 14 00:32:38 i've pulled it into E-texteditor and it's fine Jan 14 00:32:43 yeah I noticed that Jan 14 00:32:44 morgan: short answer is this: Jan 14 00:32:48 romainguy_: one strategy for recover of strings.xml, though, is just to use strings -e l :) Jan 14 00:32:53 I tried Jan 14 00:32:55 didn't work Jan 14 00:33:02 sure it does. i used to do it all the time Jan 14 00:33:16 morgan: the build runs javadoc on the entire public source base, using a custom doclet called "droiddoc" [in the open source tree] Jan 14 00:33:18 weird, I definitely didn't work when I tried Jan 14 00:33:21 make sure you use -e l, they are UTF-16 in that doc. Jan 14 00:33:23 probably used the wrong flag Jan 14 00:33:29 ah that would do it Jan 14 00:33:32 morgan: droiddoc produces three pieces of output Jan 14 00:33:36 -e l tells it to look for UTF-16 strings, usually with NUL bytes in bewteen the letters Jan 14 00:33:42 (1) the .html documentation that is the actual javadoc processing Jan 14 00:33:59 any ideas why this is running past the end of the line? http://paste.ifies.org/242 Jan 14 00:34:06 (2) a file called public_api.xml that describes the public API as defined by the tree being built Jan 14 00:34:33 (3) a whole lot of "stub" .java files, corresponding to all the public classes, their public fields & methods, etc. Jan 14 00:34:47 The .java files produced as (3) get compiled into the SDK's android.jar Jan 14 00:35:02 ctate: neat. thanks for the info Jan 14 00:35:33 the public_api.xml file is used by a standalone tool called "apicheck" [also in the open source tree] to verify that what was built is binary-compatible with released SDKs Jan 14 00:35:34 digitalspaghetti: is this a binary file? if yes, you dont want a Reader. Jan 14 00:36:08 readers are for reading in byte streams as characters, performing charset decoding. this is not what you want to extract the data as it was written to the file. Jan 14 00:36:09 is the special android.jar made just to support @hide, or to make it small or what? Jan 14 00:36:24 @hide is a custom javadoc tag implemented in droiddoc Jan 14 00:36:35 no, it's just a string in a file Jan 14 00:36:43 ...are you *sure*? :) Jan 14 00:36:49 several other Java projects out there use the same technique Jan 14 00:36:52 XDoclet for instance Jan 14 00:36:56 if I recall the name correctly Jan 14 00:36:58 to link an apk you need to have an android.jar to link against that supplies the available methods etc Jan 14 00:37:01 yes, and .trim() seemed to work Jan 14 00:37:02 that was very popular before annotations Jan 14 00:37:08 just like linking a C program against shared libraries Jan 14 00:37:15 and actually it should really be the @HIde annotation :) Jan 14 00:37:37 the point of @hide was to let us exclude some public methods/classes/packages/etc from the SDK automatically Jan 14 00:37:49 hmm, for some reason if I set TextView.setHorizontallyScrolling(true), TextView.getScrollX() returns crazy numbers (eg 7934) Jan 14 00:37:50 [automatically == without having to hand-edit stuff every time] Jan 14 00:38:01 zhobbs_: yes but that doesn't matter Jan 14 00:38:09 ctate: seems like i good system. Jan 14 00:38:10 zhobbs_: and that's probably because you centered the text Jan 14 00:38:13 ctate: i would qualify this as automagically, of course :) Jan 14 00:38:18 morgan: it works pretty well in practice Jan 14 00:38:28 and that's important Jan 14 00:38:39 romainguy_: ahhh....centered text, makes sense Jan 14 00:38:44 (Disclosure: i did a lot of the work on droiddoc & apicheck) Jan 14 00:39:12 i asked because i wanted to use a @hidden var and I was wondering how hard getting an unhidden android.jar would be Jan 14 00:39:20 hehe Jan 14 00:39:21 impossible :) Jan 14 00:39:32 morgan: it would be a bad idea Jan 14 00:39:39 stuff is @hide for good reasons Jan 14 00:39:45 seriously, if you use @hidden stuff, your code is pretty much guaranteed to break on future devices Jan 14 00:39:51 That'd be a very good way to create apps that'd break on future systems. Jan 14 00:40:03 just like all of google's apps ;) Jan 14 00:40:04 understood, but this isn't for release Jan 14 00:40:15 jasta, zing! Jan 14 00:40:48 for instance i made ScrollView do horz scroll, but without access to View.mScrollX/Y it isn't very clean Jan 14 00:42:08 morgan: you have getScrollX/Y and scroll(x, y) Jan 14 00:42:20 morgan: just call getScrollX() and ... ==romainguy_ Jan 14 00:43:37 hmm, i must have misunderstood the correct way to hack it Jan 14 00:45:32 yes. i did. Jan 14 00:45:57 good to know Jan 14 01:27:23 is it possible to filter the Contacts displayed with ACTION_PICK ? Jan 14 01:27:43 I mean , that i.e. only the ones with emails are displayed. Jan 14 01:47:29 jasta: this stupid Mac OS X doesn't understand the -e flag with the strings command Jan 14 01:50:15 good evening Jan 14 01:50:20 could anyone help me out? Jan 14 01:50:57 I am trying to edit the qwerty.kcm in order to provide me easier access to norwegian special characters on the keyboard on the ADP1. Ive edited the qwerty.kcm file, but i need to generate the binary layout file (.bin) Jan 14 02:01:01 anyone Jan 14 02:01:05 could really use the help **** ENDING LOGGING AT Wed Jan 14 02:59:57 2009