**** BEGIN LOGGING AT Wed May 09 02:59:59 2012 May 09 03:00:02 Snwspeckle: "easy" is a relative term. I can say making a MultiThreaded TFTP server in C is easy, but for someone who has never seen pthreads or C could disagree May 09 03:01:07 true, true May 09 03:01:38 As obscure as that example is, I use that because I wrote one for school lol May 09 03:01:40 dammit, still not working.. May 09 03:03:51 So if I am declaring a custom style I create to be used in the Manifest, why is it not being used?.... May 09 03:07:20 canadiancow|work going to go get some "fill it mig non"? May 09 03:07:37 lol May 09 03:08:03 Snwspeckle because you're doing it wrong? May 09 03:08:16 ?... May 09 03:08:33 seems like the only explination May 09 03:09:10 I got a question then May 09 03:09:17 huh, apparently my phone's battery died and I didn't notice May 09 03:09:34 Say I want to use a refresh item, do I leave the android:icon blank and remove it since I want the default? May 09 03:09:51 huh? May 09 03:10:07 there is no default icon May 09 03:10:15 Basically lets say I want to add a refresh object to the actionbar but I want to use the one used in ICS May 09 03:10:23 do I remove android:icon? May 09 03:10:28 no May 09 03:10:46 then where do I get those resources?.. May 09 03:11:27 you do realize there is no "default" one? May 09 03:11:51 the default ICS images tho May 09 03:12:14 icons* May 09 03:12:19 you can reference those with android:icon="@android:drawable/ic_whatever" May 09 03:12:36 but thats only if you need custom ones May 09 03:12:44 should I remove that if I want the default? May 09 03:12:50 there is no default May 09 03:12:53 android:title="@string/action_label_refresh" android:icon="@drawable/ic_menu_refresh_holo_light" /> May 09 03:12:55 ? May 09 03:13:03 Thats where I am confused May 09 03:13:24 ic_menu_refresh_holo_light is an included icon May 09 03:13:30 there is NO default May 09 03:13:41 if you want to use a built in icon, you have to reference it May 09 03:13:44 but it needs to exist May 09 03:13:53 built in, as in, pre-installed? May 09 03:13:53 and there is not system refresh icon I don't think May 09 03:14:01 http://developer.android.com/reference/android/R.drawable.html May 09 03:14:28 ok May 09 03:14:29 thanks May 09 03:15:16 there is probably a listing of images somewhere May 09 03:15:23 but you could also just look in the platform dir May 09 03:15:38 http://androiddrawableexplorer.appspot.com/ May 09 03:15:54 got anything more recent? May 09 03:16:04 nope :/ May 09 03:16:31 looks like ic_menu_refresh existed in 2.2 May 09 03:16:40 but don't think it does in 4.0 May 09 03:17:37 Still can't get my custom style to be used... May 09 03:17:43 probably something really stupid I am messing up May 09 03:18:04 oh, it appears it does exist May 09 03:18:08 just not on the docs list May 09 03:18:38 so you could do android:icon="@android:drawable/ic_menu_refresh" May 09 03:19:08 mhm ok May 09 03:19:21 Well I added them, yet my style still isnt porting into my tabs.. May 09 03:19:24 ughh May 09 03:19:33 porting into your tabs? May 09 03:19:35 wtf does that mean May 09 03:20:04 My custom style is not being used, yet I have cross checked it with the example.. May 09 03:21:45 g00s why is the new androidplot not drawing my graph!?! May 09 03:22:37 i want to fetch android_id from c++. it appears that there are not sufficient privledges to read /data/data/com.android.providers.settings/databases/settings.db directly using sqlite3? Is there another way that doesn't involve me calling into Java via jnienv (or via swig directors)? May 09 03:22:45 Hey there I have an architectural question. I have an Android app that needs to download a Zip file first before doing anything. Once the Zipfile is loaded a Loader can go ahead and use a file in the Zipfile to load the data for the first Fragment in the Activity. I am right now stuck on how I can either trigger the loader or tell the loader to wait until the zipfile has been downloaded. May 09 03:22:46 I am initiating the Zip download in the Activity and the Loader in the Fragment. suggestions ? May 09 03:25:13 Hey any awesome devs want to help me with this: http://stackoverflow.com/questions/10467175/drawing-non-rectangular-shapes-on-android May 09 03:25:23 I can seem to figure out the best way to do this May 09 03:25:55 usually you ask the question, then follow it up with a URL May 09 03:26:20 bankai_ yeah I already put all the details in the stackover flow question May 09 03:26:31 and it is a graphical kinda question May 09 03:26:53 so you're making people go to a URL because you're too lazy to explain even the basics of it ? May 09 03:27:27 so you're typing all of this out instead of moving your mouse pointer to a hyperlink? May 09 03:27:41 I'm doing JNI development and when I try and use GetDirectBufferAddress it always comes back null. Verified input byte buffer was allocated directly. May 09 03:27:47 i'm in irssi, there's no "hyperlink" May 09 03:27:53 bankai_ an image is worth a thousand words May 09 03:27:58 oh sorry, you'll have to drag copy and paste May 09 03:28:15 Anyone have any idea about styling Tabs with Pagers?... May 09 03:29:57 nm, I r newb May 09 03:34:23 greetings May 09 03:34:56 t0mless, regarding the EditText grabbing the focus as soon as the fragment loads, apparently i have to use a hack to fix this... May 09 03:35:04 which makes absolutely no sense to me May 09 03:35:21 you create a dummy layout at the top that steals focus and has no content May 09 03:35:36 and onResume() you insure that this is taken care of May 09 03:36:31 also, has anyone ever made a generic database Adapter class that allows grabbing data from any database? (possibly with a couple of necessary parameters in the constructor?) May 09 03:36:50 would be pretty simple May 09 03:36:54 i'm growing very tired of creating adapter classes for every table in my DB...and controllers too May 09 03:36:59 but as far as I know, no May 09 03:37:15 why are you creating adapter classes for every table? May 09 03:37:37 i was thinking of passing in the table columns as an array, as well as what table is being "adapter'd" at the time May 09 03:37:49 t0mless, basically because i've been learning how to do it May 09 03:38:07 now i am feeling ready to make a generic, reusable adapter for all my tables May 09 03:38:41 Does anyone know of a good example of a MultiTable Content Provider ? May 09 03:38:42 same with the controller classes i've made, which handle creating rows for the table, finding rows, getting the whole table, etc. May 09 03:41:27 well, i need to sleep. i'll just come back tomorrow May 09 03:41:35 night all May 09 03:56:26 Question/Poll about Fragments. Do you put your fragments directly into your layout.xml files or do you put a Framelayout into your layout.xml and replace it with the fragment dynamically? Or are you doing something completely different? May 09 03:57:13 I use May 09 03:59:00 can't .replace() a May 09 04:00:50 Hey Jake I take that as a statement? I started out with fragment but I feel like i have reached a point where I need more control over when I load the fragment into the activity, and to my knowledge that's only possible by replacing a FrameLayout. Right? Wrong? May 09 04:04:16 Can to May 09 04:05:06 pretty sure i've used ft.replace() with just May 09 04:05:28 * pfn scratches his head May 09 04:05:33 damnit, why is my socket now blocking... May 09 04:05:42 * t0mless blocks pfn May 09 04:05:45 t0mless i dont think so May 09 04:05:52 particularly when it should be closed by the remote side May 09 04:07:08 hrm May 09 04:07:15 lemme go find the project I think i'm rembering May 09 04:10:46 I've totally used .replace() on May 09 04:10:51 no May 09 04:10:53 you haven't May 09 04:11:01 :0 May 09 04:11:04 :) * May 09 04:11:32 Grunewald: correct May 09 04:12:03 JakeWharton: thanks for the confirmation May 09 04:12:37 im new to services and runnable. I dont understand why my updateTimeTask only goes through only once in the handleintent and then stops. It should continue! http://pastebin.com/knSe10Nt May 09 04:14:06 cooldman224 where is your loop that would make it repeat _ May 09 04:14:08 ? May 09 04:15:03 cooldman224 ah I see what you want to do there May 09 04:15:13 Grunewald, inside my runnable. May 09 04:17:46 cooldman224 I would have to dig deep into that code don#t have time at the moment if you can't get an answer here try Stackoverflow May 09 04:17:51 hrm... May 09 04:17:56 IntelliJ is not responding May 09 04:18:01 that's a first May 09 04:18:08 Grunewald, i dont understand the difference between onStartCommand and onHandleIntent May 09 04:19:26 That's not really what IntentService was designed to do May 09 04:20:07 onHandleIntent runs in a separate thread May 09 04:20:10 onStartCommand doesn't May 09 04:20:11 IntentService is meant to be started by an intent to do a specific task on the background and then stop when it's done May 09 04:20:12 that's the difference May 09 04:20:32 and it automatically spawns a workerthread and automatically queues the intents May 09 04:20:41 and automatically stops when it's out of work to do May 09 04:21:30 "IntentService is meant to be started by an intent to do a specific task on the background and then stop when it's done" But am I not doing that? May 09 04:21:38 no May 09 04:21:44 I know right now it shouldnt stop but im just doing a simple example May 09 04:22:07 you're starting it and then posting to yet another thread and posting it again and again May 09 04:22:50 so once it posts that runnable, the service is done and probably shutsdown May 09 04:22:58 ahhh ok May 09 04:23:07 makes htc sense now May 09 04:23:19 I need to use a service May 09 04:23:19 did you really just throw out an htc pun? May 09 04:23:30 no May 09 04:24:19 ....yes May 09 04:26:15 NO SOUP FOR YOU May 09 04:26:22 i think my datetime thing here is going to go into day 4 May 09 04:26:28 g00s the androidplot javadoc is terribad May 09 04:26:37 t0mless: hehe, i remember that May 09 04:26:46 their wiki was a bit better May 09 04:26:52 but it went kaboom as well May 09 04:26:55 that project was going full steam ahead, and then the dude that worked onit abandoned it to open source May 09 04:27:11 and it seems to have gone tits up May 09 04:27:30 Indeed May 09 04:28:24 so when you get a ticket for a movie, are you allowed to stay and watch it again ? May 09 04:28:29 So in order for me to set the size of my labels, I have to use these silly size metrics? May 09 04:28:32 i think i might watch Prometheus 4 or 5 times May 09 04:28:54 heh May 09 04:28:58 Technically... no May 09 04:29:05 ok, thats all i needed May 09 04:29:13 g00s: they send cleaners in May 09 04:29:26 steal the cleaners uniform May 09 04:29:29 That's when you go to the bathroom May 09 04:29:40 i'll just wait for the movie to come out on itunes then May 09 04:29:46 fuck it May 09 04:30:02 though I think most theaters have the bathrooms on the other side of the ticket checker dude May 09 04:30:05 Jak_o_Shadows: that's when you use garrote May 09 04:47:29 i have this strange problem of eclipse injecting '1' s in my code May 09 04:47:49 like all of a sudden, there will just be something like while (…) { 1 May 09 04:47:56 wtf i can't even May 09 04:48:25 thats a feature May 09 04:49:06 Hey is there any difference between using dp and using dip as unit of measure ? May 09 04:49:20 eclipse has numerous high-quality features like that. May 09 04:49:23 or are they just aliases May 09 04:52:04 they are the same May 09 04:52:35 Thanks t0mless that's what I thought May 09 04:59:13 g00s: i would make sure it's not a problem with your keyboard. May 09 04:59:29 * readme has had similar problems, especially on laptops May 09 05:00:26 05-09 04:51:32.736: W/dalvikvm(391): Unable to resolve superclass of Lro/android/LocationMap; (18), LocationMap is just the tutorial from android for google maps api, and its superclass is MapACtivity May 09 05:00:40 Android and Google APIs version 8 May 09 05:01:52 i suppose i have to add maps.jar to the libs/ folder not only in the build path May 09 05:02:04 indeed May 09 05:02:08 Though May 09 05:02:28 I thought MapActivity was already in the google APIS images May 09 05:04:16 but i've never really used MapActivity May 09 05:04:20 canadiancow prolly knows May 09 05:04:24 he loves map activity May 09 05:05:08 g00s I actually had a laptop keyboard go bad to where everytime I hit d or e keys, it put in a 3 as well May 09 05:05:38 fortunately you can just replace the keyboard :) May 09 05:05:47 once, I took a mac in for service in the pre apple store days. May 09 05:05:57 I was missing an f1 key, I didn't ask them to replace the keyboard. May 09 05:06:20 they took my nice clean keyboard and replaced it with one that was riddled with human hair May 09 05:06:34 but I didn't realize it until I got home, then I cleaned all the hair out and stuff May 09 05:06:47 shortly later, it was just stolen :) May 09 05:07:13 lol May 09 05:07:16 good story May 09 05:07:23 the best part is it had gentoo on it May 09 05:07:28 so whoever stole it got hosed. May 09 05:07:43 i'll be buying a new one soon... after ptsd. May 09 05:07:54 I need a new laptop May 09 05:08:06 i need a laptop, period May 09 05:08:43 its sad, my desktop would probably sell for $50 bucks tops. May 09 05:09:27 * readme bedtime May 09 05:11:51 night May 09 05:18:48 readme: do you remember that old powerbook scam :) May 09 05:18:58 the story, that is May 09 05:19:11 p-p-p-powerbook May 09 05:19:33 Haha May 09 05:19:36 I remember that May 09 05:19:48 that was classic May 09 05:19:51 Agreed May 09 05:20:12 Having to manually set the size of these label widgets is fucking stupid May 09 05:20:25 it should automatically adjust to the text that is in it May 09 05:21:05 t0mless: what are you fighting with ? May 09 05:21:13 androidplot May 09 05:21:21 ah IC May 09 05:24:42 I'm managing to reliably... crash the emulator, and there's not much happening in logcat. Anything I should do? May 09 05:25:06 crash the emulator? May 09 05:25:11 or have your app crash? May 09 05:25:25 vadi2 try it on a real android device May 09 05:25:26 crash the emulator. May 09 05:25:32 o.O May 09 05:25:38 Grunewald: doesn't happen on a real one, just wondering if I should report it May 09 05:25:55 what type of crash? May 09 05:26:03 and on what os? May 09 05:26:05 maybe if you can make the case simple and reproduceable May 09 05:26:07 The emulator is just closing May 09 05:26:30 suppose I have a relative layout with a top menu aligned to the top, and a bottom menu aligned to the bottom. how could i make a listview then fill all the space inbetween? May 09 05:26:31 ubuntu 12, w/ gpu on, seems to be crashing when I open an edittext with a link in it that should get auto-linkified May 09 05:26:36 nvidia drivers May 09 05:27:31 try it on a new avd May 09 05:27:53 not sure if emulator errors are logged somewhere May 09 05:28:06 alright May 09 05:28:47 what's happening btw: http://dl.dropbox.com/u/84880/out.ogv May 09 05:29:14 is there an 'intellij for idiots' guide to setting something passable up for android? i'm so used to eclipse, the last time i looked at it, it was confused as hell May 09 05:30:01 It's pretty simple once you figure it out May 09 05:30:23 t0mless: you use it too ? May 09 05:30:26 pretty much just have to tell it where sdk is, and create android sdk elements May 09 05:30:27 yea May 09 05:30:30 vadi2 I would try to narrow it down, if you can show that it crashes when you have gpu on and off then the gpu isn't the problem, try it on a different os aso. I would contact anyone who works on the tools project http://tools.android.com/ Tor Norbye for example https://plus.google.com/116539451797396019960/about May 09 05:30:48 g00s I can help ya set it up if you want May 09 05:31:03 Grunewald: Alright, I'll try. Don't have another OS though, but if the new AVD does it, I'll see about gpu on/off May 09 05:31:17 t0mless: ok, let me take another stab at it :) thanks May 09 05:33:05 vadi2 there is also a google group for the tools project https://groups.google.com/forum/?fromgroups#!forum/adt-dev May 09 05:33:10 hi all May 09 05:33:17 Grunewald: thanks for the links :) May 09 05:37:35 woot, shaved at least 40% off the loading speed of my app May 09 05:37:55 * pragma- hugs Debug.startMethodTracing() and System.currentTimeMillis() May 09 05:41:28 pragma-: what'd you do? May 09 05:41:51 vadi2: I identified some code paths that were poorly written May 09 05:41:59 ah May 09 05:43:16 Grunewald: happens on a new AVD but not with gpu off. May 09 05:43:21 There was one loop that was checking a value from sharedprefs each iteration instead of caching the value, for one. May 09 05:44:11 At over a thousand iterations, the msecs add up. May 09 05:45:05 g00s I almost feel like it is going to be better to just put my own textviews inside a relative layout with this XYPlot May 09 05:45:13 this LabelWidgets are fucking stupid May 09 05:45:22 these* May 09 05:45:34 vadi2 you might be on to something probably worth posting in the adt groups May 09 05:45:42 alright, posting. May 09 05:53:13 wonder if it's possible to write share intent handlers? May 09 05:53:35 you mean like a ShareActionProvider ? May 09 05:55:37 no clue, I was just annoyed by how useless all the options are... ;) thanks for the pointer, will look into it when I get to work May 09 05:58:44 t0mless: i'm thinking about just writing my own graphing view :( May 09 05:59:40 i can' express how unenthusiastic i am about that May 09 05:59:44 *cant May 09 05:59:56 Ha May 09 06:00:01 open source it May 09 06:00:04 so I can use it May 09 06:02:35 gpl it so he can't May 09 06:04:30 hehe May 09 06:05:10 I have a contacts URI how can i get date of birth from it. Where can i find more about tables? May 09 06:05:39 hm, a friend of mine who worked at some sort of social media company wants me to write an article on what i think about android; problem is i don't like influencing people with my opinions really. thats why i left seminary; i don't want to tell people what to believe May 09 06:08:17 G00s can u plz hlp me. I will nt hv prob with ur opinion :-) May 09 06:08:48 g00s, but people live to be influenced May 09 06:09:01 c2tarun: i haven't used the contacts provider. its complicated. i would probably wind up looking through the code :( May 09 06:10:45 I di use contacts providers... didn't like it May 09 06:10:50 did* May 09 06:11:20 but imo the documentation was sufficient May 09 06:11:31 for getting started at least May 09 06:16:29 man, the Visual Studio 11 RC is looking very nice May 09 06:17:10 basically, MS has a 'Director of User Experience, Tools Division' May 09 06:17:20 thats amazing, i think it shows May 09 06:20:48 shit, twenty_four_hour_time_format is not a public string resource May 09 06:28:00 hmm, haven't seen that VS grows abit too fast for me May 09 06:30:00 What does the publishing page mean by '180w x 120h' for dimensions? It doesn't seem to be pixels. Is that just the desired ratio? May 09 06:30:13 <`z> o.o May 09 06:34:37 Can someone explain to me whats going on in the ArrayListFragment class of this example http://developer.android.com/reference/android/support/v4/view/ViewPager.html May 09 06:34:40 specifically the newInstance() method May 09 06:36:10 i don't see a newInstance() method on that page May 09 06:42:06 CPU optimizations -- now runs faster and uses less battery! May 09 06:42:06 History loads at least 40% faster (depending on IO speeds) May 09 06:42:07 Don't create uid string and name lower-casing until needed May 09 06:42:07 Get uid string directly from StringPool when possible to avoid valueOf() calls May 09 06:42:10 Cache lowercased names in StringPool to avoid toLowerCase() calls May 09 06:42:12 Replace instances of toLowerCase() in tight loops with StringPool.getLowerCase() May 09 06:42:15 is there any way to block calls on android 4 now that google has removed permission.modify-phone-state ? May 09 06:42:16 Replace pool.size() with StringPool.size field May 09 06:42:18 StringPool now checks pool size only on additions May 09 06:42:21 Setting max log entries now takes effect immediately May 09 06:42:23 Cache max log entries value in Settings instead of always retrieving from prefs May 09 06:42:26 oh shit May 09 06:42:41 oops May 09 06:45:14 the play publishing page is telling me "This application is available to over 0 devices.". Is that normal? May 09 06:46:19 did you click save and it saved ok? May 09 06:46:25 Yeah. May 09 06:46:52 doesnt sound normal May 09 06:47:50 I saw that once, think it was just a hiccup in google's processing. May 09 06:50:13 alright May 09 06:55:29 Does anyone have any suggestions about handling exceptions/errors in an AIDL stub? May 09 07:09:45 when publishing an app, how can i filter it to be in my country only? May 09 07:10:18 because under publishing options I set it to South Africa, yet other countries can still see it... May 09 07:10:20 :/ May 09 07:10:28 lol May 09 07:14:59 i wonder, is it possible to get a view that has a graphics palette, ie. 256 colors. instead of truecolor ? May 09 07:18:28 Need help in getting date of birth frm contacts can anyone plz help :-( May 09 07:19:08 G00s sorry i got disconnected that time. May 09 07:20:06 I wam writing a b'day remindr in which usr have to choose contact. Is thr anyothr way of reading dob?? May 09 07:24:52 c2tarun, so what are you stuck at? May 09 07:25:05 hrm... what's the attribute to control the z-index of views? May 09 07:25:16 does anyone know why my startForeground isnt working? http://pastebin.com/3AvR5aWG May 09 07:25:23 I cant find a way to query out dob frm url May 09 07:28:27 Tank-man u thr? May 09 07:30:38 i havent worked with stuff like that, no idea, sorry May 09 07:43:46 hello, I found this code and I'm trying to get to upload a photo to php upload form. http://pastebin.com/QC7UvFYf May 09 07:43:59 can someone help please May 09 07:54:17 cyfi: there is way more there than you need to be asking us to debug May 09 07:54:21 pinpoint the problem May 09 07:54:30 use logcat and trace it down May 09 07:54:46 no one is going to help you otherwise May 09 08:01:06 c2tarun: have you checked http://stackoverflow.com/questions/8579883/get-birthday-for-each-contact-in-android-application ? May 09 08:01:58 root66 the problem is I don't know how to handle form inputs, the file gets sent to the server, just don't know how to send it right May 09 08:02:25 you mean you don't know how to structure the http post? May 09 08:02:35 yeah May 09 08:02:45 Content-Type: whatever/whatever May 09 08:03:03 Content-Length: data_size May 09 08:03:07 blank line May 09 08:03:09 data May 09 08:03:59 well yeah, I have all that.. May 09 08:04:16 see I'm trying to add the file into the upload form May 09 08:05:33 there is no content length in your header May 09 08:05:37 I am looking right at it May 09 08:05:48 why not just use apache HttpClient? May 09 08:05:51 oh, hrm May 09 08:05:52 i'm somewhat of an android newbie having inherited a horrible application. the thing is, we have a background service doing work and notifying the ui which in turn updates progress bars etc. Originally, this was a list that was updated using notifyDataSetChanged(). However, the service ran in the ui thread and everything was horrible. I managed to let the service run in the background, however now I need to fetch an Activ May 09 08:06:00 isn't it part of the included libs now? May 09 08:06:05 I don't know how to import it lol.. May 09 08:06:14 I was trying earlier.. May 09 08:06:46 http://developer.android.com/reference/org/apache/http/client/package-summary.html May 09 08:06:51 org.apache.http.client May 09 08:06:52 you cannot send a multipart using HttpClient May 09 08:06:57 beware May 09 08:07:09 Ivru: fair enough May 09 08:07:12 he is just uploading a png though May 09 08:07:40 regardless, you need content length May 09 08:08:35 I am not auditing your network code, but there is nothing wrong with doing it this way as long as your header is right May 09 08:08:38 which in this case it is not May 09 08:11:48 well I get HTTP/1.1 200 OK May 09 08:12:13 with or without lenght May 09 08:12:38 then server returns 501 Method Not Implemented May 09 08:15:03 the php code http://pastebin.com/UmA8bt2u May 09 08:20:14 if I decompress a layout repeatedly adding it to a linear layout, is there some way I can identify them / mark them so I can tell which is which? May 09 08:21:08 what is the correct way to display numeric information about seekbar change? For example when the user sets the seekbar to the middle I want to display the information 50. Or maybe there is something better to use than seekbar? I am using it to set a threshold for some action May 09 08:23:41 I think we all use seekbars for this May 09 08:24:10 String.valueOf(seekBar.getProgress()) May 09 08:24:22 No idea about what you mean by correct. When a seekbar is being adjusted, the listener fires, at start, at drag, and at end. So you just change some textfield from these events May 09 08:24:48 Precisely what he said May 09 08:26:02 alankila: t0mless, I mean that using toast to display the value would have to be delayed somehow, so it would show only the last value and not the whole range May 09 08:26:14 so you use the end drag event May 09 08:26:31 alankila: how to do it? didn't see anything like that in the docu May 09 08:26:54 huh? May 09 08:27:11 You can have a textview that is updated as you drag if you want May 09 08:27:33 not sure what you're looking for May 09 08:28:16 public void onStopTrackingTouch(SeekBar arg0) { May 09 08:28:19 try looking for that May 09 08:28:23 t0mless: no, I want to display the value after the user takes the finger off the seekbar May 09 08:28:28 from OnSeekBarChangeListener May 09 08:29:07 alankila: ok, thanks May 09 08:30:35 in a listview can you add a "tag" / id or something when you add a child so you can identify the entry? May 09 08:34:34 use yout own 'entries' and custom adapters than you may get not an entry but an object of type you put in the list. (every view have setTag/getTag methods, btw) May 09 08:37:42 xa0c: I think that's what need get/setTag May 09 08:37:50 * I need May 09 08:37:53 thanks May 09 08:50:09 Can some body doing app for me? I want doing something like online TVs. May 09 08:54:20 one thing I cannot seem to work out, is if we used a SQLiteOpenHelper to create and populate a database, how do we delete it? May 09 08:54:47 basically I want a "reset all data" feature in my app May 09 08:55:09 so deleting the whole db seems easiest May 09 09:08:35 trinode: why "drop table" sql request doesnt fit your needs? May 09 09:11:25 in any case, when you create db it should be located at /data/data/your.app/youdbname.db, you're always may use simple file delete May 09 09:11:47 It should be, yes May 09 09:11:48 Might not be May 09 09:12:19 hey guys May 09 09:12:36 I'm pretty sure that dropping the table is better way for 'reset'. May 09 09:13:46 yep May 09 09:17:23 can i drop something into an sqlite database in an UncaughtExceptionHandler ? May 09 09:17:49 or rather - are there any cases where this wouldn't be possible? May 09 09:18:18 at least, if it is some db-related exception :) May 09 09:18:26 heh May 09 09:20:52 so I wrote some thing that when it crashes it'll dump the exception to a database May 09 09:23:50 why not send it to the cloud? May 09 09:24:00 that's the next part May 09 09:24:03 db first, cloud later May 09 09:24:43 * Ge0rG is using com.nullwire.trace as a drop-in cloud uploader for uncaught exceptions May 09 09:24:57 all you need is a box running php somewhere May 09 09:25:47 What is the recommended way of stopping an Android thread? May 09 09:28:11 Ge0rG: have a look at ACRA, all you need is a G form :) May 09 09:30:34 SimonVT: I didn't use sqlite in the android yet, in what cases db location differs from default? I read that, it uses path according to Context, so I think it's placed when your's app is placed. (I do not know about 'installing app on sd card', btw, too silly yet). Just checked: looks like this path could be obtained by .getFilesDir() method. May 09 09:33:21 how can i create an empty file on the sdcard? May 09 09:33:51 hoangtran: I prefer self-hosting, kthx May 09 09:35:31 jeppy: check it: Environment.getExternalStorageDirectory() May 09 09:35:58 yes but I want to create an empty file May 09 09:35:59 yeah, maybe I'm old (lazy), I like putting it somewhere other than my box, until my boss create a task to implement that ;) May 09 09:36:22 File.createNewFile() doesn't work May 09 09:45:10 it's funny how you can start wi-fi while on aero mode May 09 09:46:02 (offline mode) Just happened now on my galaxy May 09 09:46:12 Criztian: it is funny how you can disable airplane mode while in airplane mode.... May 09 09:46:25 no, they coexisted May 09 09:47:09 my phone was in offline mode and I turned on wi-fi and both icons were there May 09 09:47:32 and I could update stuff as if online May 09 09:48:14 can somebody tell me why this: tvThreshold.setText(R.string.tvThresholdString + " " + progress); converts my string to int? progress is an int May 09 09:48:17 Criztian: you can manually enable wifi in airplane mode, yes. this is a feature though May 09 09:48:48 Ge0rG, so wi-fi is not the problem on airplanes? May 09 09:48:49 simh: because R.string.tvThresholdString is an int as well May 09 09:49:13 Criztian: it depends on whom you ask. some planes actually offer wifi internet access in-flight May 09 09:49:31 Hello everyone! May 09 09:49:33 oh ok, that's new to me May 09 09:49:33 Criztian: tx power on wifi is limited to 100mW, GSM phones used to transmit at up to 4W May 09 09:49:40 jeppy: have you set WRITE_EXTERNAL_STORAGE permission? May 09 09:49:41 Ge0rG: so... what is the proper way to setText in textview? May 09 09:50:02 simh: getText(R.string.tvThresholdString) + " " + progress May 09 09:50:04 Ge0rG: now I got you May 09 09:50:38 simh: or even better: make your string contain "progress: %d", then you can getText(R.string.tvThresholdString, progress) and it will be put into place automagically May 09 09:51:27 Ge0rG: getText()? May 09 09:51:56 Ge0rG: the funny thing is that people think that wi-fi is worse for your health than cell phones May 09 09:55:18 simh: yes. setText(getText). May 09 09:55:27 simh: Context.getText to be precise May 09 09:55:47 Criztian: the funny thing is that people think wifi will crash your airplane. May 09 09:56:06 Ge0rG: thanks May 09 09:56:07 lol May 09 09:56:11 let's leave 'the funny thing is that people think' only May 09 09:59:17 I use my neighbour's internet access (with consent XD) and wi-fi's power is so low that when they get out of their home my connection stops until they move away XD May 09 09:59:41 When I display some images I downloaded in my app, I get weird dithering artifacts. How can I prevent that? May 09 10:00:09 The images are jpgs, loaded to sd and they don't have these artifacts in the downloaded file, only when I display them in the GUI. May 09 10:00:11 Why could that be? May 09 10:02:51 hmm, so there's no way to get arround passing context references around May 09 10:02:59 even if i just want to access the application context? May 09 10:03:17 i just need access to a raw resource in a deeply nested function.. May 09 10:03:27 and i would hate to drag all the contexts around May 09 10:20:50 so if i wanted to draft a few guys on to work on an app... May 09 10:20:56 split the $ May 09 10:21:24 would this be the place to find some qualified individuals May 09 10:29:54 parco: why not to use rentacoder/vworker? "Please don't advertise websites, jobs, or contracts" © topic May 09 10:30:24 was looking to put together more of a team, more personal May 09 10:30:41 this is not something that will be able to pay out any time soon May 09 10:31:03 if i wasnt a damn ee major id know some people May 09 10:59:43 Is there a way to prevent dithering? May 09 11:03:09 if i want to test something on android that requires a context how do i do that? May 09 11:03:35 new Activity() May 09 11:07:46 should I be using AndroidTestCase? May 09 11:10:10 can I even test library projects? May 09 11:11:51 I don't know, and yes May 09 11:11:53 respectively May 09 11:15:23 Hello, I am trying to pass a bitmap between two activities. I have put the bitmap inside the intent using putExtra("bitmap", mBitmap); but how do I get it out on the other side ? May 09 11:15:58 Bitmap bmp = (Bitmap)getIntent().getParcelableExtra("bitmap"); May 09 11:16:10 tyvm May 09 11:16:41 * g00s is a little behing, and just finished watching Predators. it kinda sucked :( May 09 11:16:46 *behind May 09 11:19:23 i think whoever wrote DateFormat, SimpleDateFormat … should be banned from programming forever May 09 11:20:23 * Chainfire mutters something similar about the person who decided to make AsyncTask serial by default in Android 4.0 May 09 11:20:48 or the person who decided secondary external storage should be R/O May 09 11:20:54 * Chainfire could go on ... May 09 11:21:30 hey there, got a question. (^^) is there a possibility to remember the contact picked in com.whatsapp.ContactPicker? May 09 11:27:10 Chainfire: the same thing should be done to the person who wrote AsyncTask in the first place :P May 09 11:27:46 * g00s knows who that is ... May 09 11:27:53 * g00s whistles May 09 11:29:47 hrnt> true! May 09 11:29:57 hrnt> but it was "fixed" before I jumped into Android ;) May 09 11:30:26 I imagine for Android 5.0, they will just refrain from running AsyncTasks at all May 09 11:30:34 too make coding easier and compatibility less, and all that May 09 11:31:51 Has there been any information about what may or may not be in the next Androi version? May 09 11:32:13 Or indeed the next Android version ;P May 09 11:32:39 looking at the source code for DateFormat, it has a getter and setter for a numberFormat … and its not even fucking used. May 09 11:33:23 looking at date, time, and calendar functions in any library is a surefire way to have a bad time. May 09 11:33:25 <[deXter]> Knossos, a "d". May 09 11:34:14 oh man.. i followed this: http://stackoverflow.com/questions/2642777/trusting-all-certificates-using-httpclient-over-https/6378872#6378872 May 09 11:34:28 to be able to trust a self signed certificate on our test machine.. May 09 11:34:48 interesting: it works great on an android 3.x device, but fails on our 2.x devices May 09 11:35:11 on the latter it fails with: class javax.net.ssl.SSLException: Not trusted server certificate May 09 11:35:32 I have a question, and google isn't helping.. so I figured I'd come here. If you're using a DB in your app and you're writing to it, and the user recieves a phone call and you get interrupted.. what happens? As you've probably guessed I'm pretty new to android development. :) May 09 11:35:36 the bouncy castles provider seems to be the same version on both android versions.. May 09 11:36:33 davasaurous: android is multiprocessing system. Your application is not interrupted. May 09 11:36:41 davasaurous: does the DB have an automated rollback? May 09 11:36:58 alankila: the system might kill the process in a low mem situation May 09 11:37:09 davasaurous: what DB are you using? May 09 11:38:22 tapas it's a theoretical question, assuming rollback it rolls back then, and is all good? alankila so the onPause events are purely telling you to stop anything that might mess up the user experience (eg. music during phone call), not telling you you're dead and clean yourself up? May 09 11:38:28 i have no idea how you're supposed to test a library project.. just created a test project for the library, added the library as a dependancy and it keeps whining that it can't find the instrumentation target package.. any ideas? May 09 11:39:22 "instrumentation target package"? May 09 11:40:05 Test run failed: Unable to find instrumentation target package: com.mylibrary.package May 09 11:40:32 wtf lol May 09 11:41:03 librar project b4...just make an android project, check "is project" then include as android project May 09 11:41:08 so basically May 09 11:41:11 * Jug6ernaut has no idea May 09 11:41:57 yeah, I did that May 09 11:42:19 ah May 09 11:42:42 it worked, I had to change the manifest package to the package of my library project I want to test May 09 11:42:48 Chainfire: how is your camera app doing ? May 09 11:42:59 So boreeddd May 09 11:43:02 g00s> pretty well May 09 11:43:06 :) May 09 11:43:12 paid for my 5D Mark III, hehe May 09 11:43:23 :D May 09 11:44:36 you got money dude :/ May 09 11:44:50 What lenses do you have for your DSLR? May 09 11:45:38 How can I cancel a service if the activity that started it crashes? May 09 11:46:19 code1> if it truly crashes, the entire process is killed, including the service May 09 11:46:28 so if the service restarts depends on the flags you use at startup May 09 11:46:34 (if im not mistaken, I dont use services much) May 09 11:47:09 Chainfire: seems my service is still running! :/ May 09 11:47:09 is it normal to have to change the visibility of some member methods so that testing will work? May 09 11:47:37 code1: are you sure it wasn't restarted? May 09 11:48:23 hrnt: I'll check... May 09 11:48:56 Hey, i'm getting this error when trying to export signed apk: No .class files were found in project "facebook", so none of the classfile based checks could be run. Does the project need to be built first? --- google didn't help much, anyone seen this before? May 09 11:50:48 code1> reread http://developer.android.com/reference/android/app/Service.html start-to-finish. Service restart behavior depends on the way the service is started, and the return value of onStartCommand (depending on android version, on older versions I believe it depends on onStart), and whether or not the service runs in its own process May 09 11:51:12 its tricky to get right, and behavior will differ between Android versions. Google for a compat solution covering all API levels you wish to support. May 09 11:51:24 (alternatively: make sure your software doesn't crash ;)) May 09 11:52:48 hrnt, Chainfire: thanks, it is being restarted - I'll have a read and see if I can fix it. May 09 11:53:57 Chainfire: yes making sure it doesn't crash is the best solution! ;) (though I need to plan for the unexpected!) May 09 11:57:56 I need to show an activity inside another activity. Currently I do it using a tabhost with a tab widget with 0dip height and it looks pretty working fine :) But it seems to be not the best solution available. Can someone tell me how exactly one should do this? May 09 11:58:20 Use fragments May 09 12:00:07 Is there any scientific way to determine how much battery my App is using up? May 09 12:00:47 Knossos> no May 09 12:00:52 Knossos: the answer is always "too much" :) May 09 12:01:01 heh May 09 12:01:08 and the built in Android facilities that display battery usage are naieve and unreliable May 09 12:01:26 various things you read when you search for this will point you at those... dont trust 'em May 09 12:01:51 I don't trust any normal readouts. I heard that a lot of devices actually display falsely that the battery is full for a while after being charged fully. May 09 12:02:13 To reduce the number of calls to tech support complaining of diminishing battery life. May 09 12:03:17 its not that they show their full May 09 12:03:20 they're May 09 12:03:24 well.. it is May 09 12:03:30 I'd guess all of them. It's not a good idea to keep the battery fully charged, so once it hits 100%, it'll let it drop down to 90% before charging again May 09 12:03:52 90% may differ from device to device May 09 12:03:57 yeah, basically what i was about to say. :x May 09 12:04:15 If user unplugs charger and sees it's at 92%, they'll complain without knowing why it's at 92% May 09 12:04:22 why is it not good to keep it fully charged? May 09 12:04:32 Yeah, that was it SimonVT. May 09 12:04:44 code1: Keeping it plugged in destroys battery life May 09 12:04:57 Wears down the abttery faster May 09 12:05:13 I heard that's a myth from previous battery technology that no longer applies. May 09 12:05:16 If storing a battery I believe the recommended level is 40% May 09 12:05:27 Lithium battery that is May 09 12:08:07 SimonVT: why would unplugging cause it to drop to 92%? May 09 12:08:15 for example. May 09 12:08:39 sup May 09 12:08:42 When you plug in your charger it'll charge to 100% May 09 12:08:50 It'll stop charging and let the battery discharge a bit May 09 12:09:06 Once it hits 90%, or whatever level specified, it'll charge up to 100% again May 09 12:09:27 having a problem with overridePendingTransition, I want my splash screen to animate out over the top of the next activity, but setting 0 for the enterAnim stops the animations from working all together May 09 12:09:31 The phone will still tell you it's fully charged May 09 12:09:57 SimonVT: I see. May 09 12:10:30 I've tried putting it in the onPause of my splash activity, and in the onCreate of my main activity, but same problem May 09 12:10:46 i've also tried using a 'hold' animation instead of 0, but same problem May 09 12:11:04 Imagine the amount of support calls if user unplugged their charger after leaving it the night over, and battery meter read 90% May 09 12:12:24 So when it is unplugged it will still read as 100% even though it might be at 91%? May 09 12:12:32 Yes May 09 12:12:59 So at what point does it display at it's true value? May 09 12:13:19 After some time May 09 12:13:27 Can't drop too fast or user gets suspicious May 09 12:13:28 there's hardly such a thing May 09 12:13:40 even if you look at the % the battery driver gives you May 09 12:13:42 that's hardly reliable May 09 12:14:04 There's also that May 09 12:14:14 round it to the nearest 10%, maybe it's "somewhat" reliable May 09 12:15:03 If you ask the system does it give you the displayed value or the "truer" value? May 09 12:15:16 from an app i mean May 09 12:17:45 when using an sql database does is make sense to cache a set of +- 40 rows in the object ( hashmap ) if they are constant and often retrieved? or will caching be done anyway somewhere in the sql code and will this have no effect? May 09 12:18:26 Hi, I'm trying to open socket and for some reason I'm getting 'source not found' any1 knows why? or what I should do? May 09 12:19:38 Guys, what to read about testing android apps? I mean: mock/unit testing. May 09 12:20:17 guys my n1 is no longer recognised by windows not matter what i do - changed usb cable rebooted etc, anyone know about this or is my n1 just broken somehow? May 09 12:20:30 anyone know how to do activity transitions? May 09 12:21:00 CallumTaylor directly after u call startactivity u can use May 09 12:21:00 overridePendingTransition(R.anim.push_up_in,R.anim.push_up_out); May 09 12:21:10 simple as that! May 09 12:21:14 yeah, but what if i only want to animate the outgoing activity May 09 12:21:20 when i put 0 for the enteranim May 09 12:21:21 Make an animation that does nothing May 09 12:21:25 the animations stop all together May 09 12:21:28 tried tht May 09 12:21:30 same problem May 09 12:21:34 i dont know what to do if my n1 is bust im screwed May 09 12:22:01 Maybe the new activity is animated in on top of the splash screen May 09 12:22:06 Hey, i'm getting this error when trying to export signed apk: No .class files were found in project "facebook", so none of the classfile based checks could be run. Does the project need to be built first? --- google didn't help much, anyone seen this before? May 09 12:22:18 how would i get the splash to animate out over the top of the main view? May 09 12:22:29 gaz`: could always use wireless adb if usb is broked May 09 12:22:49 i would have thought overridePendingTransition(0, x.ui.R.anim.slide_up_out); would be fine… but 0 just stops the animations working all together May 09 12:23:04 Maybe don't make the splash screen an Activity May 09 12:23:50 lamalama: does your project have a build error? May 09 12:24:08 If the new Activity appears on top of the splash activity, with no animation, it's pretty obvious you wouldn't be able to see the splash activity animating May 09 12:24:24 right, is there anyway to reorder the activities May 09 12:24:29 so the splash will be on top May 09 12:24:33 lamalama: That's just lint telling you it can't run classfile based checks May 09 12:25:02 Shouldn't stop you from exporting May 09 12:25:13 when using an sql database does is make sense to cache a set of +- 40 rows in the object ( hashmap ) if they are constant and often retrieved? or will caching be done anyway somewhere in the sql code and will this have no effect? May 09 12:25:16 There's probably other issues that's causing it to fail May 09 12:25:32 I guess it will? there will only have to be made 1 query on startup? May 09 12:25:43 dzan how much memory do the constants take up May 09 12:26:05 Jug6ernaut, object headers + 2 strings + 1 int May 09 12:26:21 dzan: you should actually benchmark it, but I would start from no-caching case and just validate that there's no harm to ignoring the caching May 09 12:26:23 * Jug6ernaut says just cache them May 09 12:26:24 strings of max +- 15 chars May 09 12:26:40 and if your query is an indexable query, then especialy I would not worry about it, it'll find the right rows very fast in all likelihood May 09 12:26:41 SimonVT: it works when i run it on my device, and the error appears only when i try to export the signed apk May 09 12:26:47 I'd only worry about incessant table scans May 09 12:27:23 caching would certainly be much faster than db io May 09 12:27:24 alankila, Jug6ernaut but doing a query doesn't that cause overhead enough? sure it finds them but method calls,... May 09 12:27:31 i would cache on demand May 09 12:27:32 wongk, thx :p thought so May 09 12:27:37 hi May 09 12:28:18 wongk, sure but that's an "extra feature" for now it will only be about 20 objects or something or how do you mean "on demand" exactly May 09 12:28:24 Does TextView draw immediately if I call setText? May 09 12:28:35 I would measure an effect, if any May 09 12:28:39 I hate code that is unnecessary May 09 12:28:45 dzan: it gets cached when it is first needed May 09 12:28:46 ^^^ May 09 12:29:07 wongk, indeed was the plan, making a "ObjectRepo" a singleton class May 09 12:29:09 For example, textView.setText("a"); textView.setText("b"), will it draw two times May 09 12:29:14 or just one time May 09 12:29:17 some stuff that needs to be written because otherwise it won't work CAN be tricky, it has right to be. But adding any bit of code on an unvalidated hunch doesn't strike me as very smart, if you can't reason what the performance should be in advance May 09 12:29:19 when an instance is requested it loads them in from the db ( all of the objects ) May 09 12:29:22 jimmy_lo_chien_f: Just one May 09 12:29:39 jimmy_lo_chien_f: Draws are posted to the handler, they don't happen immediately May 09 12:29:55 thanks anyway daz and Simon, what ill do instead is fade the new activity in whilst the old slides out, will just have to do :) May 09 12:31:04 You mean the queue keeps only one draw message if I call setText this way May 09 12:31:31 Yes May 09 12:31:35 OK May 09 12:31:39 setText will cause the TextView to invalidate itself May 09 12:32:03 That basically tells the framework "ask me to draw when you get a chance" May 09 12:32:49 will it remove the draw message if there is already another draw message May 09 12:33:12 there is no draw message, merely a draw flag, I think May 09 12:33:24 yep May 09 12:33:38 it can even be a damage region May 09 12:34:18 When the view is invalidated it will set a flag, as well as notify the parent May 09 12:34:26 If the draw flag is already set, invalidate() does nothing May 09 12:34:34 OK May 09 12:34:44 I see May 09 12:34:51 SimonVT, thank you May 09 12:35:25 thank god i gave my mate a free nexus one anbd he still has it and has upgraded May 09 12:35:36 so gonna grab that, its weird its like the port on my phone is dead May 09 12:35:41 windows always says not recognised May 09 12:36:21 gaz`: if you happen to come across any more of those free nexus ones, feel free to let me know ;) May 09 12:38:15 : May 09 12:42:43 Hi, I'm trying to open socket and for some reason I'm getting 'source not found' any1 knows why? or what I should do? May 09 12:47:10 wongk hehe ok May 09 12:47:19 google were a bit more generous back then May 09 12:47:33 altho from them ive had 2 nexus ones a g1 and a htc flyer! May 09 12:47:44 and id have had google tv if i was a yankeee May 09 12:47:46 :) May 09 12:47:58 where do i sign up for that? :P May 09 12:48:06 hehehe May 09 12:48:15 one was for adc2 as i was in final May 09 12:48:23 one was for >5000 dls i think in the early days May 09 12:48:33 and others from conferences May 09 12:50:36 Leeds didnt ur device die too? its weird it works fine but winblows always says not recognised May 09 12:52:05 I want to do a check in the onCreate of a service. If it fails, how should I kill the service before it starts? May 09 12:53:08 code1: stopSelf() May 09 12:53:47 wongk: will that work even before it's started? May 09 12:54:11 one way to find out May 09 12:54:43 true May 09 12:54:47 reading offical docs? May 09 12:56:53 seems probably better done in onStartCommand May 09 13:01:23 I've created an intent to open WhatsApp's contact picker, and included a message (EXTRA_TEXT), so you can share stuff from within the app to WhatsApp. works fine so far, but I'm looking for a possibility to terminate the WA activity right after the message is sent. Is that possible? May 09 13:01:31 anyone ever heard of the overflow meny not working when using actionbarsherlock on a galaxy s2? May 09 13:01:58 Yep May 09 13:02:11 Native implementation doesn't allow forcing the overflow menu May 09 13:02:12 Cor3_: Not an answer to your question, but, why? If android needs the resources and you're not in the foreground, it will kill you May 09 13:03:15 Cor3_: oh; you're not WhatsApp, that's another program? No, you can't kill them. May 09 13:03:30 so it's a problem with the galaxy s2's shitty version of ICS? May 09 13:03:46 It's the default behavior May 09 13:03:51 Too bad. :/ May 09 13:03:58 if the device has a menu button, no overflow button is shown May 09 13:04:06 Cor3_: if apps could kill other apps, Bad Things would result eventually May 09 13:04:09 Doesn't matter if it's a s2, or any other device May 09 13:04:10 it works on other devices May 09 13:04:24 I am using the .ForceOverflow theme May 09 13:04:33 It works on Sounds logical. ;) May 09 13:04:40 Cus that's a custom ActionBar implementation May 09 13:04:47 >= ICS uses the native actionbar May 09 13:05:00 ah May 09 13:05:18 i'm overriding the behaviour of the menu button in my app May 09 13:05:31 so is there another workaround? May 09 13:05:36 Nope May 09 13:05:49 balls. May 09 13:06:00 And how about remembering the chosen WA contact? May 09 13:06:42 Cor3_: only if it returns it to you in an intent or something May 09 13:07:11 did anyone work with custom videoview so i can for example disable canSeekBackward and set it to false for example.. May 09 13:07:18 Okay, gonna look after that. ;) May 09 13:13:11 I'm working on an app where the user is able to capture audio and store them as .3gp-files. How would I go on about concatonating these recordsings? May 09 13:17:42 Now I know that it has extras (I/ActivityManager( 233): START {flg=0x14000000 cmp=com.whatsapp/.Conversation (has extras)} from pid 8746) but I can't find a method to get those extras without being the app... May 09 13:25:39 why SensorEvent returns different values, for the same motion, for different phones? How can I make it more... consistent? May 09 13:26:50 i am talking about accelerometer May 09 13:34:05 hi guys, anyone here have any experience with accessing ffmpeg through JNI? May 09 13:34:51 evening May 09 13:36:48 I'm having trouble getting ffmpeg to decode frames of a video to png, I can get it to decode video to an AVFrame and write the AVFrame to a ppm file, but the ppm file comes out in black and white, and when i try to write it to png instead, the file is corrupt and i'm not sure if it's because i'm writing the png header incorrectly or if the data just needs to be decoded differently first May 09 13:36:48 before being written May 09 13:37:42 is this the place for xcode ? May 09 13:37:58 joking :P May 09 13:39:23 otherwise, does anybody know if it's possible to execute ffmpeg binary using Runtime.exec() on a non-rooted phone? May 09 13:39:28 this might be more java related - but if i have an array md - String blah [][]; May 09 13:39:55 depends if the binaries were included in the rom or not, should be yes hto May 09 13:40:07 why do i always gets a null pointer when i blah[int][1] = etc; May 09 13:40:28 because you haven't set a size on the array May 09 13:40:50 dmalice but i cant set the size with an int ? May 09 13:40:54 did you initialze each string array in the array? May 09 13:40:57 if i have string array ? May 09 13:41:18 no, you have to initialize each "row" of the 2d array May 09 13:41:47 i have a static array [][] then have the size declared later with array.length [static num] May 09 13:42:22 you must do something like: May 09 13:42:33 static String blah[4][3]; May 09 13:42:43 not initialized May 09 13:42:46 dmalice: fwiw, cm7 does not have ffmpeg in the PATH May 09 13:42:47 then you can access it like blah[int][1] = "asd" May 09 13:42:50 cheers dmalice ill give it a shot May 09 13:43:02 textView.setText("X"); textView.setText("X"); <-- does the second call to #setText(CharSequence) cause the TextView to invalidate, or is it smart enough to realize nothing's changed? May 09 13:43:27 canadicancow|work probably have to check source May 09 13:43:35 doing that May 09 13:43:41 was just hoping id get an answer first :) May 09 13:43:48 lol May 09 13:43:48 It is smart May 09 13:44:01 Answered the same question earlier :p May 09 13:44:14 * Jug6ernaut loves how checking if the val changed is considered "smart" hehe May 09 13:44:18 I don't think there are ffmpeg binaries built into any roms. I've actually cross-compiled ffmpeg using the ndk (ffmpeg is a c library), so I have an arm-7 binary, but the problem is when I try to call Runtime.exec() commands on it i get an access denied exception, and exec-ing a chmod doesn't seem to have any eeffect May 09 13:44:31 Oh wait May 09 13:44:33 Like that May 09 13:44:36 Probably not smart May 09 13:44:41 xD May 09 13:44:45 wut May 09 13:44:55 I doubt it's smart enough canadiancow May 09 13:45:02 yea i dont think it is May 09 13:45:18 im not sure it matters in most cases May 09 13:45:21 yeah May 09 13:45:25 but i think we have a few screens where we call an updateUi() method or something May 09 13:45:28 and it sets *everything* May 09 13:45:32 it's probably too simple an operation that they didn't bother putting in a check May 09 13:45:36 regardless of whether anything's changed May 09 13:45:41 text, images, etc May 09 13:45:48 Nothing about textview is simple :p May 09 13:45:57 relatively speaking of course May 09 13:45:58 the interface isn't bad May 09 13:46:20 canadiancow|work: well at least all those individual updates should be collapsed into 1 May 09 13:46:23 i would hope May 09 13:46:57 you could extend TextView and overwrite the setText method May 09 13:47:05 but that's probably more work than it's worth May 09 13:51:14 How do private services actually work? Once it's backgrounded, unless it's NON-private, how can subsequent instances of the Activity that intially launched it have permission? May 09 13:51:55 I have an XMPP service I don't want other apps to hijack, but I don't see how I can prevent it... May 09 13:52:31 the service is still declared in your app manifest isn't it? May 09 13:52:39 how will other apps know what it's called May 09 13:52:41 cubicool is that a content provider ? May 09 13:53:28 According to the docs START_STICKY is guaranteed that onStartCommand will be called again after being killed. But I'm finding that it isn't, am I missing something? May 09 13:54:06 dan82au: I'm not sure; I'm fairly new to Android development. I have the app working, I'm just wondering if I'm barking up the wrong tree with this design. :) May 09 13:55:14 I have a IntentService that connects to our work's XMPP backend and does various things (like query server loadtime, etc). I can communitcate with it easily enough with my Activity as long as it's not a "private" service, but I wouldn't want another app to be able to send messages to it at will. May 09 13:56:33 http://developer.android.com/guide/topics/manifest/service-element.html#exported May 09 13:57:59 hmm seems like a bug in 2.3 May 09 13:59:15 is coke or pepsi better for android development ? May 09 13:59:37 cocaine is definitely better May 09 13:59:53 beer for me, makes you a bit sleepy though May 09 14:04:13 Any idea how to determine whether a temperature value should be displayed in C or F (based on current locale)? May 09 14:05:14 aleb i imagine so, not sure how though :) May 09 14:05:19 display it in both ? May 09 14:06:05 are you using any kinda of gis ? May 09 14:06:18 I want to know what the majority of the users prefer, for example Fahrenheit in USA May 09 14:06:38 or Celcius in Germany May 09 14:06:53 aleb: first approximation, F in the US, C everywhere else in the world May 09 14:07:05 yes, so you need to use f in the u.s and metric everywhere else hey ? May 09 14:07:14 ding dong May 09 14:08:07 Leeds, hm, good point, there might be only a few of those with F May 09 14:08:43 and obviously an option to let the user change it if they want May 09 14:09:12 sure :) May 09 14:09:17 "Fahrenheit remains the official scale of the United States, Cayman Islands and Belize" May 09 14:10:11 easier to just display both considering the calculation May 09 14:10:54 aleb: and people over about 40 in the UK May 09 14:11:20 Could anyone have a quick view over http://pastebin.com/hbaUFxAb and tell me why the proximity sensor isn't reacting when I put my hand over the phone? May 09 14:11:30 dan82au: nah, that's messy May 09 14:11:53 Leeds agree, but if its just a temperature calc its fine May 09 14:12:40 xemi> are your onResume and onPause called ? :) May 09 14:13:01 xemi> does the device actually have a proximity sensor ? May 09 14:13:22 dan82au, FYI it's not a temperature calc, it's a travel guide :) May 09 14:13:42 aleb but what units are you measuring :P May 09 14:13:43 Chainfire: yes, it's a Galaxy S1 (i9000) May 09 14:14:12 force,area,weight etc... May 09 14:14:16 dan82au, that's irrelevant May 09 14:14:24 huh ? May 09 14:14:33 I'm not measuring anything May 09 14:14:47 xemi> try SENSOR_DELAY_UI May 09 14:14:52 so you don't need a unit of measurement ? May 09 14:14:55 aside from that, code seems good to me ... May 09 14:15:20 ehm May 09 14:15:28 why are mSensorManager and mProximity final ? May 09 14:15:32 *shakes head* people are confusing May 09 14:15:41 * Chainfire scratches head... does that even work that way ? May 09 14:15:47 Chainfire: I'v just figured that onResume is never called so the mSensorManager.registerListener(this, mProximity, SensorManager.SENSOR_DELAY_NORMAL); never gets called May 09 14:15:56 i moved it up in the constructor May 09 14:15:59 I've got 2 or more .3gp-files recorded by the user, how can I join/concatonate these files? May 09 14:16:22 dan82au, I have some data and I need to display it, it's irrelevant how the data is represented internally May 09 14:16:31 and now it seems to work :-) May 09 14:16:38 xemi yeah that'd do it May 09 14:16:48 I wonder though, why this AsyncTask construct? it is strange for this May 09 14:16:50 is that the standard way of using the proximity sensor? that seems like something a handler would do better than an async May 09 14:16:51 aleb its still not clear though May 09 14:17:13 Chainfire: because I'm planning to have it run as a thread, it's just a part of a more complex motion detection app May 09 14:17:17 asynctasks shld normally be used for something that needs to just happen in the background and then be over May 09 14:17:26 there is also motion detection by camera running at the same time May 09 14:17:39 and I'm planning on doing a detection by sound now :-) May 09 14:17:53 hmm, just read the news about G vs O May 09 14:17:57 so you want to know wether or not the system/phone etc.. that runs you application is imperial ? May 09 14:18:10 dan82au, yes May 09 14:18:17 I have no idea how to approach the bySound detection issue though ;-) May 09 14:18:42 XeruX, I have an answer for you but you aren't going to like it May 09 14:18:45 def be a java function for that my friend, give me a sec - only new too May 09 14:19:07 xemi> if you want to use a background thread for this stuff, use a real thread. AsyncTask is not really fit for this May 09 14:19:19 you're going to have to use a library like openAV(which is GPL), or ffmpeg (LGPL) May 09 14:19:20 (yes you CAN, but you SHOULDNT ;)) May 09 14:19:26 Chainfire: it seems to work well, why isn't it fit for this? May 09 14:19:44 dan82au, if you were talking to me, don't bother with that function May 09 14:20:09 xemi> because AsyncTask is "meant" for shortrunning task in the background. it has its own threadpool en executor methods, that may interfere with eachother May 09 14:20:14 anyone got a good liner to use to install the jdk ??? May 09 14:20:22 the behavior changes between API versions as well, AsyncTask is not exactly stable and/or reliable May 09 14:20:27 no worries, what did you come up with ? May 09 14:20:29 dmalice: Ok, but I read somewhere that you can use AudioRecord and handle raw PCM-data, but it seems like it might not work on all devices because of different implementations? :/ May 09 14:20:47 xemi> you can still use it, but sooner or later, if you grow the number of AsyncTasks in your application, and they are long-running, you will run into trouble May 09 14:21:04 yeah, i May 09 14:21:06 just some friendly advice, feel free to ignore. as stated, you CAN if you must :) May 09 14:21:25 Chainfire: ok if it won't work well when tested ill switch. I'll have 3 AsyncTasks running until specified to stop by the main UI switch. May 09 14:21:38 Xerux, I've been working on a project that requires working with videos as well, and ffmpeg seems like the only real option as android's built-in tools are very limited May 09 14:21:54 xemi> which API version are you testing on? May 09 14:21:57 dmalice: I only need to concatonate audio records, not video May 09 14:21:57 dan82au, as I said, "Fahrenheit remains the official scale of the United States, Cayman Islands and Belize" and I'll use Locale.getDefault() May 09 14:22:36 sweet aleb :) May 09 14:22:48 learnt something myself also May 09 14:22:55 oh audio recordings only, in that case i'm not 100% sure May 09 14:23:42 xemi: Depending on API level, only one asynctask will run at a time May 09 14:23:46 xemi> if you are developing for 2.x or 3.x right now, I can tell you, when you test your software on ICS, it won't work, as AsyncTasks are ran serially (by default) instead of in parallel May 09 14:23:47 Chainfire: API Level 10 May 09 14:24:09 Ouch. May 09 14:24:38 now we just told you, so you know, so you can code around it, but if you don't know, it's going to really cost you some debugging time to figure it out! :) May 09 14:24:47 Xerux, do you need to actually be able to save the recordings as a single joined file? if so you probably still need to use something like ffmpeg May 09 14:24:53 yes indeed, Chainfire, thanks. May 09 14:25:39 (it cost me like two days to find this "bug") according to AsyncTask "idea" it is still correct, that is why I say, if you want to run longrunning background threads, use a real thread, not AsyncTask which is meant for shortrunning background tasks May 09 14:26:43 Chainfire: that's been known for a while... May 09 14:27:11 Leeds> I didn't say I had the problem today, did I :) May 09 14:27:18 implication :) May 09 14:27:36 so you would rather I *not* warn xemi about this, so he runs into this problem later and goes "wtf?" :) May 09 14:28:54 nope, just that saying it took you time to find a 'bug' which is a) well-known and b) documented... May 09 14:29:13 "When first introduced, AsyncTasks were executed serially on a single background thread. Starting with DONUT, this was changed to a pool of threads allowing multiple tasks to operate in parallel. After HONEYCOMB, it is planned to change this back to a single thread to avoid common application errors caused by parallel execution." May 09 14:29:44 Leeds> that is certainly true, but in a complex application, you don't immediately find that the problem is that your threads are running serially May 09 14:29:58 what is "after HONEYCOMB" May 09 14:30:02 HONEYCOMB_MR1? May 09 14:30:03 ICS? May 09 14:30:10 not that it really matters though May 09 14:30:54 Obligatory "after fuck you that's when" May 09 14:31:04 o.O May 09 14:32:25 so anyway, anyone ever worked with ffmpeg and android before? May 09 14:32:51 i'm having nothing but problems and the documentation for the ffmpeg c libraries is SPARSE to say the least May 09 14:35:26 can anyone please help me with this exception? http://paste.ubuntu.com/977965/ May 09 14:36:14 dmalice> I seem to recall there's an open source media player for android based on ffmpeg May 09 14:36:19 have you looked for that? it might help May 09 14:36:56 c2tarun> you ran out of memory May 09 14:37:05 make sure the images in your project arent bigger than they need to be May 09 14:37:33 Chainfire, really? May 09 14:37:36 * c2tarun checking May 09 14:37:49 c2tarun> "E/AndroidRuntime( 599): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget" May 09 14:38:01 that says you ran out of memory while loading a bitmap May 09 14:38:31 this usually means one of your graphics is too big, but you can also have run ALMOST out of memory for another reason, and a little bitmap pushed you over the edge :) May 09 14:39:48 hey there, I'm trying to set up a ScrollView. In landscape view, it's perfect. However, in portrait view, the scrollview does not fill the entirety of the vertical space - even though I have layout_height set to fill_parent May 09 14:40:37 chrizc: pastebin your layout May 09 14:41:05 evancharlton; http://pastie.org/private/6t9j1bbazlcxamiwajycvg May 09 14:41:07 http://pastebin.com/q5mgPnfv why wont it linkify valid numbers ? May 09 14:43:17 evancharlton; never mind, found ScrollView's "fillViewport" attribute. May 09 14:44:29 Chainfire, you were right :) I rescaled a big image and it worked :) thanks May 09 14:44:43 'nother question - I have a text box on the first page of my app. the keyboard seems to be auto-focusing on the box... how do I stop this? May 09 14:46:23 c2tarun read up on providing different DPI images in your app.. always provide the smallest image possible for the screen. in Android 4.0 it is better, but pre 4.0 you must keep in mind the typical memory limit for an app is 2 to 2.5 times a full-screen images. So if you fill the screen with small images on average 2.5 times higher resolution that absolutely needed, you WILL run out of memory. May 09 14:47:04 chrizc, you could add this to your activity in your manifest android:windowSoftInputMode="stateUnchanged" May 09 14:47:10 chrizc: focusable="false" May 09 14:47:19 not sure if that's your overall goal tho May 09 14:47:21 dominicdinada; but I want it to be focused later on? May 09 14:48:11 chrizc: my solution will prevent the softinput from coming up when the activity starts, as long as the keyboard wasn't already open May 09 14:48:13 how can I add b'day date to a contact in my virtual device? I am on gingerbread May 09 14:48:19 but it will also leave it open if it was open before the activity started May 09 14:48:20 dmalice; sounds good May 09 14:49:07 dmalice; much better. May 09 14:49:41 glad to help May 09 14:51:04 c2tarun: I don't think gingerbread includes those extra details in the contact object May 09 14:51:36 dmalice, but my cellphone has that :( May 09 14:51:46 dmalice, it is also gingerbread May 09 14:51:58 is your device using stock android? May 09 14:52:18 dmalice, how can I check? May 09 14:52:24 Is there a decent Http Client available on android? The apache stuff is just horrible... May 09 14:52:28 what is the model of your phone c2tarun? May 09 14:52:45 Hi all May 09 14:52:56 GT-S5830 May 09 14:53:40 dmalice, GT-S580 May 09 14:53:44 yeah May 09 14:53:59 ello May 09 14:54:07 what happens when I record video in background and the user opens a camera app? May 09 14:54:18 that's samsung right? Samsung runs a customized Android rom and they likely added that field to the contacts that isn't present in stock android May 09 14:55:06 even in stock ICS there's no birthday field...they've added an "Events" field where you can store custom dates like anniversaries or birthdays, but there's not a built-in way to store a birthday directly, in stock android May 09 14:55:10 dmalice, ohh... :( so if I had to grab that b'day date from contact I have to use some Samsung API (if they provide) and that app will not work on all android devices? May 09 14:55:47 since the last update, if i open a file twice it opens in two different tabs. I don't like this update, is there a way to revert it? May 09 14:56:00 that's right c2tarun May 09 14:56:27 the android address book is quite basic, i don't know why they've left out a lot of pretty simple fields May 09 14:57:08 on the other hand, there may be a way to grab birthdays from contacts from the user's google account (i.e., gmail contacts), which I think does have a birthday field May 09 14:57:30 i'm not familiar with those APIs or if they are even available, but that could be something you could investigate as an alternative May 09 14:58:05 dmalice, thanks a lot :) May 09 14:59:39 dang`r`us, you mean if you're running the camera in a background task and then the user switches to the camera app while your task is still running? May 09 15:00:22 dmalice, exactly May 09 15:01:31 Best bet is probably testing it, but I'm pretty sure the OS will throw an exception on the second app's Camera.open() since it would be locked by your task May 09 15:01:45 the second app should be handling those kind of errors May 09 15:03:09 dmalice, okay, thx! May 09 15:17:58 http://pastebin.com/q5mgPnfv why wont it linkify valid numbers ? May 09 15:18:50 why are you OR'ing PHONE_NUMBERS with PHONE_NUMBERS May 09 15:20:40 canadiancow thats was an example from d.android.com i believe May 09 15:21:18 hey guys May 09 15:26:54 Hello guys. I have an activity with a progressbar, i'd like to let the bar spin for a little while before proceeding with the next activity... is there a way to do this without instantiating a new Thread? May 09 15:28:29 hi, wondering which http client I should be using, want response caching and connection pooling, http://android-developers.blogspot.com/2011/09/androids-http-clients.html suggests I should use httpurlclient but also says it doesn't cache responses before 4.0? May 09 15:33:15 Drknzz: Handler#postDelayed(..) May 09 15:34:34 evancharlton: Thanks, definitely a better solution to spawn a whole thread for such a small task May 09 15:34:42 than* May 09 15:34:57 the impossible can happen on Android: Java.lang.NullPointerException: at android.app.Activity.onStop(Activity.java:1301) May 09 15:38:16 Impossible? heh May 09 15:38:59 NPEs on android? I'LL NEVER BELIEVE IT. May 09 15:39:26 in fact, the impossible happens all the time on Android May 09 15:40:34 any thoughts on which http client lib to use? May 09 15:40:36 I'm a little bit stumped... I'm working on creating a remote service with an AIDL interface. If there is an error inside one of the Stub methods, how should I handle them? The only thing I can think of at this point is to make my method return Double instead of double, but then I have to deal with creating it parcellable and all that jazz for all of the primitives. Any thoughts? May 09 15:40:51 I don't even understand why there's multiple choices here May 09 15:40:59 shouldn't there just be one good choice not 3 crappy ones May 09 15:43:24 bfrog: if you need its feature, repackage the latest stable HttpComponents and use that May 09 15:44:16 hello, my android phone is randomly rebooting: how can i troubleshoot ? May 09 15:44:29 adb logcat May 09 15:44:36 #android May 09 15:44:39 also, that's a question for #android, not #android-dev May 09 15:44:39 drknzz, you could even just use an indeterminate progressbar and just setvisibility(View.GONE) when you don't need it showing May 09 15:44:46 too fast for you evancharlton! May 09 15:44:57 story of your life, I'm sure May 09 15:44:58 hello evancharlton ok, then what entries should i look for in the log? May 09 15:45:03 basically May 09 15:45:04 little quick on the draw, canadiancow|work ? May 09 15:45:08 yep May 09 15:45:17 LaPizza: anything related to the shutdown sequence May 09 15:45:33 at least i can hold my liquor May 09 15:45:47 any keywords for example? May 09 15:45:49 dmalice: Not quite, i just want it to spin for 1 second before going to the login activity, kind of a splashscreen... May 09 15:46:26 ah a splash screen May 09 15:46:42 LaPizza: If it's a custom ROM (CMod or maybe something like that...) you may be better off at XDA May 09 15:49:57 Drknzz thank you. May 09 15:50:10 anyway i am now looking at the logcat May 09 15:50:25 but can't find where it says anything like 'abnormal shutdown/reboot' May 09 15:53:27 is there a way to add a header-layout (e.g. a textview and a button) to ALL layouts? May 09 15:53:49 no matter what there is in the layout. so first header - then the rest May 09 15:54:13 or a search-bar on the top of every layout May 09 15:54:21 vorwaerts: May 09 15:54:24 you can include one layout in another May 09 15:54:35 but an Activity subclass would probably be better May 09 15:54:35 vorwaerts: Have you tried putting said bar on a different xml and inflating it onStart? May 09 15:55:09 vorwaerts: Works for me with ListView and ListView.addHeaderView May 09 15:55:33 said bar? May 09 15:56:18 Guys, is there a way to start another activity AND delete the starting activity off the stack? I.E: I definitely dont want my slpash screen to show when the user presses back May 09 15:56:32 vorwaerts: your search bar May 09 15:56:52 i have none May 09 15:56:52 so i just learnt (thanks to bfrog) that i should be using httpurlconnection instead of httpclient on newer versions of android..... who knew May 09 15:57:05 Drknzz: call finish May 09 15:57:06 I'm having a hard time believing that no one has come across this problem before.. handling errors in a remote service stub call... :/ May 09 15:57:13 Thanks May 09 15:57:26 storkme: everyone who read that blog post :P May 09 15:57:41 Also, does the Bundle onCreate is called with include the Intent's extras? (As in Intent#putExtra(..)) May 09 15:57:42 heh May 09 15:58:08 but i do not know how to inflate a xml May 09 15:58:28 vorwaerts: getLayoutInflater().inflate May 09 15:58:42 You pass an R.Layout id to it May 09 15:59:34 ok i try May 09 15:59:45 so first i creat a new xml with my header? May 09 16:00:20 vorwaerts: Yes. Use my tethod if you want a list below your header May 09 16:00:23 method* May 09 16:00:52 Or use as evancharlton said if you don't want that May 09 16:04:56 vorwaerts: http://www.ezzylearning.com/tutorial.aspx?tid=1763429&q=customizing-android-listview-items-with-custom-arrayadapter Check that link May 09 16:05:02 It might help your quest May 09 16:05:18 i dont have any listview May 09 16:07:16 i got getLayoutInflater().inflate(R.layout.header, null); and nothing is happen May 09 16:07:32 Hello! :> Got a problem with intents. I start com.whatsapp.ContactPicker with extras which then starts com.whatsapp.Conversation with extras. I get the intent used to start com.whatsapp.Conversation per ActivityManager and try to restart the exact same intent again which is always denied b/c the UID of the calling app (mine) is not accepted by WA. Is there a possibility to "fake" the UID? ^^ May 09 16:07:37 vorwaerts: You have to assign that inflated layour to something May 09 16:08:24 vorwaerts: You might want to create a special empty linearlayout to hold your bar May 09 16:08:39 But i think is the most sensible thing to do May 09 16:08:56 i dont know May 09 16:09:55 ah in xml May 09 16:10:08 May 09 16:10:58 Hello, Should I consider each activity in an app as a separate application? I access the same sqlite database in each activity using a static class..should I close and open the database when switching activity? May 09 16:11:35 thegrinch1: No, but on my limited experience with Android, i'd say you should close the connection if you lose focus May 09 16:12:05 But the focus can be lost in each activity.. May 09 16:12:32 thegrinch1: i guess you could use a global singleton (e.g. extent Application) and handle your DB connection there May 09 16:12:35 Drknzz including works but when i include my xml - nothing will follow May 09 16:12:41 but opening and closing a sqlite is rather cheap May 09 16:12:57 vorwaerts: I'm no android layout expert, but lemme google a bit May 09 16:13:19 thegrinch1: whjat's your reason for wanting to keep the conection open? May 09 16:13:26 vorwaerts: http://developer.android.com/resources/articles/layout-tricks-merge.html Look at that link May 09 16:13:47 is it ok to file a bug against an ADT preview? May 09 16:14:08 I use the same database in nearly all my activities...Closing and opening the database seems to me not very efficient... May 09 16:14:38 I already use a singleton.. May 09 16:15:40 but in some cases, when leaving the app and getting back to it,I get errors..It seems the database is closed when leaving the app... May 09 16:16:37 So I was wondering wether I should close the database before leaving an activity and opening it when entering another one... May 09 16:17:27 hi there - trying to make a software button that imitates the hardware "menu" button that was mandatory pre-3.0... using openOptionsMenu() works on 2.3.5 Gingerbread, but nothing happens on 4.0 ICS... using ABS and the menu button is an actionbar button. May 09 16:18:55 cant i do something like (in html) i have a header-div and a content-div. the header is always the same no matter what is following. May 09 16:19:56 chrizc, why dont you just use the actionbar's overflow option? May 09 16:19:59 vorwaerts: you cna May 09 16:20:04 that's how "menus" work on 3.0+ May 09 16:20:09 can, too May 09 16:20:10 evancharlton how? May 09 16:20:25 vorwaerts: by putting the header outside of the scrollview May 09 16:20:35 canadiancow; what? ...you misunderstand. I have an action bar, and all it has is a button called "menu." When it's pressed (or when the hardware menu button is pressed, if available), the pop-up menu shows. May 09 16:21:15 no, you misunderstand May 09 16:21:24 you shouldnt have a "Menu" button May 09 16:21:28 why. May 09 16:21:29 you should use the overflow action item May 09 16:21:34 which is provided for you by default May 09 16:22:02 canadiancow; how would I use the overflow action item, without having some of the options already displaying on the action bar? I want the action bar clear apart from this "overflow" button? May 09 16:22:26 So can I conclude this and accept that there's no way to fake UID's? May 09 16:22:31 1. you misunderstand what an actionbar is and why they removed the menu May 09 16:22:39 showAsAction="never" May 09 16:22:42 2. you can set attributes on menu items so they ne... yea May 09 16:22:51 canadiancow|work... they haven't removed the menu? o.o May 09 16:22:59 yes they did May 09 16:23:00 they deprecated it... May 09 16:23:05 evancharlton what scrollview? i dont have any May 09 16:23:17 * chrizc facepalms May 09 16:23:25 this would look messy if I throw all the menu items on the actionbar. May 09 16:23:32 Is there something like StringTemplate in Android? May 09 16:23:42 and, surely, if I set showAsAction to 'never', it wouldn't provide me with an overflow button? May 09 16:23:46 evancharlton i want add a header no matter what content there is May 09 16:23:51 wrong chrizc May 09 16:23:53 in fact May 09 16:23:58 that is the OPPOSITE of the truth May 09 16:24:02 which bit May 09 16:24:10 if you never show it as an actionitem, it ALWAYS gives you an overflow button May 09 16:24:13 how else would you access it? May 09 16:24:14 never tells it to not show in the actionbar May 09 16:24:16 oh. May 09 16:24:17 I see. May 09 16:24:20 * chrizc tries May 09 16:24:25 Items not shown in the action bar goes to action overflow May 09 16:24:31 Or options menu if your phone sux ;d May 09 16:25:43 SimonVT: don't be jealous of my menu button ;) May 09 16:26:25 Menu button is bad and you should feel bad May 09 16:26:36 SimonVT / canadiancow|work; okay, I just set my four menu options as never show as action... now I have no overflow button? May 09 16:27:27 Does your phone have a menu button? May 09 16:27:32 Yes. May 09 16:27:35 Then there's no overflow button May 09 16:27:36 welp! May 09 16:27:43 .-. I didn't realise it was that clever. May 09 16:27:46 evancharlton i have this problem with my listview May 09 16:27:48 its not working May 09 16:27:53 i set the height to wrap_content May 09 16:27:55 canadiancow|work: try putting it in a scrollview May 09 16:28:02 oh ok May 09 16:28:02 thanks May 09 16:28:13 maybe two or three scrollviews May 09 16:28:18 you have it backwards May 09 16:28:22 he wanted 3 listviews in one scrollview May 09 16:28:47 no reason you can't do both May 09 16:31:24 3 listviews, each in a scrollview, all in a scrollview? May 09 16:32:15 now that sound enterprisey! May 09 16:32:15 on a ListActivity? May 09 16:35:29 In a fragment in a fragment May 09 16:36:04 we don't care for fragments around there here parts May 09 16:36:08 yo dawg May 09 16:39:13 does anybody here use the foursquare app? I'm looking to use a similar kind of layout to theirs - how would I do that with the actionbar? I have the top bar bit sorted, but how would I do the tabs below it, without using a TabHost? May 09 16:39:57 Use a linearlayout with a bunch of textviews May 09 16:40:12 Or, actionbar tabs May 09 16:40:20 that May 09 16:40:35 actionbar tabs? May 09 16:41:16 wait, found the sdk page May 09 16:41:18 http://developer.android.com/guide/topics/ui/actionbar.html#Tabs May 09 16:42:24 SimonVT; found it. May 09 16:43:56 hi i am quite new to java and android. i have stumbled over this construction: setListAdapter(new ArrayAdapter(this, R.layout.list_item, COUNTRIES)); Why is String in <>? what does it mean? May 09 16:44:40 thats a java construct May 09 16:44:51 you can have arrayadapter for other types as well May 09 16:44:57 it indicates this one accepts strings May 09 16:45:23 it adds constraints to your code so you dont accidentally put another type of object in there May 09 16:45:30 dunno what the official name is May 09 16:45:37 generics May 09 16:46:04 ok so this is like an overloaded funtion? May 09 16:46:21 and i "help" the compiler and tell him i want the String version? May 09 16:47:01 overloaded method May 09 16:47:13 a little bit, i guess May 09 16:47:25 in a horizontall linearlayout - can i set the most right view to align right? May 09 16:47:40 except overlodaded methods have to be explicitly specified May 09 16:48:08 vorwaerts: try it and find out May 09 16:48:12 ok so the constructor of the class ArrayAdapter has several versions and one of it is for the type String. Is that correct so far? May 09 16:48:19 no May 09 16:48:40 evancharlton there is no align May 09 16:48:41 generics are written... genericaly, google it May 09 16:48:53 vorwaerts: the word you're looking for is gravity May 09 16:48:58 What is the lifecycle of a singleton object/glocal object ?There's no destructor in java so how can I make sure everything is properly closed in case android collect them? May 09 16:49:13 evancharlton but it doesnt work May 09 16:49:14 wongk: ok thanks i have found something May 09 16:50:10 vorwaerts: then you did it wrong. Please go read the docs. May 09 16:50:37 thegrinch1: in the case of singletons or globals, there is always a reference to the object May 09 16:50:55 they won't be collected until the process is terminating May 09 16:51:05 Anybody have an answer for this? http://stackoverflow.com/questions/3497593/partially-open-slidingdrawer May 09 16:51:32 Java doesn't have globals :P May 09 16:51:47 but when the activity goes background it can be collected..so there are possibilities the singleton is collected to... May 09 16:52:16 thegrinch1: the words Activity and singleton don't mix May 09 16:52:28 Call public static var = global. May 09 16:53:09 why don't they?Is it forbidden to use singletons when programming android? May 09 16:53:50 Is anyone familiar with how I can override the config change when you undock an Asus Transformer? I have tried android:configChanges="uiMode" (as implied in the docs) May 09 16:54:00 Android controls the lifetime of an activity (partially), that goes against the very purpose of a singleton May 09 16:54:15 I know,that's why I ask.... May 09 16:54:26 how do I have it so that a portion of the screen can be swiped? May 09 16:54:33 you can have singletons May 09 16:54:45 so when you talk about singletons in android, activities aren't part of the discussion, otherwise you're doing it wrong May 09 16:55:22 unless you say "i access my singleton from this activity and this activity" :P May 09 16:55:50 LOL...I access the singleton from all my activities!!! May 09 16:56:07 but what does that have to do with the lifetime of the singleton May 09 16:56:41 When the activities are reclaimed,the singleton is reclaimed too,no? May 09 16:56:46 no May 09 16:56:56 so that's a memory leak? May 09 16:57:01 When the process is reclaimed the singleton is May 09 16:57:15 no, there's always a reference to the singleton May 09 16:57:25 otherwise, how would you access it? May 09 16:57:50 Anybody have an answer for this, or any suggestions? http://stackoverflow.com/questions/3497593/partially-open-slidingdrawer May 09 16:58:01 when i setText(String) to a TextView - how can i make a new line? May 09 16:58:06 the singleton belongs to the application process memory space...when the memory is reclaimed,the singleton is reclaimed to... May 09 16:58:12 \n in the string? May 09 16:58:48 Yes vorwaerts. May 09 16:59:21 how can i add items to a listview? May 09 16:59:50 ultrixx: You should probably do some Googles / looking through the SDK samples. May 09 16:59:58 thegrinch1: the singleton lives as long as there is a reference to it. May 09 17:00:10 That is a very general question, and some investigating would give you a better answer May 09 17:00:28 thegrinch1: usually, it's done by creating a static reference in a class May 09 17:00:31 so any singleton is a memory leak.... May 09 17:00:36 lol May 09 17:00:36 thegrinch1: in that case, it lives until the class is unloaded May 09 17:00:41 no, that's not what a memory leak is :( May 09 17:00:51 i don't think you know what a memory leak is exactly May 09 17:01:15 read this http://stackoverflow.com/questions/6470651/creating-a-memory-leak-with-java May 09 17:01:41 static = lives as long as the class is loaded. May 09 17:02:13 I definitely know what a memory leak is...The sinhgleton maintain a reference to himself...so there's always a rference for it and it cannot be garbage collected... May 09 17:02:22 thegrinch1: You should watch the memory management talk from 2011 Google I/O. May 09 17:02:33 I already watched it.. May 09 17:02:42 Activities can be reclaimed at any time. Doesn't necessarily have to be when the process is reclaimed May 09 17:02:42 It should have answered these questions. :) May 09 17:02:43 They already said multiple times that the reference is removed once the process itself is terminated. May 09 17:03:10 So just because your activities are no longer in memory, doesn't mean the singleton isn't May 09 17:03:19 due to the fact that the class is unloaded when the process is terminated :) May 09 17:03:39 hello, is it possible to assign a value to a CheckBox (a String) I want to use this string in case the chechbox is checked May 09 17:04:05 My question do not deal with memory leaks but how can I be sure that when I go back to an activity,the static objects are still valid? May 09 17:04:07 Pinas: sure, but you'd have to extend CheckBox May 09 17:04:08 Pinas: Try setTag() May 09 17:04:19 I am not 100% sure that exists, mind you. May 09 17:04:20 Knossos: oh, duh. Or that :P May 09 17:04:23 it does May 09 17:04:23 how do I get an android.support.v4.app.FragmentManager, instead of the android.app.FragmentManager from SherlockActivity? May 09 17:04:33 You don't May 09 17:04:43 You use SherlockFragmentActivity May 09 17:05:05 o.o I... see? Is that basically the same as using a FragmentTransaction? May 09 17:05:15 chrizc, no May 09 17:05:23 SherlockFragmentActivity == FragmentActivity May 09 17:05:41 I already have a SherlockFragment? May 09 17:05:48 anyone else who didnt get their $$ from google this month? May 09 17:05:59 chrizc, yeahso? May 09 17:06:07 you don't have a fragmentactivity May 09 17:06:24 so I'm confused as to what I make a SherlockFragmentActivity... the activity that I'm trying to do the transaction in? May 09 17:06:33 SherlockFragment extends android.support.v4.app.Fragment May 09 17:06:40 That fragments needs a FragmentActivity May 09 17:06:48 Hence, SherlockFragmentActivity May 09 17:06:58 chrizc, you haven't ever used the support lib, huh; you need a fragmentactivity May 09 17:07:07 in order to use fragments in the support lib May 09 17:07:09 pfn; I have, just not with fragments. May 09 17:07:11 ok thank you both :) May 09 17:07:17 anyway, I'm now using the SherlockFragmentActivity May 09 17:07:20 wtf do you use the support lib for, if not fragments May 09 17:07:26 * pfn scratches head May 09 17:07:32 pfn; at the moment, just swapping Activities. May 09 17:07:38 oh May 09 17:07:39 wait May 09 17:07:41 no, you're right May 09 17:07:44 I haven't used the lib before. May 09 17:07:58 chrizc: Have a look at the ABS samples, best advice. May 09 17:08:00 chrizc, please refer to the sample app in the support lib May 09 17:08:05 That too ^ May 09 17:08:10 pfn; ...which one? May 09 17:08:14 there's about a bajillion. May 09 17:08:19 there's only 1 May 09 17:08:56 well, there's 2, but I'll leave that as an exercise for you to figure out which one May 09 17:08:59 :p May 09 17:10:16 Hi! I have a question about threading with sdk 15, I have a method that sets up a tcp server socket, i call this method from thread like and i still get the NetworkOnMainThreadException. I dont understand why it does this, I can provide the code if it helps! May 09 17:10:34 -like May 09 17:11:02 You are running your network code on the UI thread, this will make the App hang. May 09 17:11:05 it helps May 09 17:11:33 I know, and that's why i made another thread from within the method is called... May 09 17:11:37 You need to make your code multi-threaded. Putting your server in a Service for example. May 09 17:12:48 Please look at this code, that does make it multi-threaded right? May 09 17:12:48 any idea why adding a tab larger than the others causes huge padding in a TabWidget? May 09 17:12:49 Thread tcpServer = new Thread() { May 09 17:12:50 public void run() { May 09 17:12:50 try { May 09 17:12:50 Server.Start(); May 09 17:12:50 } catch (Exception e) { May 09 17:12:50 e.printStackTrace(); May 09 17:12:50 } May 09 17:12:51 } May 09 17:12:51 }; May 09 17:12:52 tcpServer.run(); May 09 17:13:26 irc is not for code May 09 17:13:40 Sleevezipper: use something like pastebin for code May 09 17:13:49 Sleevezipper, please use www.pasteall.org, pastebin or anoter website for paste. thanks May 09 17:13:56 Sorry about that! Thought it was ok cause it was just a few lines May 09 17:14:14 If everyone posted just a few lines though, this channel would be a mess :P May 09 17:14:23 Yeah you're right May 09 17:14:46 Sleevezipper: don't extend thread, implement Runnable. May 09 17:15:01 Sleevezipper: the method to start the thread is start May 09 17:15:02 not run May 09 17:15:17 you're not actually using a thread May 09 17:15:24 yeah, calling run() would just invoke your overriden method on the same thread :P May 09 17:15:46 I'm a little bit stumped... I'm working on creating a remote service with an AIDL interface. If there is an error inside one of the Stub methods, how should I handle them? The only thing I can think of at this point is to make my method return Double instead of double, but then I have to deal with creating it parcellable and all that jazz for all of the primitives. Any thoughts? May 09 17:16:11 nplus: Double.NaN May 09 17:16:19 it is a special value in the floating point spec May 09 17:16:22 used to indicate error May 09 17:16:36 and can be used with primitive double. May 09 17:17:26 readme: Thanks, is there something similar with other primitives? May 09 17:17:28 Thanks a lot guys! Never thought it would be something simple like that. May 09 17:17:44 nplus: nah, usually -1 is used for ints and such though. May 09 17:17:50 tbh I use the object wrappers when possible because i like null May 09 17:17:52 Anybody have an answer for this? http://stackoverflow.com/questions/3497593/partially-open-slidingdrawer May 09 17:18:02 Just going to keep trying. Fingers crossed. :) May 09 17:18:25 you could always use a second value to indicate: int a; bool isASet; May 09 17:19:31 bool isASetSet; May 09 17:20:16 readme: Like a second parameter to the method defined as an 'out parameter' in the AIDL file? May 09 17:22:53 canadiancow|work: funny, but I think initializing it to false would suffice. May 09 17:23:15 nplus: dunno about what you're going to do with your AIDL file. May 09 17:23:22 but the theory should probably tranfer. May 09 17:27:27 readme: I just want to make sure I'm on the same page. Where do you suggest I use the boolean isASet? I can't pass a boolean by reference to my service... May 09 17:28:08 broadcast? May 09 17:30:41 I'm trying to follow the SDK's tutorial on ActionBar tabs with TabListeners, but I can't seem to get the TabListeners to work - if I follow the code on the page exactly, it tells me TabListener is generic. If I remove the property, it tells me TabListener can't be instantiated... help? May 09 17:31:41 nplus: oh, I see May 09 17:32:15 nplus: maybe you should define your own parcelable object type May 09 17:32:19 or use extras. May 09 17:32:23 Right now, I'm tempted to create a container object with a field for each primitive May 09 17:32:39 they already exist May 09 17:32:47 Integer, Double, Character, Boolean etc. May 09 17:32:52 a parcelable one? May 09 17:33:20 I don't think you should be sending them all as separate objects in your bundle May 09 17:33:33 you should probable define a custom parcelable object that is built to your purpose May 09 17:33:45 then you can pass them through with writeValue & readValue, if you don't want to use primitives May 09 17:34:44 Maybe, it just seems a bit silly that there isn't a good way of handling errors in the remote service May 09 17:34:58 aaanybody? May 09 17:35:17 chrizc May 09 17:35:22 pastebin your code and errors May 09 17:35:24 I'll take a look at things and probably create objects for each type of response May 09 17:36:46 how can you check if you're on the main thread May 09 17:37:09 Thread.currentThread().getId() == Looper.getMainLooper().getThread().getId() ?? May 09 17:37:11 dmalice; http://pastie.org/private/tzifoyer1bnlda6hnf3jjq error is line 51, "The type ActionBar.TabListener is not generic; it cannot be parameterized with arguments