**** BEGIN LOGGING AT Mon May 18 02:59:57 2009 May 18 03:04:39 can anybody think of an obvious reason why a GridView wouldn't display my views after adding a new element to the Adapter? May 18 03:04:56 i pretty much copied and pasted the ImageAdapter from the example on the dev guide May 18 03:06:39 i tried invalidating the view after adding the new element but it still didn't show up May 18 03:07:15 yet oddly enough when i flip perspectives to trigger loading from saved state it works May 18 03:20:39 you have to call notifyDatasetChanged from the adapter May 18 03:20:44 invalidate() won't do any good May 18 03:45:16 if `adb devices` doesn't list my mounted gphone, this is bad right? May 18 03:45:26 it can happen May 18 03:45:37 if you're on windows, make sure you installed the drivers May 18 03:45:48 you can also try to kill the adb server with adb kill-server and try again May 18 03:46:30 ok, i had to turn on debugging mode on the phone May 18 03:46:32 i think May 18 03:46:34 that worked anyway May 18 03:46:41 i'm on mac May 18 03:55:49 I'm trying to install the HelloAndroid app, but I see this in the adb logcat "Requires newer sdk version #2 (current version is #1)" May 18 03:56:11 i think my sdk is version 2, is it saying my gphone needs #1? May 18 03:57:45 i guess #2 is the api level on the sdk May 18 03:58:05 and it is release 1 May 18 03:58:37 doesn't make sense :( have to go May 18 03:59:51 herro. I heard somewhere that developers could get their hands onto a G1 for an extremely discounted rate (unlocked too), do you know if this is true? May 18 04:00:25 there is a device for developers May 18 04:00:27 called the ADP1 May 18 04:00:35 it sells for something like $399 May 18 04:03:00 thanks May 18 04:13:07 i don't understand this May 18 04:21:16 i installed the latest sdk, 1.5. I set min sdk version 2 when setting up the project in eclipse. No idea why I can't install this thing. May 18 04:22:24 plediii: what version is your phone running? May 18 04:23:02 what kind of version? May 18 04:23:08 <_Auron_> lol May 18 04:23:10 the version of the system on your phone? May 18 04:23:41 firmware 1.0, kernel 2.6.25 -01843. Don't see "system" May 18 04:24:12 baseband 62.33.20.08H May 18 04:24:12 <_Auron_> 1.5 sdk is for 1.5, you have 1.0 May 18 04:24:23 ok May 18 04:24:50 firmware is the version of the system on my phone? May 18 04:25:00 <_Auron_> yes May 18 04:26:06 here you go May 18 04:26:11 your phone is running the api level 1 May 18 04:26:17 and you want to install an app that requires level 2 May 18 04:26:23 1.0 = level 1 May 18 04:26:26 1.1 = level 2 May 18 04:26:26 that makes sense May 18 04:26:29 1.5 = level 3 May 18 04:26:31 i'm looking up how to upgrade my phone May 18 04:33:50 i can't find anything recent :-/ May 18 04:33:54 i would have thought it would update automatically May 18 04:38:06 plediii: what phone do you have? May 18 04:38:10 and what carrier? May 18 04:38:17 tmobile g1 May 18 04:38:31 do you have a t-mobile plan? May 18 04:38:34 i bought it 7 days ago May 18 04:38:35 yea May 18 04:38:39 weird May 18 04:38:42 call them :) May 18 04:38:53 eh, found the update May 18 04:39:09 it normally comes to your phone May 18 04:39:10 although it seems strange the link comes from a forum with a guy with a punisher logo for an avatar May 18 04:39:25 updates normally arrive over the air May 18 04:39:48 hmm May 18 04:39:56 that does make sense... May 18 04:40:38 but i really want to install helloandroid right now :'( May 18 04:40:52 what's stopping you? May 18 04:41:01 just set the api level to 1 May 18 04:41:02 ancient firmware version May 18 04:41:21 hmm, so i put the update on my phone and am ready to hit alt+s to install it May 18 04:41:29 you think i should turn back? May 18 04:42:42 probably, i may have just downloaded 1.1 anyway May 18 04:43:51 i guess i'll wait and call them tomorrow May 18 04:58:28 I wonder why the GC runs pretty much non-stop while you're on a call May 18 04:59:16 it shouldn't May 18 04:59:23 does it even come from the phone process? May 18 05:01:29 romainguy, I'm not positive on that, but every time (2, maybe 3 times) that I've been on a call while I had adb logcat running, it was GC running all the time May 18 05:01:49 next time can you check what the pid is and it matches the phone process? May 18 05:01:56 running it now May 18 05:02:00 cool thanks May 18 05:02:33 when it says D/PhoneApp( 99): does that mean that the pid is 99? May 18 05:02:45 yes May 18 05:03:04 interesting May 18 05:03:11 something else must be going nuts then May 18 05:03:31 what is the process running the GC? May 18 05:03:43 could just be sync syncing, it likes to kick off gcs :) May 18 05:04:12 bah tmobile claims to know nothing May 18 05:04:43 they only google controls when i get the update May 18 05:04:59 and google says 1.5 availability is determined by the carrier May 18 05:05:37 romainguy, doesn't data get disabled while on a call? May 18 05:05:46 romainguy, and it comes from a few different pids; I'll look into what they are May 18 05:05:48 KNY: not on 3D May 18 05:05:49 er May 18 05:05:50 3G May 18 05:05:58 romainguy, EDGE only here in Rochester, NY :( May 18 05:05:58 data is disconnected on EDGE and GPRS May 18 05:06:10 irk me with a spoon May 18 05:06:15 plediii, yeah, they give you the run around May 18 05:06:28 plediii: that's not true, T-Mobile has control over the rollout May 18 05:06:29 plediii, so far that's my single biggest beef with android May 18 05:06:40 plediii: and they probably think you're calling about 1.5 May 18 05:06:50 romainguy, right, but they tell you to talk to google who tells you to talk to your carrier who tells you ... May 18 05:06:54 I guess they stopped sending 1.1 updates May 18 05:06:55 as opposed to 1.0->1.1? May 18 05:07:20 i guess i'll do 1.1 myself May 18 05:07:29 romainguy, while reading through the docs today, I saw a FOTA permission; do you know what that is off the top of your head? May 18 05:08:17 Force OTA? :) May 18 05:08:28 romainguy, that's what I was guessing, haha May 18 05:08:36 there used to be a way to force OTA checks May 18 05:08:40 google seems to tell me "firmware over the air" May 18 05:08:55 but that got removed sometimes after 1.0 May 18 05:08:56 man, if it's still there then there's an app that you could sell for $9.99 May 18 05:09:04 that would not help May 18 05:09:13 all it does is force the check against the server May 18 05:09:15 doesn't mean that idiots wouldn't buy it, haha May 18 05:09:21 if it's not available for your device, it won't do anything May 18 05:09:28 like the "Cupcake" app(s) that are in the market May 18 05:09:32 trust me, that's what we used to use internally to update our phones May 18 05:09:37 really? May 18 05:09:45 the ones that crack me up are the ones that let you close apps or save RAM May 18 05:09:53 haha, yeah May 18 05:10:40 I wonder if they just call System.gc(); (if they do anything at all) May 18 05:11:09 that's what they do May 18 05:11:17 which does absolutely nothing to other apps :) May 18 05:11:47 haha May 18 05:11:53 "scam" May 18 05:12:00 if course May 18 05:12:02 of* May 18 05:12:26 is it possible for a third-party app to modify entries in the call log? May 18 05:14:19 no idea May 18 05:14:53 sorry, I didn't mean to ask you in particular; that was more of a general question May 18 05:15:00 but thanks for the heads up May 18 08:05:57 potatodemon: Mark Murphy's books will have a 1.5 version soon - I believe they're the first, his warescription is top value May 18 08:07:08 d'oh - replying to 13 hour old message? priceless :( May 18 08:07:50 so I've not been able to get an answer on this anywhere. Can we access sms history (like a call log equivalent) on android? May 18 08:23:04 I am using a ScrollView for showing several EditText fields (and others). Below them there is a list of Buttons that show a dialog, when clicked. My problem is, that whenever I click on a button the ScrollView scrolls to the last selected EditText. I want the scrolling to stay just where it is. Any idea where I could look at to solve this? May 18 09:05:21 can Google's Maps app open GPX files? May 18 09:05:36 or will I have to use a 3rd party one? May 18 09:08:07 uscheller - the buttons are in aren't children of the scrollview and they're affecting it? May 18 09:12:12 My posts to google groups don't go through.. Can someone here please take a moment to think about my problem? May 18 09:17:46 all view elements in this activity are children of the scrollview. but when i click on a button, i'd expect the scrollview to not scoll anywhere else. May 18 12:01:34 hello. can i have a broadcastreceiver as subclass of a service? when i do this i can't get to add it to my manifest. the editor does something like "MyServiceClass$MyReceiver" and says the file has an error May 18 12:05:58 z May 18 13:05:03 is it possible to define sth like "5 @string/distance_metric" in xml? this item should be "5 miles" or "5 kilometers" depending on the country code. May 18 13:09:35 uhm, yes this is possible... but shouldn't it rather be either 5 miles or 8 kilometers? May 18 13:10:03 oh wait... I don't know if this is possible, sorry May 18 13:11:29 anyone happen to know which intent brings up your options for calling a contact? Like when you click a contact in the contact list May 18 13:17:10 skyPhyr, go through the Contacts source code May 18 13:17:31 skyPhyr, or just watch adb logcat May 18 13:17:35 KNY that's part of the open code? :) thanks May 18 13:17:40 yes May 18 13:17:46 packages/apps/Contacts May 18 13:17:46 cool - thanks :) May 18 13:17:55 Hi, is there a way to create a ListPreference with multiple choices (checkboxes instead of radio)? May 18 13:37:02 thanks again KNY got it all sorted :) May 18 13:37:29 hit a weird one though - noticed that when my widget's config launches it's putting the package name twice May 18 13:37:30 com.schmutza.android.intouch/com.schmutza.android.intouch.InTouchConfig May 18 13:37:56 it works, but that doesn't seem right to me - any ideas what I've done wrong? May 18 13:38:45 once for the app, the other for the class, I believe May 18 13:39:06 one's* (never get on IRC in the morning) May 18 14:48:00 hey romainguy, I have a question for you regarding your response in this thread: https://groups.google.com/group/android-developers/browse_thread/thread/188b26ff7097e045 May 18 14:48:20 if I make my private AsyncTask static, then I can't easily interact with the UI thread, no? May 18 15:16:38 kc8pxy, sorry , fell asleep last night May 18 15:26:03 can someone tell me what this means May 18 15:26:03 http://dpaste.com/45308/ May 18 15:26:10 cant see any of my code in the traceback May 18 15:26:38 It happens when clicking on a preference May 18 15:26:45 no onclick/onanything hooked up afaics. May 18 15:31:52 we need to have all assets for all variations (i.e. layout-land etc) even if some of them remain identical between views? May 18 15:32:03 err between variations I mean May 18 15:33:02 you can do what i do, and just programatically insert them May 18 15:33:04 but i'm lazy. May 18 15:33:53 skyPhyr, no, if you have a drawable that is the same in layout.land and layout-port, then just place it in layout/ and that's it May 18 15:34:26 hmm that's odd as since I added a layout-land and drawable-land I'm getting errors May 18 15:34:40 about icon missing (it's only in drawable) May 18 15:35:44 sure it's with the same filename? eg I have drawable/asd.png, drawable/qwe.png and drawable-port/asd.png May 18 15:36:08 in portrait mode, drawable/qwe.png is used since I do'nt have it in drawable-port/ May 18 15:39:17 tauno: restarted eclipse and now it's happy May 18 15:39:22 thanks for the help :) May 18 15:39:34 would have copied stuff everywhere if you hadn't confirmed it wasn't needed May 18 15:41:59 Heyy May 18 15:45:24 anyone else have the design view in eclipse fail for xml files in the layout-land directory? May 18 15:45:43 it can happen May 18 15:45:50 file bugs at b.android.com May 18 15:49:26 ok - should I throw in a layout file for testing? May 18 15:51:21 oh romain, while I've got you. broadcasts of sms sending and a CallLog equivalent - not in there right? May 18 15:51:51 just so I don't go insane reading the entire internet to verify (checked the docs everywhere I could think of already) May 18 16:03:38 is there a way to make the permissions for debug-signed apps be open so i can browse the files using adb shell? May 18 16:19:20 <[cliff]> hi all May 18 16:20:22 <[cliff]> is it possible to hint android to cache rendered ListView items (probably a bitmap in memory) so that when the user scrolls the list and these items are redrawn they don't need to be rendered again? May 18 16:21:53 [cliff]: that's already what it does May 18 16:22:19 <[cliff]> hmmm that's not what I'm seeing on the emulator May 18 16:22:35 <[cliff]> I have a complex item view and it's rendered time and time again May 18 16:22:38 and yet, that's what it does May 18 16:22:47 but note that your item is reused May 18 16:23:08 so every time a new adapter position shows up on screen, it needs to be re-rendered in the bitmap May 18 16:23:17 <[cliff]> romainguy_ no, I had to create my own adapter to prevent that, it was breaking May 18 16:23:27 what was breaking? May 18 16:23:33 <[cliff]> data was being cached May 18 16:23:48 then you were probably misusing the adapter May 18 16:24:21 <[cliff]> for example: two item views, 1 had the text "i'm item 1" and the 2 had the text "i'm item 2". sometimes the #2 view would get the #1 text May 18 16:24:34 because you were not rebinding the item May 18 16:24:52 in getView() you receive a convertView parameter May 18 16:25:00 if it's != null you must reuse it May 18 16:25:16 <[cliff]> cute, still, I was actually using ViewBinder's May 18 16:25:17 by simply setting all its values again May 18 16:25:50 then you were not binding correctly May 18 16:26:24 <[cliff]> iirc binding is performed by the SimpleCursorAdapter, let me check the docs again May 18 16:26:32 are you reusing the convertView in your custom adapter? May 18 16:26:43 <[cliff]> no May 18 16:27:06 what exactly does your custom adapter do? May 18 16:27:18 no you are not reusing the convertView? May 18 16:27:42 <[cliff]> right, i'm not reusing the convertView May 18 16:27:53 then that's why you see your item being rendered all the time May 18 16:27:57 you keep feeding listview new items May 18 16:28:09 (which by the way is making you eat up tons of memory) May 18 16:28:13 <[cliff]> the custom adapter grabs data and renders the custom view May 18 16:28:19 <[cliff]> yup, that's right May 18 16:28:28 <[cliff]> ok, give me a couple of minutes to try the convertview May 18 16:34:16 <[cliff]> ok, I'm seeing exactly the same problem: rendering takes a bit of time so by reusing the convertView, stale information is displayed until the new data is rendered May 18 16:34:53 <[cliff]> maybe I can see this because I'm on a really slow laptop May 18 16:35:02 <[cliff]> but it's ugly as hell May 18 16:35:45 <[cliff]> and no, rendered item views are not being cached May 18 16:35:45 no May 18 16:35:57 <[cliff]> if I scroll fast to the top I can see stale data being presented on the first item May 18 16:36:05 <[cliff]> until the view is refreshed May 18 16:36:06 if stale information is displayed, then your adapter is not doing its job May 18 16:37:05 that or your custom view is not doing its job when it gets the new data May 18 16:37:06 <[cliff]> ok, how can I improve it then? from where I see it, it looks an UI rendering issue May 18 16:37:25 show me your implementation of getView() May 18 16:37:45 <[cliff]> custom view is just a RelativeLayout with ImageView's and TextView's. there is no magic there aside from setText and setBitmapDrawable May 18 16:37:57 just show me the code :) May 18 16:38:08 <[cliff]> I've been through this the other day May 18 16:38:15 <[cliff]> probably pastie's still around May 18 16:39:07 <[cliff]> http://pastie.org/private/q6isjbubycumjeo8mvsdg May 18 16:39:26 <[cliff]> that is _old code_ May 18 16:39:50 <[cliff]> instead of bindView it's now getView() May 18 16:40:10 <[cliff]> because I stopped using ResourceCursorAdapter and went with a BaseAdapter May 18 16:40:11 <[cliff]> mind you May 18 16:40:21 <[cliff]> with a ResourceCursorAdapter I had _exactly_ the same problem May 18 16:42:01 given this code, it makes sense to see stale data for the imageviews May 18 16:42:33 <[cliff]> yup, that was expected, but not in the TextViews May 18 16:44:03 <[cliff]> there has to be a way to cache the rendered output of a view May 18 16:44:13 <[cliff]> I just haven't figured out how yet May 18 16:44:21 argh May 18 16:44:24 it does that already May 18 16:44:36 that's not the issue May 18 16:44:36 <[cliff]> well then, it sucks at it :-) May 18 16:44:48 well it works for all the lists in all apps I've seen so far :) May 18 16:45:02 <[cliff]> yeah, specially very basic lists May 18 16:45:11 complex lists too May 18 16:45:17 <[cliff]> can I get an example? May 18 16:45:28 the built-in Music player May 18 16:45:31 the list of emails in Gmail May 18 16:45:43 heck, this one too http://code.google.com/p/shelves May 18 16:50:10 I wonder if my problem is related. I have a GridView of ImageViews and I have it set up so that on a touch event the touched ImageView will toggle between alpha of 128 and 255. It works fine except for the first item, which doesn't get redrawn with the new alpha unless I cause another touch event to happen elsewhere, like on the edge of the screen. May 18 16:51:05 Changing it to properly reuse the convertView has caused it to now work 50% of the time instead of 0%. May 18 16:51:16 how do you change the alpha? May 18 16:52:55 setAlpha() May 18 16:53:32 lemme check something then May 18 16:54:35 ah here we go May 18 16:54:47 blanu: all you have to do is call imageView.invalidate() after you call setAlpha() May 18 16:55:11 does anybody know why File.renameTo() might fail when moving a file from internal storage to the sdcard? May 18 16:55:25 unfortunately nothing helpful is printed in the logs May 18 16:59:31 guess there's no way to read errno huh May 18 16:59:48 romainguy: Hey thanks! That works perfectly. May 18 17:08:33 <[cliff]> i'll have to take deeper look into the Shelves app. thanks romainguy_ May 18 17:08:48 np May 18 17:09:04 hi May 18 17:09:30 anyone here know how to set up a repo repository? May 18 17:09:48 to check out android's code? May 18 17:09:54 yes May 18 17:09:59 no no May 18 17:10:04 to host android code May 18 17:10:13 there's no such thing as a repo repository May 18 17:10:18 repo is just a wrapper script for git May 18 17:10:20 i know May 18 17:10:24 it's git May 18 17:10:43 still, there must be _some_ tools to make a maintainers life easier... May 18 17:11:10 you'd have to ask that on git channels :) May 18 17:11:36 no May 18 17:11:40 repo != git May 18 17:11:50 repo is a script that handles tens of git repos May 18 17:11:58 i bet admins don't maintain that manually May 18 17:12:07 (i have git repo hosting going on allready) May 18 17:12:48 well, 'ill try just cloning it, i don't really think it'll work... May 18 17:12:59 (also need to change the manifest of course.. May 18 17:13:01 ) May 18 17:15:54 is there a reason why we can't directly query on the people._id column? May 18 17:17:43 ok, i'm starting to see how this can be done. May 18 17:28:47 soul9: Are you starting your own Android distro? May 18 17:29:32 no May 18 17:29:41 just trying to make community devs easier May 18 17:30:23 (freerunner target) May 18 17:38:47 That's cool. I'm still waiting for a nitdroid build that works. I know folks with freerunners too, so it will be cool to see them running Android as well. May 18 17:39:10 android runs fairly well on the fr :) May 18 17:41:43 Does the software keyboard work? May 18 17:42:14 yeah, it's great in cupcake May 18 17:42:19 not in koolu-1.0 :) May 18 17:43:09 what is nitroid? May 18 17:47:09 hi, can anyone explain me the difference between the VideoView and the MediaPlayer? May 18 17:47:55 I'm trying to create a video player with play, pause etc. but the video is not working in the videoview May 18 17:48:11 it is working in MediaPlayer, but that one does not have the controls...? May 18 17:49:09 nitdroid is the distro for the Nokia N800/810 tablet. It's great, except the software keyboard is broken. It's based on ADP1.5. May 18 17:50:28 is there a way to make a bitmap "mutable" when it has been created using BitmapFactory.decodeResource? May 18 17:56:50 ahh, i see May 18 18:02:11 ctate: thanks for the vid/pid link for the usb config, everything is working now :) May 18 18:04:46 jt436: sweet May 18 18:05:26 I forgot to kill adb and restart, that cause me some issues May 18 18:18:49 jt436: ah yeah, that'll definitely be an issue. May 18 18:18:49 but you figured that out, so. May 18 18:27:27 what's the standard format for bitmaps when you don't state a config? ALPHA_8, ARGB_4444 or RBG_565? or, asked differently : what's the most speed efficient? May 18 18:30:06 you cannot not specify a config May 18 18:30:21 and the most speed efficient would be 565 May 18 18:30:27 but you lose translucency May 18 18:30:28 so... May 18 18:30:30 well, if you use BitmapFactory.decodeResource you don't have to May 18 18:30:42 then the config will be set for you based on whatever you decode May 18 18:30:47 yeah .. I guessed 565 would lose alpha May 18 18:31:00 so if you load a PNG with alpha values, it will be 8888 May 18 18:31:05 an opaque image like JPG will be 565 May 18 18:31:12 romainguy: actually, that's not trye May 18 18:31:12 BitmapFactory never returns 4444 images May 18 18:31:14 true even ;) May 18 18:31:47 what is not true? May 18 18:31:56 I had a tough time finding that out, as I'm using a bitmap for collision purpose, but decodeResource dithered the bitmap, so I don't think it was 8888 May 18 18:32:09 it does if the bitmap doesn't have alpha values May 18 18:33:20 it dithers? or it returns an RGB_8888? May 18 18:34:24 if it has alpha values, it returns an ARGB_8888 bitmap May 18 18:34:34 if it doesn't, it will give you a dithered 565 image May 18 18:34:41 unless you ask for a non-dithered image May 18 18:34:48 ahh May 18 18:34:57 yeah. then I was getting a 565 image May 18 18:36:34 My problem right now is that decodeResource only returns a immutable bitmap, and I must change parts of it, depending on some variable (the difficulty setting of my game). that way I can just alter the game's background depending on the difficulty setting, instead of having the same bitmap with a few pixels changed twice May 18 18:37:20 so I create a brand new mutable bitmap, and copy the bitmap from the resources in it, then apply the changes. May 18 18:37:48 sounds about right May 18 18:37:56 but using RGB_8888 decreased the performance a great deal May 18 18:38:49 so I need to convert the new bitmap to 565 when all the changes were made May 18 18:38:59 thanks :) May 18 18:39:04 you helped me a lot :) May 18 18:39:18 np May 18 18:40:52 I have a question about LocationManager.getLastKnownLocation(GPS_PROVIDER)... It's returning an out-of-date location, even though my MapActivity shows my up-to-date location. May 18 18:41:03 Shouldn't it return the same current location as MapActivity shows, since MyLocationOverlay is subscribing to location updates and presumably updating the LastKnownLocation? May 18 18:42:55 as a cross-check, do you have a location listener and is it being updated? May 18 18:43:26 I don't have one handy, no, but I could add one to debug May 18 19:01:18 so I added a LocationListener using the GPS_PROVIDER with a minTime of 10s to my MapActivity, and it appears that it never gets called. Even though MyLocationOverlay is clearly showing my location changing when I move around May 18 19:05:32 ctate, any other ideas? May 18 19:11:14 Is here somebody from adnroid team? May 18 19:29:03 ah, i see what the problem is. My GPS_PROVIDER is TEMPORARILY_UNAVAILABLE (per LocationListener.onStatusChanged), so I'm not getting any results. I guess I need to use getBestAvailable(), and anytime the status changes I need to reset my locationmanager to the latest getBestAvailable May 18 19:32:12 can you play audio to the earpiece in 1.5? The docs say no, but I'm hoping that's out of day May 18 19:32:15 out of date* May 18 19:40:24 (scratch that about status changes) May 18 19:57:27 I'm trying to populate an sql database in my app from a txt file. What would be the best way to go about doing that? I've already created the dbadapter and helper classes May 18 19:58:15 Alternatively, is there anyway to install a pre-populated sql db in an app, as a resource or something? May 18 19:59:07 That's a feature I wish App Engine had as well. May 18 20:01:05 yeah, i suppose i could just put the text file on the phone's sd card and parse it like that May 18 20:02:07 seabass: more or less. May 18 20:02:29 have your db written to a file preformatted, and then read from that file May 18 20:02:36 you don't have to extract it, really May 18 20:02:50 you can read from assets in your app as long as they are < 1M May 18 20:02:54 1MB May 18 20:03:03 Personally, I would just add the statements to the helper's onCreate and not bother with putting it in a separate file. May 18 20:03:27 well I don't have them in a database yet May 18 20:03:53 so it's probably the same amount of work either way May 18 20:05:43 blanu: if you've got 100,000 odd entries, that could a pretty huge number of statements... May 18 20:06:41 I have to automate it since there are close to 10000 entries May 18 20:06:57 Ah, I see. May 18 20:07:28 the file isn't all that large, maybe 300K, I think I'll just add a routine that populates the db when the db is first created May 18 20:07:38 shouldn't bloat the app too much May 18 20:08:12 That seems like the way to go. May 18 20:08:26 thanks for the help! May 18 20:18:29 seabass: if you want to install a prepopulated sqlite database, http://bit.ly/9AbtJ May 18 20:29:54 romainguy: should i create a progress bar inside of the AsyncTask or in the place that creates the new AsyncTask ? May 18 20:30:06 your choice :) May 18 20:30:17 hunterp: isn't there a preProcess method or something May 18 20:30:26 that probably runs in the UI thread May 18 20:30:46 onPreExecute() May 18 20:30:53 as long as the progress bar is displayed, it will be modal, and hence doesnt matter if it blocks the UI May 18 20:31:05 for what it's worth, I create them in the AsyncTask May 18 20:32:33 I use ViewStubs May 18 20:32:41 and inflate them in the AsyncTask May 18 20:36:40 is it possible to cancel an incoming call? (while it's still ringing) May 18 20:37:49 romainguy___, of course you do, a simple showDialog() would be too easy wouldn't it? ;) May 18 20:38:34 I hate dialogs May 18 20:38:35 ah.. progress bar, sry May 18 20:38:41 not a dialog May 18 20:38:49 well why have a progress bar in the hierarchty when it's not needed? :) May 18 20:38:50 romainguy___ you do? why so? May 18 20:38:54 ViewStub ftw May 18 20:40:01 I learn something new everyday in here... May 18 20:40:19 I even wrote an article about ViewStub :p May 18 20:40:50 well, I also forget something everday.... May 18 20:40:57 romainguy___, yeah, I read it.. but still, why do you hate dialogs? May 18 20:41:01 cause I think I've read them all May 18 20:41:33 tauno: because they don't look good, they're obnoxious, distracting and frustrating May 18 20:41:59 romainguy___, speaking of that - the lack of new updates in the blog is also frustrating (: May 18 20:42:19 tauno: you can't blame romainguy___, he's been pulling his weight on the blog May 18 20:43:02 ` May 18 20:43:10 yeah, not blaming him personally really.. he happened to be in the wrong place in the wrong time :) May 18 20:43:17 at* May 18 20:43:49 something that hasn't been discussed in ages is the ADC May 18 20:43:53 part II May 18 20:44:07 romainguy, a wise guy here once said that if you don't like how stuff looks/works, then patches are welcome ;) May 18 20:45:39 anyway.. what I don't like are activities that just display a small "please wait" infinite progress indicator and that are used between two activities.. what's up with them? who the hell thought that this is a good idea? May 18 20:46:17 anyone get cupcake on their regular phone ? May 18 20:46:26 hunterp, yes May 18 20:46:32 yay for you ;-) May 18 20:46:34 hunterp: http://www.engadget.com/2009/05/18/t-mobile-usa-delays-android-1-5-rollout-by-a-few-days/ May 18 20:47:06 ugh May 18 20:47:31 its cheaper to buy another android from tmobile and root it? instead of $400 for a dev phone ? May 18 20:48:04 i really need to test on a 1.5 device May 18 20:48:07 hunterp: if you're already going to get a 2-year contract, yes. otherwise it's more expensive. May 18 20:50:14 You can get a used G1 for about $250. May 18 20:50:42 <_Auron_> I got mine for half that in almost mint condition :) Bought from a friend that said the phone was too complicated for him. May 18 20:51:06 I also don't like Toasts.. sometimes at least. They are really great if used correctly but some apps display a HUGE toast for an etternity and you can't cancel them or remove them and you can't see what behind them.. so you just have to sit there and hope that it will go away eventually May 18 20:52:39 ..or there's a HUGE Toast but it's going away really quickly so you can't read more than the first/second line May 18 20:52:58 tauno: maybe make the back button remove the toast if it is displayed? May 18 20:53:21 tauno: I wonder how they do that. I tried setting a long delay on a toast and it still went away after 1 second. May 18 20:53:44 maybe 1 second is too long for me at some point :P May 18 20:53:46 tauno: I always think toasts are too quick May 18 20:54:04 maybe I'm a slow reader May 18 20:54:42 (idk how long a LENGTH_LONG will be displayed.. but it sure is too long for some toasts but people still use it in this case) May 18 21:00:33 is there a good way to send email from an android app? I want to send crash reports to my server, but JavaMail 1.4 doesn't seem to work out of the box May 18 21:01:47 emmby: setup an api on the server May 18 21:01:54 or launch an intent and let the user send an email May 18 21:03:01 yeah, i was starting to come to those conclusions. Nothing else out there? May 18 21:05:54 hi everyone May 18 21:07:28 Is there a way to reset the state of an AnimateDrawable so it can play again? May 18 21:08:24 I can run the example shown at http://developer.android.com/guide/topics/graphics/2d-graphics.html#frame-animation, but I can never replay it. May 18 21:15:13 romainguy, still there? May 18 21:16:11 ohhh, i like this technique: May 18 21:16:12 ProgressDialog dialog = ProgressDialog.show(this, "","Loading. Please wait...", true); May 18 21:16:15 new DownloadMarkersTask(dialog).execute(lat+"",lng+""); May 18 21:16:28 and then I dismiss the dialog from within the asynctask. May 18 21:16:31 easy! May 18 21:16:59 what are you guys opinion on coding for android? i have a collegue that insists on using server stucture like with all the DAO and interface and abstract stuff May 18 21:17:36 chouman82: make your code work, period. May 18 21:17:51 well May 18 21:17:55 so as long as it works u don't care? May 18 21:18:04 well designed code is easier to maintain May 18 21:18:06 as long as it works, the bills get paid May 18 21:18:23 as long as you're not fired, you get to keep improving :-) May 18 21:19:23 but without coding standard it becomes hard for others to read and understand wat da heck is going on May 18 21:19:43 depends how many others there are May 18 21:20:00 often, you cannot get people in a small team to agree to coding standards May 18 21:20:08 in a large company, maybe May 18 21:20:32 also depends if the codebase is coded with a standard from the beginning May 18 21:20:35 some would want to make their code as undecypherable as possible... :) May 18 21:20:55 to which I am against, naturally May 18 21:21:18 chouman82: if the DAO is actually relevant, good, use it. May 18 21:21:29 if it's just a fetish because you like having DAOs, don't bother. May 18 21:21:34 This is just as true in android as it is anywhere else. May 18 21:21:49 well i think the way he writes over complicate the code May 18 21:21:56 possibly May 18 21:22:01 I haven't seen it so I can't comment. May 18 21:22:06 yea May 18 21:22:15 I will say that I'm not the biggest fan of the forced indirection that android foists on developers May 18 21:22:23 everything must be read as a database, and in a very particular format, like it or not. May 18 21:22:40 I'm looking at you, contacts list :E May 18 21:22:50 you guys attending the google io? May 18 21:22:54 yes May 18 21:23:07 if anyone wants to get me in cause im a "student of life" May 18 21:23:12 i'll drop $50 May 18 21:23:22 cool i def want to meet and learn from you guys May 18 21:23:23 pretty sure that's not how it works May 18 21:24:28 anyone knows why android retains the info of uninstalled packages in the packages.xml? May 18 21:26:24 so that you can query about uninstalled packages May 18 21:26:32 there are calls for PackageManager to display info for uninstalled packages May 18 21:26:53 well i guess one problem that i ran into with that is May 18 21:26:55 why this might be useful is up to debate, but you may want to differentiate between packages that were uninstalled and those that were never installed May 18 21:27:06 Google IO: wish I could go, but not able to go from the UK unfortunately. May 18 21:27:34 i ran into this a few times in the transition to 1.5 May 18 21:27:49 so i have installed a few apps with shared user id on my phone already May 18 21:27:54 and then i switched to 1.5 May 18 21:28:15 and with 1.5, the keystore location changed so it's using a different key store May 18 21:28:40 now i tried installed app with the same shared user id but built with a different key sotre May 18 21:28:55 it fails with different shared user id or something similar May 18 21:29:29 and from there on i tried different things to fix, like changed my key store and uninstall all apps... etc May 18 21:29:31 no use May 18 21:29:40 had to wipe the whole phone and start from scratch May 18 21:31:38 : ( May 18 21:31:56 and my guess is because of all the info retained in the pacakges.xml May 18 21:34:37 that's probably true May 18 21:53:22 is there an easy way to tell if my G1 is in landscape or portrait orientation? May 18 21:55:24 i'm using getWindow().getWindowManager().getDefaultDisplay().getHeight() > getWidth(), but thought there might be a more direct way May 18 21:55:54 Yes, check the http://developer.android.com/reference/android/hardware/SensorManager.html, getOrientation May 18 21:56:08 mmmmm, pretty sure that's not it May 18 21:56:23 iirc, that will show which way the device is oriented May 18 21:56:28 not whether the screen is portrait/landscape May 18 21:57:12 getWindow().getWindowManager().getDefaultDisplay().getOrientation() ? May 18 21:57:26 the problem with defaultdisplay is that it's the default values, not the current values May 18 21:57:45 hmm May 18 21:57:49 so while accurate when you start, it deviates when you run May 18 21:58:00 so, you can seed with those values, but make sure you capture every surface change event May 18 21:58:06 hm, no good May 18 21:58:33 I really just let SurfaceView figure this out for me May 18 21:59:34 basically, i have a layout that's slightly different in portrait vs. landscape mode. I've been struggling to make one layout that would handle both gracefully, but finally decided it might just be easier to make two and switch between them May 18 22:00:01 that may be the wisest move May 18 22:00:46 so what's the best way to do that? will getDefaultView().getOrientation() always be correct during onCreate()? May 18 22:01:07 emmby: use res/layout May 18 22:01:11 and res/layout-land May 18 22:01:14 oh! May 18 22:01:24 two seperate layout files May 18 22:02:59 emmby: http://developer.android.com/guide/topics/resources/resources-i18n.html#AlternateResources May 18 22:03:57 brilliant. i don't see a reference to "layout-land" at that url, but it works? May 18 22:04:16 yes May 18 22:04:31 it's referenced in that table May 18 22:04:41 Screen orientation | port, land, square May 18 22:04:49 ic May 18 22:15:24 much nicer. thanks zhobbs May 18 22:31:11 how would you guys creat a chess-board like grid tablelayout with buttons ? that stuff was really simple in java i fail with that xml stuff though =) May 18 22:36:02 what exactly does flush do for the outputsream? May 18 22:37:32 tuxfusion: GridView would probably work May 18 22:37:56 and just have an adapter that supplies the appropriate image for each piece May 18 22:45:48 tuxfusion: http://android-developers.blogspot.com/2009/04/ui-framework-changes-in-android-15.html mentions a couple of ways to do it May 18 22:52:22 anyone know how I would convert this: "/external/images/media/143" into a file path? May 18 22:55:28 khert: uh, that is a file path :\ May 18 22:55:38 just toss it into a new File as the argument May 18 23:06:34 thx for the input May 18 23:40:50 Hey, I'm having issues when I upgraded from the 1.1 SDK to the 1.5 SDK: when I go to Properties>Android to change the SDK location, it is all grayed out, I can't select anything. Has anyone else hit this issue? May 19 00:00:18 Hey. May 19 00:00:39 I'm running Debian, and adb can't see my dream even though it's plugged in and has USB debugging turned on. May 19 00:00:43 Do I need to load a kernel module? May 19 00:02:58 ttuttle: yeah May 19 00:03:41 Which one? May 19 00:04:02 you need a udev rule (and access to some device - easiest done as root) May 19 00:04:24 sorry ... was looking for it May 19 00:04:49 http://developer.android.com/guide/developing/device.html May 19 00:04:58 ttuttle: ^^ May 19 00:06:18 does the ADT not like x86_64 as a dev platform? May 19 00:06:51 I think that ADT is 32-bit-only May 19 00:07:10 jbq__: yo May 19 00:07:17 hey May 19 00:07:37 So even with the udev rule set up (which isn't working, but I chmodded by hand to make up for it), it still doesn't see my phone. May 19 00:07:50 no wonder i was having issues getting my eclipse to like it :-( May 19 00:08:03 ttuttle: recent linux (e.g. ubuntu 9.04)? May 19 00:08:07 kc8pxy, I'm on x86_64 May 19 00:08:26 ttuttle: you're running debian or ubuntu? May 19 00:08:39 ttuttle, try this: `sudo $(which adb) kill-server && sudo $(which adb) devices` May 19 00:08:54 ttuttle: with Jaunty, the rule had to be 51 May 19 00:08:54 KNY: distro? May 19 00:08:56 jbq__: recent debian. May 19 00:09:01 ttuttle: anyway, if your rules files is 50, try to make it 51 instead and see whether that helps. May 19 00:09:04 ttuttle: 50 didn't work anymore May 19 00:09:04 kc8pxy, Ubuntu 9.04 May 19 00:09:06 jbq__: tried 51 May 19 00:09:09 :( May 19 00:09:11 jbq__: that doesn't matter May 19 00:09:19 KNY: ganymede? May 19 00:09:23 kc8pxy, yes May 19 00:09:32 KNY++ # that worked May 19 00:09:37 ttuttle, excellent May 19 00:09:43 Qwell: sorry, just trying to help, I know it works on some distros... May 19 00:09:51 sometimes it just needs a kick in the ass to start working :) May 19 00:09:52 * jbq uses MacOS, none of that nonsense. May 19 00:10:23 anyone done any work yet porting kismet to android? May 19 00:13:56 kc8pxy: I doubt it. May 19 00:27:03 * kc8pxy plans to :) May 19 00:33:17 does anyone know where the android plugin stores the location of the SDK? May 19 00:39:05 bah. Updated my android plugin now projects wont compile May 19 00:41:45 same! May 19 00:41:52 meanburrito920: you mean the eclipse plugin? window->preferences->android May 19 00:42:43 ezome: I know where that is. The issue is, I updated to 0.9 and the Preferences>Android box is grayed out so I cant change the location of the SDK to the 1.5 version May 19 00:42:51 so I'm looking for the text file May 19 00:42:55 with the config info in it May 19 00:42:58 so I can do it by hand May 19 00:43:00 oh right May 19 00:43:14 any ideas? May 19 00:44:01 bherrmann7: yoru old source? May 19 00:44:22 I had everything working for about 4 months now May 19 00:44:38 but then I updated the eclipse plugin, and now I cant get my projects to compile May 19 00:44:48 they act like they are missing the JDK and android.jar May 19 00:44:58 bherrmann7: 1.1 sources, or 1.5 sources? May 19 00:45:00 I did not follow the directions on the update site May 19 00:45:03 1.1 sources May 19 00:45:55 bherrmann7: i'm new to android in 1.5. i'm finding that many of the tutorials i find need a bit of updating also.. perhaps that's your issue. May 19 00:45:58 I simply wanted to see if the eclipse plugin was updated, but some how had to now update my sdk, and plugin, but something is still wrong. and I bumming. May 19 00:48:01 Here's a nice error message "Cannot create linked resource '/.org.eclipse.jdt.core.external.folders/.link0' the parent resource is not accessible. May 19 00:48:46 bherrmann7: did you uninstall / reinstall the plugin, or just update it? May 19 00:49:22 I simply updated it. It's pretty common practice in eclipce land to update plugins May 19 00:49:29 ahah May 19 00:49:44 yea. I now know, the site says, remove first, then update. May 19 00:50:09 it can't hurt to try May 19 00:50:21 I think I ran into a similar issue, and I think that's how I fixed it May 19 00:50:24 yes, true. I'm giving that spin now. May 19 00:51:07 worse comes to worse, I can reinstall eclipse May 19 00:52:42 Damn. Even after full removal and reinstall, I still get an error using the 'new Android project wizard' May 19 00:52:55 Angry angry angry May 19 00:55:33 tried creating a new workspace... now I get "no classfiles specfied" and "Covnersion to Dalvik format failed with error 1" May 19 00:55:44 in the error console May 19 00:56:36 humm. but no error in the java console... May 19 00:57:13 running the program just results in constant stack traces May 19 00:57:37 [2009-05-18 20:57:09 - ddms]Exception during activity from Selector. May 19 00:57:38 [2009-05-18 20:57:09 - ddms]null May 19 00:57:38 java.lang.NullPointerException May 19 00:57:38 at com.android.ddmlib.Debugger.accept(Unknown Source) May 19 00:58:17 now constant "IOConsole Updater" messages, dandy May 19 00:58:30 reinstall eclipse time May 19 01:07:26 if I add a file.. I can make the media player notice it with ACTION_MEDIA_SCANNER_SCAN_FILE broadcast.. what do I use if I want to make it recognize that a file is deleted? May 19 01:17:38 Heya May 19 01:17:52 Does your application's activity have to extend Activity directly? May 19 01:30:10 hrm, does the android library include the JDI interfaces? I'm trying to build the kawa swank backend for slime and the build works for normal kawa targetting the jdk, but not when I build kawa for android. Googling is not terribly helpful ("do you mean JNI..." and then a bunch of crap about star wars). I just want to make sure before I start porting it the interfaces in os.android.Debug / dalvik.system May 19 01:41:50 what's kawa swank and slime? May 19 01:49:37 squalus: kawa is a scheme compiler for the jvm (it seems to be the only Lisp/Scheme that can target android with no effort ATM) May 19 01:50:05 squalus: slime is the lisp interaction mode for emacs, and swank is the server backend that runs in a lisp/scheme image May 19 01:50:32 squalus: my plan is to set up forwarded port to the swank server in my app on my device using adp and then slime-connect to it so that I can poke around more easily May 19 01:52:33 squalus: the kawa swank backend uses JDI to setup breakpoints / fetch stack traces / etc. May 19 01:52:50 unknown_lamer: That's very interesting. I'd like to get some non-Java languages running on Android. I was under the impression that most of them won't run without significant modification. May 19 01:53:29 I don't think Dalvik provides JDI. That's a JVM thing. Dalvik has its own DDMS deal. May 19 01:53:31 blanu: the changes to kawa were < 100 lines and are in its svn HEAD May 19 01:53:53 blanu: scala runs also May 19 01:53:54 That's cool, I'll have to try it out. May 19 01:54:03 Oh wow, I had no idea. May 19 01:54:09 I do a little in scala. May 19 01:54:14 although its mainly playing around May 19 01:54:29 although everything that works, seems to work May 19 01:54:36 per brothner's weblog entry on building is slightly out of date (SDK 1.1 vs 1.5), but I got it to build by copying the template build rules and manually rewriting the compile -> jcompile + scompile rules May 19 01:55:06 I'm still stuck at hello world though because ... yeah, I hack Common Lisp by for fun /and/ profit and so this whole Java world is terrifying May 19 01:55:09 unknown_lamer, i have the same problem with scala.. I dont know ant well enough to fix it May 19 01:55:32 Yeah, it took me about five minutes to write hello world, and six hours to figure out how to get ant to compile scheme :-X May 19 01:56:00 unknown_lamer, i'm very interested in seeing what/if you get it working.. May 19 01:56:49 The real challenge with using another language is going to be that everything on Android uses custom APIs which are very Java in their design. Mapping those to an interface idiomatic to the scripting language is going to be a real challenge. May 19 01:56:56 http://unknownlamer.org/files/temp/kawa-hello.png May 19 01:57:31 blanu: calling java from kawa is not /so/ painful -- it's just like using CommonLOOPS in the 80s... May 19 01:57:57 but oh my, no multiple inheritance or multimethods or MOP. It hurts. May 19 01:57:58 * wmealing doesn't find calling java from scala too bad either May 19 01:58:39 When using Java APIs from inside another language I often feel like I'm just writing Java code in a very difficult and convoluted way. But you can eventually build up a little library that hides enough of it to start being fun. May 19 01:59:50 Much like many python libraries are basically just thin wrappers around the corresponding C API, and then there will be a second "pythonic" library that uses the first library and provides things like objects. May 19 02:00:43 naturally May 19 02:01:13 hrm, I guess I could try JDE + JDB and at least get /something/ May 19 02:01:21 and then there is always kawa.repl.eval May 19 02:02:47 wtf http://dl-ssl.google.com/android/eclipse/ broken? May 19 02:04:26 No repository found at https://dl-ssl.google.com/android/eclipse/ May 19 02:08:14 Downloading zip file worked, http://developer.android.com/sdk/adt_download.html May 19 02:19:11 hmm lisp/scheme on 'droid May 19 02:19:15 that might be kinda cool **** ENDING LOGGING AT Tue May 19 02:59:57 2009