**** BEGIN LOGGING AT Fri May 18 02:59:58 2012 May 18 03:00:07 I'd like to know who invented chuck norris jokes. May 18 03:00:17 Also Chuck Norris. May 18 03:00:26 I suspected that May 18 03:00:42 I think I saw an interview on like Conan about that May 18 03:01:05 I guess these two dudes put a webpage up with the jokes and Chuck showed up at their house and scared the shit out of them May 18 03:01:11 then he laughed and said he enjoys them May 18 03:04:26 holy shit the sound hound app has like 50 activities May 18 03:05:04 nice, bizdev guy from Airpush trying to 'friend' me on linkedin May 18 03:05:16 hahaha May 18 03:05:34 tell him to go "NOTIFICATION AD" himself May 18 03:05:44 yeah, something like that May 18 03:06:18 did you see the one post about how a new ad company is trying to put ads before outgoing phone calls? May 18 03:08:08 yup May 18 03:08:44 is it unfair to report spam on him? :) May 18 03:09:01 * t0mless shrugs May 18 03:09:14 I probably wouldn't, but i'm too nice for my own good May 18 03:09:29 woot woot! https://android-review.googlesource.com/#/c/35900/ May 18 03:09:35 I would accept his friendship and then use his email to sign up for free trials on every porn site I can find May 18 03:09:35 linked in blah May 18 03:09:42 too many phb on linkedin May 18 03:09:43 reported May 18 03:10:13 Afzal: woohoo :) May 18 03:10:40 Leeds, time to do it for the tablet browser too I guess :/ May 18 03:10:49 :D May 18 03:10:49 yeah, get on that... May 18 03:11:03 What happens when two items in a Set suddenly return the same from .equals? #LazyInternet May 18 03:11:06 probably nothing May 18 03:11:45 huh May 18 03:11:49 SoundHouse uses ABS May 18 03:11:59 SoundHound* May 18 03:12:13 I think I knew that May 18 03:12:16 t0mless, I read that as SoundHound anyway :p May 18 03:12:25 because I have it installed and have never used it nor had the desire to May 18 03:12:31 so it had to get there for some reason May 18 03:12:47 their UI is actually pretty nice May 18 03:14:06 but does not seem like it requires... SIXTY THREE... activities May 18 03:15:26 plus 4 receivers and a service May 18 03:15:55 t0mless: you know what they say, you should use a different activity whenever you change any of the text or images on screen May 18 03:16:01 right? May 18 03:16:08 * t0mless must be doing something wrong May 18 03:16:21 new activity for anything that is clickable? May 18 03:18:05 activities all the way down May 18 03:18:07 some people never discovered view.setVisibility() May 18 03:18:23 can you nest ActivityGroups? May 18 03:18:57 readme, or textView.setText() May 18 03:21:30 guys, do you know how to get the CHOICE_MODE_MULTIPLE_MODAL behaviour in ListView from ICS back to 2.2+? I use ABS as well May 18 03:24:25 what's the difference between CHOICE_MODE_MULTIPLE and CHOICE_MODE_MULITPLE_MODAL ? May 18 03:25:28 does that just automatically set mode multiple when an action mode is started? May 18 03:25:33 because you could just do that manually May 18 03:25:44 i think so May 18 03:26:11 on ICS, long click -> start selection mode; once in selection mode, a short click selects/deselects. Once out of selection mode, short click fires onclick event. In 2.2, you whether are in selection mode or onclick event mode... not hybrid May 18 03:26:47 t0mless, yes - that's exactly what the ICS source does indeed May 18 03:27:56 yea, so just use the normal selection mode and then set multiple when you start your aciton mode May 18 03:27:59 I tried to backport ICS source, but got lost in all dependencies the new code has May 18 03:28:00 and then turn it off when you're done May 18 03:29:23 You might be able to get away with an extension of ListView May 18 03:31:17 Ehmm... which events should I listen to? I override performItemClick (short click) and showContextMenuForChild (long click), but I seem to be missing something May 18 03:31:54 JakeWharton, I tried to inherit from 2.2 ListView May 18 03:32:46 anyone had problems with scrollto on a webview, it seems to scroll to the wrong place somehow, i guess scale ismessing it up anyone know how to adjust the x and y based on scale? May 18 03:33:40 convert your #s to DPs? May 18 03:34:22 hmmm May 18 03:34:29 would that work? May 18 03:34:42 what are good apps May 18 03:34:46 i dont udnerstand why it doesnt go to the right sot even when im on 100% scale May 18 03:34:50 it almost works May 18 03:34:53 *spot May 18 03:40:35 sorry guys, got disconnected from the hotel wifi. Any replies on which events I should reply to? May 18 03:42:12 you sould be able to just change the selection type in your ActionMode callbacks May 18 03:43:09 t0mless, I've got that code. But I need to find out two events that the listview fires. 1) when the user short clicks; 2) when the user long clicks. May 18 03:44:00 tofi9 and onItemClick and onItemLongClick don't work? May 18 03:49:08 do you call the bar-graphs that rise and fall with the music in English? May 18 03:49:26 iwant to implement this one in android May 18 03:49:37 an equalizer? May 18 03:49:44 A midi file? May 18 03:49:47 oh, no you mean the visualization? May 18 03:50:04 yes May 18 03:50:13 visualization May 18 03:50:17 Good evening all. I recall reading somewhere that one can determine whether a file most recently added to the MediaStore has been fully written to the SD card by evaluating what's aparently the mediastore field written only after the file write lock has been released. I just don't recall which ield it was or where I read this (or even if it's accurate) can someone shed some light on this? May 18 03:51:49 I I'm mistaken about this, can someone suggest an alternate approach to assure that for example, a picture taken with the camera has been fully written to the SD card before I try to upload it somewhere? The only option I've come up with is to try to obtain a write lock on the file, but that seems sub-optimal May 18 03:53:23 hillct http://developer.android.com/reference/android/provider/MediaStore.MediaColumns.html#DATE_ADDED maybe? May 18 03:54:23 i found an example May 18 03:54:23 thanks May 18 03:55:38 t0mless: I was looking at that list to try and determine if one of them would be updated only affter the file write operation was complete. Date, it seems gets inserted when the file write initiates. I thought at one point it was Mime_Type that was updated only after the write completes, but that may not be it either May 18 03:56:01 Howcome the ics emulator launcher will rotate to landscape, but my stock galaxy nexus won't? May 18 04:00:27 JavaDog: try settings->display->auto rotate screen May 18 04:04:54 s/howcome/why is it that/ May 18 04:05:38 lol May 18 04:16:40 If I want to get space around my list items May 18 04:16:46 do I need to nest their layout inside a frame layout? May 18 04:16:54 setting layout_margin isn't causing space to appear around them May 18 04:17:15 the space needs to exclude the background of the layout May 18 04:18:11 readme: Doesn't work... any other app will rotate, but not the launcher May 18 04:18:35 JavaDog: oh, I didn't know you were talking about that. May 18 04:18:50 my launcher doesn't rotate either. May 18 04:18:56 CM9 on droid 3 May 18 04:19:07 (ICS) May 18 04:19:22 My gnex is stock May 18 04:19:56 what I'm saying is I think that there's a chance the launcher just doesn't rotate May 18 04:20:04 it doesn't rotate on this stock 2.2 droid I have, either May 18 04:20:39 I know it doesn't rotate pre-ics, but the ics emulator launcher rotates May 18 04:21:17 so does the gingerbread emulator launcher. May 18 04:21:30 Oh, didn't realize May 18 04:21:37 I just happened to have it open May 18 04:22:00 Guess it's just a dev build thing... really don't see a reason why it should be excluded from non-dev ones though May 18 04:22:13 it's not a dev ting May 18 04:22:21 when you put the emulator in landscape you're changing the device config May 18 04:22:47 on the phone you're just affecting the orientation sensor and the app is reacting May 18 04:23:32 Tablets will rotate to portrait, too May 18 04:23:54 Though that might be specific to the roms I've tried; haven't used stock ics on my tablet May 18 04:24:19 so the only way I can think to put space around a list item is by nesting inside framelayout, but lint says it's useless to do that. May 18 04:24:24 "useless layout" May 18 04:24:48 Could you just draw some fake borders and use padding? May 18 04:25:06 readme: why not add padding to the ListView? May 18 04:25:26 JakeWharton: i want space between all sides, imagine a sequence of ovals that don't touch, basically. May 18 04:25:50 I've got it with FrameLayout, but I wonder if there is a better way May 18 04:25:58 Use padding on the root view of each list item then May 18 04:26:08 yeah, I had that set before May 18 04:26:15 I'll try it again though, and see what happens May 18 04:26:23 the issue is that with padding, my background image occupies that space May 18 04:26:27 whereas I want it to be transparent May 18 04:26:36 as to see the background below it May 18 04:27:02 my image is a ShapeDrawable gradient.. so maybe it can be tweaked there. Not sure. May 18 04:27:23 \o/ padding! May 18 04:27:27 I can put padding in the drawable May 18 04:28:29 Or not.. I guess what I would have wanted is margin. May 18 04:29:31 How can I make sure that when a button is clicked, a new instance of an activity is launched (and how do I properly dispose of any old ones)? May 18 04:29:49 use the clear top flag May 18 04:31:05 http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP May 18 04:31:27 intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) on your intent. May 18 04:34:50 Not sure that's quite what I need... let me draw a picture May 18 04:35:48 make it pretty May 18 04:36:52 I added the smiley face for your viewing pleasure http://i.imgur.com/tpfiv.png May 18 04:38:12 whooo got my bluetooth rfcomm stuff talking May 18 04:38:15 haha May 18 04:38:16 excellent May 18 04:39:28 hmm trying to use a webview for a map where i can scroll to different pins, but i cant get it right, anyone know generally how u handle the scale, so if my x,y are like 100x100 and my scale is 1.5 it should be like x*(1/scale) or something?.. May 18 04:40:12 It's possible that clear top is what I want, but I'm not sure exactly May 18 04:40:41 JavaDog just call finish on the one your in May 18 04:41:09 When? May 18 04:41:15 on back button press? May 18 04:41:20 is there any way to get the unique device ID without context wrapper? May 18 04:41:21 after startActivity() May 18 04:41:38 i'm running into trouble using context wrapper May 18 04:41:39 JavaDog oh, u shouldnt really need to do that really, android will clean them up as needed May 18 04:42:13 I need a new instance though May 18 04:42:25 ah May 18 04:42:33 hmm May 18 04:42:38 are u sure May 18 04:42:43 why do u May 18 04:43:01 Activity 1 is a search page and activity 2 lists results. Without a new instance, I get the old results for a different search May 18 04:43:21 just clear it up as its exited ie in onpause May 18 04:43:28 or clear it up when u return in onResume May 18 04:43:35 What about orientation changes? May 18 04:43:54 The parsing process in activity 2 takes a long time and I don't want to repeat it May 18 04:43:57 keep the data in onpause i think and repopulate in onresume May 18 04:44:18 The data stays there as it should, I'm using a fragment May 18 04:44:18 i often keep things static for that reason May 18 04:44:30 not sure if you should do but so long as you clear it up when needed it should be ok May 18 04:44:37 I just want to throw the old instance out and get a new one May 18 04:44:48 All the code needs to be run again anyway May 18 04:45:06 well yeh just call finish() May 18 04:45:09 thatll do it May 18 04:45:36 b1n0ry: there's no reliable unique device id across multiple android devices May 18 04:45:49 anything you have found is going to flake out on many implementations and be generally unreliable. May 18 04:45:56 the only solution is to generate one. May 18 04:46:18 Where do I call finish? May 18 04:46:35 after u call stratActivity for new one May 18 04:46:41 or in back if u like May 18 04:47:13 I call it from a fragment within activity 1, like so parentActivity.startActivity(i); May 18 04:47:41 "i" is: Intent i = new Intent(parentActivity, SearchResultsActivity.class); May 18 04:47:56 hmmm... that gives me an idea, thanks readme. i'm thinking i could make a web call to a server to 'requestNewId' and store it in the local filestore the first time the app is run. sound reasonable? May 18 04:48:18 JavaDog: "Unless you specify otherwise, a configuration change (such as a change in screen orientation, language, input devices, etc) will cause your current activity to be destroyed" May 18 04:48:21 JavaDog might be ok, im not into fragments yet May 18 04:48:28 you get a new instance when you rotate the screen May 18 04:48:40 unless you changed configChanges in the manifest. May 18 04:49:51 no, but in the fragment I have setRetainInstance(true) May 18 04:50:07 for orientation changes... though I wonder if it would work without May 18 04:51:56 Well it works, but not in a way I like. Upon orientation change, activity 2 will parse results again, wasting a lot of time for the user potentially May 18 04:52:09 show me this "parse results" code May 18 04:52:15 and the data structure that stores the results May 18 04:52:19 It's rather large May 18 04:52:34 is there any reason you can't just keep a reference to the results? May 18 04:52:40 It's just an asynctask doing some html parsing using jsoup May 18 04:52:44 Hi, have an issue with media playing May 18 04:52:53 ok, and presumably it gets parsed into "results" May 18 04:52:53 ? May 18 04:52:58 where are the results kept? May 18 04:53:15 five arrays May 18 04:53:20 where are those? May 18 04:53:21 link as attached : http://stackoverflow.com/questions/10640063/android-mediaplayer-unable-to-play-media-file-from-local-storage May 18 04:53:31 within the AsyncTask static class May 18 04:53:34 Would appreciate if someone could point to the cause of the issue May 18 04:53:38 private static class May 18 04:54:22 ok, and did you keep a static reference to your instance of it, or is your task an instance member? May 18 04:54:39 I wouldn't keep the data inside the task, though. May 18 04:54:49 simply because the purpose of the task is to put something in the background, not to store data for you May 18 04:55:20 here's what you basically need to do: put the data somewhere after you get it, and devise a mechanism for checking whether the data has already been fetched May 18 04:56:11 how reliable are shared preferences? can the user easily alter them outside of the app? (such as purging app cache or manipulating files, etc)? May 18 04:56:22 b1n0ry: the user can clear them May 18 04:56:41 ok, so probably not a good place to store an installation id May 18 04:56:52 can someone tell me what the three horizontal lines in the status bar are called on honeycomb+? Want to remove them but don't know what to look for. May 18 04:57:49 b1n0ry: it's a perfectly fine place May 18 04:58:07 readme, unless the user clears it. May 18 04:58:18 then it looks like a new installation May 18 04:58:30 if i have a tabhost view with some buttons at the top but im in a tab itself and have setcontentview how do i get at the buttons in the tab screen? if u know what i mean :) May 18 04:58:32 b1n0ry: do you know of any software that creates an unerasable installation id? May 18 04:58:32 trentg: the menu button ? May 18 04:58:49 b1n0ry: adobe is pretty bad, they put that junk on your MBR. May 18 04:58:59 bankai_, yeah, that's what I've been googling for but nothing suggested works May 18 04:59:32 b1n0ry: my point is, you didn't have a strategy to tell apart "clear data" and "factory reset" to begin with, so how do you know whether a user is clearing the data, giving his phone to his little sister, or just doing a factory reset? May 18 04:59:46 readme, i'm just thinking that internal storage might be better. "By default, files saved to the internal storage are private to your application and other applications cannot access them (nor can the user)" May 18 04:59:59 readme, factory reset would be less likely/frequent to occur May 18 05:00:09 gaz`: maybe through the parent May 18 05:00:22 b1n0ry: sounds good May 18 05:00:59 i think using the google account could be a pretty good indicator, too May 18 05:01:08 readme: Ah, I see now. Thanks for the help May 18 05:01:12 I'm not sure about how to get that, though. May 18 05:01:26 yeah, and a device can be assigned multiple google accounts May 18 05:01:41 yeah I am one of those :) May 18 05:01:42 cant u get the IMEI? May 18 05:01:49 or the mac address or bluetooth id? May 18 05:02:00 it doesn't have to be your primary criteria. it can be a hint. May 18 05:03:06 don't be fooled by this: http://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID May 18 05:03:16 if you look into it you'll find it's very inconsistently implemented. May 18 05:03:30 yeah, my current implementation uses it but i'm changing it May 18 05:03:44 thus my questions ;) May 18 05:05:38 i need to lock to one device for another app b1n0ry what was ur overall thoughts? :) May 18 05:05:49 and did u think of imei/bluetooth/mac? May 18 05:06:05 i'm not a good one to ask. i am brand new to this myself. May 18 05:06:13 this has some interesting suggestions May 18 05:06:15 http://www.pocketmagic.net/?p=1662 May 18 05:06:45 http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id May 18 05:06:54 (hint: the first answer is wrong) May 18 05:08:49 funny, 'm already reading that second link May 18 05:09:33 http://android-developers.blogspot.com/2011/03/identifying-app-installations.html May 18 05:12:54 thanks Leeds , might be just what i'm looking for May 18 05:37:56 anyone had problems with LayoutBelow? it desotns eem to do anything May 18 05:38:25 show the code May 18 05:38:50 I've found it doesn't work if you try to layout_below something below something that is center_vertical'd May 18 05:39:07 http://pastebin.com/RiX1BDHF May 18 05:39:21 each time i paste my xml its open season on destroying me :) May 18 05:39:22 which element should I look at May 18 05:39:29 look for layout_below May 18 05:39:31 ViewFlipper? May 18 05:39:46 its hard to follow since the crownbutton is in a relative view at bottom May 18 05:39:48 the reason that won't work is because you've got it inside another RelativeLayout May 18 05:39:51 viewflipper yes May 18 05:40:02 oh? why wont that work May 18 05:40:08 I don't even see crownbutton May 18 05:40:09 where is it May 18 05:40:13 very bottom May 18 05:40:21 which one is better for android development -- linux or windows May 18 05:40:31 oh ur right May 18 05:40:34 its not even there May 18 05:40:35 wrtf May 18 05:41:05 gaz`: the layout_below is to be set on the children of a RelativeLayout and can be used to describe relationships between the children of that layout only May 18 05:41:16 ah May 18 05:41:22 see it works fine if i use padding May 18 05:41:26 but then it might mess up on other res May 18 05:41:32 you may want to put the layout_below on the enclosing RelativeLayout. May 18 05:41:53 hm, well maybe they do work across multiple RelativeLayouts May 18 05:41:59 if it *works* it doesn't mean it's a good idea, though. May 18 05:42:04 it's a completely broken one ;) May 18 05:42:05 doesnt seem to still May 18 05:42:13 grr May 18 05:42:20 oh, that's because it's inside anohter LinearLayout. May 18 05:42:22 my bad. May 18 05:42:56 -- if a and c are relative layouts, you *cannot* use layout_below to put z below b May 18 05:43:13 readme: which one is better for android development -- linux or windows May 18 05:43:16 relationships only between immediate children. May 18 05:43:19 prateekp: linux. May 18 05:43:23 ok May 18 05:43:29 Ubuntu Linux is optimal :) May 18 05:43:56 how should i download source May 18 05:44:02 s.android.com May 18 05:44:09 also we aren't a platform dev channel May 18 05:44:12 we discuss app dev here. May 18 05:44:45 which os is best to dev on? May 18 05:44:51 lol May 18 05:44:58 which distro of linux? May 18 05:45:00 I'm trying to show some extra diagnostic UI elements when the debuggable flag is set on my app (which it isn't for release builds), but somehow the diagnostic UI still shows in the release build... May 18 05:45:15 billdollar Ubuntu Linux is optimal :) May 18 05:45:27 though so, ty. May 18 05:45:29 Whichever one I happen to use is the best May 18 05:45:37 lol May 18 05:46:16 xfgh May 18 05:48:37 Leeds, the example function you found worked perfectly, thanks! May 18 05:48:41 noob question, but any idea as to why a file stored in internal storage is not readable from a media player May 18 05:48:59 because a file stored in internal storage is available only to the application that stored it there May 18 05:49:24 Well while storing openFileOutput("myfile.mp4" , Context.MODE_WORLD_READABLE); May 18 05:50:00 does that make it possible for the file to be accessible by a media player May 18 05:50:16 the same file plays when i store it in raw/assets May 18 05:50:36 don't know, i'm no pro. but i would think that most media players would default to the SD card for finding content May 18 05:50:53 Hey everyone, I'm having an issue and I need some insight. Can anyone spare a moment to assist? May 18 05:51:11 I actually try to read the file using : ParcelFileDescriptor.open(new File( URI.create("file:///data/data/com.mypackage/files/myfile.mp4")),ParcelFileDescriptor.MODE_READ_WRITE); May 18 05:51:11 mMediaPlayer.setDataSource(parcel.getFileDescriptor()); May 18 05:51:47 been scratching my hair out since long around this.. May 18 05:51:59 hm lol the UI was visible by default rather than gone *doh* May 18 05:52:56 baradasahu, you shoudn't hardcode the path to the data directory May 18 05:53:09 tried using getFilesDir() as well May 18 05:53:14 the same result May 18 05:54:39 baradasahu, it won't make any difference in terms of readability of the file, it was just a general style/portability suggestion May 18 05:55:21 Anyone know anything about the way hardware keyboards are handled by android? May 18 05:55:42 baradasahu, most likely you'll have to write to the external storage directory (and have the corresponding permission) if you want another app to read your files May 18 05:56:05 Actually i am doing both in the same app May 18 05:56:42 also I did try writing to external storage, but is there any way to control file permissions being set while writing to external storage May 18 05:56:57 baradasahu, what are you using ParcelFileDescriptor for? May 18 05:57:30 (if you're trying to write an mp4 file) May 18 05:58:19 Yeah it's an mp4 file… and I try to read it back in my player May 18 05:59:00 I use the ParcelFileDescriptor to have the mode of reading defined while opening the file May 18 05:59:19 a parcel is a serialization format, it's not a normal raw file May 18 05:59:27 I've got a ListView (ListFragment, really) acting strangely... after being populated, some elements appear to all have the same values. When I scroll them off screen and then return to them, they have their correct values. Do I have to refresh the list after adding a bunch of elements to it somehow? May 18 05:59:38 if you write your mp4 data into a parcel, it's not going to be a well-formed mp4 file May 18 06:00:00 JavaDog, notifyDataSetChanged() ? May 18 06:00:15 If I have a