**** BEGIN LOGGING AT Wed Feb 29 02:59:58 2012 Feb 29 03:00:03 t0mless: i think he's stating that his activity is extending ListActivity and cannot extend another to add the compability he needs for actionbar. I'm guessing. Feb 29 03:00:12 but you will see, their ActionBarActivity just extends Activity Feb 29 03:00:21 so you could have that extend ListActivity instead Feb 29 03:00:27 so in my ActionBarActivity, should I extend Listview? Feb 29 03:00:34 ListActivity Feb 29 03:00:39 you dont actually need ListActivity. It's just some convenience wrappers Feb 29 03:00:42 yeah thats what i mean Feb 29 03:00:51 also true Feb 29 03:00:51 but it's handy Feb 29 03:01:01 You can just reference your listview directly Feb 29 03:01:09 mrenouf: probably too handy for me to live without :/ Feb 29 03:01:20 you can make your own FooListActivity by copying the source and changing the base class Feb 29 03:01:20 but yeah, i may do just that Feb 29 03:01:22 You could also use action bar sherlock Feb 29 03:01:34 i need to learn how to use abs Feb 29 03:01:35 yeah, so whats the difference? Feb 29 03:01:40 ive heard there is none now Feb 29 03:01:40 I'm fairly certain ABS provides that as well Feb 29 03:01:45 abs? Feb 29 03:01:51 ActionBarSherlock Feb 29 03:01:52 action bar sherlock Feb 29 03:02:06 yeahyeah Feb 29 03:02:17 whats the difference though Feb 29 03:02:26 also known as "Why the hell didn't Google provide this for us in the first place?" Feb 29 03:02:33 ^^^^% Feb 29 03:02:51 AbelianHorizon: http://actionbarsherlock.com/index.html Feb 29 03:02:53 Captain Hindsight Feb 29 03:02:59 "Backport *ALL* the APIs!!1!" Feb 29 03:03:29 yeah, anyway. ABS is awesome and you should use it. It is not hard to use Feb 29 03:04:13 so youre recommending it over googles solution? Feb 29 03:04:40 google does not have a good backward compatibility solution Feb 29 03:04:46 ^ Feb 29 03:04:55 I'll give it a go Feb 29 03:04:59 thanks for the tip guys Feb 29 03:05:07 might hang out in here as well Feb 29 03:05:20 cheers :D Feb 29 03:06:10 anyone seen a sample code for a custom TimePicker view that has seconds also? Feb 29 03:06:28 regarding a device's pixels, how would you call the amount of pixels on either axis, keeping in mind that width and height are not really appropriate due to orientation changes Feb 29 03:06:44 s/how/what Feb 29 03:07:11 dammit, now I can't remember the ratio Feb 29 03:07:19 is it 2:3:4 m:l:xl dpi? Feb 29 03:07:49 120 160 240 320 Feb 29 03:08:05 btw why does the date picker suck so much, is there a calendar view date picker? Feb 29 03:08:33 lmhx 2368 Feb 29 03:08:38 lmhx 3468 Feb 29 03:08:52 (the second one) Feb 29 03:08:58 boom Feb 29 03:09:02 ty Feb 29 03:09:12 at least that's what jake told me ;0 Feb 29 03:09:24 AbelianHorizon: there is one but i believe its not open source and paid plugin/lib Feb 29 03:09:29 found it on the website Feb 29 03:09:38 it is 3468 Feb 29 03:09:44 but if you don't give a fuck about ldpi Feb 29 03:09:53 4:6:8 is 2:3:4 Feb 29 03:10:05 pretty sure I had this same convo with Jake like 3 days ago Feb 29 03:10:13 I've never seen an ldpi device Feb 29 03:10:18 whois t0mless Feb 29 03:10:20 but they do exist Feb 29 03:10:24 I am me Feb 29 03:16:03 I am getting sync errors when running repo sync and none of the solutions I am finding apply to my circumstances. Here is a pastebin of the error http://pastebin.com/2A2u3FL8 any suggestions? Feb 29 03:18:47 what os trimmer? Feb 29 03:19:09 sorry Feb 29 03:19:19 never heard of that os Feb 29 03:19:22 linux ubuntu 11.10 to be exact Feb 29 03:19:51 what version of git/python do you have? Feb 29 03:20:22 my app targeting api 8, is that the reason it looks the same in ICS instead of using the new spinners/checkboxes in say my preferences activity? Feb 29 03:20:30 Python 2.7.2+ Feb 29 03:20:52 git version 1.7.5.4 Feb 29 03:21:23 I dunno, that was the only way I was able to get it to sync Feb 29 03:21:34 was ubuntu VM with python 2.7 and git 1.7 Feb 29 03:21:52 let me boot the VM Feb 29 03:21:59 and see just what python/git I had Feb 29 03:22:23 trimmer: why are you using -f? Feb 29 03:22:24 thanks t0mless Feb 29 03:22:41 because it won't complete Feb 29 03:22:49 ... meaning? Feb 29 03:23:15 yea, same versions for me Feb 29 03:23:22 I just did repo sync Feb 29 03:23:23 there're a bunch of @overrides that need removing from ABS, why is that? Feb 29 03:23:33 ? Feb 29 03:23:49 you need to fix your imports Feb 29 03:23:53 for things like MenuItem Feb 29 03:24:29 though I did the ics-mr1 branch Feb 29 03:25:51 SeligArkin, the errors you see, I was getting many more before I ran the repo sync with -f Feb 29 03:26:09 did you have errors with your init? Feb 29 03:26:16 no Feb 29 03:26:25 try nuking it and starting from scratch? Feb 29 03:27:18 hey guys, I'm trying to figure out how to delete a table from my sqlitedb. I can delete the entries in a table no issue, but I still have the empty table Feb 29 03:27:57 Most recent attempt without -f http://pastebin.com/7VBp2TEh Feb 29 03:28:40 I tried mDb.execSQL("SELECT DROP TABLE IF EXISTS "+tbname); but that didn't work.. Feb 29 03:28:56 trimmer did you have errors the first time you ran init? Feb 29 03:29:11 SeligArkin, I thought about doing that, but how large are my daily bandwidth restrictions? Feb 29 03:29:29 trimmer: that depends on your ISP? Feb 29 03:29:32 ( L4nce0 ): you forgot the ; in your SQL statement Feb 29 03:29:46 L4nce0: also, it's not SELECT DROP... it's DROP... Feb 29 03:29:49 t0mless, oooh yeah that may help! Feb 29 03:29:54 oh, that too Feb 29 03:30:23 t0mless: any idea? Feb 29 03:30:23 No, I had no errors running init, I had what seemed to be a hang described in the TCP stack section, but when I checked my arp caches they were not poisoned Feb 29 03:30:41 AbelianHorizon, you need to set your Java Compiler settings to 1.6 Feb 29 03:30:45 .:19:23:48:. ( t0mless ) you need to fix your imports <-- AbelianHorizon Feb 29 03:30:59 or that Feb 29 03:31:03 No, actually Google sets bandwidth restrictions on an IP basis for the android surce Feb 29 03:31:04 (more likely) Feb 29 03:31:15 the old methods are using the android.whatever.SomeClass Feb 29 03:31:35 trimmer: not to my knowledge? O.o Feb 29 03:31:36 and some of them need to be changed to com.actionbarsherlock (if you're using the 4.0 beta) or android.support.v4 Feb 29 03:31:42 okay, so, I need to do a data wipe to install a custom rom. problem is, my tablet is encrypted so cwm cannot wipe data. would it be possible to just select all the files in the data folder and delete them all? thanks in advance Feb 29 03:31:59 Hei: #android-root Feb 29 03:32:00 trimmer they do, but you won't be cut off for just two downloads Feb 29 03:32:16 i dont get it though, i just downloaded the zip, unzipped it, started a new project, and theres all these errors. There are no imports in some of the files with @override errors, I don't understand why I would need to change these Feb 29 03:32:32 o.O Feb 29 03:32:42 what project? Feb 29 03:32:57 did you link the library project properly? Feb 29 03:33:07 im not even that far Feb 29 03:33:18 if it's not linked Feb 29 03:33:21 right after i start the new project from source Feb 29 03:33:31 and label it as a library Feb 29 03:33:45 (its already checked "is library") Feb 29 03:33:46 I'm confused... what are you doing? Feb 29 03:34:26 I just want to add ABS to my app, and just downloaded the ABS zip, and started a new project in eclipse in order to use it as a library Feb 29 03:34:38 you need to link the support library Feb 29 03:34:39 but theres a bunch of errors Feb 29 03:34:46 actually Feb 29 03:34:51 you using 4.0 or 3.5? Feb 29 03:34:51 and all of them are @override errors Feb 29 03:35:02 version for what Feb 29 03:35:05 ABS Feb 29 03:35:16 idk just dl-ed the link Feb 29 03:35:32 3.5.1 Feb 29 03:35:47 :D Feb 29 03:36:15 and what methods have errors? Feb 29 03:36:17 and what is the error? Feb 29 03:36:26 every one is the same Feb 29 03:36:36 Don't say @override error Feb 29 03:36:37 remove @override annotation Feb 29 03:36:47 lool Feb 29 03:36:51 What's the error. something about superclass? Feb 29 03:36:54 Method NAMES Feb 29 03:36:56 or error about the annotation? Feb 29 03:37:26 its just something with @override before it, and if i remove the @override, the error goes away Feb 29 03:37:28 either override isn't overriding, or its errors on interface impl cause he has source set to 1.4 or 1.5 Feb 29 03:37:40 dude Feb 29 03:37:49 "something" is not the right answer Feb 29 03:37:53 theres a bunch Feb 29 03:37:58 MenuItem add(CharSequence title); Feb 29 03:38:01 thats one of the lines Feb 29 03:38:06 thats better Feb 29 03:38:12 theyre not all the same Feb 29 03:38:25 what java are you set to compile with? Feb 29 03:38:30 @Override Feb 29 03:38:30 public int compare(ItemInfo lhs, ItemInfo rhs) { Feb 29 03:38:30 return lhs.position - rhs.position; Feb 29 03:38:30 }}; Feb 29 03:38:40 don't paste a bunch of lines in here, use paste bin Feb 29 03:38:43 yeah, thats 1.6 Feb 29 03:38:49 you need 1.6 source version Feb 29 03:38:52 agree with mrenouf Feb 29 03:38:59 compile with Java 1.6 Feb 29 03:39:05 Eclipse? Feb 29 03:39:07 so, if i run java -version at command line --- 1.7 Feb 29 03:39:22 you need to set what JDK you're using Feb 29 03:39:23 i dont know how to check eclipse Feb 29 03:39:23 its in the project properties Feb 29 03:39:26 in your build path Feb 29 03:39:41 i think the android "fix project properties" might do it Feb 29 03:39:55 Yeah Feb 29 03:39:56 1.5 it looks like Feb 29 03:40:05 change to 1.6, all better Feb 29 03:40:29 sweet, thanks guys Feb 29 03:40:31 lol Feb 29 03:40:59 should run smoothly now sorry for spamming the channel Feb 29 03:43:18 aw dammit Feb 29 03:43:23 spilled tea on my tax documents Feb 29 03:43:32 good thing I'm going to file electronically Feb 29 03:43:35 hopefully it was white tea Feb 29 03:43:55 my app targeting api 8, is that the reason it looks the same in ICS instead of using the new spinners/checkboxes in say my preferences activity? Feb 29 03:44:21 i've been targetting api 8 all along but happened to drop the apk on my wife's phone running ics Feb 29 03:45:50 Alright, I took your suggestions and nuked the repo. I also applied the tcp window scaling tweak talked about on the download instructions.... Lets see if my machine plays nicer now. Feb 29 03:45:55 Thanks for your help. Feb 29 03:46:52 QubeZ did you use built in themes or custom theme? Feb 29 03:47:06 built in Feb 29 03:47:21 then it should use the new ics themes Feb 29 03:47:36 though you may have to request Holo theme, so maybe not Feb 29 03:47:43 the only time i specified a theme is my mapview activities for NoTitleBar Feb 29 03:47:54 t0mless, I would have sent in the tea stains and all in past years. Feb 29 03:47:58 i request that in the manifest? Feb 29 03:48:20 you can't if you're targetting api8 Feb 29 03:49:08 so i'll need to release 3 versions of my app... targeting 8, targetting 14 ics and then a tablet version Feb 29 03:49:30 can you intercept notifications? Feb 29 03:49:43 Nope Feb 29 03:49:52 listen for them? Feb 29 03:50:02 Nope* (Technically AccessibilityServices can get notified) Feb 29 03:50:08 i'd like to try and meet all 3 in one apk... i guess tablet is easy just adding bigger icons and re-org etc... but how do you release a app that will look the "system default" in both ics and lower apis? Feb 29 03:50:59 QubeZ define your own styles Feb 29 03:51:14 Theme.MyTheme parent="Theme.Light" in values Feb 29 03:51:31 and in values-13 put Theme.MyTheme parent="Theme.Holo.Light" Feb 29 03:51:52 QubeZ you can also do the same kind of stuff for supporting tablets Feb 29 03:51:54 and i can still target api 8? Feb 29 03:52:02 no, target 14 Feb 29 03:52:09 er, 13 at least Feb 29 03:52:21 maybe 12? or 11... what was 3.0? Feb 29 03:52:25 but the app will still work on lower? Feb 29 03:52:29 of course Feb 29 03:52:37 as long as you set your minSdk Feb 29 03:53:12 sorry, thats what I meant. minSdkVersion is 8 in my manifest but im also targeting 8. Feb 29 03:53:22 i'll have to target 14 and minSdk 8 Feb 29 03:53:39 so if your minSdk is 8 and target is 13 you can use the Holo theme in values-13 resource folder Feb 29 03:53:59 i need to google differences a bit and get a better understanding Feb 29 03:54:01 and as long as you don't use any API calls above 8 it will still run on everything Feb 29 03:54:11 t0mless: right, gotcha. Thanks. Feb 29 03:54:30 but if you start using higher api calls, query the Build.SDK_INT value and make sure the current device can run it Feb 29 03:54:42 you can support tablets in the same way by using layout-large Feb 29 03:54:47 resource folder Feb 29 03:55:12 using layout-large and dropping icons in drawable-xhdpi right? Feb 29 03:55:16 or layout-xlarge i thought? Feb 29 03:55:25 layout-xlarge is like 10" tablets Feb 29 03:55:30 layout-large is like 7" tablets Feb 29 03:55:45 and I think a lot of tablets are hdpi Feb 29 03:55:48 k but the icons go into drawable-xhdpi? or just drawable-hdpi? Feb 29 03:55:52 probably some that are mdpi too Feb 29 03:56:10 ok.. so throw the biggest icons to support the tablet and android scales them down for the phone Feb 29 03:56:20 for dpi yea it can do that Feb 29 03:56:28 won't do that for size qualifiers Feb 29 03:56:45 so if you have a layout only in layout-large and try to run it on a phone, it will crash and burn Feb 29 03:57:30 right now i have everything working fine on all phones i tested. I'll just need to drop bigger icons in drawable-hdpi and replace my smaller ones then create a layout-large for all my activities Feb 29 03:57:46 then it should look fine on tablet, im guessing Feb 29 03:58:32 we'll be going back to the drawing board on this app soon enough and looking at the ICS design guidelines to influence our next version Feb 29 03:58:38 right now it was just functional Feb 29 04:00:37 Is there a list of "don'ts" for android development? I frequently run into scenarios where ui elements don't appear at all, and it takes ages to figure out why. In one case, I used a LinearLayout, and apparently that one ui element wouldn't work in a LinearLayout. There seems to be a lot of issues like that, and I'd really like a comprehensive list of what not to do. Feb 29 04:01:18 there's lists of what to do and how things work... Feb 29 04:01:41 dont make a back button ;0 Feb 29 04:02:06 what ui element didnt work in LinearLayout? Feb 29 04:04:01 there needs to be a reference guide for device's resolution, psyical screen size, and other qualifiers Feb 29 04:05:00 TrentonAdams I'm also curious to what element wouldn't work inside a linear layout Feb 29 04:05:40 jeppy: lol, really? Why not? You mean android phones don't have those? Feb 29 04:07:51 devtekbeta: I don't even remember now guys, sorry. All I remember, is that in both the VM, and on my phone, I got erratic appearances of the element in the linear layout. When I changed the layout type, the problem dissappeared. It just seems there's quite a few bugs surrounding the use of layouts. I only call them bugs, because there's no errors giving, saying "you can't do that", but instead it just doesn't work. Feb 29 04:08:25 maybe it was size/dimension related Feb 29 04:08:38 devtekbeta: it could have been, or weighting, or something. Feb 29 04:08:43 I was pretty new. Feb 29 04:08:46 Still am really Feb 29 04:09:09 The one I'm working on today was my fault. I was trying to shortcircuit stuff. :P Feb 29 04:09:21 me too Feb 29 04:09:22 lol Feb 29 04:09:23 Just so I could see something work and what not. Feb 29 04:09:43 I was returning a count of 0 from an adapter, oops Feb 29 04:09:44 i guess we can only learn from experimenting Feb 29 04:10:07 good night Feb 29 04:10:15 Yeah, I usually experiment first, in a hacky sort of way, and then clean it up when I know how it works. Feb 29 04:10:45 None of it's really complicated, just voluminous. :P Feb 29 04:11:47 i find drawing elaborate diagrams helps me visualise stuff Feb 29 04:19:05 devtekbeta: yes, I've been doing that too with my UI design. Very helpful. Feb 29 04:20:09 Now I'm having an issue where a multi item ListView item, with a checkbox, is acting strange. When I check one item, multiple items are checked. When I scroll around, the ones that are checked change. I'm obviously reusing instances in some bizarre way. Feb 29 04:20:24 But, I thought I was doing it the same as a couple of different examples I've found on the net. :( Feb 29 04:20:34 yeh. not just for UI wireframes though.... i do it for classes and stuff for all the methods and paramaters interacting with eachother.... just made a blueprint for my arrayadapter and listview... really helps me see the mechanics of how it all interacts Feb 29 04:21:23 if you're re-using convertView you will want to explicitly set the checkbox on/off in getView Feb 29 04:21:34 because it will re-use one of the previously shown list items Feb 29 04:21:42 which may have had the checkbox on Feb 29 04:21:50 wabz: Yeah, i was just about to look into that. Thanks, now I know I'm going in the right direction. ;) Feb 29 04:22:07 TrentonAdams: but it sounds like you're doing the correct thing Feb 29 04:22:26 Trenton Feb 29 04:22:29 im watching this Feb 29 04:22:33 wabz: So, I suppose I should be doing the same as the examples, saving my view instances? Feb 29 04:22:38 in the "setTag()"? Feb 29 04:22:38 http://www.youtube.com/watch?v=wDBM6wVEO70 Feb 29 04:22:49 Google I/O 2010 - The world of ListView ^^ Feb 29 04:22:57 its very helpful video Feb 29 04:23:02 yeah the world of listview is worth watching Feb 29 04:23:11 it covers the viewholder pattern Feb 29 04:23:37 obviously you don't have to do that, you can just findViewById each time Feb 29 04:24:03 in that vid they go through what performance enhancements you get by implementing each of these tactics Feb 29 04:28:06 wabz: I'll take a look. I wanted to omit the hold pattern, because it seemed like just extra code for nothing. Feb 29 04:28:42 it's only a few extra lines of code Feb 29 04:28:51 the benefit of that is nothing compared to re-using convertview Feb 29 04:28:55 wabz: OMG, it's 60 minutes. :P Feb 29 04:29:10 I'm a programmer, I want 5 minute brief. ;) Feb 29 04:29:12 yeah.. that was my reaction too, but at the end I thought it was worth it Feb 29 04:29:15 lol Feb 29 04:29:26 1 hour for ONE widget?? Feb 29 04:29:33 wabz: Okay, maybe. Feb 29 04:29:59 anyway, you can fix your problem just by explicitly setting the checkbox state each time using findViewById Feb 29 04:30:12 then if youwant more performance, do the viewholder pattern Feb 29 04:31:06 wabz: But how do I determine what the checkbox state should be? I'm going to have to store it, no? Feb 29 04:31:20 you can tag it or stored the state in the db Feb 29 04:31:31 oooo, gotcha's and don'ts, maybe I should skip to the end.. lol Feb 29 04:31:43 yeah, don't hyou have some array of objects (or cursor) or somnething for your list? Feb 29 04:31:48 QubeZ: Yeah, that's what I meant by store. :D Feb 29 04:31:51 just add the attribute there if it isn't already Feb 29 04:32:11 wabz: Yes, but the check box is not related to those items directly. It's just a flag to let me do an action on more than one item. Feb 29 04:32:27 So, I think setTag() is the way to go, eh? Feb 29 04:32:40 that will work, but will stop you doing the viewholder thing later :p Feb 29 04:32:53 viewholder should be used Feb 29 04:33:01 its way uber performance Feb 29 04:33:08 hmm, fair enough. Feb 29 04:33:09 you coul djust have a separate list which holds which rows are checked Feb 29 04:33:22 you're gonna want to grab thoes ones quickly later on anyway, I suppose Feb 29 04:33:40 it's not way uber performance Feb 29 04:33:48 it's a small improvement, iirc Feb 29 04:34:20 sorry, i mean reuseable view's instaead of returning new view's Feb 29 04:34:44 diff convo, sorry Feb 29 04:34:54 Yeah, this 60 minute video reminds me of a project I worked on in 2009. I went into the project thinking "this should be really simple". Then, I started reading the 3000 pages of documentation, and second guessed myself, and ended up needing to read a whole lot to be sure what I was doing. In the end, it really was as simple as I thought it was. Why 3000 pages? Feb 29 04:35:26 The project should have taken me a month, it took 6. Feb 29 04:35:39 "Give me 6 hours to cut down a tree, and I will spend the first 4 sharpening the axe" --Lincoln Feb 29 04:35:48 http://www.youtube.com/watch?feature=player_detailpage&v=wDBM6wVEO70#t=749s Feb 29 04:35:49 If they had just given me snippets of code only, with brief notes on what each thing was, it would have been 1 Feb 29 04:35:51 pause it right there Feb 29 04:36:10 the difference between "Correct" and "Fast" is the ViewHolder pattern Feb 29 04:36:56 I clicked a random point in it and got that graph straight away Feb 29 04:37:01 didn't think I'd be able to find it Feb 29 04:37:02 heh Feb 29 04:38:20 wabz: lol, yeah an extra 5 fps for the holdview pattern. Feb 29 04:38:25 wooohooo Feb 29 04:38:40 wabz: You psychic? Feb 29 04:38:45 if you have fairy complicated listview items, it's definitely worth it Feb 29 04:41:01 i used it and thankful for sitting to watch that vid Feb 29 04:41:13 my listview has 7 items to track, all db driven though Feb 29 04:56:08 wabz: yeah, it seems like the state of the checkbox will have to be tracked on my own, eh? setTag() won't work, because it's tied to the view, which Android may throw away, or not use for that element again. Feb 29 05:10:00 so onCreateOptionsMenu is being overridden in FragmentActivity (in sherlock) by a final method (otherwise same signature). This means I can't override it in my app... should I add the code in the final method to the method in my main code? Feb 29 05:10:50 here are the two methods from the fragment activity http://pastebin.com/ihmhfEwi Feb 29 05:11:18 You're overriding the wrong one Feb 29 05:11:30 you have to use the one with the elements from com.actionbarsherlock Feb 29 05:11:41 so the code in the pastebin is sherlocks not mine Feb 29 05:11:52 I know Feb 29 05:12:29 you need to override onCreateOptionsMenu(com.actionbarsherlock.view.Menu menu) { Feb 29 05:13:00 tyvm Feb 29 05:15:46 its actually android.support.v4.view.Menu menu Feb 29 05:15:57 but that got me there Feb 29 05:16:02 that's the wrong one Feb 29 05:16:07 really? Feb 29 05:16:08 you sould be overriding the other one Feb 29 05:16:13 cause the other didnt work Feb 29 05:16:20 your imports are probably screwy Feb 29 05:16:48 oh crap Feb 29 05:16:51 you're using 3.5 Feb 29 05:16:54 nvm Feb 29 05:17:02 use the support.v4 one Feb 29 05:17:09 for sure Feb 29 05:17:26 in ABS 4.0 you have to use the other method sig Feb 29 05:18:09 For some reason I am getting an java.lang.IllegalAccessError error when I try to access java.util.concurrent.TimeUnit.toMinutes. Does anyone know why? Feb 29 05:19:26 :/ Feb 29 05:19:47 JoeTheGuest: stack trace Feb 29 05:20:59 It's fine on my gnex but my droid x errors with that. Feb 29 05:21:30 Whoa Really? That.. is.. weird.. Are they both stock Roms? Feb 29 05:21:51 Nexus is on AOKP and dx is on stock. Feb 29 05:22:20 But it's still odd. Feb 29 05:22:28 That shouldn't matter. Feb 29 05:22:41 Oh so your Nexus is custom? hmm.. I wonder if for whatever reason Moto locked that out of its DVM Feb 29 05:23:14 Theres a dx update, im downloading it Feb 29 05:23:59 It wouldnt surprise me if moto did stupid crap like that Feb 29 05:24:06 All it's doing is converting. It's not like it's trying to grab any system stuff. Feb 29 05:24:12 Yea, I hate moto Feb 29 05:25:59 Ugh, is there a way I can set a Spinners mode if I get it from using findViewById? I want mine use Dialog mode but its on Drop down mode Feb 29 05:28:37 is there any way to update values to the Settings.Secure Content provider? I want to change the default TTS engine programatically. Feb 29 05:28:48 my manifest has this line Feb 29 05:29:15 but I'm getting write access errors when attempting to write Feb 29 05:30:10 Permission denial: writing to secure settings requires android.permission.WRITE_SECURE_SETTINGS Feb 29 05:30:22 Loman: I beleive that is not something a non-system app can get Feb 29 05:30:47 can I make a 'system' app? Feb 29 05:30:49 Loman: no Feb 29 05:31:03 what if I have root access Feb 29 05:31:05 Loman: well, if you roll your own firmware, but only then, and not on other firmwares or any shipped firmware Feb 29 05:31:25 Loman: nope, root won't do it. Needs to be signed by the key that generated the firmware. Feb 29 05:31:31 oh ok Feb 29 05:32:03 thanks for your answer, now I can get some sleep Feb 29 05:32:16 there may be a way to hack it up if you have root, but it'd be really ugly at best I suspect, and fairly unfriendly to the user. You could try asking in android-root or one of the firmware dev channels Feb 29 05:33:07 there's a bunch of permissions in android which are either deprecated or just not available to non-system apps Feb 29 05:38:56 The kindle fire doesn't have any TTS settings availalble to the customer so they can't use a 3rd party tts engine. I was going to see if I can make an app that would allow them to Feb 29 05:44:20 I'm watching the World of ListView on youtube. I'm over half way through. They mentioned having multiple selectable items, but they didn't show how to actually acheive it. i.e. No mentioned of needing to create a checkbox in your layout, or that it will create it for you, etc. Feb 29 05:55:38 Could not find class 'android.widget.PopupMenu' <- I'm not certain why Feb 29 05:56:58 Is it legal to create PopupMenus from a ListFragment? Feb 29 05:59:51 Yea Feb 29 06:00:07 what api you compiling against? Feb 29 06:00:25 I have a FragmentActivity which holds a Fragment added programmatically; after rotation I loose that fragment; how do I get it back? Feb 29 06:00:26 hello everyone! I am having a tough time getting the adb server to start again. I've closed eclipse and tried a dab kill-server, then dab start-sever, but i get a message that daemon not running, starting it now on port 5037, and then a message it did not ACK failed to start daemon thread Feb 29 06:00:38 i had tried to reset dab from ddms but that didn't work either Feb 29 06:00:40 any ideas? Feb 29 06:00:41 findFragmentById or byTag doesn't find it in onCreate Feb 29 06:00:57 if it was added programatically it wouldn't have either of those Feb 29 06:01:03 it got destroyed in onDestroy Feb 29 06:01:22 you should add orientationChagnes to your manifest and handle it yourself Feb 29 06:01:31 the fragment is visible Feb 29 06:01:34 so Feb 29 06:01:35 I just can't get a handle to it Feb 29 06:01:44 Oh Feb 29 06:01:44 I need to pass events to it from the wrapper activity Feb 29 06:02:19 the reference to it is destroyed in onDestroy Feb 29 06:02:24 yes Feb 29 06:02:26 t0mless: 4.0 Feb 29 06:02:28 if you're adding it programatically Feb 29 06:02:34 you will have to add it again Feb 29 06:02:44 vadi2 then popup window should be available Feb 29 06:02:45 I add it if the savedInstaceState is null Feb 29 06:02:52 but on rotate it's not null Feb 29 06:02:57 I am getting HTTP/1.1 503 Service Unavailable: Back-end server is at capacity from Adwhirl. What a piece of junk... Feb 29 06:02:58 Should be... but it's not finding the class at runtime Feb 29 06:03:24 etuleu doesn't matter if the saved instance state is not null, the reference gets destroyed Feb 29 06:03:42 so you either need to handle rotation yourself, or use a weak reference Feb 29 06:03:54 so does this mean I have a leak? Feb 29 06:04:08 not sure if you can put a fragment into the savedInstanceState bundle Feb 29 06:04:11 but you might be able to Feb 29 06:04:21 how come the fragment is still showing in the ui? Feb 29 06:04:23 and then retrieve it in onCreate Feb 29 06:04:59 because it exists, your reference to in your activity was destroyed Feb 29 06:05:25 I imagine that the framework savedInstanceState on onCreate are doing that part Feb 29 06:05:29 of recreating the fragment Feb 29 06:05:38 I see so I need to just find it somehow Feb 29 06:05:44 okay - i learned that if i do an dab nodaemon server i get more info - cannot bind 'tcp:5037' any ideas? Feb 29 06:06:47 sorry adb….stupid lion autocompletion.... Feb 29 06:07:03 something is using that port Feb 29 06:07:14 check your processess and see what's open Feb 29 06:07:18 or do a netstat Feb 29 06:08:09 oh and yikes, talking to you on a mac, but android sdk etc is on windows 7 Feb 29 06:08:29 task manager then Feb 29 06:08:31 i did a netstat and couldn't see anything on that port, t0mless - I'm rebooting now... Feb 29 06:08:35 and netstat is available on windows Feb 29 06:08:54 t0mless, I think I managed to find it; I was using the wrong id; you need to pass the id of the container (in my case a FrameLayout) Feb 29 06:08:59 and not the id of the fragment itself Feb 29 06:09:07 well... yea Feb 29 06:09:19 if you created your fragment programatically it doesn't have an ID Feb 29 06:09:21 well Feb 29 06:09:22 it does Feb 29 06:09:31 the container does have an id Feb 29 06:09:43 if you created your fragment programatically it doesn't have an ID <-- fragment Feb 29 06:09:50 I thought you were referencing the container Feb 29 06:09:54 oh ok Feb 29 06:09:57 thanks! Feb 29 06:11:31 Doesn't seem like anyone else ran into this much, either... hm Feb 29 06:11:47 Could not find class 'android.widget.PopupMenu', referenced from method .Overview$OverviewFragment.onActivityCreated Feb 29 06:11:49 rebooting fixed it - man, this is the best framework i have used in eclipse as far as it not going down too often, i still wish it would be a bit more stable Feb 29 06:13:01 anyone know where I can get more info or tutorials on how to manage calendar items properly? For example, I can understand that recurring tasks are shown on the calendar repetitively with some flag set in the DB as to how often it occurs. But let's say in Google Calendar, you have a recurring task but you remove one instance of it for some date... how is this tracked? Feb 29 06:14:51 not sure that is entirely possible Feb 29 06:15:12 to just remove one instance of the repetative task, but i'm not sure Feb 29 06:15:59 vadi2 double check what you're compiling against Feb 29 06:16:07 in eclipse build path Feb 29 06:16:13 and in project.properties if it exists Feb 29 06:16:18 t0mless: google calendar does it somehow, enterprise calendars like outlook do it somehow Feb 29 06:16:23 its confusing as shit hehe Feb 29 06:16:33 I have no idea how they're stored then Feb 29 06:16:49 t0mless: no worries, thanks. It's an interesting problem. Feb 29 06:17:00 I'll check the build path Feb 29 06:17:04 http://designer.inktastic.com/details.php?product=999385 Feb 29 06:17:12 That's probably how you feel. Feb 29 06:17:29 Yeah 4.0 and ABS+plugins Feb 29 06:17:34 and the support jar Feb 29 06:17:35 t0mless: lol Feb 29 06:18:00 according to the docs android.view.PopupMenu has been available since api 11 -_- Feb 29 06:18:08 er Feb 29 06:18:11 android.widget Feb 29 06:19:02 Shouldn't Eclipse complain about it if it's not visible? Feb 29 06:19:09 hm Feb 29 06:19:13 indeed Feb 29 06:19:19 is this a compile error? Feb 29 06:19:21 It's not... just crashing at runtime Feb 29 06:19:24 nope Feb 29 06:19:37 oh, ClassNotFoundException? Feb 29 06:19:50 what are you testing on Feb 29 06:20:05 My 2.3.3 android Feb 29 06:20:10 that would be why Feb 29 06:20:12 On which ABS is already working so far... Feb 29 06:20:26 Wouldn't no ABS stuff work if that was the cause? Feb 29 06:20:34 No... Feb 29 06:20:45 API 11 = 3.0 Feb 29 06:20:54 so PopupMenu is not available Feb 29 06:20:58 not sure if it's in support lib Feb 29 06:21:00 How are fragments working? Feb 29 06:21:08 Oh, might not be in support lib... Feb 29 06:21:09 fragments are in the support lib Feb 29 06:21:14 That makes sense Feb 29 06:21:22 What else opens the modal window then? Feb 29 06:21:29 if it was in the support lib you'd have to import android.support.v4.widget Feb 29 06:21:30 I guess I'm trying to use the wrong class. Feb 29 06:21:55 PopupWindow exists since api level 1 Feb 29 06:22:27 t0mless: android.support.v4.app.ActionBar actionBar = getActionBar(); <---------no getActionBar() method in ABS ActionBar.java (abstract) how can I instantiate an actionbar to call setDisplayHomeAsUpEnabled() Feb 29 06:22:42 getSupportActionBar Feb 29 06:23:06 tyvm Feb 29 06:23:15 i feel like a blind man Feb 29 06:23:23 thanks Feb 29 06:23:25 There is help docs on the actionbarsherlock.com site Feb 29 06:23:32 there are* Feb 29 06:23:39 shouldnt code high Feb 29 06:24:47 I'm still not clear on how to properly have selectable items in a ListView. When I click on my items, my click listener is not doing anything. Feb 29 06:24:58 selectable and clickable items actually. Feb 29 06:26:22 she runs! Feb 29 06:26:46 i'm so happy Feb 29 06:26:48 :D Feb 29 06:27:46 setSelectionMode() on the ListView Feb 29 06:27:54 if you want single or multiple Feb 29 06:28:23 then you should be using the onListItemClick() from ListActivity or ListFragment, or set a listener on the adapter directly if you're not using either of those Feb 29 06:32:46 t0mless: Yeah, I've done the setSelectionMode, and I have a click listener. I click on any of my items, and *nothing* happens. I don't get a Toast message (which is what I'm doing for now), and then don't appear to get selected either. Feb 29 06:33:13 Pastebin your code Feb 29 06:33:59 t0mless: Feb 29 06:34:01 t0mless: k Feb 29 06:37:24 http://www.youtube.com/watch?v=54Yj1TABy10 < New light show! Feb 29 06:38:08 http://pastebin.ca/2122751 and http://pastebin.ca/2122752 Feb 29 06:38:54 what are you, canadian... Feb 29 06:39:44 t0mless: No, I refuse to admit that. :P Feb 29 06:39:53 Just kidding. Feb 29 06:39:59 Yes, I AM Canadian. Feb 29 06:40:02 eh? Feb 29 06:40:02 That's a deal breaker. Maybe the cow can help you :p Feb 29 06:40:18 gee, thanks. I thought everyone was nice to Canadians. Feb 29 06:40:26 My wife's an American, now can you help me? Feb 29 06:40:28 nah, it's the other way around Feb 29 06:40:29 hi Feb 29 06:40:32 Oh, maybe I shouldn't have mentioned that. Feb 29 06:40:53 why do you have the choice mode commented out? Feb 29 06:41:12 t0mless: Cause I wanted to work on one thing at a time. ;) i.e. clicking first. Feb 29 06:41:26 onItemSelected won't be called without a choice mode Feb 29 06:41:43 t0mless: oh Feb 29 06:41:59 and you should not be setting the listener in the getView Feb 29 06:42:25 t0mless: I set it to single, and I still don't get clicks. Feb 29 06:42:27 you should just override onListItemClick() in your activity Feb 29 06:42:59 t0mless: It's not a list only activity. It has other elements. Feb 29 06:43:09 Oh, silly me, all I need is headers and footers, duh. Feb 29 06:43:19 ahh, didn't see that Feb 29 06:43:30 I should make it a list only activity. Oh, but then I can't inherit from my base Activity, which does some stuff. Feb 29 06:43:54 no no, you don't have to use list activity Feb 29 06:44:02 just set the onClickListener in the onCreate Feb 29 06:44:09 on in getView Feb 29 06:44:20 ListActivity is silly Feb 29 06:44:40 misled me too. Feb 29 06:45:18 You don't have to use list activity, it just provides a lot of helpful stuff Feb 29 06:45:26 t0mless: Oh, right, the click listener probably has to be set before the adapter, eh? Feb 29 06:45:41 you can set the adapter first Feb 29 06:45:47 all I can think of is that it has a way of setting the default view when the list is empty in XML, without writing any code to set the visibility Feb 29 06:45:52 is there another benefit? Feb 29 06:45:55 but you're resetting the listener every single time a new row is created Feb 29 06:46:02 because you're setting it in getView Feb 29 06:46:14 in fact, you're setting it multiple times when you scroll too Feb 29 06:46:46 readme it has a bunch of convience shit, and that empty text you can set on the listview itself Feb 29 06:47:27 like getListAdapter() and setListAdapter() in the activity instead of having to do findViewById(R.id.mylistview).getAdapter() Feb 29 06:47:43 I see that as confusing and unnecessary :| Feb 29 06:47:50 * t0mless shrugs Feb 29 06:48:02 t0mless: Yeah, that's why I had the CRITICAL note in there. ;) I was just hacking, and noticed that through my hacking. Feb 29 06:48:33 you only actually need one click listener, because the views have unique ids Feb 29 06:49:07 and it passes the position of the click to the onItemClick Feb 29 06:49:46 so you can just get the Card object by using the first parameter (you named parent there) and do parent.getAdapter().getItem(position) Feb 29 06:52:18 when I click on my widget, it launches a new activity instead of putting the already launched one on front: http://pastebin.com/sFuhbTSS Feb 29 06:52:23 how to change this behaviour ? Feb 29 06:53:10 t0mless: clicker still not working Feb 29 06:53:36 let's see your new code Feb 29 06:57:37 t0mless: Just one sec, I created another problem. Feb 29 07:00:17 t0mless: http://pastebin.com/c9yTXgbS Feb 29 07:00:37 t0mless: Is that like "without a tomtom"? Feb 29 07:01:12 I need to install an ad blocker or something, this recent pastebin ad about getting rid of skin wrinkles is just fucking gross Feb 29 07:01:39 t0mless: lol Feb 29 07:01:44 t0mless: how old are you? Feb 29 07:01:52 27 Feb 29 07:01:57 t0mless: And where can I see that ad? Feb 29 07:01:59 :P Feb 29 07:02:05 muhahaha Feb 29 07:02:12 it's opened every fucking time I've opened pastebin today Feb 29 07:02:53 t0mless: Maybe they know you're age? You know you're over the hill now, right? Feb 29 07:02:56 do you get a null pointer exception there TrentonAdams? Feb 29 07:02:59 because you should... Feb 29 07:03:00 t0mless: nope Feb 29 07:03:08 t0mless: or, not that I know of, let me check the logs. Feb 29 07:03:30 oh Feb 29 07:03:31 nvm Feb 29 07:03:37 missed the view.findViewById Feb 29 07:03:47 t0mless: I'm running on steam here. Just a sec, I'll add a log statement, to see if my click event fires at all. Feb 29 07:03:49 final List cards = Feb 29 07:03:50 (List) parent.getAdapter().getItem(position); Feb 29 07:04:00 Each item is a List? Feb 29 07:04:32 getItem should only be returning Card object, not a List Feb 29 07:04:44 and you don't need to post a new runable Feb 29 07:04:49 you're already on the UI thread Feb 29 07:05:26 t0mless: Yeah, that's what I thought, about the runnable, but I've seen problems in onCreate(). Feb 29 07:05:43 Oh, no, that's only when running code *in* on create. Feb 29 07:05:52 Not on an event setup there. Feb 29 07:06:03 bingo Feb 29 07:06:13 and most times it's not an issue as long as you do setContentView first Feb 29 07:06:27 but you may as well do your UI updating stuff in onResume() Feb 29 07:06:32 or onStart() Feb 29 07:06:42 t0mless: yeah, probably a good idea. Feb 29 07:06:51 t0mless: Yeah, the click event is not fired AT ALL. Feb 29 07:07:15 hrm... seems like it should work fine Feb 29 07:07:33 well Feb 29 07:07:43 truthfully seems like you should get a ClassCastException Feb 29 07:07:50 t0mless: LOL. I'm using AdapterView.OnClick... Feb 29 07:07:56 because you're casting Card to List Feb 29 07:08:39 t0mless: where? Feb 29 07:09:02 t0mless: oh, in the click, duh. Yeah, but it's not running, so I'm not. Feb 29 07:09:02 line 69/70 Feb 29 07:09:24 t0mless: good catch on a visual. ;) Feb 29 07:09:44 oh... the checkbox is taking over Feb 29 07:09:48 I bet that's what's happening Feb 29 07:09:51 t0mless: taking over? Feb 29 07:09:54 yea Feb 29 07:09:57 stealing the click Feb 29 07:09:59 and not passing it along Feb 29 07:09:59 t0mless: OMG, checkboxes everywhere, they are taking over. Feb 29 07:10:13 you should make the checkbox not clickable in XML Feb 29 07:10:14 t0mless: The langaliers are coming, ahhhhh Feb 29 07:10:17 and then just toggle it manually Feb 29 07:10:20 on list item click Feb 29 07:10:22 t0mless: I'll try. Feb 29 07:10:49 if you click on anything in the row that's not the checkbox/text does it fire? Feb 29 07:11:10 t0mless: clicks still not working, and neither are the checkboxes. Feb 29 07:11:22 t0mless: I didn't add code to check them though, I can do that later. Feb 29 07:11:57 and if you click like the verrrrry edges of the list item row does the listener fire? Feb 29 07:12:34 It seems that if I am to use a PopupWindow+Menu manually, I have to give the width and height of the popup - how will I know that? Feb 29 07:12:53 t0mless: nothing. I'm going to remove checkbox. Feb 29 07:13:33 I had a similar issue in my app before Feb 29 07:13:51 t0mless: you were right, that damn checkbox is messing it up. Feb 29 07:13:56 t0mless: Why though? Feb 29 07:14:00 ahhhhhh Feb 29 07:14:01 Yea.... because they're bitches Feb 29 07:14:33 t0mless: googled it. Feb 29 07:14:35 http://stackoverflow.com/questions/8549751/checkbox-making-listview-item-non-clickable Feb 29 07:14:41 there is some xml attribute you can do to pass the click up the chain Feb 29 07:14:44 t0mless: merci beaucoup t0mless Feb 29 07:15:02 that's the one Feb 29 07:17:17 t0mless: things like this drive me nuts. You know, shit like that shouldn't happen. I did not click that damn checkbox. Feb 29 07:17:37 it's because a checkbox view also has a textview attached to it Feb 29 07:17:39 t0mless: I understand that it had "clickability" and was stealing it, but it shouldn't. Feb 29 07:17:48 and padding around it and shit Feb 29 07:20:23 http://fs02.androidpit.info/ass/x38/628738-1278154321670.png <- is that a PopupMenu? Feb 29 07:20:29 t0mless: Yeah, but I was directly clicking the text too. Feb 29 07:20:45 vadi2: yes Feb 29 07:20:53 alright Feb 29 07:21:08 Surprised it's such a pain to make pre-3.0, I thought they were more widely used. Feb 29 07:21:09 vadi2: You can use AlertDialog to create one Feb 29 07:21:11 vadi2 that's a context menu Feb 29 07:21:27 that is often created on long presses Feb 29 07:21:33 and is supported pre 3.0 Feb 29 07:21:35 Yes, that's what I want Feb 29 07:21:41 look up ContextMenu Feb 29 07:22:06 http://developer.android.com/guide/topics/ui/menus.html#context-menu Feb 29 07:22:20 Aha yeah. Thanks Feb 29 07:23:58 t0mless: Sometimes I think the android dev team is on the cutting edge of stupidity. Feb 29 07:24:22 btw.. are you putting a checkbox with a different textview right next to it? Feb 29 07:24:42 I already closed your pastebin for your item layout Feb 29 07:24:50 t0mless: yes, I hadn't thought of putting the text in the checkbox, duh Feb 29 07:25:03 because checkbox has a builtin textview that you can just set with android:text= or checkbox.setText() Feb 29 07:25:10 less views = better performance Feb 29 07:25:24 t0mless: Okay, but then I wouldn't be able to get the click, right? Clicking the text would check the box? Feb 29 07:25:53 is that not what you want? Feb 29 07:25:56 t0mless: My brother bought the new google nexus, and has shown me soooooo many things that are counter-intuitive. Like REALLY counter-intuitive. Feb 29 07:26:30 t0mless: No, I want the items to be single clickable, but also checkable, to allow a different *batch* operation, such as delete. Feb 29 07:26:55 you should look into using the action mode then Feb 29 07:27:03 t0mless: ? Feb 29 07:27:06 where you can select multiple items when it's enabled Feb 29 07:27:14 new in 3.0 Feb 29 07:27:23 but backported in jake wharton's library Feb 29 07:27:28 t0mless: oh, I want to support 2.2+ Feb 29 07:27:39 t0mless: hmm, interesting. Feb 29 07:27:46 you use much 3.0+ stuff? Feb 29 07:27:56 like the gmail app Feb 29 07:28:05 on honeycomb or higher, uses the action mode Feb 29 07:28:21 though they also use checkboxes so.... Feb 29 07:28:41 t0mless: No, I only have a single 3.0 device, which I haven't used much. Feb 29 07:28:49 t0mless: Is it possible to code for multiple platforms? Feb 29 07:28:54 of course Feb 29 07:29:08 t0mless: hmm, I thought the Java linking would fail on an older device. Feb 29 07:29:19 nah, you just compile against the higher API Feb 29 07:29:31 and then use checks in the code to see if it's safe to call higher level stuff Feb 29 07:29:36 t0mless: So dual compile then? Feb 29 07:29:41 noooooo Feb 29 07:30:15 the IOSched app example does a lot of multiplatform stuff Feb 29 07:30:20 I was sure that imports would break your code if the packages didn't exist. Feb 29 07:30:21 not that well... but they do it Feb 29 07:30:30 nope Feb 29 07:30:32 Maybe that's really old Java and I'm not up to date. Feb 29 07:30:47 only if you actually try to use the object that doesn't exist Feb 29 07:30:58 t0mless: Hmm, okay, cool Feb 29 07:31:33 you CAN make multiple apks if you want Feb 29 07:31:37 the market supports that Feb 29 07:31:54 and then you just provide qualifiers and then it will send the appropriate one to the requesting device Feb 29 07:32:00 Not sure what I'm going to do about the weird checkbox behaviour. I guess I'm going to have to store a list of my own checked items. The optimizations of the ListView are messing with my checkbox states. Feb 29 07:32:15 yea, that's what I did Feb 29 07:32:28 moving away from that though Feb 29 07:32:40 okay, it's not database backed, so I guess that's probably the best way. Feb 29 07:32:49 t0mless: Oh, to what? Feb 29 07:33:01 action bar and quick actions Feb 29 07:33:18 Never heard of them; I'm *really* new Feb 29 07:33:31 the action bar is the HC+ thing, but back ported Feb 29 07:33:42 HC+? Feb 29 07:33:46 and quick actions are like in gtalk when you click the contact badge Feb 29 07:33:48 honeycomb Feb 29 07:33:50 3.0 Feb 29 07:33:53 You're talking to a newb man. lol Feb 29 07:34:12 ah Feb 29 07:34:14 http://developer.android.com/guide/topics/ui/actionbar.html Feb 29 07:34:43 then I think I'm going to use the action mode with the action bar for multiple item actions Feb 29 07:35:05 question - the default black background on apps, does this somehow perform better than say a white or imaged bkgnd? Feb 29 07:35:29 solid color probably has a better performance than an image... but marginally Feb 29 07:36:09 I think there have been studies done and, while it depends on each device, I think blue pixels use less power? or something like that Feb 29 07:36:20 thanks t0mless - i figured better than image. just so…dark. wondered if white used more power? Feb 29 07:36:27 ah... Feb 29 07:36:28 probably does Feb 29 07:36:41 but not noticably Feb 29 07:36:45 unless you're like SOLID white Feb 29 07:36:54 for extended periods of tiem Feb 29 07:36:56 time Feb 29 07:37:33 Yeah, white is essentially all 3 leds on. Feb 29 07:38:01 I don't think blue would be the minimal, I would expect it would be black. black = 3 leds off. Feb 29 07:38:26 though some devices use a backlight, so there's still power usage after the leds are off Feb 29 07:38:55 AMOLED I think goes right off for each pixel that is pure black. Feb 29 07:39:03 thanks TrentonAdams and t0mless Feb 29 07:39:52 yea, I think they just did a test with a bunch of devices with launchers tinted different colors Feb 29 07:40:00 and it was either red or blue that used the least Feb 29 07:40:05 A guy could write an app to keep the screen on in white, then you charge it back up, and go black and do it again, while watching the battery. :D Feb 29 07:40:47 :) Feb 29 07:40:50 t0mless: hmm, very odd from a hardware perspective. Feb 29 07:41:10 I don't think they did a black screen :p Feb 29 07:41:20 hey I want to hook and application launch (any, not necessarily mine). how would I do this? Feb 29 07:41:22 I read it on phandroid like a year ago Feb 29 07:41:28 I have root Feb 29 07:41:37 uhh... what? Feb 29 07:41:50 an* Feb 29 07:42:33 #android-root might know, but I don't Feb 29 07:43:17 you might be able to have a service that watches logcat in the background for the "starting activity (cmp ... )" logs Feb 29 07:43:22 but not sure all devices log that the same Feb 29 07:43:47 I want to conditionally block the app launch Feb 29 07:43:53 lol Feb 29 07:44:06 Yea, not possible with the framework as far as I know Feb 29 07:44:24 'no you cannot send an email right now' Feb 29 07:44:27 #android-root might know more Feb 29 07:44:33 *BAM* Feb 29 07:44:36 lovely Feb 29 07:44:40 In yo face! Feb 29 07:45:04 if it were possible i think KPN over here would block whatsapp immediately Feb 29 07:45:10 on their branded phones Feb 29 07:46:53 along with a shitload other free sms/messaging apps Feb 29 07:46:59 though I just use google talk Feb 29 07:56:17 has anyone worked with the APIDemos for GridLayout? it should have a button, but it is not appearing.... Feb 29 07:58:07 winegoddess: check your weighting. Feb 29 07:58:16 Hello world! ^^ Suggest me pls, where should i hold level data for my android game? Can i hold objects or only! Basic constants like int, string etc? Should i use SQLite, or xml, json, txt file? Thx Feb 29 07:59:04 Defuera: if not so much to store - use SharedPreferences Feb 29 07:59:17 Defuera: if a lot to store, and for different users etc, I'd look into storing in a db Feb 29 08:00:01 You could use a distributed hash table so you have the added benefit of using mapReduce to restore from recent saves through cached inverse keystores Feb 29 08:00:35 Ok, so shared data.. i'm going to study what is it now) Feb 29 08:01:10 But how it looks like? Is it a. class file? Feb 29 08:02:09 Hash table, ok i write it down) Feb 29 08:03:48 Thank you guys, i think i can find now what i want in manuals. Feb 29 08:06:14 hi TrentonAdams - this is the demo - i haven't modified anything Feb 29 08:06:32 winegoddess: hmm, very odd. Feb 29 08:06:48 yeah… :( Feb 29 08:07:42 t0mless: For that check box problem, on ListView. How do I do a click listener that is only setup once, and not every time getView is called? There's no way of knowing the position of the element, because the check changed listener only gives me the checkbox Feb 29 08:08:11 the position is passed to the onItemClick Feb 29 08:08:37 in the AdapterView.onItemClickListener Feb 29 08:09:00 t0mless: I know, but then I have to create a click listener on EVERY call to getView() Feb 29 08:09:02 oh, you mean when the checkbox it checked Feb 29 08:09:09 yeah Feb 29 08:09:51 I think I just kept a separate Vector() or ArrayList() or something of checked items Feb 29 08:09:58 and did .add() and .remove() Feb 29 08:10:06 then .contains() to see if I should check it Feb 29 08:10:14 but there is a way to get the position Feb 29 08:10:18 I'd have to look it up Feb 29 08:11:03 t0mless: Maybe I can get position by object instance somehow. Feb 29 08:11:21 you could statsh it in the checkbox tag Feb 29 08:11:26 stash* Feb 29 08:12:03 oh duh, the position is abailable in getView Feb 29 08:12:11 t0mless: Yeah, but it still causes the issue of needing to create a click listener per call. I don't need to stash it, I can just use it if it's final. Feb 29 08:12:38 for that you would have to create a listiner in getView Feb 29 08:13:04 ah - i think i know why i don't see the button, its off screen of the emulator Feb 29 08:14:33 layout fail? Feb 29 08:14:54 hierarchy viewer will tell you if it's there and where it is Feb 29 08:15:57 ooooh. thanks t0mless - where do i find that…? i just created a new avd. Feb 29 08:16:41 there is a hierarchy viewr perspective in eclipse or you can just run it from the command line Feb 29 08:16:57 the app needs to be open in the avd Feb 29 08:18:28 i openedit in the default and for api 15 - I'm guessing just choosing 4.0.3 defaults wasn't enough and i needed to change the screen? Feb 29 08:18:51 ? Feb 29 08:18:57 oh, maybe i needed to "scale to display real size?" Feb 29 08:19:01 oh yea Feb 29 08:19:06 it makes it huge otherwise Feb 29 08:19:12 unless you use tiny screen res Feb 29 08:22:53 what should I use to makes graph/plot ? Feb 29 08:23:04 is there a best solution ? Feb 29 08:24:49 ooooh ooooh, hey gurus! how do i turn OFF the default "help" on newly launched emulators? its very annoying - and i don't have the fastest system Feb 29 08:25:05 i don't mean via the emulator, before it gets launched Feb 29 08:27:30 doh! on my not seeing the button….needed to be in landscape mode! Feb 29 08:28:52 i'm not sure I know what you're talking about winegoddess Feb 29 08:29:21 also there should be a dynamic layout that loads on the correct orientations so nothing is "hidden" Feb 29 08:37:35 t0mless: when i launch my application with an and that is ICS, i get the annoying help overlays saying things such as, click and hold to add our app to the home screen, etc Feb 29 08:38:05 t0mless: as for the button being hidden, intereting. i just pulled it form the adk download Feb 29 08:38:09 I think you can turn those off in the settings Feb 29 08:38:13 just like any other ICS device Feb 29 08:39:14 i don't want t do it through each device i start up though…would like it across the board Feb 29 08:40:02 It isn't really much hassle to click two "ok" buttons on first launch Feb 29 08:40:42 SimonVT: it is when my system isn't that fast, and it doesn't really respond very quickly... Feb 29 08:40:53 maybe i need more memory :) Feb 29 08:40:59 yea, that's not possible Feb 29 08:41:05 You have to do it once.. The next 100 times you launch that emulator, it isn't there Feb 29 08:41:07 but why would you need more than one ICS avd? Feb 29 08:41:20 If you can't click an ok button, I don't think you'll get much out of using the emulator anyway Feb 29 08:41:53 it works well on all else - it seems the help is particularly slow n closing Feb 29 08:45:37 well, it will only appear once on that avd Feb 29 08:45:41 not every time you launch it Feb 29 08:45:56 also if your computer is crap you should keep the avd open Feb 29 08:46:06 don't close/relaunch on every change Feb 29 08:46:12 and use snapshots Feb 29 08:48:31 t0mless, do you sleep? Feb 29 08:48:37 from time to time Feb 29 08:49:10 In fact, I've tried to make a habit of it Feb 29 08:49:17 it seems like you've been on for 3 days straight Feb 29 08:49:29 yeah it's overrated :P Feb 29 08:49:31 my computer stays on most times Feb 29 08:49:42 i mean actively Feb 29 08:49:48 and sometimes I access it remotely from work Feb 29 08:49:56 and I only work part time so I have tue/weds off... Feb 29 08:50:38 i'm not trying to heckle you, just an observation Feb 29 08:50:42 and IRC is an excellent place to complain :p Feb 29 08:50:55 though the others are probably tired of it Feb 29 08:51:20 nah, you provide info, so it's good Feb 29 08:51:57 I've been slacking on my own app and now I forgot what specifically I was working on Feb 29 08:52:44 i keep getting distracted by you tube Feb 29 08:52:52 haha Feb 29 08:53:03 I get distracted by phandroid/npr/realm of the mad god Feb 29 08:53:11 and sometimes diablo3 and borderlands Feb 29 08:54:05 yeah realm of the mad god just got closed as soon as i saw what it was Feb 29 08:54:14 haha Feb 29 08:54:25 it's quite entertaining Feb 29 08:54:48 shooters tend to make days go by in minutes Feb 29 09:03:12 guys i have an opengl question but nobody is in there, can anyone help me with my 3d camera issue?\ Feb 29 09:09:20 Not I, I don't know enough about openGL Feb 29 09:12:51 If I'm recycling Bitmaps every frame, will that cause GC spam in logcat? Feb 29 09:17:22 starlon: if _you_ do it, it probably will :) Feb 29 09:17:31 damnit Feb 29 09:17:33 :) Feb 29 09:17:35 ;) Feb 29 09:21:42 it may or may not Feb 29 09:22:01 using recycle() on bitmaps just marks that they're eligible for garbage collection Feb 29 09:24:05 For some reason logcat's going nuts with GC spam. Feb 29 09:24:11 Maybe it's something else. Feb 29 09:24:36 https://gist.github.com/1939391/e31ab82533293ecfc3dd119d5656a060a12ff80f Feb 29 09:24:51 What am I doing wrong with respect to identifying / finding my TextView? Feb 29 09:25:33 that is, findViewById(R.id.server_connection_status) returns null Feb 29 09:26:06 you're doing it before setContentView() Feb 29 09:26:11 so at that time it doesn't exist Feb 29 09:26:25 yeah, was just about to say Feb 29 09:26:56 huetsch: Activity.findViewById() does Activity.getContentView().findViewById(), essentially Feb 29 09:27:06 err, eliminating that non-existent e variable: https://gist.github.com/1939391 Feb 29 09:27:10 ahh Feb 29 09:27:13 thanks guys Feb 29 09:28:56 is it possible to make the src of an image view tiled? Feb 29 09:29:04 or does that only work for backgrounds? Feb 29 09:29:49 I have no idea on that one Feb 29 09:29:53 would have to investigate Feb 29 09:30:13 though you could bootleg it by just using a View and setting the background Feb 29 09:31:24 t0mless: well, tiling works ok, if i use android:background in the ImageView, but then padding doesn't have an effect any more. i guess it would be exactly the same for just a View Feb 29 09:33:05 Indeed Feb 29 09:33:13 Margin has an effect on background I think Feb 29 09:33:18 oh ok Feb 29 09:33:21 lemme try that :D Feb 29 09:35:28 i might just wrap a linear layout around it and have that set a padding Feb 29 09:36:04 Or, figure out the difference between margin and padding Feb 29 09:36:21 hehe Feb 29 09:37:10 tapas: padding in the mother is margin of the child :P Feb 29 09:37:25 or same effect, rather Feb 29 09:38:43 I think there is a good visual on the dev site somewhere Feb 29 09:39:46 Mikellip: ok, got it.. thanks.. Feb 29 09:41:18 can't seem to find it though Feb 29 09:42:00 margin is spacing between and view and other views. Padding is spacing between a views bounds and its content Feb 29 09:42:17 but if you draw a box inside a box inside a box inside a box you can then label them, from the inside out: content, padding, margin, parent Feb 29 09:42:52 that is a terrible description Feb 29 09:42:55 but i'm tired Feb 29 09:42:57 so i'm going to bed Feb 29 09:43:05 boxception Feb 29 10:10:43 Nobody knows something about how to close the async task? ^^ Feb 29 10:14:37 kazoooka, ? Feb 29 10:18:25 Check out ASyncTask.cancel(), isCancelled(), onCancel().. it's all there in the manual Feb 29 10:19:23 Just return from doInBackground.. yay, it stops Feb 29 10:19:37 Okay thx mikellip Feb 29 10:21:01 but do your isCancelled check in onPostExecute and not only onCancelled ...because my cancelling makes it end up invoking onPostExecute >.< Feb 29 10:21:24 If you need it that is Feb 29 10:29:01 okay well i thought of something, when i get a message from the handler in my activity then close the task - i now made a global variable in the activity with the task i need and do the task.cancel() when i get the message that it should get canceled Feb 29 10:37:58 Why would you need to cancel an asynctask Feb 29 10:38:26 if the activity/fragment is no longer around? Feb 29 10:44:20 If you are downloading a file and the user clicks cancel, the task would need to be stopped. Feb 29 10:44:55 Alright Feb 29 10:54:15 I need to download some data from the net with 2 options: 1) if the app is closed, i need to update a progressbar in the notification area. 2) if the app is open, to update a progressbar in the app. Feb 29 10:54:35 what do i have to do Feb 29 10:55:20 om4r: you usually want both in the case the app is open Feb 29 10:55:26 at least, that's the android 'standard way' Feb 29 10:55:49 is AsyncTask enough for this? Feb 29 10:55:56 nope Feb 29 10:56:06 normally you would: Feb 29 10:56:37 1) have the activity start a background service that does the download Feb 29 10:57:08 2) update a notification from the service Feb 29 10:57:35 3) broadcast progress updates which any interested party can receive (usually only the one activity) Feb 29 10:57:47 if an android project is made into a library and being used as a library, is its AndroidManifest completely ignored? Feb 29 10:58:17 MDijkstra: how do I broadcast to my app Feb 29 10:58:30 Google BroadcastReceiver, om4r Feb 29 10:58:31 iivvoo: Basically Feb 29 10:58:54 You still want min/target api, but that's about it Feb 29 10:59:08 (just for the lint checks etc, good practice) Feb 29 10:59:09 ok Feb 29 10:59:27 om4r: there are several ways, you could just have 1-to-1 communication between the service and the activity Feb 29 10:59:37 I'm experiencing something strange with a background - it gets smudgy at a random point when using the app Feb 29 10:59:44 its a fine grained pattern Feb 29 10:59:46 problem is, you then have to deal with the fact that the activity can dissapear Feb 29 10:59:53 asif density is handled wrong all of a sudden Feb 29 10:59:54 or yeah, google what Knossos said Feb 29 11:00:04 after a while it disappears. Feb 29 11:00:12 Android has weirdness with gradients sometimes. Is the gradient an image or xml? Feb 29 11:00:20 I wondered if a library that has anyDensity=false might cause this Feb 29 11:01:17 it's not a gradient, it's a bitmap drawable with a tiled png Feb 29 11:01:33 Try setting the background to dithered Feb 29 11:01:35 hmm, ok thanks for the answer Feb 29 11:02:18 android:dither="true" already Feb 29 11:03:02 Alright, the other thing I do sometimes is purposefully add noise to the gradients Feb 29 11:04:07 iivvoo: http://www.planetphotoshop.com/say-goodbye-to-gradient-banding.html Feb 29 11:04:30 Or http://slodive.com/photoshop/how-to-correct-banding-in-your-gradients-using-photoshop/ Feb 29 11:04:37 but it's not a gradient :) Feb 29 11:04:47 it's just a bitmap that somehow seems to get stretched Feb 29 11:04:52 Ah Feb 29 11:05:04 I think I misunderstood somewhere down the line :P Feb 29 11:23:16 I assume android somehow caches the background image Feb 29 11:23:20 something "happens" to it Feb 29 11:23:28 and then it's broken Feb 29 11:23:35 I just wonder what it could be Feb 29 11:45:34 argh Feb 29 11:45:42 I've replaced the background with something else, random Feb 29 11:45:46 now it no longer happens Feb 29 11:46:00 or perhaps it's not visible on this specific background Feb 29 11:48:08 i've been looking at writing an application with plugins on android, i'm wondering if its possible to write a plugin system that is able to get /download plugins from the net ? Feb 29 11:48:35 I see http://code.google.com/p/jspf/wiki/RunningOnAndroid as a simple example, which is cool for local plugins (i think) Feb 29 11:48:50 but is there anything in the security model that would stop downloaded plugins from working ? Feb 29 11:53:08 no idea but it'd be stupid if they don't check for that Feb 29 11:53:39 well, i came across http://android-developers.blogspot.com.au/2011/07/custom-class-loading-in-dalvik.html Feb 29 11:53:47 and i'm not sure if it is , what i think it is Feb 29 11:56:58 hi Feb 29 11:57:11 hello Feb 29 11:57:12 hi Feb 29 11:57:15 hi Feb 29 11:57:30 does anyone know if the Context associated with an Activity holds the Activity class name ? Feb 29 11:57:43 * zhongfu dodges Feb 29 11:57:47 SUCCESSSSSS Feb 29 11:58:07 Achievement unlocked. Feb 29 11:59:51 Achievement unlocked: DODGED QUESTION IN #android-dev Feb 29 12:01:03 i'm going to have to write it to test.. Feb 29 12:02:05 my favorite server is now vanilla Feb 29 12:02:07 hmm... Feb 29 12:04:16 hi :) Feb 29 12:05:24 it is possible to create a virtual interface on an android device ? (my device is rooted but it is an official installation/rom) Feb 29 12:06:10 wrong channel i guess Feb 29 12:06:15 this is for app development Feb 29 12:06:21 try #android and #android-root Feb 29 12:06:57 oh ok sorry Feb 29 12:08:36 is there a way for an android app to get more memory? Feb 29 12:11:03 iivvoo: 3.0+ supports a manifest attribute that gives more memory. There may be valid cases to use it. Feb 29 12:11:40 yeah, just found largeHap Feb 29 12:11:44 heap.. but I'm on 2.2 Feb 29 12:12:09 iivvoo> how much memory are you needing ? Feb 29 12:12:16 (and more importantly, why) Feb 29 12:14:06 not sure, just more, mostly to single out certain issues I'm having Feb 29 12:15:47 iivvoo that clears that up then ;) I'm asking because with all the software I've written, I've only actually needed this one time... so I'm interested Feb 29 12:17:45 my app can share pics, but also be used to share pics. so when i hit share, it itself shows up in the list. any way to avoid this? Feb 29 12:17:54 I'm handling a lot of images/bitmaps, some relatively large Feb 29 12:18:13 hey guys Feb 29 12:19:23 if i have a class + a String Array in it + a method_1 that changes the inside of this array ... now i call method_2 (in the same class) ... what do i have to do to use the CHANGED array? Feb 29 12:19:51 Surfer2010: nothing? Feb 29 12:20:02 yeh, it will be that array Feb 29 12:20:15 since you pass by ref Feb 29 12:20:15 xroberx, Activity *is* a Context Feb 29 12:20:45 iivvoo> I see. I had a similar situation ... it seems on a lot of GB devices you can use as much memory as (full screen 32 bit bitmap) * 2 Feb 29 12:20:54 xroberx, you can use PackageManager to get the label if that's what you want Feb 29 12:21:26 iivvoo> theres a few Bitmap properties that may be of help, depening on where you get the imagery from Feb 29 12:21:54 mrenouf: thanks, that's very useful Feb 29 12:22:02 iivvoo> also if you do not need access to the Bitmap object but just keep images in memory, you can allocate memory in native code and store the image data there while you don't use it... native code is not limited to the VM memory restrictions Feb 29 12:22:13 alankila but i tried and the second method is using the "old array" Feb 29 12:22:23 Chainfire, I've read that - native code or opengl textures Feb 29 12:22:25 Surfer2010: doubt it. Feb 29 12:22:27 http://pastebin.com/mXakQ0zg Feb 29 12:22:29 but that's too much work right now Feb 29 12:23:18 Surfer2010 ugh.. how about using an arraylist? Feb 29 12:23:26 alankila: after i used doRotate a couple of times i use doSwitchRecieve and it used the "old team1" Feb 29 12:23:35 iivvoo> well if it's just for personal testing, you can always root your phone and edit /system/...prop and make vm heap size larger Feb 29 12:23:50 xorgate: don't know how to :( so i used this Feb 29 12:24:24 Surfer2010: yes, that is obvious. Feb 29 12:24:35 and expected. Feb 29 12:24:37 meanwhile I'm still fighting my background tile issue Feb 29 12:24:40 driving me crazy Feb 29 12:24:55 I've taken the background image, added some markers to it so try and see what happens Feb 29 12:24:59 and now it won't happen :( Feb 29 12:25:01 your team1recieve is actually fully independent of the team1 array Feb 29 12:25:26 what they have in common are the *values*, Feb 29 12:25:46 Surfer2010 what are you trying to achieve? i'm sure there's a more stable and clean way to do it Feb 29 12:25:46 I however guarantee you that changes to team1 array are seen by both methods. Feb 29 12:26:12 you mean i need to build the team1recieve inside the doSwitchRecieve method to get it work? Feb 29 12:27:05 Surfer2010: you could consider only storing the int numbers of the team1 array indices there. Feb 29 12:27:36 so you'd be having int[][] team1Receive = { { 1, 1, 2, 3, 4, 6 } etc. Feb 29 12:27:40 xorgate: i try to have a "look up table" where it can get "how do they stand" who is where because on 6 different roations they are set up different Feb 29 12:28:00 then when you need names, or whatever, you look them up from the updated team1 array. Feb 29 12:28:32 oh right alankila :-O good that makes sence ... and i know my mistake now :) Feb 29 12:28:50 yes, you had copied the values of the team1 array, but there is no link to the team1 itself. Feb 29 12:29:12 xorgate: there for sure is a better way ... (isn't there always^^) ... but i don't know how to ... it's about basically a volleyball team on the field ... Feb 29 12:29:31 yes and i thought it was a link ;) Feb 29 12:29:54 Surfer2010 so you have a lookup list of 6 times 6 players, so you could have a base array of 6 names, and 6 lookup tables containing indices into that array? Now you copy strings Feb 29 12:31:05 Hey all. Is it possible to send out a gllobal intent that any other (if they are listening) can respond to? Feb 29 12:31:10 it seems that my activity's onCreate is called whenever the screen gets rotated 90 degrees - is that what's supposed to happen? Feb 29 12:31:12 in theory :-) Feb 29 12:31:25 squeakytoy yeh look into broadcasts Feb 29 12:31:30 huetsch: unfortunately yes. Feb 29 12:31:32 nice, thanks Feb 29 12:31:52 alankila: can I just tell my app to only accept one orientation and not to rotate? Feb 29 12:31:56 and if so, how? Feb 29 12:31:57 huetsch: android recreates the view tree and the only way to do it is to fire onCreate again. It's an android snafu, fixed by fragments, where fragment creation is separate from view tree creation Feb 29 12:32:06 huetsch you can avoid this with some trickery. look into onConfigurationChange Feb 29 12:32:27 huetsch or tell the app to only do portrait in the manifest Feb 29 12:32:35 yes, there are ways to disable it... configChanges="orientation" in manifest, etc. Feb 29 12:32:45 ah, the portrait sounds like what i want Feb 29 12:33:11 thanks Feb 29 12:33:12 but be careful some devices are default landscape ;0 Feb 29 12:33:32 or rather users would generally use them in landscape Feb 29 12:34:00 i'm not picky here, this is an internal app, and I just want to avoid the possibility of oncreate being called multiple times Feb 29 12:34:14 if they need to rotate or it looks squashed, so be it Feb 29 12:34:36 xorgate: 0 xor 0 = 1, 0 xor 1 = 0 and 1 xor 1 = 0 right? Feb 29 12:35:01 God I don't remember any of my boolean logic and I call myself a programmer... shame Feb 29 12:35:12 huetsch you can call requestLayout() in the config chance to handle the orientation change and have a new layout, while avoiding destroy and create of the activity Feb 29 12:35:33 suckahs check out my badass game http://impact.mikedg.com/unityweb/WebPlayer/WebPlayer.html Feb 29 12:35:46 DammitJim one of the 2 should be 1 Feb 29 12:35:53 to be true Feb 29 12:36:13 DammitJim: wrong Feb 29 12:36:20 o, so one does the inverse first, then OR Feb 29 12:36:23 0 xor 0 = 0. Feb 29 12:36:24 Dammit! jim Feb 29 12:36:40 exclusive or. Either one must be 1, the other must be 0. You just have to think what the exclusive means to remember this. Feb 29 12:36:43 I'll remember that... 1 of the 2 needs to be 1 Feb 29 12:36:54 and only 1 Feb 29 12:37:05 right, both 1s gives you a false Feb 29 12:37:15 then again who ever uses xor in coding anymore Feb 29 12:37:23 i do Feb 29 12:37:33 xorgate, that's funny because my boss always talks about everything in terms of xor Feb 29 12:37:35 why would you program and not use XOR Feb 29 12:37:47 using xor is patented! Feb 29 12:37:47 no, wait... mutually exclusive is not the same as xor, is it? Feb 29 12:37:49 DammitJim: your boss is a xor Feb 29 12:38:03 mikedg, to be honest, I thought for a moment xorgate was him LOL Feb 29 12:38:05 mikedg i never seem to need it.. used it when fiddling bits around in my assembler days though Feb 29 12:38:06 thx xorgate and alankila it works now :) Feb 29 12:38:07 * alankila imagines the xor cursor patent expired long time ago Feb 29 12:38:25 huetsch, you're doing it wrong Feb 29 12:38:27 ah, awesome, no more problems with that. thanks guys Feb 29 12:38:53 It took me a while to realize once why there's || and && but not ^^. :-/ Feb 29 12:39:03 mrenouf: the right way is fragments? Feb 29 12:40:13 I suggest fragments personally because of the possibility to setRetainInstance(true) on them. People who have difficulties with the fragment object changing or losing state should have these problems go away. Feb 29 12:40:25 huetsch, no, trying to avoid onCreate being called more than once. You don't control that. It means you're dependent on static state in your activity. You're going to have other issues if you follow that apoproach. Activities should restart gracefully. Feb 29 12:40:53 and this solution is reasonably clean compared to the onRetainNonConfigurationInstance crap Feb 29 12:41:59 hmm, so I'm just trying to set some stuff up once and then pass the info off to a service that the activity starts Feb 29 12:42:20 huetsch, oh, then you have nothing to worry about Feb 29 12:42:51 incidentally, if I call finish() from the activity that launches the service, will the service still stick around? Feb 29 12:43:05 huetsch, if you startService yes Feb 29 12:43:13 great, thanks Feb 29 12:43:15 huetsch: and don't stopService on onDestroy Feb 29 12:43:15 thats the whole point of services Feb 29 12:44:10 you can use 'binding' to start/stop the service in refcounting manner Feb 29 12:44:19 one good pattern is to have the service post a notification and stop itself when it's done Feb 29 12:44:21 if you need such behavior Feb 29 12:45:30 ah, ok Feb 29 12:46:26 is it expensive to carry a object of type location arround or should i implement a new class which only contains attributes needed? Feb 29 12:47:27 carry around where? object of type location? Feb 29 12:48:23 between my gps handler and my view / activity Feb 29 12:49:24 onLocationChanged(Location loc) Feb 29 12:49:41 should be alright Feb 29 12:50:01 but you could, if it turns out to be too expensive Feb 29 12:50:09 simply make your own container Feb 29 12:50:17 you only neet lat long and accuracy? Feb 29 12:50:25 till now Feb 29 12:50:31 maybe speed later Feb 29 12:51:07 but I think you should be alright Feb 29 12:51:14 considering it implements parcelable Feb 29 12:51:56 ty Feb 29 12:56:32 does the sherlock split actionbar work on pre3.0? Feb 29 13:07:56 http://europe.nokia.com/PRODUCT_METADATA_0/Products/Phones/8000-series/808/Nokia808PureView_Whitepaper.pdf this is interesting, even though most of it went over my head Feb 29 13:08:11 wonder what mr romainguy_ thinks (being the resident photographer and all) Feb 29 13:08:17 heh Feb 29 13:12:40 bourke, thats kind of the whole point I think Feb 29 13:13:59 mrenouf: not following.. Feb 29 13:14:55 sherlock provides actionbar stuff on previous releases Feb 29 13:15:06 so it should all work back to 2.1 Feb 29 13:15:27 At least for abs 4.0, I'm not sure about 3.5 Feb 29 13:15:47 storkme, how the hell did they acheive a 41MP sensor?! Feb 29 13:16:06 wizardry or some shit Feb 29 13:16:10 brb going back to work Feb 29 13:18:08 hello Feb 29 13:18:15 ive just thought of the most frikken awesome idea that will transform the android phone! Feb 29 13:18:21 Arkezis: patent pending! Feb 29 13:18:23 I'm looking for create my own android's rom Feb 29 13:19:08 squeakytoy: ? Feb 29 13:19:14 nvm :-) Feb 29 13:19:15 ok Feb 29 13:19:27 turns out that my background is sometimes simply not tileing Feb 29 13:19:50 which explains the stretching. Wasn't sure if it was just stretching or some other (density) effect Feb 29 13:19:53 I've downloaded all the sources, but I just want to "import" them in Eclipse to browse and mobify them easily... Do you know how to do this ? Feb 29 13:20:12 when I'm importing them, a lot of projects are imported, but it's like application projects Feb 29 13:20:15 I have no clue how to google this - android background tile gives tons of irrelevant results Feb 29 13:20:52 http://stackoverflow.com/questions/8030934/android-tiled-backgrounds-occasionally-get-stretched might be related Feb 29 13:21:39 nobody's working on framework modifications ? :/ Feb 29 13:22:59 can a method return two values like one boolean and one array? Feb 29 13:24:29 You can return an array of objects, with the first object being a boolean and the second an array Feb 29 13:25:06 Although it's a bit dirty Feb 29 13:25:09 What do you need it for? Feb 29 13:25:18 android:layout_margin y u ignore bottom margin >.< Feb 29 13:25:30 Otherwise you can create a DTO class for it which has a boolean and an array Feb 29 13:26:10 mh okay i want to replace an element of an array, wrote a method for it, but now i wanna return in this method the "edited array AND if it worked or not Feb 29 13:26:34 how about the edited array if it worked and null otherwise Feb 29 13:26:37 hmm, romainguy is actually responding in the SO discussion Feb 29 13:26:40 just make it return a boolean and give the array to be modified as parameter? Feb 29 13:26:48 here: http://pastesite.com/32216 i get a warning about nested weights being bad for performance.. what would be the alternative? Feb 29 13:26:59 bottom line, repeating backgrounds in android are hell Feb 29 13:27:45 iivvoo: we just stumbled over this bug in our app, too. to reliably tile the background of a view you need to tell it that the drawable has been mutated.. Feb 29 13:27:51 so i call the method and if i get the boolean = true back i say newarray = .... and if false i open an dialog or something is that what you mean Esox? Feb 29 13:27:54 huh repeating backgrounds are hell? Feb 29 13:28:03 what do you mean? Feb 29 13:28:51 iivvoo: so we manually use this function on every view that hasa tilable bg: http://pastesite.com/32217 Feb 29 13:29:02 A silly question - if I disabled one of the preloaded apps then how do I enable it again? It's not displayed in Settings -> Apps -> All anymore :P Feb 29 13:29:32 Surfer: PM Feb 29 13:29:34 ah nevermind, I'm blind Feb 29 13:29:46 (they are at the end of the list) Feb 29 13:30:20 mikedg: there seems to be a rather longstanding bug in android (up to 3.0 or something) with tiling backgrounds (especially when the same bg is used in different views) Feb 29 13:30:34 we scratched our heads for a while about this, too Feb 29 13:30:54 oh that makes sense Feb 29 13:31:32 so nobody's know how to import framework in eclipse ? (noob inside \o/) Feb 29 13:31:46 import framework? Feb 29 13:31:57 Arkezis: it's probably as easy as adding a jar somewhere in your project directory Feb 29 13:32:13 tapas: in fact, it's not :p Feb 29 13:32:18 eclipse will not build a rom for you Feb 29 13:32:32 tapas nice, many thanks Feb 29 13:32:50 mikedg: i don't want it to build my rom, just use it to browse and mobify easily the code Feb 29 13:32:59 iivvoo: i guess you could make an easier function that traverses the view hierarchy from a given view root.. Feb 29 13:33:27 iivvoo: with this function you have to basically add an id to every view that uses a tilable bg and findViewById it and pass it to this functions.. Feb 29 13:34:05 iivvoo: note that this has to be done everytime a view gets inflated (so especially in BaseAdapters that inflate views themself) Feb 29 13:34:20 tapas the background in question isn't used that much Feb 29 13:34:21 tapas: i've tried to "import" but it has imported me projects like adt, adt-feature, adt-ndk.... Feb 29 13:34:32 well, it sorta is, it's defined in only a few places and reused a lot Feb 29 13:35:27 Arkezis: are you talking about java's "import" keyword or about the "import" of a framework into eclipse? Feb 29 13:36:21 tapas: import into eclipse ! I'm just at the beginning, trying to create an eclipse project with all the android framework ! ;-) Feb 29 13:37:06 tapas I assume it will (also) work for views that have their background set throug styles.xml and/or directly from the layout xml? Feb 29 13:37:33 tapas you should paste your fix to those SO links I gave Feb 29 13:37:38 (if you don't want to I can do so) Feb 29 13:43:31 iivvoo: my colleague got the fix from somewhere else.. i guess it's small enough, that one can take it without attribution if it helps people Feb 29 13:43:38 iivvoo: paste it yourself :D i'm busy atm Feb 29 13:43:54 ok Feb 29 13:44:00 I hope it fixes my problem - many thanks again Feb 29 13:44:02 iivvoo: and yes, i'd assume for all those views.. Feb 29 13:44:31 Arkezis: oh ok, if so: get the ADT plugin and follow the instructions for a hello world app Feb 29 13:45:01 tapas: I think you're not understanding me (I'm not explaining that much well :p) Feb 29 13:46:23 tapas: I want to modify the android framework and build a new rom. I almost know which files I have to modify (LocationManager.java principally) but I just want to modify it with eclipse interface. for know, I was using notepad to modify files and it's not that much easy and convenient... Feb 29 13:47:28 storkme: That Nokia thing... isn't that all just conventional technology but with downscaling rather than upscaling for the zoom? Feb 29 13:48:12 Is there a god tutorial wich explains the basic In java programming: Feb 29 13:48:31 android orientated ofcourse Feb 29 13:49:11 probably somewhere in google's database Feb 29 13:49:42 If you know OOP and another programming language it shouldn't be too hard to just throw yourself into android programming Feb 29 13:49:57 there is a basic concepts for android on google Feb 29 13:49:58 well, the way I understood is they have a huge 41MP ccd that captures the whole 'scene', if you wanted a zoom level of 2x you'd just capture a region of the data on the ccd and throw the rest away, so a normal zoom doesn't do any sampling (assuming you wanted a full resolution image) Feb 29 13:50:09 just check out the basic concepts like intent etc Feb 29 13:50:15 yeah Feb 29 13:50:27 storkme: A normal zoom will probably do some downsampling, except at maximum magnification. Feb 29 13:50:29 and for noise reduction they combine multiple physical pixels into one virtual pixel Feb 29 13:50:43 yeah, what he said Feb 29 13:51:11 normal digital zoom just captures a region of the ccd then upsamples it to a larger res, the prueview doesn't have to do that since they have 40MP to work with Feb 29 13:51:29 Arkezis: ah ok. then i have no clue.. what kind of build system does the android framework use? Feb 29 13:51:33 They can, of course, also use the extra physical pixels for some convolution filter to straighten out some lens effects. Feb 29 13:51:50 if it's ant, then just import it into eclipse as existing ant project.. Feb 29 13:53:04 tapas: I know that the files I have to modify are java files. I thought I can create an eclipse project with all the sources to browser them easily.... Feb 29 13:54:29 Arkezis: yeah you can do that.. in the package explorer: right click, choose Import... Feb 29 13:54:48 then from the list of things just choose "File system" and navigate to the root of your stuff you want to edit.. Feb 29 13:55:41 Arkezis: but wouldn't it be nice, if eclipse would also build the thing for you? but anyways, i guess this channel is more about app-development and not so much about creating your own images Feb 29 13:55:58 which is a rather complex topic i guess. maybe there's #android-root or something Feb 29 13:56:28 Workboot: I don't think it has a moving lense Workboot Feb 29 13:56:31 * Workboot wonders if he knows the team who did the ISP for that device. Feb 29 13:56:43 storkme: Got a BOM or teardown or something? Feb 29 13:57:15 sorry, nope Feb 29 13:57:18 (what's a BOM?) Feb 29 13:57:37 Bill of materials. Feb 29 13:57:47 byte-order mark! ;) Feb 29 13:57:57 The place people like me normally look to see if they're in another device they didn't know about. Feb 29 13:58:00 sorry mate no idea, it was only anounced a few days ago so probably too early for the teardown at least Feb 29 13:58:37 Luckily, since I quit that job, and I didn't know anything about it at the time, I'm free to speculate. Feb 29 13:59:10 Anyone know where the emulator makes system dumps/snapshot data? I remember nuking a whole load of junk from my PC a while ago, but can't remember where the emulator puts it Feb 29 13:59:57 funny to see though that the only area where nokia still leads is imaging Feb 29 14:00:04 snapshots are in docs\user\.android, but IIRC it also creates a system dump elsewhere every time the emulator crashe Feb 29 14:00:12 how challenging would it be to port something like apt to Android? Feb 29 14:00:20 quite challenging Feb 29 14:00:37 or well, it'd depend on what you want it to do Feb 29 14:00:41 what about replicating similar function? Feb 29 14:00:54 again, depends on what you want it to do Feb 29 14:01:17 just pull a list of packages, install them, remove, check for updates Feb 29 14:01:21 you already have the openwrt package manager, ipkg Feb 29 14:01:27 that you could use Feb 29 14:01:31 that's a lot simpler Feb 29 14:01:32 o.o must check Feb 29 14:01:43 does it allow custom repositories? Feb 29 14:01:49 possibly Feb 29 14:02:05 hmm, alright, checking Feb 29 14:04:10 Esox got 2min ? --> can i open Dia? Feb 29 14:04:22 Surfer Feb 29 14:04:23 PM Feb 29 14:09:34 MDijkstra: I think Nokia still lead in radio technology as well. Feb 29 14:09:50 well, could be Feb 29 14:09:57 I have very little patience for trying to talk to someone using an iPhone in poor coverage. Feb 29 14:10:01 but that's not that apparant to the average consumer Feb 29 14:10:04 Like, most of Cambridge. Feb 29 14:10:08 at least, where I live Feb 29 14:11:28 Just today I hung up on my other half and called her back on the landline just because her phone is too crappy. Feb 29 14:13:03 yeah, the iPhone is pretty bad in that regard Feb 29 14:13:31 my dads' iPhone loses coverage constantly Feb 29 14:14:08 Where are @id's declared for design xmls? Like where is @id/statusIcons declared at to be used in other xmls. Feb 29 14:14:27 muffunz: declared anywhere Feb 29 14:14:32 Actually... Nokia may only be mediocre, but the iPhone makes them look pretty smart. Feb 29 14:15:08 Well I mean lets take specifically statusIcons. I'm trying to edit the way the status bar is setup in UnNamed ROM for the SGS2. Feb 29 14:15:10 oh man, TTS quality is really bad. why is it so noisy? seems like it's clipping as well. Feb 29 14:15:11 I am new to Android. If possible please tell me what to read for, I can find out the rest. I have a prebuilt executable that I want to be copied in /out/.../system/bin. Should I create a new directory within the prebuilt, and use add-prebuilt-files to copy the same ?. Thank you for any help. Feb 29 14:15:48 I blame nokias issues on not listening to feedback from consumers.. and then like MANY MANY companies trying to frantically release something that competes directly with x Feb 29 14:16:02 oh androd is open linux with opensource this and that Feb 29 14:16:05 we need to build the same Feb 29 14:16:55 I blame nokia's issues on management that had 2 years to respond to the grave threat that was the iPhone Feb 29 14:16:58 but chose to ignore it Feb 29 14:17:14 only noticing once it was kind of too late Feb 29 14:17:27 I mean I think the european market in large is a diff market than the united states Feb 29 14:17:40 I think nokia has always been huge in europe and people were mostly ok with their phones Feb 29 14:17:46 I'm from europe Feb 29 14:18:01 and even here you don't see many nokia's anymore Feb 29 14:18:08 mostly the old dumbphones Feb 29 14:18:21 but what did I see? Durable, plastic, but durable phones with a dated UI and old apps Feb 29 14:18:39 I had an old symbian smartphone, and honestly I didnt mind it much Feb 29 14:19:10 the last symbian phone I owned was the E61i Feb 29 14:19:16 I think companies need to be aware of threats and be ok with innovating new products, not just trying to get something out that does exactly what x does on another platform Feb 29 14:19:24 microsoft lately has had a HUGE problem with that Feb 29 14:19:29 it was good, but the iPhone was a huge leap forward in terms of what I could do on my phone Feb 29 14:19:33 the last symbian phone i owned was the Nokia X3 and that was only for 3 months Feb 29 14:19:34 oh god we need a modern smartphone OS Feb 29 14:19:55 so they take some amazing technology and then put that shitty ui on it Feb 29 14:20:04 yeh Feb 29 14:20:17 and desperately desperately push it Feb 29 14:20:32 but nokia, instead of responding by building their own awesome next-gen OS, gave apple the time it needed to give the iPhone mass market appeal Feb 29 14:20:35 its like fuck competing... you are going to lose no matter what. Worry about innovating your own ideas Feb 29 14:20:46 So what are my chances of having any success at all building android on a 32bit machine with a 3.04 GHz hummingbird Intel single core cpu and 4GB ram? Feb 29 14:20:50 if they had responded immediately I guess they'd have crushed apple on momentum alone Feb 29 14:21:14 http://gizmodo.com/5365299/courier-first-details-of-microsofts-secret-tablet Feb 29 14:21:16 32bit? Feb 29 14:21:35 if microsoft had actually released that instead of just building a video about it and walking away Feb 29 14:21:42 I am sure they would have significant tablet market share Feb 29 14:21:53 ron_frown: the courier is years-old news :/ Feb 29 14:22:00 thats my point Feb 29 14:22:15 the mockups were amazing.. the ui concepts were definitely bleeding edge Feb 29 14:22:25 they just walked away from it =) Feb 29 14:22:49 decided to focus on building their own mobile os to TRY and compete... and waste time on stuff like IE Feb 29 14:22:57 they're not a hardware company, at the core, and they couldn't find third-parties to build them afaik. Feb 29 14:23:27 imagine the "OMG ANTITRUST!!!!1111" that would have ensued (wrongly) if they had decided to do it as a first-party product. Feb 29 14:23:43 I really couldnt imagine what ms would have to do to make wp7 a winner Feb 29 14:24:05 make it completely open, release dev tools for several platforms, revise the UI Feb 29 14:24:06 Presumably Apple snuck up on Nokia by using a really low-quality camera so that they'd be completely ignored. Feb 29 14:24:11 might as well walk away Feb 29 14:24:13 ron_frown: they can't. they eliminated all enterprise desire for the platform and they alienated too many devs. Feb 29 14:24:27 dont get me wrong... .net and c# is fucking bitchin Feb 29 14:24:55 but, they would have been better off focusing on how to get those techs running on platforms etc Feb 29 14:25:10 ron_frown: .net 3.5 ran on windows mobile 6 just fine. Feb 29 14:25:12 because with commecial closed os they have to figure out how to convince OEM to use it Feb 29 14:25:22 I think "just fine" is an overstatement Feb 29 14:25:24 it worked Feb 29 14:25:29 was it not compact edition? Feb 29 14:25:45 and afaik all wm6 devices were slow as alls hit Feb 29 14:25:47 yeah. afaiui, winphone 7 also doesn't use the full .net Feb 29 14:25:47 all shit Feb 29 14:25:54 true true Feb 29 14:26:00 nah. the later wm 6 phones were pretty nice. Feb 29 14:26:24 mine's great for ssh, for example, since it has onboard rsa encryption acceleration Feb 29 14:26:29 my previous phone was a winmo 6.5 (flashed new rom, now at 6.5.5) Feb 29 14:26:34 HTC Touch2 Feb 29 14:26:48 I mean between android and wm7... people already like android, its enticing for oems because its mostly free, and customizable Feb 29 14:26:54 huge customer base, and huge app creator base Feb 29 14:27:01 its just a no brainer Feb 29 14:27:07 anyway Feb 29 14:27:13 preaching to the choir anyway I assume Feb 29 14:27:17 I need to go to damned wokr Feb 29 14:27:18 peace Feb 29 14:27:40 heh. i was going to point out the other side of why the platform's fail :D Feb 29 14:27:54 heh Feb 29 14:32:44 I see http://code.google.com/p/jspf/wiki/RunningOnAndroid as a simple example, which is cool for compiled local plugins, is there any reason one couldnt get plugins from the internets for android apps ? (from within the app ) is there some security model that would stop it ? Feb 29 14:33:05 clear Feb 29 14:33:25 hi! How can I retrieve a single row from a sqlite database? Feb 29 14:33:32 select it by unique identifier. Feb 29 14:33:51 oh shit Feb 29 14:33:52 quake warning of a mag. 7 Feb 29 14:33:55 where. Feb 29 14:33:59 japan Feb 29 14:34:03 (where I am) Feb 29 14:34:07 yes... i did it and the content are strings. how can I put the result into a textview? Feb 29 14:34:32 w33dy, sweet that was quick, you read up on tutorial on setting the text in a textview. Feb 29 14:34:49 i mean, you know the name, get it, then look at the textview functions, i'm just punting, but it ssomething like setText(something) Feb 29 14:34:56 textview.setText(something) Feb 29 14:35:20 NOTICE Feb 29 14:35:20 let me check if we can insert strings into textivew Feb 29 14:35:24 *textview Feb 29 14:35:28 i imagine you can. Feb 29 14:35:46 IF I SEE YOU DRIVING AND TALKING ON THE PHONE EXPECT TO SEE A NUMBER OF GOLF BALLS FLYING AT YOUR WINDSHIELD Feb 29 14:36:10 that is all Feb 29 14:36:26 Tron-, be safe. Feb 29 14:38:59 I have a Service that fires new Threads, and an Activity that I want updated. First I passed the activity to the service (service.setview(activity)) but when i called activity.update() it was complaining since it was being called from the wrong thread Feb 29 14:39:09 so i read I need to use a Handler Feb 29 14:39:41 so i created a Handler on the activity and passed that, but I still get the error that it's being called from the wrong thread Feb 29 14:39:48 BloodSkin, don't answer the phone when playing burnout paradise, got it. Feb 29 14:42:36 should this work? http://pastebin.com/nUGFMkZf Feb 29 14:46:04 Who can I whisper for a XML Layout - don't get why something isn't working the way i thought it would... Feb 29 14:49:20 It's now working great, thank you. Feb 29 14:49:21 :) Feb 29 14:50:55 ungamedplayer: thanks - turns out it was only a 5.1 Feb 29 14:51:57 is there any way to see how people got to downloading my app? say from a referral or something Feb 29 14:55:15 i dont know how anyone works in eclipse.. really. Feb 29 14:55:53 ungamedplayer: specific problem ? Feb 29 14:57:12 importing a project, that apparently has a plugin, error code shown in errors tab, double click error, takes me to the wrong line, wrong place. Feb 29 14:57:27 find what its complaining about 5 lines down Feb 29 14:57:40 why does this Feb 29 14:57:41 android:id="@+id/scoreText" Feb 29 14:57:41 android:layout_width="wrap_content" Feb 29 14:57:41 android:layout_height="wrap_content" Feb 29 14:57:41 android:layout_gravity="center_horizontal" Feb 29 14:57:41 android:text="Medium Text" /> Feb 29 14:57:41 not get centered in my linearlayout? Feb 29 14:57:43 Did you try cleaning the project ? Feb 29 14:57:50 edit, then i get it complaining "IResPlugin.java was modified manually! Reverting to generated version!" Feb 29 14:57:59 so, i guess this code is generated.. from somewhere.. Feb 29 14:58:06 i'm guessing an AIDL file or something similar. Feb 29 14:58:32 kazoooka dont do that Feb 29 14:58:39 JeroenDL, you mean under project->clean ? Feb 29 14:58:46 ungamedplayer: yes Feb 29 14:58:52 yes, done it. Feb 29 14:59:02 canadiancow: what? Feb 29 14:59:10 paste shit Feb 29 14:59:12 the "IResPlugin.java" file is under the src, not the gen directory. Feb 29 14:59:20 kazoooka: read topic, sais you should use pastebin for this Feb 29 14:59:25 so i dont assume its auto generated... Feb 29 14:59:27 kazoooka: also check gravity of parent Feb 29 14:59:29 zomfg .... i am so sorry Feb 29 14:59:44 parent is also center_horizontal Feb 29 15:00:02 and if it is auto generated, its also broken because its got a variable "cl" in it that is not referenced/created in scope. Feb 29 15:00:08 i wont paste so much in anymore - i am really really sorry Feb 29 15:00:20 and the linearlayout is oriented how? and is it wrap or fill? Feb 29 15:00:34 wait for it Feb 29 15:00:38 should just pastebin it Feb 29 15:00:40 Has anyone had any success building android on older machines? Feb 29 15:00:48 JeroenDL, http://stackoverflow.com/questions/8013209/android-binder-generator-fails Feb 29 15:00:54 if it wraps the content of course it won't center Feb 29 15:01:18 someone else with the same problem Feb 29 15:01:19 http://pastebin.com/BfETBw8j Feb 29 15:01:31 my first round of google searching left me nowhere.. Feb 29 15:02:15 How can i extract source from an official htc release exe file from htcdev site so i can remove bloat and edit source? Feb 29 15:02:24 trimmer, not sure what you mean ? Feb 29 15:02:41 dr0zd0v, you might find it breaks installing at that point Feb 29 15:03:02 dr0zd0v: #android-root Feb 29 15:03:08 ok i get it - thx mikellip - it was that i didnt have any orientation in the parent... Feb 29 15:03:13 Ahhh sorry thanks Feb 29 15:03:21 first day back writing android code, already trip over a code generation bug. Feb 29 15:03:23 kazoooka: good :) Feb 29 15:03:46 domo arrigato! =) Feb 29 15:03:49 ungamedplayer, I have a single core 3.04 GHz processor, 4GB of RAM running kernel 3.0.0.16 on ubuntu Oneiric. Feb 29 15:04:01 trimmer, thats not old.. its slow.. but not old. Feb 29 15:04:14 you'll be fine Feb 29 15:04:33 ungamedplayer, It's a seven year old model. In my book, it's old Feb 29 15:05:45 I have already compiled the android system once successfully without any extra's and all worked. I am just wanting to identify any and all pitfalls before getting underway as I have limited resources. Feb 29 15:06:20 I am kind of fearing what will happen to my compile times as I add additional software to the compile. Feb 29 15:06:29 it just takes longer. Feb 29 15:06:39 you know this already though Feb 29 15:07:14 you dont need to compile everything, every time.. just build the parts you need.. unless you need it. Feb 29 15:07:29 Yeah, a whole day for the base system... When I begin to MOD the system it will probably extend to two days. Feb 29 15:07:48 you build it once, right ? then you modify Feb 29 15:07:52 just run "make" on the parts you modify Feb 29 15:08:00 sorry.. its mm or whatever the build tool is Feb 29 15:08:13 Okay, ungamedplayer, help me understand how rebuilding single parts gets integrated into the final build Feb 29 15:08:40 unless things have changed since last time i built it Feb 29 15:08:46 well as soon as I have a good build again, I am integrating Eclipse into the picture. Feb 29 15:08:46 build the lot Feb 29 15:08:49 then Feb 29 15:09:00 do your modifications, for whatever that might be Feb 29 15:09:04 I have been working hard on this machine recreating the build environment Feb 29 15:09:10 unless you do a make clean.. or androids build system is worse than it used to be Feb 29 15:09:14 it should only rebuild the parts that need it Feb 29 15:09:37 i can't imagine the engineers requiring a whole rebuild for each part Feb 29 15:10:07 testing would be very, very painful. Feb 29 15:10:20 so as I add components such as the google apps and compile them they will literally add themselves into the resulting .img files? Feb 29 15:10:54 yeah well, the engineers are probably building on cray Feb 29 15:11:02 doubt that cray has a arm build target. Feb 29 15:11:37 it does, believe it or not, a toolchain is a tool chain Feb 29 15:11:58 i dont want to get into it. Feb 29 15:12:23 anyways.. you put it in the right location in the git tree, add it to the relevant things to build.. Feb 29 15:12:29 include it in the things to include in the final rom image Feb 29 15:12:33 and you'll have happy days. Feb 29 15:12:39 Google doesn't use crays... but as a friendly SRE said, they have it way too easy to just "drop more machines at it" Feb 29 15:24:48 I have put off this problem for a couple of weeks, and after spending a few hours I can't figure it out. I have been using the v4 support library, However I now want to use this version https://github.com/petedoyle/android-support-v4-googlemaps Feb 29 15:25:24 but when i change the libraries over I get a class not found exception Feb 29 15:25:53 it seems that the references to the library are not updated, but as far as i can see all the project properties are correct Feb 29 15:27:23 anybody have any idea what I can look into to fix the problem? Feb 29 15:35:36 nobody? Feb 29 16:07:29 getResources is a method of activity? Feb 29 16:07:30 hi guys, is there a way to limit use of application, to lets say 30 min per day to open application like AngryBirds? Feb 29 16:09:35 mbarisa - that's not a question for #android-dev Feb 29 16:09:37 try #android Feb 29 16:09:43 Kake_Fisk, it's in Context Feb 29 16:09:49 I see Feb 29 16:09:54 danke Feb 29 16:10:23 there is any game programmer who would do some job? Feb 29 16:11:14 loveya: channel topic: "Please don't advertise websites, jobs, or contracts" Feb 29 16:13:35 where you suggest to search? Leeds Feb 29 16:14:53 Leeds i think that's a silly rule Feb 29 16:15:02 i found a gfx person here last night Feb 29 16:15:25 now if you're coming here and every 5 minutes saying HI IM HIRING FOR ABC CORP PLEASE SEND YOUR RESUME TO RECRUITMENT@ABC.COM Feb 29 16:15:30 canadiancow|work: I don't know who added it, or when, to be honest... I see the point - far too easy to get flooded out by - yeah, that Feb 29 16:15:30 canadiancow|work: agreed Feb 29 16:15:51 it's basically "don't a douche, br0" Feb 29 16:16:02 be* Feb 29 16:16:10 I wonder if someone is worried about liability-type stuff Feb 29 16:16:11 oh, right Feb 29 16:16:31 Leeds: no, it's that we were annoyed by someone spamming for their company Feb 29 16:16:46 vjtachyon? Feb 29 16:16:49 no comment Feb 29 16:16:51 "no spamming" might be better then :) Feb 29 16:16:59 i know he got kicked at some point Feb 29 16:16:59 any game programmer>? Feb 29 16:17:57 would be good if there *was* somewhere a bit more organised... there was a mailing list in the early days, but it died Feb 29 16:18:21 loveya: yes why? Feb 29 16:19:00 anyone here worked on NFC related development? Feb 29 16:19:41 nGuys, I've a question: I want this http://i42.tinypic.com/1zgzsbt.png layout in my app, a toggle like Wifi in settings (ICS) and a slider for changing DPI below the toggle Feb 29 16:19:48 How could I realize that? Any links, tips etc.? Feb 29 16:24:11 netchip-dev, you want to know how to create the controls? Feb 29 16:24:33 gaara_akash: i am Feb 29 16:24:41 nfc Feb 29 16:25:31 canadiancow, awesome! currently i dont have a external nfc reader but it is coming next week. Can i connect it to the emulator and will it be recognized? Feb 29 16:25:40 almost certainly no Feb 29 16:25:46 gaara_akash, with tabs etc yes Feb 29 16:26:45 canadiancow|work: i mean to see it programatically, and limit use.. is there a way to do that.. Feb 29 16:26:58 for kids.. to play angry birds 1 hour max a day.. Feb 29 16:27:20 canadiancow, so how do i get that working? Feb 29 16:27:37 canadiancow, it would be great if you gave me some kinda of direction Feb 29 16:28:05 netchip-dev, are you not happy with the existing controls provided? Feb 29 16:30:15 gaara_akash, I want tabs, like in Google Music and a slider bar for choosing a value, and a toggle like in ICS (wifi) Feb 29 16:30:18 gaara_akash: buy a device that has nfc Feb 29 16:30:21 So they exist Feb 29 16:30:25 What is the difference between using Android library projects and using normal libraries? How different is using Library projects rather than creating a libs folder in my project and copy java archives and using it? Can some one spend a few minutes to explain this based on the structure of the Facebook SDK? Feb 29 16:30:49 resources Feb 29 16:30:49 But I simply don't where I can get the refenrence code and the names of the methods Feb 29 16:31:05 canadiancow, duh :P i know that, apart from that! something where i can work with just the emulator Feb 29 16:31:11 no Feb 29 16:31:14 i dont think it's possible Feb 29 16:31:36 emulator is good for non-hardware stuff Feb 29 16:31:37 netchip-dev, its all about what theme and what style you choose Feb 29 16:31:45 but as soon as you want gpu, bt, wifi, telephony, nfc, camera, etc Feb 29 16:31:47 you need a device Feb 29 16:32:03 :/ Feb 29 16:32:11 that sucks man Feb 29 16:32:31 but am i on the right track atleast? Feb 29 16:32:51 if i have to make an nfc reader connected to my laptop actually be recognized by the emulator Feb 29 16:33:00 get a beagle/panda board Feb 29 16:33:02 do i have to write some kinda of a bridging program? Feb 29 16:33:44 gaara_akash, thx man Feb 29 16:34:22 netchip-dev, sure Feb 29 16:34:35 http://developer.android.com/design/index.html netchip-dev check that out Feb 29 16:34:47 [11:32:52] if i have to make an nfc reader connected to my laptop actually be recognized by the emulator Feb 29 16:34:47 no Feb 29 16:34:54 what on earth would make you think that would work Feb 29 16:35:08 gaara_akash, thanks :) Feb 29 16:35:43 canadiancow, uhhh, then how do i make the emulator recognize any device thats connected to its host? Feb 29 16:35:50 you dont Feb 29 16:36:06 why not? Feb 29 16:36:16 because the emulator wasnt designed to do that Feb 29 16:36:25 how would the emulator know how to process signals from random devices? Feb 29 16:36:39 i believe that since r16 or something you can use a webcam as the device's camera Feb 29 16:36:42 but thats it Feb 29 16:36:52 well, the android os already knows how to process signals from a nfc reader Feb 29 16:36:53 you cant just hook up arbitrary hardware and expect it to work Feb 29 16:36:56 no Feb 29 16:37:05 after all libnfc is meant jus to do that Feb 29 16:37:07 there are drivers on every device for the SPECIFIC hardware that device has Feb 29 16:37:30 yea... Feb 29 16:37:50 but the driver is actually taken care of by the host os Feb 29 16:38:15 the emulator only recognizes as generic nfc device which is understood by the pre-installed libnfc library Feb 29 16:38:28 which is already embedded in the kernel of the emulator Feb 29 16:38:41 no Feb 29 16:38:46 every device has a set of drivers unique to that device Feb 29 16:38:57 you cant just take /system from one device and flash it to another Feb 29 16:38:59 nothing will work Feb 29 16:39:24 if you want to use nfc, the emulator is not going to work. period. end of discussion. Feb 29 16:39:47 canadiancow|work: that's not true Feb 29 16:39:58 just adb shell am broadcast the NFC intents :P Feb 29 16:40:09 ~_~ Feb 29 16:40:15 thats not nfc Feb 29 16:40:17 thats the intent system Feb 29 16:40:33 isn't that how the NFC data is transported? Feb 29 16:40:38 yes Feb 29 16:40:52 so there's no actual difference Feb 29 16:40:55 sure there is Feb 29 16:41:17 if i tap to pay with my visa right now, its going to send different data than if i do it 2 seconds from now Feb 29 16:41:39 on the android side of things, everything might be the same Feb 29 16:41:42 but for the other device... Feb 29 16:41:45 right Feb 29 16:41:53 I was assuming this was for testing NFC Feb 29 16:42:04 who is actually using the emulator _use_ NFC? Feb 29 16:42:12 i still think if yo uwant to test nfc, you should buy a device with nfc Feb 29 16:42:28 also, you could write a script to read from your NFC reader and forward to the emulator via intents :P Feb 29 16:42:31 bam! Feb 29 17:01:21 so im in a debate about how bitching about certain religious rules to people who dont follow your religion but instead another religion is a waste of time Feb 29 17:01:35 csb Feb 29 17:01:41 because religious people are close minded and reject opinions that are not their own Feb 29 17:02:45 Would I get problems with supporting different resolutions and pixel densities? Feb 29 17:03:58 BloodSkin: and how is this on topic of #android-dev? Feb 29 17:04:27 tired of not having any song suggestions for my light shows Feb 29 17:05:38 Kake_Fisk: no? Feb 29 17:06:24 Okay, that would be nice Feb 29 17:06:33 I'm making a game by the way Feb 29 17:06:36 SurfaceView Feb 29 17:07:09 its on topic because android is a religion to some Feb 29 17:07:10 lol Feb 29 17:07:19 hell idk it was too quiet Feb 29 17:07:48 just say evancharlto_n without the underscore three times fast Feb 29 17:07:51 then it will get loud Feb 29 17:08:20 if I need to occasionally poll a web service, is a Service that starts a thread a reasonable way to go? Feb 29 17:08:44 thread runs stuff which downloads data and fires intents, etc Feb 29 17:09:08 I think the service keeps running even if your app quits Feb 29 17:09:19 so I think that depends on what kind of app you are building Feb 29 17:09:24 in this case that's ideal Feb 29 17:09:34 i'd like to pop up a notification in the notification center if the app is not running Feb 29 17:10:01 wyvern`: this aint iOS damnit! we have no stinkin notif center Feb 29 17:10:11 there's some sort of notification system Feb 29 17:10:14 i see docs about it Feb 29 17:10:18 notification tray Feb 29 17:10:20 that. Feb 29 17:10:29 the thing that slides down Feb 29 17:10:32 wyvern`: just a joke :P we dont call it that Feb 29 17:10:50 okay, what's the right lingo :) Feb 29 17:10:50 and yes i am an iOS dev ;) Feb 29 17:11:03 and in all fairness the iphone does have SOME features that i miss Feb 29 17:11:14 like the emulator not being horribly slow? :( Feb 29 17:11:19 wyvern`: ehh.. I usually call it the nitif bar Feb 29 17:11:37 wyvern`: if your doing stuff for 2.3.3, there is the Intel x86 image, its mucho faster than the ARM images Feb 29 17:11:49 yeah i haven't spent the time to set that up but I probably will at some point Feb 29 17:11:56 wyvern`: Look up IntentService and AlarmManager Feb 29 17:12:17 One creates a thread for you, the other can start your service every x minutes Feb 29 17:12:35 SimonVT: the polling will have to be more frequent than that, unfortunately Feb 29 17:12:43 (server side is not under my control, bad api design, etc) Feb 29 17:12:52 wyvern`: Alarm Manager can do whatever you want in regards to frequency Feb 29 17:13:28 I see. Though, its docs suggest using Handler for stuff while the app is running Feb 29 17:13:38 but AlarmManager looks ideal for getting alerts while the app is down Feb 29 17:13:58 You probably shouldn't query very often when your app isn't running :p Feb 29 17:14:07 right Feb 29 17:14:13 once every 30s or minute is probably fine Feb 29 17:14:36 That's often if your app isn't running Feb 29 17:15:23 well, the correct answer is to use C2DM to alert. Server side doesn't support that yet... Feb 29 17:15:34 god I hate making UI's Feb 29 17:16:10 I'm already working 5 hours for a stupid actionbar, ad I got didly squat Feb 29 17:16:40 shroomyreader: how complex is your UI? Feb 29 17:16:51 SimonVT: Maybe i'm misunderstanding how to use IntentService but it looks like that's something where I'd have to have some other thing that fires intents every X seconds that the IntentService then handles Feb 29 17:17:47 When the app is running, I need to be constantly polling this endpoint (again, I know -- this sucks, but API is out of my hands) every several seconds (10? 15? 20? Something like that) Feb 29 17:18:18 wyvern`: your not able to do this event based? Like just listen for data and the server just pushes it? Feb 29 17:18:45 DrPenguin: that is the obvious way to do it. Unfortuantely the only thing exposed by the server is GETing a "list of recent events". Feb 29 17:19:09 wyvern`: lameasaurusrex Feb 29 17:19:14 totally. Feb 29 17:19:30 pick your poison.. pushr, websockets, blah blah blah? anything would be better than this. Feb 29 17:19:36 But this is what I've got to work with, so polling it is! Feb 29 17:21:03 wyvern`: Yeah, you fire an intent to start the intentservice. I figured you were sane about your polling, that's why I suggested this and alarmmanager :p Feb 29 17:21:36 so each intentservice has its own thread? Feb 29 17:22:27 the one thing i miss from my iphone Feb 29 17:22:33 is sheep launcher Feb 29 17:22:48 nothing is better than throwing a sheep Feb 29 17:22:51 They're executed one at a time on a thread. Might be the same thread if more intents are queued iirc Feb 29 17:23:11 hm. that's not great, then. I don't want to block anyone else's intent service tasks. Feb 29 17:23:24 wyvern`: why would it block? Feb 29 17:23:25 well, it's easy enough to start my own (one) thread Feb 29 17:23:27 One thread, within your app Feb 29 17:23:38 It's not system-wide shared Feb 29 17:23:54 ah, so as long as *I* don't add any other IntentServices it shouldn't be a problem? Feb 29 17:24:04 BloodSkin: there is some sheep launching app on android Feb 29 17:24:06 but still, where's the (every n seconds) scheduling going to come from? Feb 29 17:24:19 the most straightforward way is just have a thread that polls the server and sleeps Feb 29 17:24:51 there is!?! Feb 29 17:24:53 You probably want to do something else than itnentservice Feb 29 17:24:59 * BloodSkin googles Feb 29 17:25:07 It was just a suggestion for polling in the background Feb 29 17:25:11 makes sense. Feb 29 17:25:24 And it looks fine for that -- alarm manager fires intent, intent service handles it Feb 29 17:25:35 I'm trying to authenticate a user on my app using facebook... I can get the permissions + facebook token, but when I try to validate the facebook token on my server using the https://graph.facebook.com/oauth/access_token call, it doesn't work because redirect_uri is invalid (but there's not redirect_uri parameter when making the token request by the facebook android sdk)... any hints? Feb 29 17:25:47 OMG ITS HERE Feb 29 17:25:57 Guys it's here! Feb 29 17:26:06 DrPenguin i love you Feb 29 17:26:08 no homo Feb 29 17:26:11 ok may6be a little Feb 29 17:26:12 whoa there bro Feb 29 17:26:14 but not much Feb 29 17:26:16 haha Feb 29 17:26:22 I dont even know you mang Feb 29 17:26:23 DrPenguin: you have a new friend. Feb 29 17:26:30 unfotunately Feb 29 17:26:44 damn its ben here for a while too Feb 29 17:26:52 been* Feb 29 17:27:09 must have been ported right after i looked Feb 29 17:29:35 Is there a safe method to access data from one app, in another app? Feb 29 17:30:55 SharedPreferences Feb 29 17:31:00 (i think) Feb 29 17:31:10 Are their safe through different apps? Feb 29 17:31:19 SharedPreferences won't work unless they have the same keystore signature Feb 29 17:31:38 you need ContentProvider Feb 29 17:31:43 or use IPC Feb 29 17:31:47 IPC? Feb 29 17:32:09 InterProcessCommunication Feb 29 17:32:14 kavelot why do you need facebook? In general, for sharing, you're better of using intents in stead of writing your own integration code Feb 29 17:33:02 I think I have to use contentprovider. Feb 29 17:33:05 thanks Feb 29 17:37:12 How do I use the accelerometer in a android virtual device? Feb 29 17:37:35 I tried picking up my monitor and moving that but it didnt work Feb 29 17:37:44 please tell me your not serious Feb 29 17:38:00 yes that was a joke Feb 29 17:38:10 AW MAN I was seriously laughing for a second Feb 29 17:38:25 Awesome Feb 29 17:38:40 well, laptops have accelerometers now... Feb 29 17:38:56 supersat: wha? they do? Feb 29 17:39:03 Hey DrPenguin. I'm an african prince who's going to inherit a lot of money. I just need your help to get them out of the country Feb 29 17:39:20 SimonVT: who do I make the check out to? Feb 29 17:39:31 Mr G. Ullible Feb 29 17:39:43 Huh, That seems to be a common name these days! Feb 29 17:39:46 does someone use ormlite here ? Feb 29 17:40:04 ^_^ Feb 29 17:40:42 Seriously though, you know someone has probably done what ChronosA said he did Feb 29 17:41:36 DrPenguin: actually, laptops had accelerometers earlier than phones etc. Feb 29 17:41:37 can you send accelerometer data to the avd through ddms? Feb 29 17:41:47 I know you can send mock locations Feb 29 17:42:01 p_l: ... OH WOW that actually makes sense! The Hard Drive Smart Protect stuff right? Feb 29 17:42:03 t0mless: AFAIK no... not with default image, that is Feb 29 17:42:15 DrPenguin: yep, available in thinkpads ;) Feb 29 17:42:18 Dragonene: At the very least, to detect drops to park the harddrive before impact Feb 29 17:42:26 p_l: I just literall made the connection Feb 29 17:42:45 Hey, is there an easy implementation of an image view with pinch to zoom type functionality? Feb 29 17:42:46 although I believe there are web demos that use macbook accelerometers... Feb 29 17:43:20 yes, you can poll the data from IBM's and Apple variants of it Feb 29 17:43:35 and there was code that turned that into simulated joystick Feb 29 17:43:40 ChronosA, sensor stuff is buggy in the avd to my experience Feb 29 17:43:42 Yeah, I played a few games for osx where you had to tilt your laptop to get a ball to roll Feb 29 17:43:53 Avoid falling in holes and stuff Feb 29 17:43:54 trying to catch orientation changes actually caused crashes/hangs Feb 29 17:44:04 at least at api level 8 Feb 29 17:44:05 Looks retarded, but surprisingly fun Feb 29 17:44:10 huh, they released a system update for my droid 2 Feb 29 17:44:18 I wonder if it breaks root Feb 29 17:44:26 most likely it will Feb 29 17:49:59 whats the difference between Fragments and FragmentActivities? Feb 29 17:50:15 FragmentActivities hold Fragments Feb 29 17:52:20 o.O Feb 29 17:52:30 a FragmentActivity is an Activity Feb 29 17:52:33 a Fragment is a Fragment Feb 29 17:52:54 yeah Feb 29 17:52:59 thanks Feb 29 17:53:23 obvious Feb 29 17:53:45 * t0mless tips the canadiancow Feb 29 17:53:51 :D Feb 29 17:55:28 idk, im just having trouble getting a listfragment going, my list is created by java and does not have an R.id.list ID Feb 29 17:56:06 ListFragment in the support package does not support custom layouts Feb 29 17:56:16 Use a regular fragment Feb 29 17:56:38 o.O Feb 29 17:56:51 it supports custom layouts, as long as you have the android.R.id.list Feb 29 17:57:04 just use a normal fragment ~_~ Feb 29 17:57:05 Hey can anyone advise me on how I can have an activity that launches when the user opens the app directly from the android market, but doesn't appear in their menu with the rest of their launchers? I've tried without a category tag (so it wouldn't appear in the launcher menu) but I have no idea how to test it since it's not on the market yet. Feb 29 17:57:10 how do i get that, if im trying to use a list of objects Feb 29 17:57:21 or rather android:id="@android:id/list" Feb 29 17:57:38 t0mless: Nope Feb 29 17:57:41 AbelianHorizon you can just use a normal fragment though Feb 29 17:58:15 okay, well I'll try that I guess ty Feb 29 17:59:06 anyone use gradle to build their android projects? Feb 29 17:59:30 SimonVT o.O really? Feb 29 17:59:35 Really Feb 29 17:59:38 why the fuck not Feb 29 17:59:40 The native listfragment does Feb 29 17:59:53 Cus for some reason they use a custom id for the compat listfragment Feb 29 17:59:58 Instead of android.R.id.list Feb 29 18:00:12 well that's just fucking stupid Feb 29 18:00:22 ^_^ Feb 29 18:00:34 * t0mless investigates SherlockListFragment Feb 29 18:01:02 SherlockListFragment just extends the compat listfragment Feb 29 18:01:41 So... anyone know anything that could help me/ Feb 29 18:04:47 SimonVT well that explains why my list was being so fucking weird Feb 29 18:05:33 I wonder why they used a different id Feb 29 18:06:29 I don't see any good reason Feb 29 18:07:50 It also doesn't have the Loading text like the native one Feb 29 18:07:59 empty text? Feb 29 18:08:05 it has an id for it.. Feb 29 18:08:09 No Feb 29 18:08:22 ListFragment shows an indeterminate progress bar until an adapter is attached Feb 29 18:08:27 Compat has just the progress bar Feb 29 18:08:34 Native has progress bar and the text "Loading" Feb 29 18:08:35 hrm Feb 29 18:08:38 i think i just broke nfc on my gnex Feb 29 18:08:52 because the world hates you canadiancow|work Feb 29 18:08:57 Tho I guess the reason for the text is no localization Feb 29 18:09:03 02-29 13:02:54.133: W/dalvikvm(32496): VFY: unable to resolve virtual method 494: Landroid/media/MediaMetadataRetriever;.captureFrame ()Landroid/graphics/Bitmap; Feb 29 18:09:06 what did you do Feb 29 18:09:09 Unless R.string.loading is public Feb 29 18:09:14 thats a third party app running on 4.0.3 Feb 29 18:09:21 It isn't.. Feb 29 18:10:11 anyone know if there is a way to allow users to long-press on a drop-down item provided by AutoCompleteTextView (for deletion purposes)? Feb 29 18:12:15 QubeZ: Use something visible instead, like a button Feb 29 18:12:40 so user selects the item then presses the button (optional) to delete the tag? Feb 29 18:12:46 delete the item Feb 29 18:13:44 I'd imagine you could put a button in the dropdown next to the item.. Isn't it backed by an adapter? Feb 29 18:14:09 ahh thats possible, yes i believe its backed by an adapter. Feb 29 18:14:13 ill have to look into this Feb 29 18:14:27 thanks Feb 29 18:18:54 if its backed by an adapter, couldnt you also use onItemLongClickListener()? Feb 29 18:21:22 i dont see that method Feb 29 18:24:16 ah, its on listview, not listadapter Feb 29 18:24:35 findViewById(android.R.id.list)? Feb 29 18:24:53 Hey all. Anyone played around with an embedded webserver? Feb 29 18:25:11 so for autocompletetextview, i should still be able to adapt a custom list row so I can add a delete button next to the dropdown item? Feb 29 18:25:22 yeah Feb 29 18:30:33 what is the difference between gravity and layout_gravity? Feb 29 18:30:52 I believe gravity is what is inside that widget, layout_gravity is that widget in respect to the layout Feb 29 18:31:33 I'm mostly concerned with centering text in a textview (which is inside a linearlayout Feb 29 18:31:59 then I think you want gravity Feb 29 18:32:08 not if the text view is set as wrap content Feb 29 18:32:11 layout_ = layoutparams Feb 29 18:32:13 then he wants layout_gravity Feb 29 18:32:19 == used by the viewgroup to position Feb 29 18:33:23 layout_width="match_parent" gravity="center" Feb 29 18:33:25 anyone ever done a webserver on android? Feb 29 18:33:42 thats perverted Feb 29 18:33:50 t0mless: this is what I want to do right? stand alone public fragment -----signature------> public class HistoryListFragment extends Fragment Feb 29 18:34:09 uhh... huh? Feb 29 18:34:17 sorry, from before Feb 29 18:34:27 what's that stand alone public crap? Feb 29 18:34:39 as a stand alone file Feb 29 18:35:16 squeakytoy: Embedded jetty is probably your best bet, but you'll probably have to slip dex a --base-library so it'll actually compile. Feb 29 18:35:26 o.O Feb 29 18:35:29 if you just extend Fragment you can use all the custom layout stuff you want Feb 29 18:35:32 i dont need to do anything advance Feb 29 18:35:33 so yes Feb 29 18:35:45 cool Feb 29 18:36:29 squeakytoy: Then you don't need HTTP, do you? Feb 29 18:37:06 kamoricks: well, yes :-) but i just need to serve one request, so i am thinking of just doing a plain old server socket ;) Feb 29 18:37:27 squeakytoy: Serving one file, without regard for parameters? Seems like FTP to me. Feb 29 18:37:38 kamoricks: i need it on HTTP Feb 29 18:37:53 squeakytoy: ...Why? What understands HTTP that does not understand FTP? Feb 29 18:38:24 kamoricks: Because i want it HTTP. I want to *use* HTTP. Feb 29 18:38:32 squeakytoy: The you want Jetty. Feb 29 18:38:43 kamoricks: or a simple server socket.. Feb 29 18:39:14 squeakytoy: If you want to reimplement the HTTP/1.1 protocol, have fun with that. Actually, 1.0 will probably be simpler without Keep-Alive, but performance will be terrible. Feb 29 18:39:44 kamoricks: i dont need to do it, i can cheat and always return the resource, no matter what Feb 29 18:40:09 kamoricks: ive got things under control, thanks. Feb 29 18:44:23 Does anyone know of a decent indepth article on creating custom Views? I am trying to create one that includes other Views inside itself. Feb 29 18:44:49 then you want a custom viewgroup Feb 29 18:44:51 yo dawg Feb 29 18:45:31 I am trying to make a custom ScrollView Feb 29 18:45:54 which contains a LinearLayout and inside that TextViews Feb 29 18:46:22 why can't you do that in a layout xml? Feb 29 18:46:45 how can i call finnish from the onclick of an alertdialog without leaking the dialog window? Feb 29 18:46:54 It won't stop at that, it is going to get a bit complicated, and I want it to be very portable for other Apps that will also use it. Feb 29 18:47:37 The TextViews appear to be taking up space, the scrollview creates scroll bars, but does not display them. Feb 29 18:48:42 thread sleeps abruptly in normal execute but keeps executing forever (like desired) in Debug mode Feb 29 18:48:44 any idea? Feb 29 18:49:00 deadlock, possibly Feb 29 18:49:06 Brahs. Can any of you recommend a Linux UML modeling tool that works well with Android stuff? I used to use (and love) StarUML, but I'm on Ubuntu now. Feb 29 18:49:44 What would be some ideal menu controls? Feb 29 18:49:49 Touch on buttons? Feb 29 18:49:57 Chronax: I use Dia Feb 29 18:50:22 uml is for loosers, looserboy! muhuhahahahahah ahahahahahaha Feb 29 18:50:31 Although there is a bug in it right now (atleast 10.10) where it uses 100% CPU, and also forces X to use 100% cpu Feb 29 18:50:42 how can i let the phone vibrate on long press? Feb 29 18:50:43 Ick. Feb 29 18:50:43 sorry, dont know any uml tools, but i found a good unity config tool Feb 29 18:50:54 Thinking about trying Umbrello. Feb 29 18:51:15 let me know how that is.. I just had to make a massive UML for a class project but Dia is a POS Feb 29 18:51:37 #android Feb 29 18:51:55 Sorry, that was me failing to join a channel Feb 29 18:52:02 :} Feb 29 18:52:10 so no answer for my ridiculously easy question? Feb 29 18:52:41 freedomcaller: what question is that? Feb 29 18:53:14 how can i call finnish from the onclick of an alertdialog without leaking the dialog window? Feb 29 18:53:34 dismiss the dialog right after you call finish? Feb 29 18:53:41 freedomcaller: what t0mless said Feb 29 18:53:48 i tried dismissing before, and it still leaked Feb 29 18:53:55 then you dismissed it wrong Feb 29 18:54:03 dialog.dismiss() ? Feb 29 18:54:22 you need to dismiss it before the finish Feb 29 18:54:32 i did Feb 29 18:54:55 Then it probably isnt the dialog leaking Feb 29 18:55:12 y u no use showDialog/dismissDialog? Feb 29 18:55:29 what is that? Feb 29 18:55:35 its deff the dialog leaking Feb 29 18:55:39 activity methods for showing and dismissing dialogs Feb 29 18:55:41 you could also use dismissDialog() in onDestroy() Feb 29 18:56:05 They work quite well :) Feb 29 18:56:20 They let the framework handle dialogs so you don't leak Feb 29 18:56:38 how do i get a dialog id? Feb 29 18:56:44 also they are deprecated Feb 29 18:56:46 >.< Feb 29 18:57:18 Well, you should be using FragmentDialog Feb 29 18:57:35 fragment shmagment Feb 29 18:57:45 dont wanna use the support library Feb 29 18:58:03 well, then they aren't deprecated Feb 29 18:58:18 oh ur right, its not my dialog leaking Feb 29 18:58:21 thanks >.< Feb 29 18:58:23 I usually am right.. Feb 29 18:58:25 was so sure it was! Feb 29 18:58:32 and no thats not me being arrogant ^^; Feb 29 18:58:46 That's you being wrong Feb 29 18:58:51 ^_^ Feb 29 18:58:57 * DrPenguin death stares SimonVT Feb 29 18:59:04 you want my check or not African Prince?? Feb 29 18:59:04 well i thought i had checked, but i getss i handent checked enough Feb 29 18:59:40 * ra4king death kills DrPenguin Feb 29 19:00:26 wth? Feb 29 19:00:35 my phone just said "tornado watch" Feb 29 19:00:41 in the noti tray Feb 29 19:00:46 how can i let the phone vibrate on long press? Feb 29 19:00:48 BloodSkin: you probably should watch for a tornado then Feb 29 19:00:54 i didnt know i had a weather thing Feb 29 19:01:21 you've been hacked, someone wants to know the weather where you are... oh snap Feb 29 19:01:45 what should you do if logcat stops working? Feb 29 19:02:00 i think it was the local news app Feb 29 19:02:04 :/ Feb 29 19:02:05 close eclipse and restart it or reboot the emu Feb 29 19:02:35 thanks Feb 29 19:03:00 that happens to me all the time, although i develop and push to my phone directly (no emu) Feb 29 19:03:01 so...it's deadlock is it.. Feb 29 19:03:11 http://www.bbc.co.uk/news/uk-england-17207920 was this niall Feb 29 19:03:18 oops wrong channel Feb 29 19:03:22 no one? Feb 29 19:03:28 then why doesn't it stop in Debug mode, MDijkstra Feb 29 19:03:32 the_ellipse: google that, its very easy to do Feb 29 19:03:51 the_ellipse: your question isnt a very good one Feb 29 19:04:02 long pressing what? the screen? a button? a view? what? Feb 29 19:04:08 so the question has to be good now? Feb 29 19:04:19 its required by law Feb 29 19:04:20 the_ellipse: if you want a good answer Feb 29 19:04:23 global law at that Feb 29 19:04:31 onLongPress - screen Feb 29 19:04:38 nwo anyone? Feb 29 19:05:02 ftr, the UN = NWO Feb 29 19:05:09 the_ellipse: By default the phone will vibrate when you longpress a View with a onlongclicklistener Feb 29 19:05:14 someone slap the off-topic out of me please Feb 29 19:05:30 mhh i have 'extends SimpleOnGestureListener' Feb 29 19:06:24 ok found the issue,i was hiding my progress dialogs instead of dismissing them. thanks guys :D Feb 29 19:08:22 vib = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); Feb 29 19:08:26 could be it Feb 29 19:08:26 anyone have a low end samsung device that comes stock with aosp? Feb 29 19:08:31 freedomcaller well you were technically right then about a dialog :P Feb 29 19:08:31 like the Feb 29 19:08:31 uh Feb 29 19:08:34 wtf was it Feb 29 19:08:40 prevail i think it was Feb 29 19:09:01 well its not quite aosp but close Feb 29 19:09:07 anyone have access to one? Feb 29 19:09:11 yeah, i have a progress dialog, then when its done loading it hide it and pop up an alert dialog. but i needed to dismiss it Feb 29 19:11:36 my question is did they put the switch bar thing in the notification tray on that or is it strictly touchwiz Feb 29 19:11:58 switchbar? Feb 29 19:12:08 i guess thats what its called Feb 29 19:12:12 i call it the toggle bar Feb 29 19:12:20 because you can toggle stuff Feb 29 19:12:32 Ohh like the wifi and volume? Feb 29 19:12:33 its like the widget in ics on page 2 Feb 29 19:12:53 uh Feb 29 19:12:59 i know it has wifi Feb 29 19:13:05 but thats all i remember Feb 29 19:13:28 maybe you should try ot remember more, going by your description, itl be hard to figure out what your talking about Feb 29 19:13:57 lol Feb 29 19:14:22 its got the toggles for screen rotation, wifi, blue tooth, and gps Feb 29 19:14:35 at the very top of the pulldown notification tray thing Feb 29 19:14:38 No, there's no toggle bar, switch bar or whatever you call it in aosp Feb 29 19:14:45 right i know that Feb 29 19:14:48 ok then I know what your talking about.. and as I was about o just say, Simons right Feb 29 19:14:59 or well, they added it in ics on tablets iirc Feb 29 19:14:59 my question was did samsung include it on their non touchwiz androids Feb 29 19:15:08 what non-touchwiz androids? Feb 29 19:15:08 Ive seen it called PowerManager like the widget Feb 29 19:15:09 probably not. Feb 29 19:15:20 because they included random features from it on some devices Feb 29 19:15:26 ah ok Feb 29 19:15:30 just being curious Feb 29 19:15:57 lov: stuff like the prevail Feb 29 19:16:12 and the lower end devices that they decided couldnt handle touchwiz properly Feb 29 19:19:18 haha Feb 29 19:19:28 it seems gtalk server is goofed up because of leap year maybe? Feb 29 19:19:44 but the offline chat emails it's sending out have a timestamp of -1 Feb 29 19:19:52 so it shows up as 12/31/1969 Feb 29 19:20:14 t0mless: you know what this means right? Feb 29 19:20:24 uhm, this might be a stupid question. But i have just started a server socket on port 4444... how do i connect to it from my dev-computer? what ip is it? Feb 29 19:20:30 The Large Hadron Collider is going to destroy the world? Feb 29 19:20:33 if the android sim has a default ip that is Feb 29 19:20:38 TIME TO PARTY LIKES ITS 1969! Feb 29 19:20:43 Lol Feb 29 19:20:52 CEEEEEEEEEEEELEBRATE GOOD TIMES CMON! Feb 29 19:24:28 hello. i have a doubt about how to tell a list view or adapter that it needs to refresh. i read that this can be achieved using notifyDataSetChanged and that this should be called from UI thread… is this possible? can anyone show me or point me to an example? Feb 29 19:26:38 Yes it's possible Feb 29 19:26:54 getListAdapter().notifyDataSetChanged(); Feb 29 19:28:21 got my external batter pack from dealxtreme, hopefully it doesn't completely suck ass Feb 29 19:28:35 battery Feb 29 19:28:59 external battery pack? not extended? Feb 29 19:29:11 yeah, one of those portable battery packs Feb 29 19:41:11 t0mless: ok thanks and… how could I refer to the current UI thread? should I use the runOnUiThread? how can I get a reference to the activity to call this method? sorry about this silly questions but I'm really new to android :( Feb 29 19:57:38 changing languages based on the device's locale is all what android offers? Feb 29 19:58:10 I want to be able to change the language for all of the application on demand Feb 29 19:58:38 o_O Feb 29 19:58:44 phone settings -> text and language Feb 29 19:59:06 across one application, I mean Feb 29 19:59:08 or language & keyboard, whatever it's called on your phone Feb 29 19:59:15 right, that's actually very much an edge case. Feb 29 19:59:16 where I can have a "change language" list that the user can pick from Feb 29 19:59:21 technically you can do it but it's really awkward Feb 29 19:59:23 an edge case? Feb 29 19:59:27 yes Feb 29 19:59:43 hey, this is a very poorly defined question, so feel free to ask questions...i'm having some trouble getting my head around it completely myself Feb 29 20:00:01 Sicp: I poked around at this myself, and there's no particularly good solution that doesn't involve a lot of hacking things up Feb 29 20:00:13 That is such a bad question that... it's not even a question Escherial Feb 29 20:00:13 i'm dealing with a spinner control that someone else wrote that consists of two buttons and a textbox containing a number and i'd like the number to be editable in the textbox Feb 29 20:00:15 I don't want to have to hack at things to do it Feb 29 20:00:23 t0mless: heh, i was getting to it... Feb 29 20:00:25 negative point Feb 29 20:00:33 but perhaps i should've just stopped there for ironic effect Feb 29 20:00:36 change it to an edit text? Feb 29 20:01:07 t0mless: right, let me check if i've already tried that; it's been a long time since i've visited this issue, so i don't remember all the things i did Feb 29 20:01:23 Sicp: welp, sorry. Feb 29 20:01:44 i still don't get the bitching and moaning about the 15 minute refund period, how have people survived all these years with computer software Feb 29 20:02:14 well when you transition from 2 days to 15 minutes people get annoyed Feb 29 20:02:24 I still think that the refund period should be a lot longer Feb 29 20:02:33 but I'm assuming that there are external reasons why it's so short Feb 29 20:02:36 (legal reasons) Feb 29 20:02:37 your face should be a lot longer Feb 29 20:02:37 It should either be a lot longer, or not at all tbh Feb 29 20:02:43 lul Feb 29 20:02:46 I'm not sarah jessica parker mikedg Feb 29 20:02:49 I'm not a horse. Feb 29 20:03:02 ok, it does inherit from EditText...er, more precisely, it's an AutoResizeEditText, which is apparently supposed to dynamically resize its contents to what's entered Feb 29 20:03:17 clever Feb 29 20:04:13 t0mless: i hope so; i mostly hope that it's not what's hosing the edittext's regular ability to be changed Feb 29 20:04:26 lov, what if ... Feb 29 20:04:31 Could be Feb 29 20:05:31 so, not to abuse your generosity, but here's the source for this thing: http://pastebin.com/WvRymyW7 Feb 29 20:05:46 no it's too crazy Feb 29 20:05:47 i'm pretty sure the last dev dug it up off stackoverflow or something, since it doesn't really match his style Feb 29 20:10:32 * t0mless shrugs Feb 29 20:10:36 seems pretty decent Feb 29 20:10:43 but it's not editible? Feb 29 20:11:01 http://pastebin.com/jGg4KhJZ gives a stackoverflow error at line 27, anyone know why that would happen? Feb 29 20:11:08 So what are the odds on finding an Android device with a structured light flash? Feb 29 20:11:52 I'm thinking it must be possible to recycle the existing optical-wavelength camera for 3D vision using three different coloured structured flashes simultaneously. Feb 29 20:12:41 * Gumboot leaves the channel to think about that while he has dinner. Feb 29 20:13:01 I expect there to be working code when I come back. Feb 29 20:13:06 Afzal: Well.. what do you think happens when you change the text? Feb 29 20:13:53 SimonVT, was about to write about that. I have a check in place so that txtspeed doesn't run updateValues if that's the one that's changing due to the function Feb 29 20:13:59 Infinite loops are the win Feb 29 20:14:07 i should update the test case for that...wait Feb 29 20:14:43 you have a listener for text changes that calls the updateText method that changes the text that the listener sees and calls updateText that changes the text that the listener sees that... Feb 29 20:14:45 get the point? Feb 29 20:15:26 I'm making a game with SurfaceView, should I have each object to extend View or SurfaceView or is it okay that it just contains the Bitmap for the object? Feb 29 20:15:30 and eventually you run out of space to store all your method calls Feb 29 20:16:42 so lov, what I can do is check for locale, and whenever it's set to Germany, I load from /res/values-ger/strings.xml Feb 29 20:16:44 etc... Feb 29 20:17:44 t0mless, yes i see the problem in the test case that i've pasted, i have checks in place to prevent that in the app Feb 29 20:17:48 class* Feb 29 20:18:08 but i guess i'll just change it to something different instead Feb 29 20:18:33 Sicp: Ehh.. values-de and the framework will load them from there for you Feb 29 20:18:56 so what do I need to do then? to opt into this? Feb 29 20:19:07 I'm reading localization in the dev guide... Feb 29 20:19:12 Nothing Feb 29 20:19:20 oh Feb 29 20:19:22 Use put your strings in values- Feb 29 20:19:37 oh, so I juts need to have a place for it to fetch from Feb 29 20:19:39 values-de Feb 29 20:19:45 values-gr, etc.. Feb 29 20:20:06 nice..that's actually brilliant Feb 29 20:27:36 I know right... you'd think it was designed with multi language support in mind or something Feb 29 20:28:03 Do you do all input event in the activity class? Feb 29 20:28:27 http://developer.android.com/reference/android/widget/Spinner.html#setOnItemClickListener%28android.widget.AdapterView.OnItemClickListener%29 Feb 29 20:28:39 is this function what i think it is? useless? Feb 29 20:29:26 Why? Feb 29 20:30:05 Afzal: It's useful if you want something to happen if your user clicks on a spinner. Feb 29 20:30:24 says it'll cause an exception :/ Feb 29 20:30:32 Kake_Fisk not sure what you mean Feb 29 20:30:59 Hah Feb 29 20:31:16 t0mless: Well, doesn't setOnTouchListener have to be in the Activity class? Feb 29 20:31:17 Well, it's probably overridden from a super class Feb 29 20:31:24 I find that quite cumbersome Feb 29 20:31:40 strange Feb 29 20:32:20 ah nvm, i should use setOnItemSelectedListener Feb 29 20:32:21 :) Feb 29 20:33:00 And do you think I should use a different view for my game and for my menu or should I just use the same SurfaceView in my game? Feb 29 20:33:25 does anyone use sl4a/python ? looking for a way to package egg's with my apk Feb 29 20:33:45 Is there any release schedule for r17 tools? Feb 29 20:33:57 when it's ready Feb 29 20:33:58 wraithguard01 no, just the preview available Feb 29 20:34:48 Do you know if they fixed the doubly included dependency failure bug in the previews? http://code.google.com/p/android/issues/detail?id=20956 Feb 29 20:35:23 they introduced a bug related to that in preview2 Feb 29 20:35:28 and have since fixed it (allgedly) Feb 29 20:35:33 but its not present in preview1 Feb 29 20:36:03 Meh. Well, the bug apparently got added in r14, and it still isn't fixed in 16. Feb 29 20:36:24 Is dex open source? Feb 29 20:38:24 Is it a bit too little to use one Activity throughout the whole game? Feb 29 20:38:45 Kake_Fisk, it's not good to do that really Feb 29 20:38:57 Kake_Fisk, but it's never too late to do that :P Feb 29 20:38:58 using one activity for a whole game isn't terrible Feb 29 20:39:01 depends on what the game is Feb 29 20:39:11 if the game does all of its own custom drawing, there's no sense in really using activities at all Feb 29 20:39:24 That's what it does Feb 29 20:39:31 Okay, thanks for the clarification Feb 29 20:40:15 And should each drawable object be it's own view or? Feb 29 20:40:42 Currently, each object just have a Bitmap sprite; property which I draw with the main view Feb 29 20:41:01 SurfaceView* Feb 29 20:44:07 :| Feb 29 20:45:15 ok, i've narrowed down my inability to edit the field via the keyboard to that AutoResizeEditText class i was using, but i'm not sure what's wrong with it, specifically Feb 29 20:45:19 the code for it is here: http://pastebin.com/WvRymyW7 Feb 29 20:52:21 can you put a listview in a widget? Feb 29 20:52:28 docs seem to indicate so, but stackoverflow says no Feb 29 20:53:31 Since HC Feb 29 20:53:49 ^ Feb 29 20:55:12 hrm... need to go read about dialog fragments Feb 29 20:56:55 If you're lazy, you can just move your regular dialogs into it Feb 29 20:57:12 (I was) Feb 29 20:57:17 Well, this is already a pretty large overhaul of my app Feb 29 20:57:50 so I'll try to do it proper like Feb 29 20:57:56 do f Feb 29 20:58:17 do FragmentActivites have a showDialog to display a dialog Fragment? Feb 29 20:58:25 or do you have to attach/show it yourself? Feb 29 20:58:37 new DialogFragment().show(fragmentmanager, tag) Feb 29 20:59:25 Roger dodger Feb 29 20:59:57 might've found a teeny tiny bug. Have a layout xml, using LinearLayout, put in two widgets. Now run the app. Now change the position of the widget from above the other one to below it. Run the app, R might not be recreated causing the widgets to have the older "identities" Feb 29 21:00:39 project->clean Feb 29 21:00:53 or just delete gen/ Feb 29 21:00:56 Afzal: that's on th level of Eclipse, though. Feb 29 21:00:58 I know t0mless, i know Feb 29 21:01:12 shurane, I meant, a bug in ADT Feb 29 21:01:44 are you building with ant? Feb 29 21:02:00 or eclipse? Feb 29 21:02:06 whatever adt/eclipse use Feb 29 21:02:15 adt != eclipse Feb 29 21:02:22 there is an adt plugin for eclipse Feb 29 21:02:30 but not the same Feb 29 21:02:42 so that would be a bug with the adt plugin for eclipse Feb 29 21:03:01 try building from command line and see if it still doesn't repackage the resources Feb 29 21:03:07 isn't the language code for Greek "gre"? Feb 29 21:03:19 all language codes are two letters Feb 29 21:03:28 so no Feb 29 21:03:43 ah, I got the ISO 639-2 Feb 29 21:03:47 shurane, I meant, a bug in ADT Feb 29 21:04:09 again, if you can build on the command line with no issue, it's not ADT Feb 29 21:04:10 t0mless, I know, you're treating me like i'm new to this Feb 29 21:04:17 it's the ADT plugin for eclipse, different things Feb 29 21:04:23 ok Feb 29 21:04:28 adt plugin for eclipse then Feb 29 21:04:55 and yes, eclipse is terrible at android resources Feb 29 21:05:22 agreed, then again, it's only 2 clicks away to clean the project :p Feb 29 21:05:50 what's the option for showing the clear button in a text box? Feb 29 21:06:30 ? Feb 29 21:06:59 You create a button that does editText.setText(""); ? Feb 29 21:07:10 or do you mean the little x thing Feb 29 21:07:21 yeah the X thing Feb 29 21:07:53 That one I don't know Feb 29 21:07:54 "el" is for greek Feb 29 21:07:59 but am now also curoius Feb 29 21:08:04 lol Feb 29 21:08:05 el crazy Feb 29 21:08:48 http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources <-- has links to the ISO 639-1 language code table Feb 29 21:08:56 as well as the region codes Feb 29 21:09:37 looks like it's a custom view t0mless Feb 29 21:09:45 figures Feb 29 21:09:56 haha Jug6ernaut Feb 29 21:11:36 anyone in here use opengl a lot...since when did glIsTexture() become unsupported :| Feb 29 21:13:40 anyone use sl4a to make their apps? Feb 29 21:13:57 i have no idea what that even is Feb 29 21:13:59 t0mless, actually...it's called SearchView, at least that's the one that's used in the search function in the stock mms app Feb 29 21:14:22 Jug6ernaut: :) Scripting languages 4 android. You can use LUA / Python / Ruby etc. Feb 29 21:14:32 or maybe i'm wrong Feb 29 21:14:34 ahh, could probably find a way to just pick that feature out Feb 29 21:14:43 * Jug6ernaut hates scripts Feb 29 21:15:21 still waiting for someone to port the new NumberPicker over to <4.0 Feb 29 21:15:37 still dunno how to port over stuff otherwise I would've done it myself :p Feb 29 21:16:52 Is the date picker less shitty in 4.0? Feb 29 21:17:02 lol Feb 29 21:17:27 oh hell yea it is Feb 29 21:17:39 Anyone use the android-maven-plugin? Feb 29 21:18:11 haven't yet MalRD... looking into that still Feb 29 21:18:31 something about having to export all the platform jars to your local repo Feb 29 21:18:41 and I said "fuck it, i'll come back to this" Feb 29 21:20:00 Jug6ernaut, i love scripts :D Feb 29 21:20:25 all they do is make me angry Feb 29 21:21:35 part of my app...that was released almost a year ago(not updated since) has just stopped working Feb 29 21:21:36 woho Feb 29 21:21:56 the only Maven i know is a WWE wrestler back when I liked it :/ Feb 29 21:22:03 Oh, well, apparently it wasn't broken in the way I thought it was. I could build on the command line, but not through eclipse. Feb 29 21:22:16 * Jug6ernaut also hates wrestling Feb 29 21:22:17 The maven android plugin works ok, but the usual maven caveats apply Feb 29 21:22:33 you'll need an artifact repo if you're using things that aren't in maven central or other publicly accessible repos Feb 29 21:22:37 Solipskier still works even though it hasn't been updated since dec 2010 Feb 29 21:22:42 It looks like eclipse defaulted to the embedded one, even though I changed it to the external. Fixed that, and it is now telling me it can't find the SDK. Feb 29 21:23:03 "file has beer" in eclipse Feb 29 21:24:32 did you use the android artificat in central or export the jars to your local repo MalRD? Feb 29 21:24:54 I have them all in my local. Feb 29 21:25:44 dunno then -_- Feb 29 21:26:27 Afzal: Guess what this is: http://dl.dropbox.com/u/100261/lolol.PNG Feb 29 21:26:54 SimonVT, buahahh YES! your work? Feb 29 21:27:01 SimonVT: is that the datepicker? Feb 29 21:27:09 4.0 NumberPicker running on 2.1 Feb 29 21:27:20 numberpicker* Feb 29 21:27:21 cool Feb 29 21:27:24 And yeah, I backported it a while back Feb 29 21:27:28 Never got around to using it :P Feb 29 21:27:33 sweet! Feb 29 21:27:39 i could have used that a year ago Feb 29 21:27:39 sec Feb 29 21:27:42 but it woul dhave had to suppor 1.6 Feb 29 21:27:44 :P Feb 29 21:28:09 anyone who still uses 1.6... >_< they might as well use a feature phone Feb 29 21:28:24 thankfully, i adopted android at 2.1 :D Feb 29 21:28:53 we're not even supporting 2.1 anymore with new releases Feb 29 21:28:59 jesus christ people are freaking out about the new privacy policy Feb 29 21:29:13 npr tech news feed: last 7 posts are about it Feb 29 21:30:03 The problem isn't the Android stuff. I'm feeling like it is something that eclipse is doing, because eclipse does the best it can to cause me at least one problem per day. Feb 29 21:30:04 canadiancow|work good thing g00s got his droid on froyo! Feb 29 21:30:51 MalRD I'm sure it's either something with Maven or Eclipse, or both Feb 29 21:30:55 Afzal: https://github.com/SimonVT/android-numberpicker Feb 29 21:30:55 but I don't use either of those so... Feb 29 21:31:02 Requires: https://github.com/JakeWharton/NineOldAndroids Feb 29 21:31:14 Like I said, I can compile it without issue via mvn command line. Feb 29 21:31:19 Are there any tutorials on how to pretty up basic view widgets because my UI looks bland Feb 29 21:32:30 whoa!! I didn't even know about NineOldAndroids! Feb 29 21:32:53 SimonVT, commit message: lolol -_- Feb 29 21:33:10 I had to call it something :P Feb 29 21:35:55 Provided as-is, no support! Feb 29 21:36:33 haha, no worries. But I'll create issues if I find ... issues :p Feb 29 21:36:38 I should change it to use android: prefixed attributes Feb 29 21:36:43 But not today :p Feb 29 21:37:39 i knew this slick command to remove my email address from commit messages. >_< forgot Feb 29 21:37:43 Might have to look into back porting the ICS datepicker because the other ones are huge and ugly Feb 29 21:38:15 DatePicker is just a couple of numberpickers iirc Feb 29 21:38:53 NumberPicker isn't really just for numbers. Each entry is a number, sure, but it cna display text Feb 29 21:39:03 yea Feb 29 21:39:06 I realize Feb 29 21:39:16 The new developer console is growing on me Feb 29 21:39:22 Maybe i'll make a custom one Feb 29 21:39:28 but not now Feb 29 21:39:32 back to project Feb 29 21:39:42 Yeah, DatePicker is just 3 NumberPickers Feb 29 21:39:57 Should be easy to backport Feb 29 21:40:01 datepicker sucks. Feb 29 21:40:06 that control, even in ICS, is junky Feb 29 21:40:13 so is the time picker Feb 29 21:40:17 port the datepicker, i'll port the TimePicker after that *trollface* Feb 29 21:41:00 one man's junk is another man's...well, it's not his junk for sure Feb 29 21:41:20 Who here uses ActionBarSherlock? Feb 29 21:41:45 I will, once I start redesigning my app, do I count? Feb 29 21:41:46 * t0mless does Feb 29 21:42:04 i started to, but decided that it kind of sucks. Feb 29 21:42:24 jasta: In what way? Feb 29 21:42:32 jasta thinks everything sucks Feb 29 21:42:46 insufficiently elegant to function as a "straight-through" implementation on android 4+ Feb 29 21:43:05 hey guys, is there any way to know the source of my failure? 02-29 12:56:23.509: E/AndroidRuntime(16594): java.lang.IllegalStateException: trying to requery an already closed cursor android.database.sqlite.SQLiteCursor@417c8058 Feb 29 21:43:24 i get no line numbers Feb 29 21:43:24 the basic way the solution is factored requires a lot of extra hoops that also would make it difficult, or at least unnatural, to migrate away from it. Feb 29 21:43:36 ninjai, without seeing the code, I'll say your cursor is being closed somewhere and you're querying it again Feb 29 21:43:40 which should be its #1 goal (if it does its job right, it should be entirely useless in a couple years) Feb 29 21:43:47 SimonVT, why does your numberpicker requires another lib? Feb 29 21:44:03 holde: Because the numberpicker uses animations not available <3.0 Feb 29 21:44:07 umm..where's Show Touches in 2.3.3 emulator? Feb 29 21:44:18 it was in Settings > Developer Options on ICS Feb 29 21:44:24 Sicp, it's not there Feb 29 21:44:30 oh yours is the new one with flinging? Feb 29 21:44:51 I simply took the 4.0 NumberPicker from AOSP and made it work on <4.0 Feb 29 21:45:04 i just took the 2.1 one ;P Feb 29 21:45:13 but it's not as pretty i think Feb 29 21:45:17 And never really tested it other than just now to laugh at Afzal Feb 29 21:45:20 Sicp i think you set that stuff in the dev tools app on the emu Feb 29 21:45:32 im searching through there Feb 29 21:45:46 SimonVT, lol, not the first time I asked about the new NumberPicker and the porting projects Feb 29 21:47:57 would it be significantly challenging to make a version of the EditText control that automatically resizes the font to accomodate larger entries, rather than clipping? Feb 29 21:48:21 i've seen a few shots at this and they tend to be inelegant, either preventing you from editing the text manually or causing a host of bugs when you do Feb 29 21:50:54 Escherial: it's probably possible; you'll just be modifying the rendering. The big problem is that you're going to have to worry about ALL the IME stuff Feb 29 21:53:20 can anyone tell me why I get errors about already closed cursors and unable to resume activity errors with my code? http://pastebin.com/Grhtb8jn Feb 29 21:53:42 pfn: do you do any json parsing on scala/android? Feb 29 21:53:56 synic, not right now, no Feb 29 21:54:14 pfn: k Feb 29 21:54:34 you can use the org.json stuff in android Feb 29 21:54:39 or you can use the crappy one included with scala Feb 29 21:54:43 way to make other widgets of the same type be the same width as one of them(??) Feb 29 21:54:48 i'm using jackson for json parsing. works great. Feb 29 21:54:48 scala.util.parsing.json.JSON or something like that Feb 29 21:54:52 been trying to use the lift-json Feb 29 21:54:56 which works... in the sbt console Feb 29 21:54:59 I think people like using 3rd party libraries, I haven't done any Feb 29 21:54:59 but not on the emulator Feb 29 21:55:05 what about it fails? Feb 29 21:55:22 well, it'd be kinda hard to explain if you haven't used lift-json Feb 29 21:55:51 * pfn shrugs Feb 29 21:56:11 is it a bytecode error or something else? Feb 29 21:56:17 ninjai: I don't know what your Database class is. Feb 29 21:56:28 something else. You can have the parser try and create instances of case classes Feb 29 21:56:50 and while the same json works in the sbt console, it fails with an unhelpful error on the emulator Feb 29 21:56:53 synic, so it does code-gen? Feb 29 21:57:01 Parsed JSON values do not match with class constructor Feb 29 21:57:01 lov, it's a different class. Feb 29 21:57:01 code-gen doesn't work on android Feb 29 21:57:07 pfn: I have no idea. Feb 29 21:57:25 if they're pre-existing case classes it shouldn't need code gen Feb 29 21:57:49 ninjai: ok, well, looks like it's not even used Feb 29 21:57:59 ninjai: without specific errors and/or stacktraces I can't even begin to solve or care about your problem. Feb 29 21:58:00 yes, they are pre-existing case classes Feb 29 21:58:11 love Feb 29 21:58:13 lov Feb 29 21:58:18 the stack strace is Feb 29 21:58:24 (sec pastebin isn't loading for me..) Feb 29 21:58:53 lov this is one of them: http://pastebin.com/uBnFYcMP Feb 29 21:58:58 I get a different one sometimes too Feb 29 21:59:26 pfn: http://stackoverflow.com/questions/6520592/problem-extracting-json-using-lift-json-in-an-android-scala-application in case you're curious. This seems to be the exact problem Feb 29 21:59:30 trying to requery an already closed cursor android.database.sqlite.SQLiteCursor@417c7cb8 Feb 29 21:59:33 well. Feb 29 21:59:41 startManagingCursor Feb 29 21:59:44 you might want to not use that Feb 29 21:59:54 also Feb 29 21:59:56 instead of Feb 29 21:59:58 cursor.moveToFirst() Feb 29 22:00:04 do { ... } while(cursor.moveToNext()) Feb 29 22:00:13 ok Feb 29 22:00:14 just do while(cursor.moveTonext()) Feb 29 22:00:22 the cursor will always start 1 behind the beginning Feb 29 22:00:36 also, if your cursor returned 0 rows, you'll have an error trying to pull data that isn't there Feb 29 22:00:40 lov: good to know (regarding making an edittext with resizable text)...i may forego tackling this one and just make the box wider Feb 29 22:01:04 lov that breaks it entirely. Feb 29 22:01:20 removing the cursor.movetofirst() Feb 29 22:02:46 synic, probably a case of reflection not working well in that situation -- are you obfuscating with proguard? Feb 29 22:02:54 synic, rather than just tree-shaking Feb 29 22:03:00 synic, if you obfuscate, you'll get that error Feb 29 22:03:15 synic, unless you keepclass **.NumList in that example Feb 29 22:03:24 synic, I just run proguard with -dontobfuscate Feb 29 22:03:28 makes errors like that go away Feb 29 22:03:44 pfn: I dunno. Just using ye olde jberkel plugin Feb 29 22:03:45 or so I would assume Feb 29 22:03:54 synic, run it with -dontobfuscate Feb 29 22:03:57 let's see if I can figure this out Feb 29 22:04:07 dunno how you edit android-plugin's settings Feb 29 22:04:12 me neither Feb 29 22:04:20 in my plugin it'd be proguardOptions in Android <+= "-dontobfuscate" Feb 29 22:06:10 synic, try proguardOption in Android <+= "-dontobfuscate" Feb 29 22:06:25 k Feb 29 22:06:33 or maybe <++= Seq("-dontobfuscate","-dontoptimize") Feb 29 22:07:59 er, no < Feb 29 22:08:13 just += or ++= Feb 29 22:09:04 where do I put this? Feb 29 22:10:02 synic, in your build.sbt Feb 29 22:10:42 just anywhere? Feb 29 22:11:09 throw it in at the end, I suppose Feb 29 22:11:50 How would I go about submitting a patch to the developer tools? Feb 29 22:12:03 wraithguard01, review.android.com has procedures, I think Feb 29 22:12:15 hmm, maybe not there Feb 29 22:12:32 I fixed http://code.google.com/p/android/issues/detail?id=20956 so I may just comment on it? Feb 29 22:12:38 wraithguard01, http://source.android.com/source/life-of-a-patch.html Feb 29 22:13:01 ninjai: reread what I told you Feb 29 22:13:04 wraithguard01, attaching a diff is useful, I think Feb 29 22:13:14 ninjai: DO NOT do "do { .... } while (moveToNext())" Feb 29 22:13:23 Ok, so can I just submit a pull request to the git project? Feb 29 22:13:27 ninjai: DO do "while(moveToNext()) { .... } " Feb 29 22:13:30 wraithguard01, kind of Feb 29 22:14:21 wraithguard01: while I'd love to hear that you did indeed fix it, I get the feeling that whatever you did is going to be rejected as "not what we've done to fix it" :| Feb 29 22:14:46 Well, has it been fixed in the new versions? Feb 29 22:15:05 wraithguard01: supposedly the sdk17 preview did... something Feb 29 22:15:11 I mean, my fix was 3 lines, so there may be a more "proper" fix, however, you can't argue with "it didn't work before, but now it does" Feb 29 22:15:15 I haven't tried it out yet because fuck it, I don't need to screw up my env when it's not working Feb 29 22:15:22 wraithguard01: what's your fix? Just ignore duplicates? Feb 29 22:15:25 yes Feb 29 22:15:30 wraithguard01: yeah, that's going to get vetoed Feb 29 22:15:36 Well, fuck. Feb 29 22:15:43 That's how java works... Feb 29 22:15:50 :P Feb 29 22:15:53 Anyone know what encoding this is? (and how I can decode it?) https://sub.domain.com/Shibboleth.sso/SAML2/POST Feb 29 22:15:56 you mean DOESN"T work :P Feb 29 22:15:58 I think that they want something that will prevent the colliding jars Feb 29 22:16:17 JeroenDL, simple xml entity encoding in hex Feb 29 22:16:17 JeroenDL: zalgo Feb 29 22:16:21 lov, http://pastebin.com/ugvQJqzy Feb 29 22:16:27 JeroenDL, just convert the xNN to the appropriate char value Feb 29 22:16:32 Well, are they going to fix it, or leave it broken? Because my fix is a good stopgap solution. Feb 29 22:16:33 >_< Feb 29 22:16:36 sweet stacktrace bro Feb 29 22:16:45 e.g. x2f = 0x2f = char c = 0x2f Feb 29 22:17:04 wraithguard01, submit your patch and attach it to the bug Feb 29 22:17:07 ninjai: pastein the relevant code Feb 29 22:17:13 pfn: is the easiest way to do that with regex ? Feb 29 22:17:28 Yeah, I'm gonna do that. That way if they veto it, 50 developers will get mad. Feb 29 22:17:43 lov, http://pastebin.com/YPumyAyi Feb 29 22:17:51 JeroenDL, maybe Feb 29 22:18:19 What's the coolest tablet right now? and by coolest I mean most powerful, hackable and just all round sexy... Feb 29 22:18:29 ninjai: try calling fillProfileSpinner before you set it as the adapter Feb 29 22:18:49 if you modify an adapter, you need to call notifyDataSetChanged or something Feb 29 22:19:24 snot, transformer prime still? Feb 29 22:20:11 pfn: what do you mean by still? Feb 29 22:20:24 snot, as in I don't know what's better out at the moment Feb 29 22:20:28 pfn: I also had that in my... boss asked me which one I wanted Feb 29 22:20:53 s/my/mind Feb 29 22:21:32 lov, none of those things work Feb 29 22:21:34 but I guess there are new models on the horizon Feb 29 22:21:41 depends on how long you're willing to wait vs. getting one now Feb 29 22:22:00 pfn: yeah... we need to demo some stuff in a few weeks :( Feb 29 22:22:16 * pfn would get the transformer prime Feb 29 22:22:25 pfn: also why I'm asking here instaed of googling and going to stores Feb 29 22:22:59 pfn: can you give me a hint about what sexyness is around the corner... what I should google for is what I'm asking Feb 29 22:23:30 snot>> Huawei MediaPad 10 FHD Feb 29 22:23:36 snot, everything announced at MWC Feb 29 22:24:09 gsmarena.com Feb 29 22:24:11 pfn: yeah... :( Feb 29 22:24:33 The_Coolest: Huawei? isnt that all cheap crap? Feb 29 22:25:53 Asus Padfone! Feb 29 22:26:37 true^ Feb 29 22:26:44 snot: just look through the headline here and you'll get a very good sense of what's coming.. http://reviews.cnet.com/mobile-world-congress/ Feb 29 22:26:56 but i think that they upped their game Feb 29 22:27:42 anyone ever buy anything at pandawill.com? Feb 29 22:28:27 drezel: I'm sure that will just make me cry... I need to decide asap :/ Feb 29 22:28:43 The_Coolest: ok, ill look into them... Feb 29 22:29:19 I guess ill just say transformer prime... I need to jump on the wagon at some point Feb 29 22:29:28 thanks for the support guys! :) Feb 29 22:29:48 i want to buy a cheap tablet with gps Feb 29 22:30:01 and preferably capacitive screen Feb 29 22:30:04 this tablet says it has ICS http://www.pandawill.com/icoo-d70w-ultimate-android-403-tablet-pc-hd-screen-7-inch-8gb-1gb-ram-camera-hdmi-p59271.html Feb 29 22:30:10 any recomendations? Feb 29 22:30:24 I dunno if that site is reliable Feb 29 22:30:33 it has a 2.89/10 rating Feb 29 22:30:58 CPU All Winner A10 Feb 29 22:31:00 lol Feb 29 22:31:40 must be some new quad core monster! Feb 29 22:31:42 cr5315: 10" or very close... other wise it's jsut a big phone imo Feb 29 22:32:30 cr5315: that sure has a nice price tag though Feb 29 22:33:03 MSM 8960 pro is pretty cool Feb 29 22:33:12 support for light-field cameras :D Feb 29 22:33:29 * cr5315 will stick with companies he's heard Feb 29 22:33:31 heard of Feb 29 22:33:46 light field cameras are sick Feb 29 22:34:17 LOL, Mali 400 GPU device for $150...lemme know if it's legit The_Coolest Feb 29 22:34:43 doubt it Feb 29 22:34:58 I was about to order a dropad a8x from them Feb 29 22:35:25 but just before ordering i decided to look at ratings Feb 29 22:35:41 2.89/10 for that sit Feb 29 22:35:42 e Feb 29 22:36:53 Can anyone help me out with this annoying bug? I get the error in the pastebin attached whenever I go to resume my application: http://pastebin.com/2zLWJ2n5 Feb 29 22:38:47 pfn: I seems I have to settle with less... the transformer prime isnt available in denmark yet!!! damn!! Feb 29 22:39:10 pfn: do you have a secondary suggestion? Feb 29 22:39:51 why are you setting the onClickListener in onResume()? just curious Feb 29 22:41:36 quick question: can a fragment inflate another fragment? Like: I have fragmentA with in XML and Feb 29 22:41:48 no Feb 29 22:41:48 I don't see why not Feb 29 22:41:53 seems like a bad idea Feb 29 22:41:57 you cant put fragment sin fragments Feb 29 22:41:58 fragments should not be nested. Feb 29 22:42:02 yo dawg Feb 29 22:42:05 i heard you like fragments Feb 29 22:42:28 hmm :/ Feb 29 22:42:31 it is apparently technically possible to nest them in sense that it doesn't outright crash, but it doesn't really work either. Some lifecycle issues or something. I've done it. Feb 29 22:42:43 ninjai: you may want to look into switching your adapter.. if you're displaying data from a database and using it to populate an ArrayAdapter you're probably more suited towards using a SimpleCursorAdapter instead Feb 29 22:43:10 I use the actionbar tabs with fragments and want 1 fragment seperated in listfragment and view fragment, any ideas? Feb 29 22:43:17 I did it inadvertently, I used ViewPager and it strongly suggests that each page is a fragment, and in these pages I placed other fragments. It worked, sort of. Feb 29 22:43:35 use a Fragment with a ListView and View? Feb 29 22:43:45 for Quacktop ^ Feb 29 22:44:35 thanks drezel, do you think that is my problem? Feb 29 22:44:39 hmm, maybe I was just too focused on fragments Feb 29 22:45:28 What's the best way to start a service when the app launches? Application#onCreate()? Feb 29 22:46:57 thanks t0mless, alankila and canadiancow Feb 29 22:47:28 wyvern`: sounds like a good place Feb 29 22:50:51 hello is it possible to get an int out of an EditText? f.e. number = (Integer) EditText.getText(); Feb 29 22:51:20 Integer.parseInt(string) Feb 29 22:51:37 you can't cast a Spannable to an int Feb 29 22:51:51 or even a string to an int Feb 29 22:55:35 aright there has to be a faster way to parse JSON. Feb 29 22:55:58 than what? Feb 29 22:56:14 i've tried the built-in org.json, tried GSON, and just tried Jackson stream parsing. jackson was the fastest but it was still around half a second per record. Feb 29 22:56:19 that's just ridiculously slow. Feb 29 22:56:25 how big is the json Feb 29 22:56:35 and what are you doing to it Feb 29 22:56:51 synic, I assume lack of comment means it all worked? Feb 29 22:57:13 it varies. each record represents a db record which can be as large as 84 columns. Feb 29 22:57:32 the test query returned around 20 results. Feb 29 22:57:55 i'm parsing it as a stream and plugging it directly into the db. Feb 29 22:58:06 after i read each record. Feb 29 22:58:16 and you're sure that the json handling is the slow part? Feb 29 22:58:24 how long does it take if you no-op the db work Feb 29 22:58:40 pfn: nah, even turning off proguard all together didn't work Feb 29 22:58:49 well you can't turn proguard off altogether Feb 29 22:58:51 dex won't work Feb 29 22:58:58 unless you pre-installed the scala-libs on-device? Feb 29 22:59:01 the db insert is performed on a separate thread and eats roughly .11 secs of time. Feb 29 22:59:08 hah, well, I don't know what it's doing then Feb 29 22:59:19 this isn't uncommon from what i've read. Feb 29 22:59:23 but adding '-dontoptimize' and 'dontobfuscate' doesn't do anything Feb 29 22:59:24 http://martinadamek.com/2011/01/31/comparison-of-json-parsers-performance-on-android/ Feb 29 22:59:49 i'm seeing the same kind of performance, but a bit slower, but my records are larger. Feb 29 23:00:00 but this is still just horribly slow. Feb 29 23:00:03 synic, pastebin sbt output? Feb 29 23:00:17 pfn: that was a long time ago Feb 29 23:00:20 moonlightcheese: you're just using the streaming api, not data binding or trees? Feb 29 23:00:22 i wonder if i can do this with JNI. Feb 29 23:00:44 i tried data binding with Gson and it was even slower. Feb 29 23:00:50 jackson also has data binding Feb 29 23:01:05 but streaming should be the fastest regardless Feb 29 23:01:13 jackson touts it's stream parser as 20%-30% faster than binding. Feb 29 23:01:24 its* Feb 29 23:01:43 i wonder if a JNI parser would make a difference? Feb 29 23:02:11 or if it's worth the trouble. Feb 29 23:02:37 pfn: https://gist.github.com/1945214 Feb 29 23:03:59 synic, yeah, I dunno about what android-plugin does... never really used it since it seems to do too much magic for me Feb 29 23:04:07 especially having to deal with conscript and giter8 Feb 29 23:04:23 only thing I want to copy from android-plugin is TypedResources Feb 29 23:04:39 I'd try yours, but I don't want to change everything unless I know it'll actually fix this problem Feb 29 23:05:03 but from google searches, it looks like it won't, that lift-json's extract simply doesn't work on Android Feb 29 23:05:16 yeah, maybe it just won't Feb 29 23:05:16 however, noone mentions dontobfuscate Feb 29 23:05:19 I have no idea Feb 29 23:06:02 but man, you get a lot of warnings out of proguard Feb 29 23:06:18 I really should have writen out a more detailed order of these changes i want to implement Feb 29 23:06:22 and stuck to it Feb 29 23:06:34 now I'm jumping between them all and confusing myself sometimes -_- Feb 29 23:12:26 pfn: alright, i give up. How does yours work? Feb 29 23:12:52 synic, I don't think mine would help really... Feb 29 23:13:15 haha, ok Feb 29 23:13:31 shame. That would make this project 90% less tedious Feb 29 23:13:32 but man, that's a lot of warnings Feb 29 23:13:53 I guess you can try, but mine expects things in certain places, i.e. an existing android project Feb 29 23:13:54 *shrug*, maybe there's a way to hide all that crap, since I have no idea what any of it means Feb 29 23:14:04 if you moved it into like src/main/java and src/main/scala, etc. it'll be all funky Feb 29 23:14:17 synic, if you wanna try my plugin, sure (but you'll lose TR and device access from sbt) Feb 29 23:14:35 ah, meh. If you ever get bored and want to see if the lift-json extract works :D Feb 29 23:14:42 hi Feb 29 23:15:47 * pfn wonders how TypedResources in android-plugin handles id collisions with non-covariant types Feb 29 23:16:10 I guess it doesn't, it just warns Feb 29 23:20:23 I have an string (with some JS in it) that I want to open in the browser. Is that possible ? Feb 29 23:21:40 hi i tried to download the android source usign repo and i keep getting teh following errors Feb 29 23:21:44 http://pastebin.com/C3C5eT6D Feb 29 23:21:50 how do i fix this? Feb 29 23:22:11 vganesh, use a directory without spaces in it Feb 29 23:22:19 Hm, I can't figure out how to start my new service. I get "Unable to start service Intent {class name}: not found" Feb 29 23:22:26 pfn: okay thanks will try that Feb 29 23:22:30 wyvern`, register your service in manifest Feb 29 23:22:34 wyvern`, #1 cause Feb 29 23:22:36 it's there Feb 29 23:23:25 pastebin exception Feb 29 23:23:43 plus some context before and after Feb 29 23:25:17 pfn: http://pastie.org/private/2sdhg70mvfbpprxyu5y8q Feb 29 23:25:59 /leave Feb 29 23:26:02 wtf Feb 29 23:26:05 wyvern`, and your line in your manifest registering this service? Feb 29 23:26:27 paste updated. Feb 29 23:26:28 assuming your package is com.prnto.medigram, android:name should be .service.ChatPollService Feb 29 23:27:49 and updated once more with the onCreate. Feb 29 23:28:33 http://pastebin.com/mz1vvcAs why am i getting as an output in my TextView adding more than one player twice the same player or 3 times (adding a 3rd) and so on ? Feb 29 23:29:03 wyvern`, clean the project and rebuild Feb 29 23:29:23 wyvern`, also, do new Intent(this, ChatPollService.class) Feb 29 23:30:11 wyvern`, you used the wrong intent constructor Feb 29 23:30:32 ah, that's for actions, i see Feb 29 23:30:47 you effectively just did: i = new Intent(); i.setAction("com.foo.whatever") Feb 29 23:31:55 yep, that was it. thanks. Feb 29 23:32:32 pfn could you look at my pastebin ? ;) :) Feb 29 23:33:49 how can I have the default highlighter/selector box show up on my custom image button? Feb 29 23:34:00 Surfer2010, try to be clearer in your description of what's going on Feb 29 23:35:01 Surfer2010 because you use a global which you edit every time Feb 29 23:35:24 ok i put 1 player in --> it "prints" it in the TextView (fine!) ... i put a second player in .. the TextView shows twice! the same player ... the second i put in ... repeating this a thrid time ... i get "printet" 3 players ... all three the same as the third i put in Feb 29 23:35:26 basically tl;dr for me Feb 29 23:36:09 a global? why is teamlist global? Feb 29 23:36:28 no, playerInput Feb 29 23:36:49 you add this object to teamlist a few times Feb 29 23:37:00 but you change this object every time you add a player Feb 29 23:37:09 so you have a list of 1/2/3 times the same object Feb 29 23:37:14 out of which you create the string Feb 29 23:37:17 okay okay makes sense Feb 29 23:37:21 true Feb 29 23:37:58 so when pressing a button, create a new player object, fill it, add it to the list Feb 29 23:38:30 and the player object has to be named different each time? no Feb 29 23:38:42 no Feb 29 23:38:56 if you're referring to the name of the variable Feb 29 23:39:48 so i put the create player right as first line after i go into the case - button pressed Feb 29 23:40:06 yes Feb 29 23:40:35 perfect Feb 29 23:41:04 as for your initial question, you can find this out by working backwards from your problem: the string is incorrect, you create the string from the teamlist, it appears it has 3 times the 'same' object, why is this Feb 29 23:41:09 is it possible to have something like an "ID" in a ListArray like in SQL ... that is automatically added? Feb 29 23:41:45 if id is a property of player then it should imo be on player Feb 29 23:41:47 i tried that the last 20min ;) ... not good at finding mistakes yet i know Feb 29 23:41:55 ^ Feb 29 23:42:05 define your own object type for the arraylist to contain. Feb 29 23:42:10 thank you xorgate Feb 29 23:42:35 youre welcome Feb 29 23:45:09 Surfer2010 other notes: you can iterate over the teamlist's players using for( Player : teamlist ) {} instead of calling .get(i) everytime, also .toString() is not needed when the member is already a string Feb 29 23:45:11 Guys, is there some kind of calculator tool for asset sizes in various DPI? Feb 29 23:45:34 for( Player player : teamlist ) {} evne Feb 29 23:45:47 Example: I've got map pins in HDPI, and I need to create them in the other DPIs. Is there a tool to help me calculate their sizes for the various DPIs? Feb 29 23:46:09 Can anyone help me with this problem? I think it's because I switched my app from gingerbread API level to ICS API level. Maybe I missed something... I don't know but all suggestions have not worked for me so far. Anyone know? http://pastebin.com/cFQtj2LK Feb 29 23:46:16 then it will "go thru every player" ? Feb 29 23:46:26 Chronax try http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html Feb 29 23:46:39 and then i take every singel element and put it in a String like i did? Feb 29 23:46:52 you mean just instead of the i=0 i++ ... thing? Feb 29 23:47:13 ninjai did you call super.onPause() Feb 29 23:47:46 xorgate, yes Feb 29 23:47:53 That's not quite what I need, xorgate. Feb 29 23:48:01 more relavent error: 02-29 15:46:37.875: E/AndroidRuntime(2678): FATAL EXCEPTION: main Feb 29 23:48:01 02-29 15:46:37.875: E/AndroidRuntime(2678): java.lang.RuntimeException: Unable to resume activity {com.ninjai.mtracker/com.ninjai.mtracker.mtracker}: java.lang.IllegalStateException: trying to requery an already closed cursor android.database.sqlite.SQLiteCursor@4179bc68 Feb 29 23:48:01 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2444) Feb 29 23:48:01 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2472) Feb 29 23:48:04 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1173) Feb 29 23:48:05 ninjai, what's mtracker.java line 199 Feb 29 23:48:07 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.os.Handler.dispatchMessage(Handler.java:99) Feb 29 23:48:09 ninjai, wrong Feb 29 23:48:11 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.os.Looper.loop(Looper.java:137) Feb 29 23:48:13 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.app.ActivityThread.main(ActivityThread.java:4424) Feb 29 23:48:14 t.t Feb 29 23:48:16 02-29 15:46:37.875: E/AndroidRuntime(2678): at java.lang.reflect.Method.invokeNative(Native Method) Feb 29 23:48:18 02-29 15:46:37.875: E/AndroidRuntime(2678): at java.lang.reflect.Method.invoke(Method.java:511) Feb 29 23:48:20 02-29 15:46:37.875: E/AndroidRuntime(2678): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) Feb 29 23:48:23 02-29 15:46:37.875: E/AndroidRuntime(2678): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) Feb 29 23:48:26 02-29 15:46:37.875: E/AndroidRuntime(2678): at dalvik.system.NativeStart.main(Native Method) Feb 29 23:48:26 holy fucksticks Feb 29 23:48:26 damnit, chanserv needs a flood filter Feb 29 23:48:28 02-29 15:46:37.875: E/AndroidRuntime(2678): Caused by: java.lang.IllegalStateException: trying to requery an already closed cursor android.database.sqlite.SQLiteCursor@4179bc68 Feb 29 23:48:31 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.app.Activity.performRestart(Activity.java:4508) Feb 29 23:48:34 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.app.Activity.performResume(Activity.java:4531) Feb 29 23:48:36 02-29 15:46:37.875: E/AndroidRuntime(2678): at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2 Feb 29 23:48:38 I've got an image that's 21x34 in HDPI. How do I determine what size it needs to be for MDPI, XHDPI, et cetera? Feb 29 23:48:41 oh CRAP Feb 29 23:48:43 oops Feb 29 23:48:45 lov! Save US! Feb 29 23:48:45 sorry :S Feb 29 23:48:47 that was supposed to be a pastebin link... :S Feb 29 23:48:54 nice link Feb 29 23:49:05 * xorgate scrolls up Feb 29 23:49:07 pfn, 199 is a curley brace..? Feb 29 23:49:25 here's what I meant to paste :S http://pastebin.com/kDk3NvNs Feb 29 23:49:53 I've been trying to fix this error for a couple hours now to no avail Feb 29 23:50:02 for (Player p : teamlist){ myteamlist = myteamlist + "(" + p.ID + ".) " + p.name + " - " + p.nick + "(" + p.onfield + ")\n";} xorgate like that you mean? Feb 29 23:50:05 Surfer2010 it's an iterator through the list. since it's an ArrayList it iterates over Player objects (in my example the object is called player) Feb 29 23:50:11 Is there a tool to help me calculate the sizes I need for various DPI? Feb 29 23:50:14 For existing assets? Feb 29 23:50:15 okay Feb 29 23:50:19 Surfer2010 yes Feb 29 23:50:21 ( Chronax ): the ratio for ldpi:mdpi:hdpi:xhdpi is 3:4:6:8 Feb 29 23:50:25 perfect :) Feb 29 23:50:28 ninjai, don't use managedQuery Feb 29 23:50:42 ninjai, canadiancow ran into that a month ago or so Feb 29 23:50:49 Surfer2010 just a tip to make things easier on the eye and brain Feb 29 23:50:51 you can also use the AndroidAssetStudio Feb 29 23:50:54 pfn, managedQuery? I can't find that in my code anywhere Feb 29 23:51:21 ninjai, well, if you're doing anything with managedcursors then you'll get that Feb 29 23:51:29 ninjai, maybe even with a normal cursor, if you've closed it Feb 29 23:51:47 xorgate: it really is you're right i'm just getting started to get familiar with all those things so i'm happy for every input i get :) thanks Feb 29 23:51:57 Surfer2010 optionally make a .toString() method for Player, since now you put player-code in Team Feb 29 23:51:58 t0mless: Yeah, just read that. But it's tough to figure out with an existing HDPI asset only. ;) Feb 29 23:52:14 pfn, what should I do instead> Feb 29 23:52:18 is not Feb 29 23:52:26 don't you know math? Feb 29 23:52:28 ninjai, look at your existing cursors and see how it gets closed Feb 29 23:52:30 ninjai, then fix it Feb 29 23:53:02 pfn, fix it how? By not closing them..? Feb 29 23:53:11 ahh good idea ... :D lol i was looking for something usefull i can put in the Player class :D :D :D Feb 29 23:53:31 ninjai, by closing it when you actually mean to Feb 29 23:53:42 and not using them after you close it Feb 29 23:54:10 Hah, I deserved that one. Feb 29 23:54:14 Surfer2010 soon you will see the light Feb 29 23:54:17 t0mless: How does asset studio help me here? Feb 29 23:54:22 If I've got an existing asset? Feb 29 23:54:31 You can use an existing asset... Feb 29 23:54:47 depending on what you're making Feb 29 23:54:53 it might not help you Feb 29 23:54:58 pfn, Where I close it is where I want to, is it not? I'm done my query, I have no further need. I tried commenting out my closes entirely and it still died on me Feb 29 23:55:00 it's pretty much only for icons Feb 29 23:55:00 Yeah, I'm making map pins. Feb 29 23:55:05 So I don't think it'll help. Feb 29 23:55:10 nope Feb 29 23:55:14 just do the math Feb 29 23:55:18 pretty simple Feb 29 23:55:32 oh crap i lied Feb 29 23:55:36 ninjai, then don't use a cursor adapter Feb 29 23:55:39 i commented out the closes and it works.. Feb 29 23:55:47 ninjai, or remove the cursor adapter from your view onPause Feb 29 23:55:54 That makes me wonder, if you're going to re use the cursor object for a new query Feb 29 23:55:55 i'm getting there some day ;) for learining for about 7days i think it's ok Feb 29 23:56:06 do you need to do c.close; c = db.query(...) Feb 29 23:56:09 or don't have to close it Feb 29 23:56:17 t0mless, close it Feb 29 23:56:20 probably should close it Feb 29 23:56:27 * t0mless leaks cursors everywhere... Feb 29 23:56:38 t0mless, c = db.query will just leak the original value of c Feb 29 23:57:04 Roger Feb 29 23:57:07 I figured as much Feb 29 23:57:10 xorgate: is that "ok" ? look wired to have p.blabla(p) for (Player p : teamlist){myteamlist = myteamlist + p.toString(p);} Feb 29 23:58:06 Also, redoing some of these old ass layouts using relative layout... omg so much nicer Feb 29 23:59:01 looking at it and seeing ... Feb 29 23:59:12 I must have been drunk out of my gourd when I made these Feb 29 23:59:32 How would I create a Drawable from a resource ID if I'm outside of a context (in other words, no getResource())? Feb 29 23:59:42 MalRD, pass a context to it Feb 29 23:59:46 ^ Feb 29 23:59:53 I don't want a goddaaaamn context. Mar 01 00:00:06 Then NO DRAWABLES FOR YOU Mar 01 00:02:07 pfn, when should I be closing my cursors/database connections? Not closing them at all seems to be the current solution to my problem but that sounds wrong to me Mar 01 00:02:46 when you don't need to use them anymore... Mar 01 00:03:22 Surfer2010 why pass a player as param when the method is called on a player object? Mar 01 00:03:54 the method can access the members directly Mar 01 00:04:24 ninjai, depends on when you open them, you should close them in a reciprocal manner Mar 01 00:04:29 uhm Mar 01 00:04:32 ninjai, or do what I said earlier, remove your cursor adapter Mar 01 00:04:40 because i need to access this exact one ? Mar 01 00:05:27 Surfer2010 Player gets a method .toString() , this method knows it is run 'on' a Player, as such, it can use a Player's member variables Mar 01 00:07:47 ok Mar 01 00:07:49 Surfer2010 https://gist.github.com/1945918 Mar 01 00:08:27 pfn, if I remove the cursor adapter, how do I load my spinner with SQL data? Mar 01 00:08:33 xorgate okay makes sense thinking about it ;) lol ... amazing how "logical" this Java is ;) Mar 01 00:08:37 Player surfer = new Player( "Surfer", "is cool" ); Log.d("HELLO", surfer.toString() ); Mar 01 00:08:48 this is what we call object oriented Mar 01 00:09:22 i'm allready stuck on the next mistake i made i think Mar 01 00:09:23 loool Mar 01 00:09:58 ninjai, you load it onResume, and remove it onPause Mar 01 00:11:37 How do I "delete"/remove my adapter onPause? Mar 01 00:12:02 setListAdapter(null); Mar 01 00:12:22 or mListView.setAdapter(null); if you're not using a ListActivity/ListFragment Mar 01 00:13:26 How do I call getSupportMenuInflater() from ABS properly? Mar 01 00:14:06 Inside my SherlockListFragment, using getActivity() tries to call Androids function, I think Mar 01 00:14:22 getSherlockActivity() Mar 01 00:14:29 aha Mar 01 00:14:42 thanks, that's what I needed Mar 01 00:14:45 you can also cast the getActivity to a SherlockFragmentActivity Mar 01 00:14:57 but the first way is easier Mar 01 00:16:41 t0mless, when I do that I get FC when I pause my app Mar 01 00:17:00 why for? Mar 01 00:17:17 null pointer Mar 01 00:17:33 which method you using? Mar 01 00:17:51 profileSpinner.setAdapter(null); Mar 01 00:17:53 calling it on the listview or the activity Mar 01 00:18:02 why is your profileSpinner null? Mar 01 00:18:22 I thought thats what you said to do Mar 01 00:18:31 that will work Mar 01 00:18:35 but your profileSpinner object Mar 01 00:18:37 is null Mar 01 00:18:38 why Mar 01 00:18:47 because I set it to null like you said Mar 01 00:18:54 *headslap* Mar 01 00:18:55 [16:12] setListAdapter(null); Mar 01 00:18:56 [16:12] or mListView.setAdapter(null); if you're not using a L Mar 01 00:19:03 you're setting the adapter to null Mar 01 00:19:16 is it possible to have a listview that can have different formats for each row *and* change them? Mar 01 00:19:21 with setAdapter... but your ACTUAL profileSpinner OBJECT is null Mar 01 00:19:28 for example, while a file is uploading i want to display a progress bar Mar 01 00:19:32 you could call prifileSpinner.toString() and still get aNPE Mar 01 00:19:40 but after it's done i want to display just text Mar 01 00:19:44 because the profileSpinner object is null Mar 01 00:20:39 http://pastebin.com/wD9jn1Dk this is the code I wrote. it looks at the status of current item and returns the appropriate view Mar 01 00:20:43 hjf yes, that's possible Mar 01 00:21:17 but if the item was uploading and then it's done i get a NullPointerException when it changes to the new view Mar 01 00:21:45 t0mless: :P well yeah i guess it's possible, the Market app does that Mar 01 00:22:17 probably because you're recycling the view from the old type Mar 01 00:23:50 t0mless: yes, i suspect that is, that's why i do that in line 40: try a cast, it will fire an exception, so i null the view Mar 01 00:23:51 well, setAdapter could throw NPE itself... Mar 01 00:24:36 ninjai, simply, only request a cursor onCreate and close it onDestroy Mar 01 00:24:38 I suppose it could Mar 01 00:25:11 ninjai, but you don't pastebin anything for us to see where the NPE is Mar 01 00:29:57 if I want to use an @ in my string in strings.xml do I just escape it with \ ? Mar 01 00:30:06 Eclipse for some reason isn't happy about passing a ContextMenu from onCreateContextMenu to ABS's MenuInflater.inflate, says the menu has to be a Menu. If I try to cast it, it crashes Mar 01 00:30:22 Though I'm not certain what's different from Androids, if there is a difference Mar 01 00:36:03 Does the support lib have another name for calling onCreateContextMenu? Mar 01 00:37:25 any RoboGuice users here? I'm having weird issues with RoboService. Simply starting a completely empty RoboService subclass (other than a returns-nul onBind) causes showing a ProgressDialog to fail with android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application Mar 01 00:38:06 wyvern`, that normally happens when something happens outside of the GUI but you're trying to do GUI stuff Mar 01 00:38:36 wyvern`, like you created your service from Activity.onCreate and then you tried to do gui stuff from said service Mar 01 00:38:54 the gui stuff is happening in an AsyncTask, but that has been working forever Mar 01 00:39:19 i wonder if the injector is making the asynctask from the wrong thread or something Mar 01 00:39:28 the asynctask has been working forever, though Mar 01 00:39:41 possibly Mar 01 00:39:46 asynctask needs to be created on the UI thread Mar 01 00:39:51 or something like that Mar 01 00:40:20 vadi2, a ContextMenu is a Menu Mar 01 00:40:27 ... Mar 01 00:40:31 I guess it's an abs thing Mar 01 00:40:42 It is, but eclipse is saying it does not match MenuInflater.inflate(int, Menu) Mar 01 00:40:57 You need to use the Menu from com.actionbarsherlock Mar 01 00:41:05 fix your import Mar 01 00:41:07 I'm using it inside onCreateContextMenu Mar 01 00:41:13 There is no import, it's an argument Mar 01 00:41:23 i'm creating the asynctask (via an assisted-inject factory) inside an activity (from the UI thread) Mar 01 00:41:31 ie: http://developer.android.com/guide/topics/ui/menus.html#context-menu step #2 Mar 01 00:41:44 Except I'm using getSherlockActivity().getSupportMenuInflater() to obtain my MenuInflater Mar 01 00:42:01 Though the inflater does not like the Menu it's given. Mar 01 00:42:13 hrm Mar 01 00:42:23 use the normal layout inflater then Mar 01 00:42:49 looks like ABS doesn't do anything to the context menu Mar 01 00:42:51 I am using android.view.ContextMenu because ABS doesn't seem to have one Mar 01 00:42:59 I guess that's the issue Mar 01 00:43:00 right, so just use the normal inflater Mar 01 00:43:08 How can I? Mar 01 00:43:16 Hm Mar 01 00:43:25 android.view.MenuInflater inflater Mar 01 00:43:28 Oh, I was mixing it - that's why I couldn't perhaps. Will look Mar 01 00:44:51 Makes sense now, sorry for the fuss! Didn't realize the support lib didn't have a contextmenu to use Mar 01 00:45:27 can someone show me a code snippet or a reference on d.android.com on how to make an application show up in the 'share with' dropdown of the gallery, and how to 'receive' the image? Mar 01 00:52:42 you need to have an intent filter with the SEND intent Mar 01 00:52:53 and the appropriate data types Mar 01 00:53:08 er Mar 01 00:53:11 t0mless: can you give me a very basic code snippet / example? Mar 01 00:53:11 SHARE intent Mar 01 00:53:12 not send Mar 01 00:55:48 Mar 01 00:56:05 I stream music at work and noticed that My Data Manager reports "Music" as using a fair amount of data, and "Streaming Media" at about a fourth of that. Is this something that the OS does underneath or My Data Manager reporting something incorrectly? Mar 01 00:56:12 If the first, what differentiates the two? Mar 01 00:57:44 t0mless: so I need that in the manifest? What do I need to do in code to receive the imagE? Mar 01 00:58:17 If I want to use OpenGL in my app, and I want to use SW rendering, is there a flag I need to set to make it SW? Mar 01 00:58:48 get the image from the intent extras Mar 01 00:59:04 ...where? Mar 01 00:59:07 in what method Mar 01 00:59:09 not sure what key is used, that would depend on the app sending it Mar 01 00:59:12 onCreate probably Mar 01 00:59:17 or maybe onStart or onResume Mar 01 00:59:43 so, when an app shares an image, onCreate gets called, passing in the image in the Bundle? Or what? Mar 01 00:59:48 getIntent().getExtras().getString("data"); more than likely they pass the path to the image Mar 01 01:00:25 an app shares an image with something like Intent i = new Intent(Intent.ACTION_SEND); Mar 01 01:00:38 then sets the mime type and extras, then calls startActivity(i) Mar 01 01:00:39 and then i.putExtra("data",whatever) Mar 01 01:00:47 yea Mar 01 01:00:47 alright Mar 01 01:00:57 then you get it in your activity if that activity is chosen Mar 01 01:01:08 depends on how the sending activity set it up though Mar 01 01:01:25 you should maybe use reflection and see what's passed to you from different apps Mar 01 01:01:36 I can iterate over all the extras and print them out for example so I can determine the key name, right? Mar 01 01:01:38 or look in the source code for ShareActionProvider Mar 01 01:01:46 this'll just be used with the gallery Mar 01 01:01:47 yea Mar 01 01:02:00 You don't really have a choice Mar 01 01:02:09 true Mar 01 01:02:16 but I can only handle it from the gallery :P Mar 01 01:02:18 if you accept the share intent with image mime type, any activity can use it Mar 01 01:02:22 this isn't a public app, it's for a school project Mar 01 01:02:57 go look at the gallary source then Mar 01 01:03:03 pfn: the dialog creation is happening on the ui thread Mar 01 01:03:06 and see how it builds it's intent that it sends Mar 01 01:03:08 (always) Mar 01 01:03:13 the gallery sends, I'd need an app that receives Mar 01 01:03:17 that's true. Mar 01 01:04:34 gallery is massive O.o Mar 01 01:04:48 wyvern`, I dunno, when exactly is it happening then? if it happens before/after onResume and onPause, then there's a chance for that error to occur as well Mar 01 01:05:56 pfn: a brief summary of the lifecycle -- application starts, and in onCreate it starts a completely blank RoboService. AndroidManifest.xml has an activity designated as the main activity, so that activity launches. Mar 01 01:06:08 How can I throw an exception that will end the application? Mar 01 01:06:23 That activity has a callback that's called by the view when the password field is fully filled out. In that callback, an async task is created to execute a server call. Mar 01 01:06:25 wyvern`, pastebin the full stack of the message and some surrounding context? Mar 01 01:06:30 k. Mar 01 01:06:44 hwrd|work, any uncaught exception results in a force-close dialog by default Mar 01 01:07:41 if im serving a file with netcat like this: $ cat olddbdump.sql | nc -l 3333 Mar 01 01:07:45 How can I go about getting that file in java Mar 01 01:10:32 brx_, by using the appropriate java.net apis Mar 01 01:10:40 and nc -l is listen... Mar 01 01:11:29 Hi there, I'm polling an external device every 3 seconds or so by doing Thread.sleep(3000), however this causes the UI to not be drawn - what am I doing wrong? Mar 01 01:11:44 pfn, that command works cat outputs the file to the client upon establishing a conenction Mar 01 01:11:57 ok ill dig around the api's thanks Mar 01 01:12:27 jab416171|Cloud from I can see in the Gallary source, when share is clicked it tries to start an activity using the ACTION_SEND intent with mimetype image.getMimeType() (so image/* would catch it) and puts the Uri to the image in Intent.EXTRA_STREAM Mar 01 01:12:28 anyway, java.net.Socket and InputStream are all you need Mar 01 01:14:12 ziroday are you using Thread.sleep on the main UI thread? Mar 01 01:14:20 t0mless: aye Mar 01 01:14:25 That would be why Mar 01 01:14:29 (I take it that's bad) Mar 01 01:14:33 Yes Mar 01 01:14:39 We should hunt you down and murder you now Mar 01 01:14:49 t0mless: could you point me towards some documentation pointing out how I should implement it? Mar 01 01:14:58 use asynctask ziroday Mar 01 01:15:03 t0mless: psst, I have his address Mar 01 01:15:06 that's one way Mar 01 01:15:09 brx_: cheers, I'll look that up Mar 01 01:15:17 but for long living polling tasks you may want a service Mar 01 01:15:47 t0mless: I'm already polling a service (does that make sense?) Mar 01 01:15:48 especially if you want to drain the user's battery in record speeds! Mar 01 01:15:58 using a service to poll? Mar 01 01:16:00 pfn: http://pastie.org/private/mqsgab5f5wxq3e0kaqjpxw Mar 01 01:16:10 t0mless: no I'm getting my data from an already running service Mar 01 01:16:23 (by polling it every 3 seconds) Mar 01 01:16:23 do you have control of this service? Mar 01 01:16:27 no Mar 01 01:16:43 what is it you're trying to do? Mar 01 01:16:51 pfn: if I override RoboService's onCreate() to no-op, then the error does not occur. So, it must be something with how RoboGuice is setting up scopes, I guess. Mar 01 01:16:52 because what you're doing now seems... bad Mar 01 01:17:14 I want to get some information from a running service every 3 seconds and display it to the user Mar 01 01:17:47 you're going to run into a lot of trouble, ziroday Mar 01 01:17:50 teehee Mar 01 01:18:03 Sicp: thanks :) Mar 01 01:18:10 ziroday but not a service you made? Mar 01 01:18:14 t0mless: correct Mar 01 01:20:59 aren't you spawning a thread to fetch what you need for you (from the service)? Mar 01 01:21:30 you should have your service notifiy when something changes instead of polling Mar 01 01:21:42 did the android design guidelines get updated, or was it just that they released stencils ? Mar 01 01:21:51 just released stencils Mar 01 01:22:18 Sicp: I am now, with asynctask Mar 01 01:22:38 t0mless: the data is constantly changing - hence the every three second frequency Mar 01 01:22:48 try to run the thing, I am certain that it will die out at random times Mar 01 01:23:20 Sicp: sounds like a vote of confidence, currently I'm just skimming through http://developer.android.com/guide/topics/fundamentals/processes-and-threads.html Mar 01 01:23:23 you get your results first, then a couple of iterations further it just stops displaying Mar 01 01:23:48 Im still suffering from that very issue, still dont know how to fix a race condition that's going on Mar 01 01:26:27 Sicp: what is your race condition? Mar 01 01:29:39 there it is, DrPenguin , http://pastebin.com/GQPHmddi Mar 01 01:29:54 it's fine for the first couple of iterations, and then it just stops plotting Mar 01 01:30:18 Sicp: so.. someone gets inside the synch method and never leaves? Mar 01 01:31:15 DrPenguin: hi :) i'm getting a "null pointer error" and i THINK i know why but to be sure ... if i have a class Players ... and i'm creating an array of Players Player[] bla = new Player[7]; is that correct? Mar 01 01:31:21 well there's a while true loop in that thread-spawning code in onCreate() Mar 01 01:31:39 Surfer2010: well that makes an Array of Players, but each entry is null Mar 01 01:32:24 and I don't know where the problem is really, but I do know that there are no crashes, no errors, nothing Mar 01 01:32:25 Sicp: do you know exactly where it just stops running? Mar 01 01:32:30 the drawing just ceases Mar 01 01:32:39 Player[] bla = {null, null, null} you mean? Mar 01 01:32:43 Sicp: yeah but do you know WHERE in the code Mar 01 01:33:06 Surfer2010: no, doing Player[] blah = new Player[7] makes a Contiguous area in memory big enough for 7 "player" objects, but they are null Mar 01 01:33:11 no idea, I would suppose it's in sendAndReceive() where the value is getting stored and displayed Mar 01 01:33:23 Sicp: then you should figure out where its stopping Mar 01 01:33:52 let's say it's in sendAndReceive() Mar 01 01:33:56 Sicp: lets not Mar 01 01:34:02 DrPenguin but that is what i want ... so it is correct? or did i missunderstood you now? Mar 01 01:34:22 Surfer2010: well thats fine, but you have to initialize the entries in the array before you use em Mar 01 01:34:57 ok so in the next line with blah = {null, null, ...} ? or with actuall players? Mar 01 01:35:05 Sicp: First off, if anything, you should be logging the stack traces from your catches, you wont see em by doing printStackTrace, secondly, you should b able to use simple logging to figure out where the stuff is at Mar 01 01:35:28 well I was doing that before, I didn't keep them Mar 01 01:35:31 Surfer2010: What do you think? is null usable? Mar 01 01:35:35 this has been on for almost a month cause Mar 01 01:35:42 no ^ Mar 01 01:35:53 Surfer2010: well then, they need to be initialized with Player Objects Mar 01 01:35:55 wyvern`, weird why onCreate of the roboservice is busted... I wonder why... too bad I don't guice Mar 01 01:36:08 and will be replaced later on ... okay Mar 01 01:36:10 thx Mar 01 01:36:17 * g00s would never use robo-* Mar 01 01:36:36 Surfer2010: the point is, you want to make sure any entry you use in that array is a Player object and not null before you attempt to dereference it Mar 01 01:37:23 okay so i was right thinking my mistake is at the setting up of this array :) i'll go and check if i can fix it :) thx DrPenguin Mar 01 01:38:21 pfn: in the mean time, i'm kludging around it and posting on the roboguice forums Mar 01 01:40:03 wyvern`, so you launch this asynctask after someone finishes entering some text? Mar 01 01:40:18 and as part of launching the asynctask, it pops up a progress dialog? Mar 01 01:40:20 when is onSaveInstaceState called? when you return to the home or when the os deallocates your memory? Mar 01 01:40:29 What would be the best way/library to draw graphs? Mar 01 01:40:34 wyvern`, what's line 32 of loginasynctask look like anyway? Mar 01 01:41:43 wyvern`, how'd you get around your terrible giganto library problems from yesterday? Mar 01 01:43:06 nm i have found the answer Mar 01 01:43:33 agh, he left Mar 01 01:43:47 as I suspected (and knew), it's in the synched method Mar 01 01:43:50 bleh Mar 01 01:45:33 THREAD!! Y U DIE!! Mar 01 01:59:36 if I use alignBaseline in relative layout to position another text view, does it match baseline to baseline, or the bottom of the second textview to the baseline of the first? Mar 01 02:19:01 how do i define a variable in a class-constructor so it is usable by the entire class ? ... Mar 01 02:19:36 define it on the class instead of in the constructor. Mar 01 02:19:45 because i need to initalize an Array of Objects ... and of course can't do that just in the class Mar 01 02:20:38 use an std::vector or std::list on the class, populate in the constructor. Mar 01 02:20:56 OxDeadC0de: I dont think hes doing NDK stuff Mar 01 02:21:18 oh oops, thought this was ##C++ :P Mar 01 02:21:20 here is my Class: http://pastebin.com/eRa36Y3n Mar 01 02:21:27 NOPE Mar 01 02:21:28 line 9. is the problem Mar 01 02:21:50 i need to put this in the constructor which messes all up since i don't need one actually Mar 01 02:22:00 ... what are you trying to do? Mar 01 02:22:05 you make my brain hurt Mar 01 02:23:20 i'm VERY SORRY DrPenguin Mar 01 02:23:29 http://pastebin.com/Eg4RjKPn (updated) Mar 01 02:23:55 i wanna make a list(String) of this array of objects Mar 01 02:24:10 ... stop right there Mar 01 02:24:16 you literally mean List? Mar 01 02:24:23 nooooo Mar 01 02:24:46 * DrPenguin feels an anurism commin on Mar 01 02:25:30 i ment: combine all the elements of the Array into one String which i wanna display in a TextView Mar 01 02:25:35 better? :$ Mar 01 02:26:11 So, you wanna take an Object that isnt a string, and then.. make it a string? Mar 01 02:26:20 since i fill this array piece by piece during the use ... i need to put some objects in the array at first initializing it Mar 01 02:26:26 Or are you trying to just have a list that identifies all the stuff in the arrays Mar 01 02:26:43 no no no don't worry about that "making the String" ... i got that allready Mar 01 02:27:02 the objects i have in there have a "toString" method allready Mar 01 02:27:33 my problem is that i am getting a null-pointer error because i didn't initialize my array of object correct ... Mar 01 02:27:58 but "just in the class Team" i cannot fill it with like a for loop with player-objects Mar 01 02:28:32 so, that for loop on line 21, that gives you an NPE Mar 01 02:28:52 why do you have an ArrayList and an Array? Mar 01 02:29:23 the one is "my entire team" ... and the other is "my 7 people playing the game Mar 01 02:30:24 .. wait a second Mar 01 02:30:29 Line 21 i added to initialize my array ... but the place i put it it doesn't work of course ;) i know that, so i thought about putting it into a constructor Mar 01 02:30:32 your doing a for loop in no method Mar 01 02:30:52 where you have that loop makes no sense Mar 01 02:30:56 i know Mar 01 02:31:17 but if i put it in the consturctor it's not accessable to the methods in the class Mar 01 02:31:30 ... I call shenanigans Mar 01 02:31:52 If a member has class scope, any method in that class can see it Mar 01 02:32:37 *running to google checking what class scope means* :D Mar 01 02:32:57 so I have a red cross next to my project in eclipse, and so I can't run it - I've tried cleaning (many times), which gets rid of it but when I run it again tells me there's an error with the project but won't tell me what - any ideas? Mar 01 02:32:58 You really need to learn some java if thats the case Mar 01 02:33:17 wabz: see where the errors at and fix it? Mar 01 02:33:38 I can't figure out how to see where the error is Mar 01 02:33:50 you literally just need to look, it will show you Mar 01 02:33:55 where? Mar 01 02:34:00 in your code Mar 01 02:34:05 you LOOK Mar 01 02:34:22 there is no error in the code Mar 01 02:34:24 only the project Mar 01 02:34:42 *sigh* Mar 01 02:34:50 unless your blind, then it wont be hard to find the problem Mar 01 02:35:03 I don't think you can read - can anyone else help? Mar 01 02:35:28 And I dont think you can code worth jack Mar 01 02:35:30 wabz ... he really is right ... it's written there Mar 01 02:35:34 put up a screenshot Mar 01 02:35:38 ok Mar 01 02:39:20 how do you know which version of android source you're looking at if you download them all? Mar 01 02:39:42 http://www.whatsbeef.net/wabz/project.jpg Mar 01 02:40:40 that's all I get - nothing in Console, nothing in Error Log Mar 01 02:41:16 Restart eclipse then, you probably screwed something up after all the cleans you attempted Mar 01 02:41:24 yeah I have Mar 01 02:41:38 make sure the process is completely dead, that includes java Mar 01 02:42:57 read the workspace log Mar 01 02:44:51 Hello all Mar 01 02:46:38 wabz probably something to do with your xml **** ENDING LOGGING AT Thu Mar 01 02:59:59 2012