**** BEGIN LOGGING AT Fri Nov 02 03:00:00 2012 Nov 02 03:00:13 g00s you little bizzo Nov 02 03:00:22 "Additionally, cross-media campaigns can help you make the most of consumers’ simultaneous usage across screens." Nov 02 03:00:33 I learned a very very very important lesson today I'd like to share with you gentleman Nov 02 03:00:44 i think this translates to: "we need to track people between their devices" Nov 02 03:01:22 what is it ron_frown , not that you were waiting for me to start :) Nov 02 03:01:37 sometimes assuming the people who came before you knew what they were doing, and trying to fix problems they had Nov 02 03:01:44 and just scratch everything and rewrite Nov 02 03:01:56 and people who came before me = android/linaro engineers =) Nov 02 03:01:57 haha Nov 02 03:02:07 that didnt make sense. can you rephrase ? Nov 02 03:02:10 yes Nov 02 03:02:23 i just installed windows 8, using that right now hehe Nov 02 03:02:37 I was working on x functionality in my rom, it was partially there but broke Nov 02 03:02:46 I spent like 3 days trying to make their shit work Nov 02 03:02:57 until I realized it was half assed, and I was better starting from scratch Nov 02 03:03:24 lolz Nov 02 03:04:05 ron_frown: that probably what the next engineer is going to learn when they look at your crap :) Nov 02 03:04:08 they had switch case chains setup where one condition relied on another, and the other condition couldnt set condition for the 1st Nov 02 03:04:35 there was literally no possible way it could have worked Nov 02 03:06:33 ron_frown: i'm still waiting for the punchline Nov 02 03:06:37 is that it ? Nov 02 03:07:15 it was just hobbled together mish mash Nov 02 03:07:42 sounds like android :) Nov 02 03:07:44 the punch line is... dont assume because it was written by people that work for major corporations Nov 02 03:07:54 its not a pos =) Nov 02 03:08:02 and this is only a teeny tiny bit google here Nov 02 03:09:34 maybe its just the nature of open source Nov 02 03:10:00 i always assumed if something was made by a major corporation it was likely a pos Nov 02 03:11:54 game devs might be interested in this http://news.ycombinator.com/item?id=4730571 Nov 02 03:12:42 ron_frown: how is your new bike Nov 02 03:13:31 its fucking glorious Nov 02 03:13:40 :) Nov 02 03:13:43 when I first starting writing code Nov 02 03:13:59 I was super nervouse about my code because I had no formal education Nov 02 03:14:13 my confidence, ego and cockiness quickly got inflated hugely Nov 02 03:14:14 haha Nov 02 03:15:20 easy solution: work with people who are smarter Nov 02 03:16:04 I'd like to Nov 02 03:16:48 problem is, when they dont want to work with somebody because they recognize their ignorance /and/ ego … the 2 together dont go together well Nov 02 03:17:33 well, that's what school is for. Nov 02 03:18:08 oddalot: if your in tech, you are always in school :) Nov 02 03:18:10 They give professor jobs to those people that can't work with others lol. Nov 02 03:18:22 heh Nov 02 03:18:26 yeah, i feel that. Nov 02 03:18:51 i should of just studied philosophy, and i could be chilling right now. Nov 02 03:19:10 lol Nov 02 03:19:25 if you studied philosophy, you would be chilling … eating ramen noodles Nov 02 03:20:42 well, at least i could rationalize it Nov 02 03:20:57 in some existential manner Nov 02 03:21:01 hehe Nov 02 03:21:27 can what bring meaning be rationalized about ? Nov 02 03:21:52 i think its different for everyone at least Nov 02 03:22:25 different, but often the same Nov 02 03:22:39 we are, after all, living in a society Nov 02 03:22:45 we have shared values and beliefs Nov 02 04:13:22 deep stuff guys. Nov 02 04:49:45 is it possible for an app to crash without the process terminating? Nov 02 04:50:14 our app did that, Nov 02 04:50:46 karakuri: technically yes Nov 02 04:50:48 got the "unfortunately, has stopped." dialog, but not all our activities closed Nov 02 04:51:03 it was weird, for lack of a better term Nov 02 04:51:56 its not consistently reproducible, Nov 02 04:52:04 there is no such thing in android devices as VGA mode so one can use some lecacy driver no matter of manufacturer ? Nov 02 05:00:21 is it possible to recover/run some code when something like that happens? Nov 02 05:00:49 we don't want to leave that activity up if it crashes like that Nov 02 05:02:05 fix the crash maybe?? Nov 02 05:02:13 then there's mp problem Nov 02 05:03:42 *no Nov 02 05:04:58 karakuri: are you using android:process= anywhere in your androidmanifest? it might be that one of your processes was killed but the other wasn't. (there might also be some special case where an app can have multiple processes even if not specified) Nov 02 05:06:30 kevinb: no, as far as i can tell, we have one process Nov 02 05:06:49 what circumstances can the app have multiple processes? Nov 02 05:08:16 alex_PP: yes, that would be ideal ;) Nov 02 05:08:38 aside from specifying it, i'm not sure if it can. Nov 02 05:09:03 but i don't think i've seen anything specifically saying it can't. it definitely is not common if it happens Nov 02 05:15:58 not being able to reproduce it makes it much harder to debug Nov 02 05:16:00 le sigh Nov 02 05:21:22 ah, i see, you can't reproduce the bug, not the remaining open Nov 02 05:21:35 disregard my earlier comments Nov 02 05:33:18 anyone feel like a quick fragments intro q - in the sample code at http://developer.android.com/reference/android/app/Fragment.html, at the end of the sample it shows an activity with two fragments (supposed to at least) Nov 02 05:33:38 but the xml given is a LinearLayout, containing one fragment tag and one FrameLayout tag. is that just a mistake in the docs? Nov 02 05:35:37 guys, why i do 'fastboot devices' i dont see nothing Nov 02 05:35:46 i have Asus TF300T Nov 02 05:35:50 i boot into boot loader Nov 02 05:35:56 weird Nov 02 05:36:02 i've try in linux and windows Nov 02 05:36:04 same result Nov 02 05:36:10 device is already unlock Nov 02 05:36:30 phong_: better luck in #android-root Nov 02 05:36:58 oh, you've already asked Nov 02 05:37:03 neeeeevermind Nov 02 05:37:12 bootloader doestn always have fastboot support Nov 02 05:37:18 phong_: you've been told many times that this channel is for app dev... stop going off-topic, or please leave Nov 02 05:41:07 i follow this: http://forum.xda-developers.com/showthread.php?t=1668173 Nov 02 05:41:07 lol Nov 02 05:41:09 nevermind Nov 02 05:41:16 sick of this Nov 02 05:42:14 I wish the root channel was a bit more porting oriented Nov 02 05:42:31 seems like when I venture that way, all I hear about is unlocking my bootloader and "bricking" my phone Nov 02 05:43:20 to be fair, it is -root not -porting :) Nov 02 05:43:41 there is no porting Nov 02 05:43:42 haha Nov 02 05:43:48 well there is, but nobody hangs out there Nov 02 05:44:05 I think it's pretty clear that there just isn't the critical mass of *answerers* to do system or porting stuff on IRC Nov 02 05:44:18 there isnt a critical mass of answers anywhere lol Nov 02 05:44:29 go on android-porting, android-building, android-platform user groups Nov 02 05:44:41 I'd be willing to bet that a LOT of answers are me Nov 02 05:44:47 and crickets when I got questions Nov 02 05:45:11 exactly Nov 02 05:45:43 android-building is 90% "why android not build???" then one of three or four people making sure the OP has the right env set up (which they never do) Nov 02 05:46:06 well and the android head has been a serious mess lately Nov 02 05:46:49 android-dev group, on the other hand, is "looking for sample code to implement virtual desktop, please reply" Nov 02 05:46:50 phong: i have asus TF700T Nov 02 05:46:56 haha Nov 02 05:46:59 it also shows nothing when i do 'fast boot devices' Nov 02 05:47:03 haha Nov 02 05:47:04 but other fast boot commands work Nov 02 05:47:15 karakuri: he already got the boot :) Nov 02 05:47:45 I've made more unsolicited friends on gtalk than I care to, by participating in android-porting / android-building Nov 02 05:47:47 oh, you're right Nov 02 05:47:50 sorry Nov 02 05:48:05 well, hopefully he figures it out then Nov 02 05:48:22 random ass im's... "...how can I port this touchscreen driver to android..." Nov 02 05:48:30 hmm im having problems with maps, im using the apikey made from my debug.keystore in .android, this worked fine in a simple test app but when i move them into my main project i know get errors from BaseTileRequest Nov 02 05:48:30 holy crap tell me about it. i started answering a few q's on the various forums and suddenly people start emailing you directly Nov 02 05:48:36 I've posted that answer *AT LEAST* 10 times in both forums =) Nov 02 05:49:03 i replied to one of them that i'd be happy to help with the project, but that my rate starts at $110/hr and that i'd estimate the project to be a minimum 80 hours Nov 02 05:49:36 people who can answer those questions mainly have better things to do than waste time on IRC Nov 02 05:49:42 is my app somehow using another keystore? Nov 02 05:49:50 I have some RadioButtons where the indicator is overlapping the text Nov 02 05:49:57 can't figure out why Nov 02 05:50:28 sorry guys Nov 02 05:50:29 it works ;) Nov 02 05:50:31 hey, welcome back Nov 02 05:50:33 thanks Nov 02 05:50:45 fastboot devices...might not always show ;) Nov 02 05:50:50 phong_: next time it'll be a ban Nov 02 05:50:50 but it works..did flash :) Nov 02 05:50:55 ok sorry Leeds Nov 02 05:51:06 you gonna use nvflash and brick proof it? Nov 02 05:51:27 karakuri: this isn't #android-root for you either Nov 02 05:51:28 nvflash? Nov 02 05:51:35 ok Nov 02 05:51:37 let go there Nov 02 05:51:38 brb Nov 02 05:51:51 KEEPIN THE PEACE Nov 02 05:51:54 leeds I can answer those questions... but I'd like to make money doing it Nov 02 05:52:00 back to radio buttons then Nov 02 05:52:05 I thought about starting a very specific site to handle porting issues Nov 02 05:52:20 hyrbid chat / forums / q&a site Nov 02 05:52:31 one good thing did come of it Nov 02 05:52:39 samsung tried to recruit me to work on roms or something Nov 02 05:52:47 how would you monetize it? $$ for answers never seems very popular Nov 02 05:52:49 but I can uproot and move Nov 02 05:52:55 well thats neat i guess Nov 02 05:53:01 I wouldnt sell any services there Nov 02 05:53:02 just ads Nov 02 05:53:19 oh, gotcha, was thikning about it wrong Nov 02 05:53:20 I've effectively reverse engineered a good deal of android because the answers just arent there Nov 02 05:53:36 and as dumb as it sounds, I'd like to help prevent others form having to do the same Nov 02 05:53:50 is there a way to use XMLPullParser in a non-android project? Nov 02 05:54:13 i'd like to be able to focus on just one piece of my project Nov 02 05:54:28 RustyShackleford: grab the .java from AOSP? Nov 02 05:54:43 AOSP? Nov 02 05:54:45 i don't think it's a particularly specialized thing tho, there are probably pull parsers already out there Nov 02 05:54:49 google has done the whole pdk stuff is outdated forever Nov 02 05:54:57 erm, http://www.extreme.indiana.edu/xgws/xsoap/xpp/ Nov 02 05:55:08 RustyShackleford: android open source Nov 02 05:55:16 http://www.xmlpull.org/ Nov 02 05:55:19 Leeds for the win Nov 02 05:55:30 welcome to the internet, we have a thing called "Bing" which lets you search for things Nov 02 05:55:30 java xml parsing is a nightmare Nov 02 05:55:43 I've decided to just tell my boss anything xml related on android is impossible =) Nov 02 05:55:43 haha Nov 02 05:55:46 ./whois Leeds Nov 02 05:55:56 who bings Nov 02 05:56:19 how much slower is it to run apps from sdcard, or unnoticable? Nov 02 05:56:26 over 50% of the people who live in Redmond and have microsoft.com email addresses use Bing! on their work computers... Nov 02 05:56:28 if you know regex parsing anything is easy Nov 02 05:56:41 WHA?!?! Nov 02 05:56:45 dont parse xml with regex Nov 02 05:56:53 oh man, yeah pleeeease don't Nov 02 05:56:53 just dont. Nov 02 05:57:11 ok ok, I'm just talking from my previous php experience I guess, I did wonders with it Nov 02 05:57:12 *ml languages should be tokenized, lexed etc Nov 02 05:57:23 Leeds: if I use the package on that site, will the api be the same as android's? Nov 02 05:57:28 and I can't imagine anything I can't parse Nov 02 05:57:39 haha Nov 02 05:57:39 RustyShackleford: I have absolutely no idea - why not read a little bit of it yourself? Nov 02 05:57:54 I reverse engineered communication protocol we had for a crazy ass olympus ultrasound device Nov 02 05:58:25 http://static.olympus-ims.com/data/Image/thickness-gages-s/MagnaMike8600.jpg?rev=2364 Nov 02 05:58:56 that one is magnetic Nov 02 05:59:47 that's pretty neat Nov 02 06:02:26 so interfacing android shit with stuff like that, and security biometrics etc Nov 02 06:02:30 fun and interesting of that Nov 02 06:03:14 ron_frown: but how will that help me run Jelly Bean Slutty Unicorn 4.2 on my OG Droid? Nov 02 06:03:28 I have no idea what slutty unicorn is Nov 02 06:03:29 haha Nov 02 06:03:47 the best cooked kang! Nov 02 06:04:28 I've done fun stuff like that before too Nov 02 06:04:28 I didn't see in the instructions to put NDK in my %PATH% on Win7, shouldn't it be in the path? or some separate NDK_PATH or something Nov 02 06:04:37 we had hardware that was way too slow and shitty to run ics Nov 02 06:04:55 so I backported the on screen navigation stuff from ics to 2.3 Nov 02 06:05:38 because my boss "didnt want no physical buttons..." Nov 02 06:06:15 i've got serval onClick function which i set using the XML. is it possible to hook those function so i could add some code that runs before every onClick event? Nov 02 06:06:43 you want to guess when the user is going to click? Nov 02 06:07:07 start here: http://en.wikipedia.org/wiki/Electroencephalography Nov 02 06:07:26 or just call your pre-Click from the start of your onClicks Nov 02 06:07:31 that too Nov 02 06:09:06 Leeds: that's the backup plan, i was hoping there was a way to hook system events Nov 02 06:09:22 there is, it's called "onClick" Nov 02 06:10:17 oh lord Nov 02 06:10:20 not really, but ok Nov 02 06:10:29 there is no such thing as events as far as android is concerned Nov 02 06:11:25 I was kidding Nov 02 06:13:02 gah, i hate doing layouts programmatically... Nov 02 06:13:30 AHHHH mongo is going bazerk Nov 02 06:15:25 anyone have any idea what kind of voltages are expected by the microphone jack? Nov 02 06:16:45 maybe I'll spend some time on my db tonight Nov 02 06:17:08 you do user authentication with mongo? Nov 02 06:17:38 nah Nov 02 06:18:00 its for tinkering Nov 02 06:18:07 building my .net toolset shit Nov 02 06:31:13 fucking windows pisses me off Nov 02 06:31:42 necessary evil in developing for work etc Nov 02 06:31:46 but man Nov 02 06:55:16 hi, have a question about MediaPlayer: seeking seems to be rather weird (JellyBean 4.1.2), I set the position to 30,000 with .seekTo(30000) and almost directly after (monitoring the position) I see it playing from almost double that (60174) Nov 02 06:55:51 has anyone noticed this, is this a known bug? (can't seem to tell from search engine, seems to have been lots of trouble with media player in the past) Nov 02 06:57:24 pattern seems to be an exponential problem, when setting small values its only a tiny bit off, but as i try to set larger values the difference between what i try to set and what it gets set to (larger) becomes exponentially bigger Nov 02 07:11:17 Can anyone recommend me one of these books for HTML5 mobile development? http://www.play.com/Search.html?searchstring=html5+mobile&searchsource=0&searchtype=allproducts Nov 02 07:12:40 hey i have a question on TabActivity. I found this online and I wanna change it to Fragment Activity. But I seemed to get an error on getTabHost() and getTabWidget() Nov 02 07:12:45 http://pastie.org/pastes/5170367/text?key=wklwz30oxb9yigccjtuw Nov 02 07:13:11 TabActivity deprecated in 4.1 so i'm trying to change it to FragmentActivity Nov 02 07:14:02 ahh the disease that is tabactivity/tabhost etc Nov 02 07:20:09 ron_frown : yeap. any idea what can i do with it? Nov 02 07:21:09 http://msdn.microsoft.com/en-us/library/ff402558%28v=vs.92%29.aspx <- if I read that right it's possible to have web service send notification to the windows phone, ie basically server is one that initiates communication rather than the application. Is same possible for android? Nov 02 07:32:08 so you don't need to override getView() when subclassing CursorAdapter Nov 02 07:37:58 no, you can override bindView and some other method i don't recall the name of Nov 02 07:38:14 unless you want to do something completely different from what it already does Nov 02 07:39:54 HoneyH: all you have is a sample TabActivity that you want to convert? Just move it to the recycle bin and start with a correct example that uses fragments Nov 02 07:40:02 I say recycle bin because I bet you use windows Nov 02 07:40:36 tdignan : yeap windows it is. Nov 02 07:48:19 tdignan : the method used in the TabActivity gives the outcome that I want but I need it in 4.1 Nov 02 07:52:40 bindView() and newView() Nov 02 08:13:52 HoneyH: what method is that? Nov 02 08:14:02 instead of asking how to solve x with y, just ask how to solve x. Nov 02 08:21:36 okay, i have this. http://pastie.org/pastes/5170802/text?key=jhowuevxe2fshlwu5tisg Nov 02 08:21:45 how do i use my own layout? Nov 02 08:25:29 http://msdn.microsoft.com/en-us/library/ff402558%28v=vs.92%29.aspx <- if I read that right it's possible to have web service send notification to the windows phone, ie basically server is one that initiates communication rather than the application. Is same possible for android? Nov 02 08:26:43 tneva82, see C2DM Nov 02 08:27:01 or cloud messaging services as i think it's been renamed to Nov 02 08:51:43 HoneyH: you did it again: "I have this, how do I" could be easily rewritten as "I have y, how do I solve x with it?" Nov 02 08:51:52 a good question looks like: "How do I do x" Nov 02 08:53:23 i simply explain what i have before i post the question Nov 02 08:55:06 read: http://www.perlmonks.org/index.pl?node_id=542341 | http://www.catb.org/esr/faqs/smart-questions.html Nov 02 08:55:13 you aren't asking a real question Nov 02 08:55:29 you're asking me to read and understand your whole code, then guess what your issue is and fix it for you Nov 02 08:55:45 but, you can keep trying your way if you want. have fun Nov 02 09:01:57 I want to create a music player service that keeps on playing/working after player activity unbind (at onDestroy). Nov 02 09:01:57 should i double bind (from the main activity and player activity) to prevent the service from closing? Nov 02 09:05:14 binder seems to be the most convenient way to communicate. how does music player services usually communicate with activities? can't find any decent code to learn from Nov 02 09:13:47 services started with startService won't stop after unbind. Nov 02 09:17:03 Hi! How can I get indicator of current tab in TabHost? Nov 02 09:17:36 Hello Nov 02 09:17:43 anybody here? Nov 02 09:18:00 junnel1001: yeap. Nov 02 09:18:49 kosc: I have a question in my applciation, Nov 02 09:19:56 kosc: I am using fragment and my android API is 16...when changing to WVGA400 , some fragments don't load properly Nov 02 09:20:10 kosc: especially if it has an imageview Nov 02 09:20:35 kosc: i already tried to search in google, but i found nothing about it Nov 02 09:21:32 Can somebody help me about this? Nov 02 09:21:59 did you import the s4 lib? Nov 02 09:22:56 tagrudev: what do you mean s4? sorry Nov 02 09:23:12 ah u'r using api 16 Nov 02 09:23:21 nvm Nov 02 09:26:57 tagrudev: my animation is slide transtion, i don't know if the problem is in the animation since it seems fine in WVGA800 Nov 02 09:29:23 tagrudev: it seems the problem is in the animation since it is now fine without animation Nov 02 09:29:57 tagrudev: do you have a compile slide animation? Nov 02 09:29:58 junnel1001, code maybe / Nov 02 09:30:03 ? Nov 02 09:30:15 'ello Nov 02 09:30:20 tagrudev: but it is now fine without animation Nov 02 09:31:04 quick question - in order to replicate the tab style used in the google play market and the google music app, I simply need to set the height / width of the tabs, they'll automatically resort to that scroll style if they overflow? Nov 02 09:34:41 No Nov 02 09:34:54 You need to either use PagerTitleStrip or a library like ViewPagerIndicator Nov 02 09:35:47 ah Nov 02 09:35:58 SimonVT: noticed you on #inkscape earlier :) any life in there :P Nov 02 09:36:29 they havent had a release in so long, i thought they gave up on it Nov 02 09:36:31 Eh, I just idle there Nov 02 09:36:42 Asked a few questions when I started doing my own icons Nov 02 09:36:44 Haven't used it since Nov 02 09:36:56 Thanks SimonVT Nov 02 09:41:28 hm, looks like the FTC is going after google for the use of moto FRAND patents Nov 02 09:42:34 by moto, I assume you mean motorola? Nov 02 09:42:50 (the company which google now owns...) Nov 02 09:43:01 yup Nov 02 09:44:38 hey, i made a print-style log class. I even backported Log.wtf to 1.6+ Nov 02 09:44:41 https://gist.github.com/3999642 Nov 02 09:44:48 printf-style* Nov 02 09:45:00 note, not compatible with printf. Just the same idea. Nov 02 09:45:15 looks like slf4j-android Nov 02 09:45:17 also it's thread-safe because it doesn't use java's retarded scanner class. Nov 02 09:45:34 get me a diff, accuser Nov 02 09:46:05 they beat you by 4 years :) Nov 02 09:47:30 awesome, if you want to pull a giant ass project in just to have printf-style logging Nov 02 09:47:38 with my class, all you need to do is copy one file. Nov 02 09:47:52 slf4j seems to be a bit MORE than a printf-style wrapper. Nov 02 09:48:06 well, lots of 3rd party libs use a logging system already; often commons-logging of slf4j Nov 02 09:48:15 thats what this is mostly for Nov 02 09:48:29 g00s: I wrote a printf-style locker, and if you don't like it, then you can kiss my arse. Nov 02 09:48:35 logger* Nov 02 09:48:39 heh Nov 02 09:48:49 shrug, I have my own logger class Nov 02 09:49:16 g00s: did slf4j backport Log.wtf to 1.6+? don't think so. Nov 02 09:49:38 what a pleasant atmosphere we have here.. Nov 02 09:49:41 Log.wtf is stupid Nov 02 09:49:49 Zider is stupid Nov 02 09:49:52 welcome Zider ! Nov 02 09:50:01 pragma-: *cries* Nov 02 09:50:05 g00s: thank you :) Nov 02 09:51:05 Zider: I don't care what they say about you Nov 02 09:51:13 you're just a guy, guy! Nov 02 09:51:21 how do you know I'm a guy? Nov 02 09:51:22 :) Nov 02 09:51:34 i'm from new england where we call everyone guys Nov 02 09:51:34 no girls on the internet, etc. etc. Nov 02 09:51:50 :D Nov 02 09:51:59 sonOfRa: oh right ;) Nov 02 09:52:06 you're all a bunch of "it" to me Nov 02 09:52:17 hm, didn't know there was a "new" england.. I only heard of one.. :P Nov 02 09:53:27 it might not shock you to learn that it's in the united states Nov 02 09:53:56 for loose definition of "united" Nov 02 09:53:56 might explain why I never heard of it then :) Nov 02 09:54:09 we also have a newer version of mexico Nov 02 09:54:24 and a newer version of jersey Nov 02 09:54:34 donno where the original jersey was :P Nov 02 09:54:34 and of york and jersey Nov 02 09:54:50 and you'll have a newnewnewnewnewnewnewnewnew york.. just ask the Doctor.. :P Nov 02 09:55:03 bunch of gits Nov 02 09:55:16 I wonder if new jersey is an improvement of the old one.. Must have been bad Nov 02 09:55:46 is there a new jersey shore? :P Nov 02 09:56:37 * g00s establishes a new country: New America Nov 02 09:56:42 :D Nov 02 09:57:04 g00s: try and stay out of other countries businesses this time :P Nov 02 09:57:30 :) Nov 02 09:57:32 what man? I won't hear that. We're the world police! Team america. Nov 02 09:57:53 :P Nov 02 09:57:58 eeeeexactly Nov 02 09:58:43 seriously though, don't worry. china is going to have hegemony and look how they treat their neigbors! tibet, taiwan, etc... Nov 02 09:58:49 you'll have team china, soon. Nov 02 09:59:01 and team Edward! Nov 02 09:59:04 oh wait.. Nov 02 09:59:13 without america, iran will have nuclear weapon and will nuke europe off the map Nov 02 09:59:25 haha Nov 02 09:59:30 says who? the government? :P Nov 02 09:59:38 without israel, america wouldn't care what iran has Nov 02 09:59:51 !topic #android-dev Nov 02 09:59:53 ... Nov 02 10:00:17 yeah I guess we are a bit offtopic.. Nov 02 10:01:35 around the early morning this channel is just a stream of unresearched questions anyway Nov 02 10:01:44 better to drown it out with politics Nov 02 10:03:46 hmm, is there a way to set a "global" crash handler to intercept any uncaught exceptions in a Service/app? Nov 02 10:04:24 acra Nov 02 10:04:54 ACRA assumes I have an Activity if I read the docs right :\ Nov 02 10:05:44 You didn't Nov 02 10:05:46 If you don't want to use acra, then just use http://developer.android.com/reference/java/lang/Thread.html#setDefaultUncaughtExceptionHandler%28java.lang.Thread.UncaughtExceptionHandler%29 Nov 02 10:05:52 but I'm with simonvt on this Nov 02 10:05:54 you didn't Nov 02 10:06:13 ACRAs tutorial tells you to attach the handler in an Application subclass Nov 02 10:07:17 I see, Application, not Activity, my mistake Nov 02 10:07:33 And yeah, it basically just attaches an UncaughtExceptionHandler.. and does a lot of fancy stuff for you Nov 02 10:10:35 anyone use google supersonic on android ? dont see an android.mk or jni :X Nov 02 10:12:39 fucking java / c shit Nov 02 10:14:20 Is this a place to get help for problems with SDK setup? Nov 02 10:14:43 sure Nov 02 10:17:56 I have reasons I want to use sdk r15 and ADT 15.0.1 When I installed and setup both of those, the SDK Manager wouldn't list any of the API's I want to download. It only lists them if I use version 20 on both respectively.. Nov 02 10:18:16 Is there a work around? Nov 02 10:18:32 wow, that is old .... Nov 02 10:18:41 g00s: says it uses "low level optimization techniques" -- i'm guessing it hasn't been built for arm Nov 02 10:19:11 but if it does build on arm, swig can be used to generate a JNI wrapper very fast Nov 02 10:19:26 and by build.. I guess I also meant work. Nov 02 10:19:48 hey folks! Nov 02 10:20:24 My android phone got a small led for notification, I'm looking for the right api to use it, does someone have a magic clue for me? Nov 02 10:24:11 Unfortunately it's the revisions that the text I'm following uses. Nov 02 10:24:21 I found that you can add a flag for it on a notification but I want to avoid notification Nov 02 10:31:33 damn been stuck for days on this, does anyone have any guess why when i plot points on a mpa theyd be slightly too far to the right.. cant find out why its ridiculous Nov 02 10:31:37 map Nov 02 10:31:57 they plot fine on a google map but this is a custom map, which is supposed to be correct, but now im thinking its not Nov 02 10:33:35 Gaz`, are the points anchored to the left edge? Nov 02 10:36:38 Hi Nov 02 10:37:29 Is it possible to create alerts from an app? As in, our target audience most likely will not have an internt connection, so we would like to create alerts from inside the app based on a schedule Nov 02 10:37:41 When I have open my App via an URL in the browser, what is the maximum length this URL can have? Nov 02 10:38:26 I found that there is a 'de facto' limit of around 2000 characters for the most popular browser. But since I know I am on Android and modern browsers can handle far longer URLs, I wondered if there is a special limit on Android. Nov 02 10:39:10 sean`: you should have a look to alarmManager that allow you to execute some code when you want (see http://developer.android.com/reference/android/app/AlarmManager.html ) Nov 02 10:40:12 alex_PP yeh Nov 02 10:40:52 kakazza: I don't know for url but watch out at your javascript (if you use some) some android's version (4.0 for example) doesn't like too huge JS (not-minified lib for example) Nov 02 10:41:35 baptistem, thanks Nov 02 10:41:52 Not the right place perhaps, but are you aware of such a feature in iOS? Otherwhise I'll jump over to their resources :) Nov 02 10:43:31 Thanks Nov 02 10:45:41 sean`: I don't know for iOS but if you are working for cross-platform app, you may use webapp and win a lot of time! ( true story ) Nov 02 10:46:06 baptistem, no push :p Nov 02 10:46:32 sean`: no push? no push notification? Nov 02 10:47:50 quick question - got a pagertitlestrip, and it works fine... however the default background was the white line along the bottom, with a thicker line for a selected tab, which is fine as well... but I needed it to be of a different color. Nov 02 10:48:07 I've created 3 different 9 patch pngs and set them in a state-list variable Nov 02 10:48:18 which I applied as the BG of the pagertitlestrip Nov 02 10:48:32 all is fine except for the selected tab, which still sports the "normal" white line. Nov 02 11:00:16 can i add values to R.id ? Nov 02 11:01:14 Define som IDs in xml Nov 02 11:02:03 hi Nov 02 11:02:11 k, thanks, thought that was ilegal Nov 02 11:02:21 JakeWharton_ hi ? Nov 02 11:02:37 What? Nov 02 11:03:05 does anyone know about the ABS scrolling tabs bug? i use 3 tabs and do NOT want them to scroll, but ABS introduces white pixels to the left/right of my tabs Nov 02 11:05:54 https://github.com/JakeWharton/ActionBarSherlock/issues/673 Nov 02 11:05:55 This bug? Nov 02 11:06:07 That's just me being lazy and not getting it fixed Nov 02 11:09:34 so uh, multiple surface views on the same screen are a no-go, huh? Nov 02 11:14:22 Hmm, I can't find the Drawing sample... Nov 02 11:14:36 There was a sample with Threads, Path and whatnot. It was pretty quick Nov 02 11:15:10 Anyone know? Nov 02 11:19:36 SimonVT: about custom R.id values, which XML file? Nov 02 11:21:25 Either on a view.. or define them in values Nov 02 11:21:36 Nov 02 11:24:55 thanks Nov 02 11:36:17 I'm in a fragment, trying to get the width of one of my image controls. I want to scale a single image to match the width of my screen. Nov 02 11:36:29 But getWidth() getMeasuredWidth() returns 0 all the time. Nov 02 11:36:41 There seems to be three different hacky solutions out there on stackoverflow etc Nov 02 11:37:03 But none of them feel "kosher", does anyone know of the definitive way to get the width/height? Nov 02 11:37:24 hello, i;m trying to stream using videoview RTSP from camera, i have done it, but buffer is causing latency (about 3 seconds), what can i do about it ? i'm now looking at vitamio if it has any buffer options Nov 02 11:41:37 aoclown: they don't return a value until AFTER onMeasure is called. Nov 02 11:42:19 you basically need to run whatever code you need from onMeasure, which means you're going to have to write a custom view, and override onMeasure Nov 02 11:42:37 or, only do what you need *after* you are certain it's been called. Nov 02 11:45:08 tdignan: What happens in the lifecycles that's after it's been called? Nov 02 11:45:26 I've googled my face off to try and find that info, but short of searching through the source I can't seem to find any info. Nov 02 11:46:51 aoclown: it's not tied to the activity lifecycle Nov 02 11:46:56 view has it's own lifecycle Nov 02 11:47:15 and after it's been called, the width and measured width values are initialized Nov 02 11:47:38 if you know a view has been drawn, then you can pretty much bet onMeasure has been called Nov 02 11:47:42 Right, but I mean is there any callback in the "view lifecycle" that definitely occurs afterwards? Nov 02 11:47:48 otherwise, you'll need to hook onMeasure Nov 02 11:47:55 Well, I tried onViewCreated but it didn't work out. Nov 02 11:48:02 onViewCreated? Nov 02 11:48:03 I thought that one would have been after but apparently not. Nov 02 11:48:07 that's Fragment Nov 02 11:48:11 Yeah. Nov 02 11:48:19 they don't get measured until you add them to the UI Nov 02 11:48:19 So I thought the view would have been created and measured etc. Nov 02 11:48:22 with addView() Nov 02 11:48:34 Right. Okay. My bad. Nov 02 11:48:35 which is done internally by whatever activity has your fragment Nov 02 11:48:54 Right. Nov 02 11:49:10 I am dealing within a fragment here, I was hoping to find something there. Nov 02 11:49:26 Might be a fruitless search hm? Nov 02 11:49:44 what are you trying to do? Nov 02 11:49:52 Okay, here's the problem. Maybe you can give me a better solution. Nov 02 11:50:04 I have in my Fragment (which is such for tablet-y layouts) Nov 02 11:50:06 An ImageView Nov 02 11:50:15 It's width is match_parent, and height is wrap_content Nov 02 11:50:28 And I basically need to compute a nice scaling factor to pass into my ImageView options. Nov 02 11:50:36 To scale down the image to a reasonable sive. Nov 02 11:50:38 size* Nov 02 11:50:55 So I wanted to get the width to determine how big to make the image Nov 02 11:51:29 how precise? based on device resolution or? Nov 02 11:51:52 I don't think the precision is that useful. Even a coarse estimate is going to give me a small enough image to fit in memory. Nov 02 11:51:56 I'm only displaying one image at a time. Nov 02 11:51:59 So it's not a huge deal. Nov 02 11:52:24 They are however, full size images. Nov 02 11:52:27 you can create a values-mdpi/xhdpi/hdpi/ldpi directory Nov 02 11:52:30 So they must be scaled. Nov 02 11:52:34 and store a scaling factor in it Nov 02 11:52:48 There's an idea. Nov 02 11:53:02 But, DPI independent is the resolution no? Nov 02 11:53:08 Which is arguably more important? Nov 02 11:53:57 DisplayMetrics can get you DPI information Nov 02 11:54:14 With rotation and such, the width of that ImageView is going change... And I'm going to need to scale so it's nearly appropriate. Nov 02 11:54:34 I'm kind of wondering if the ImageView itself can take care of all of this for me.. Nov 02 11:54:37 lol. Nov 02 11:54:47 Doesn't seem like it though. Nov 02 11:56:31 tdignan: This is the guide I was following Nov 02 11:56:32 http://developer.android.com/training/displaying-bitmaps/load-bitmap.html#load-bitmap Nov 02 11:57:03 has anyone used vitamio ? Nov 02 11:57:04 So that's essentially exactly what I'm trying to do. Nov 02 12:18:46 I want to paint an Arc Path to be like in the photo http://i.imgur.com/UZrZb.png . can I do that using a Paint or do I have to create a drawable and use a gradient ? Nov 02 12:22:03 R4md4c, you can draw cubic splines using Path Nov 02 12:23:45 R4md4c, does this help? http://stackoverflow.com/questions/2836098/how-to-fill-a-path-in-android-with-a-linear-gradient Nov 02 12:27:48 Guys, what's a good webhost for hosting files that my app needs, and eventually a website too? It's gotta support hotlinking (my app needs some images) and that's pretty much it. Nov 02 12:27:53 Should be free or sorta cheap, I guess Nov 02 12:28:07 EPG: Thanks alot it did help Nov 02 12:39:32 does your ISP have free web? Nov 02 12:42:35 hi, is the 100 sms / hour limit global or per app? Nov 02 12:46:37 god damn sometimes i love coders Nov 02 12:46:56 open src projs on githib, they take the time to help you and stuff :) Nov 02 12:47:03 one of em just saved my bacon Nov 02 12:47:19 what can i do to get lag -free RTSP video on android ? Nov 02 12:47:47 hmm dunno Nov 02 12:47:49 should work Nov 02 12:47:56 lower quality of rtsp stream? Nov 02 12:48:03 rtsp stream man Nov 02 12:48:11 i;m using viewvideo widget Nov 02 12:48:19 and i;m getting 3sec delay :\ Nov 02 12:48:46 yeh no idea ;/ Nov 02 12:48:57 being able to view rtsp at all is amazing :) Nov 02 12:49:09 this has something to do with buffer size, but i searched and it doesnt allow to change the buffer size Nov 02 12:49:15 but if u control the stream u could lower the quality Nov 02 12:49:37 ehh... this supposed to be a robot head stream, so controlling it with an 3sec delay video is nonsence :( Nov 02 12:49:50 ah i see Nov 02 12:49:58 hey shmooz Nov 02 12:50:43 hi Gaz` Nov 02 12:51:41 Hi, I am playing video from url, when I get the video it's duration was e.g. 1 min but it is changing constantly.. is it possible to change duration dynamically without reloading video? Nov 02 12:51:43 does your ISP have free web? Nov 02 12:51:57 No, notrly Nov 02 12:52:03 And I'm in student accommodation and only have my laptop Nov 02 12:52:06 So I can't host myself Nov 02 12:52:12 k Nov 02 12:52:12 has anyone looked into this new ffmpeg for android on sourceforge yet ? http://sourceforge.net/projects/ffmpeg4android/ Nov 02 12:52:34 hmm.. i will looka at it Nov 02 12:52:46 meaybe it will help me to get rid of latency in rtsp stream Nov 02 12:53:13 zax55: are you using MediaPlayer/VideoView now ? Nov 02 12:53:31 zax55 u could use bluetooth if distance is not too far, prob be faster ? Nov 02 12:53:49 or wifi direct.. Nov 02 12:53:49 i'm using viudeoview Nov 02 12:54:18 and the camera is on the same subnet, wifi distance 2meters Nov 02 12:54:37 yeah I'm using VideoView too and it plays the low res mobile rtsp youtube links fine, but it can't do high res well compressed streams like Vitamio plugin Nov 02 12:54:57 funny thing is, that manipulating stream quality, doesnt affect my latency :\ Nov 02 12:55:08 I suspected Vitamio is using ffmpeg, and then went on a hunt for ffmpeg Nov 02 12:55:22 what you mean by "HQ" ? Nov 02 12:55:29 high res Nov 02 12:55:47 both meaning same Nov 02 12:56:04 but u mean 480p or higher ? Nov 02 12:56:19 I have a slow 3G network that maxes out around 150k/s Nov 02 12:56:25 ahh i get it Nov 02 12:56:33 but it makes for a great test phone Nov 02 12:56:58 videoview here handles, 640x480 rtsp stream, 30fps, every frame is keyframe Nov 02 12:57:03 because some apps like TVGo Live use Vitamio and still stream HQ fine compared to my VideoView app Nov 02 12:57:16 but i get 3sec latency, no matter what the settings are Nov 02 12:57:28 zax55: I don't have that problem Nov 02 12:57:39 seriously ? Nov 02 12:57:40 no lag ? Nov 02 12:57:52 I'm testing on a gingerbread 2.3.3 HTC Panache/MyTouch 4G Nov 02 12:58:05 no lag at all Nov 02 12:58:08 i'm running ICS galaxy s2 Nov 02 12:58:11 just buffer time a few secs Nov 02 12:58:34 hmm strange, did you add some fancy stuff to a code ? Nov 02 12:58:37 zax55: is your audio out of sync ? Nov 02 12:58:49 nope, audio seems to be fine Nov 02 12:59:14 yes I have lots of java code so far, a custom listview that loads channels/streams Nov 02 12:59:38 could you please pastebin, your videoview part only ? Nov 02 12:59:54 with Image and text, and a fancy titlebar with image and dynamic text for whats playing currently and a search box for autocomplete search Nov 02 13:00:08 nice :) Nov 02 13:00:33 uhm, its on the other box, let me see if I should install xchat there or transfer the project here Nov 02 13:00:56 just look at mine fragment Nov 02 13:00:57 http://pastebin.com/ubugFiSJ Nov 02 13:01:01 I'll PM you when ready zax55 Nov 02 13:01:08 ok Nov 02 13:01:15 i;m a newb, just basic view Nov 02 13:01:37 everything is fine, but that damn 3 sec latency :( Nov 02 13:02:13 anyone know how to detect and remove unused classes? Nov 02 13:02:46 that should work I suppose, I assign the uri on its separate line though Nov 02 13:02:49 i assume it has something to do with some buffer, because when You click a button, it take 3 sec to view the video, and exact 3 sec is the delay in streaming Nov 02 13:03:07 and I call VideoView.requestFocus() before .start() Nov 02 13:03:29 oh ok well thats normal, its buffering Nov 02 13:03:42 and shmooz, same thing was happening on my pc using VLC Nov 02 13:03:47 you need to display an indeterminate progressbar for when it is loading Nov 02 13:03:56 or determinate Nov 02 13:04:23 when i changed option :file-caching=10 (10ms) in VLC, delay was gone Nov 02 13:04:25 its just not displaying anything while loading Nov 02 13:05:05 i get it :), but have you got some idea how to lower that buffer somehow ? Nov 02 13:05:06 zax55: I see so you're saying theres no need for it to wait because its already buffered ? Nov 02 13:06:12 theres many more reasons than that to use ffmpeg, it supports way more formats Nov 02 13:06:27 hmm have You used it so far ? Nov 02 13:06:47 no I'm about to compile it, its my first NDK project lol Nov 02 13:06:54 mine too :D Nov 02 13:07:42 maybe I should run a Hello JNI first but I'm impatient Nov 02 13:08:12 xd Nov 02 13:08:29 anyway you can use VideoView.getBufferPercentage() and display it in some textview to see whats going on Nov 02 13:08:46 thanks Nov 02 13:09:15 this ffmpeg should have properties to set up caching, right ? Nov 02 13:09:26 I would assume so Nov 02 13:09:32 that would be great Nov 02 13:09:58 i would just add that rtsp stream, set caching to 10-30ms and problem is gone Nov 02 13:10:51 for some reason VLC can't play the youtube rtsp streams that work fine with my app Nov 02 13:11:50 oi oi Nov 02 13:12:27 same here, vlc couldn;t open bbc stream Nov 02 13:12:35 but the app went fine with it Nov 02 13:13:38 I answered your PM btw, we can talk there if you want Nov 02 13:23:49 How can I create a list with dynamic values? Nov 02 13:27:14 Dy...namic values? Nov 02 13:28:07 Drager: what does that mean? :) Nov 02 13:30:03 you probably want some kind of adapter Nov 02 13:31:08 This is nearly what I want: http://tricksme.in/wp-content/uploads/2012/08/send-current-location-in-whatsapp.png Nov 02 13:32:14 depends on the data source Nov 02 13:52:21 how can i access my SpeechRecognizer from within its RecognitionListener.onResults() ? Nov 02 13:54:48 in my Action's onCreate i did mySpeechRecognizer.setRecognitionListener(new RecognitionListener() {.....}); Nov 02 13:55:10 this RecognitionListener has an onResults() method Nov 02 13:55:42 then back in the Action's onCreate i call myRecognitionListener.startListening() Nov 02 13:56:15 how can i call myRecognitionListener.startListening() from within myRecognitionListener's RecognitionListener's onResults() method? Nov 02 13:56:43 argh i messed up the names.... Nov 02 13:57:03 back in the Action's onCreate i call mySpeechRecognizer.startListening() Nov 02 13:57:21 how can i call mySpeechRecognizer.startListening() from within mySpeechRecognizer's RecognitionListener's onResults() method? Nov 02 13:58:11 * regedit hears his echo in a large empty cave Nov 02 14:02:45 generally in android development how are components meant to notify/access each other, i.e. if my Action has some object that has some listener that handles an event, how can that event "notify" the Action that the event has occurred and should do something on its object Nov 02 14:05:32 regedit: in order to notify other class I use a broadcastreveicer that receive an intent an act with Nov 02 14:06:22 i see. ok thanks i'll look into that Nov 02 14:07:05 regedit: I'm not sur it's the best solution but it's very handy Nov 02 14:07:54 hmm they made changes to the itunes connect store Nov 02 14:07:59 it looks better Nov 02 14:08:39 Is it possible to make certain drawn text in a Canvas not react to canvas.scale(...)? Nov 02 14:09:10 The majority of the items I am drawing I need to scale, but some other ones I need to be kept in the exact same place, ignoring scale. Nov 02 14:13:22 where are the AOSP wallpaper images stored? I can only find 1 (default JB wallpaper) Nov 02 14:13:45 are the rest bundled by the manufacturer? Nov 02 14:15:02 Hey guys, still lookin for a webhost that allows hotlinking so I can put my apps stuff on it, if anyone has any suggestions :D Nov 02 14:15:35 Magnets, yes. or part of Google produced images. They likely are not be licensed the same. Nov 02 14:16:02 RazielZ, o_O hotlinking? what do you mean. Nov 02 14:16:12 Accessing images directly by link Nov 02 14:16:15 So my app can download them etc Nov 02 14:16:24 Most free hosts don't allow that to save bandwidth. Nov 02 14:16:26 So my goal is to clear the cache of a webview, named myWebView, before I use it. I originally tried myWebView.clearCache(true); but that didn't work. So after I did some searching online I found someone that used Context.deleteDatabase("webview.db"); and Context.deleteDatabase("webviewCache.db"); only when I use it I get the error: http://pastie.org/private/dnpgfozn2c61lprnssxma Nov 02 14:16:29 RazielZ, isn't that the basic premise of the web? Nov 02 14:16:41 Uuh Nov 02 14:16:54 Not really Nov 02 14:16:56 I've searched for an answer but found nothing so I'd be very grateful for some help. Nov 02 14:16:58 oh, *free image host* Nov 02 14:17:16 Not really. Web host. With, like, ftp and such. Nov 02 14:17:27 Here is my main code: http://pastie.org/private/x5pbt9d3tsnvofts0sqc8q Nov 02 14:17:30 Since I need some text files too and I'll eventually get a website up, maybe Nov 02 14:17:32 go buy a real webhost account, for like $6/year or whatever Nov 02 14:17:45 Well I didn't ask for a free one, I asked for suggestions for good webhosting Nov 02 14:17:52 or store them on Google Cloud Storage Nov 02 14:17:56 So if you know a good one for $6/year I'll probably get that Nov 02 14:18:53 oh. I could be wrong, but I think it's just the free ones that block image links with no referrer. But if paid ones do that too... that's just despicable. Nov 02 14:19:03 No, they don't Nov 02 14:19:16 if you host it on a lowbandwich hoster, you can use stuff like coral cdn Nov 02 14:19:16 I just don't know what paid ones to look at since there's so many lol Nov 02 14:19:22 I think either way, the free ones will impose a bandwidth cap Nov 02 14:19:25 Anyone? Nov 02 14:19:52 p1key: deleting and creating the webview again doesn't fit? Nov 02 14:26:31 in a mono PCM, is the bytesPerSecond the same as sampleRate? Nov 02 14:27:14 or since its 16 bits per sample should it be * 2? Nov 02 14:31:46 mrenouf: you inspired me to stop typing out long log statements Nov 02 14:31:50 ^ https://gist.github.com/3999642 Nov 02 14:34:20 how subtle Nov 02 14:35:06 tdignan: ... what on earth are you doing there? Nov 02 14:35:22 tdignan: why are you not just using String.format(String, Object...) ? Nov 02 14:36:17 reinventing String.format is a popular pastime Nov 02 14:36:44 alankila: I'd say it's more of a hobby now a days Nov 02 14:37:04 anyway MessageFormat.format is probably better, though slightly more verbose. And there's slf4j style {} expansion, which is useful so that if Log.d, for instance, doesn't log, there's no construction of the log string that wiill be ignored Nov 02 14:37:16 as people may do Log.d(TAG, String.format(...)) because android Log sucks Nov 02 14:37:28 evancharlton: !? Nov 02 14:37:32 but it doesn't have to suck, it's just a pity that it's such a primitive API Nov 02 14:37:33 I didn't know that existed Nov 02 14:37:48 that's too bad, writing the state machine was actually fun Nov 02 14:37:49 is there an attribute I can set once in the manifest to make all activities lock in portrait-mode? Nov 02 14:38:05 tdignan: was waste of time, but fun things usually are Nov 02 14:41:23 Quick question - I have an image that is is 100px high in the xhdpi version, 80 in the hdpi, 60 in mdpi and 40 in ldpi. Nov 02 14:41:41 I want to have a solid color bar that is always 20% of the height of the image Nov 02 14:41:59 can I just say height="20dp" in the layout for this to work, or do I need to do it programatically? Nov 02 14:42:09 0.2*height_of_button Nov 02 14:43:43 sup guys Nov 02 14:44:07 same old, sup wit u lol? Nov 02 14:53:19 Tee_Pee: should work but mdpi is the base res, so it'd be 20% of 60. Nov 02 14:53:54 His images are all different dp sizes Nov 02 14:54:07 Oh Nov 02 14:54:09 Tee_Pee: you can use values-xhdpi/hdpi/mdpi/ldpi dirs Nov 02 14:54:10 Bad bad Nov 02 14:54:11 Except hdpi and ldpi, they're the same Nov 02 14:54:34 Different dp sizes? They shouldn't be Nov 02 14:54:49 xhdpi is 50dp Nov 02 14:54:53 hdpi is like 53 Nov 02 14:54:55 mdpi is 60dp Nov 02 14:54:58 ldpi is 53 again Nov 02 14:59:41 I have a path that grows, and eventually points end up moving off the screen. Display wise, this is fine, because I can shift them all over with offset(). The problem is that there are still points on the path I think. I would think this will cause memory to leak. How can I remove points from a Path? Nov 02 15:02:20 custom view coding is very funny ;) Nov 02 15:03:05 it's almost done :) Nov 02 15:03:44 tdignan: there is an algorithm in "Algorithm's in C/C++/Java..." from sedgewick Nov 02 15:03:52 "is inside polygon" Nov 02 15:07:15 monsti: interesting, but that's not the problem. my algorithm is incredibly simple for this. I need to remove the points in a fifo manner Nov 02 15:07:26 the problem is that I can't find a method of the Path class that removes a point. Nov 02 15:08:06 I could do this easily if I used arrays or something, but I'd prefer to use a Path if possible, because that is what the canvas takes as a parameter for drawing stuff. Nov 02 15:10:24 time to look at the source I guess Nov 02 15:11:27 tdignan: this is the prefered android method ;) Nov 02 15:15:57 I can see how I'd do it with Paths, but I can only see it happening if I do way too many copies Nov 02 15:16:06 I don't want to copy it each time I need to remove a segment. Nov 02 15:16:39 i would bet my offset() calls copy it, which is fine, but any more than that is not Nov 02 15:16:54 I'm wondering if setLastPoint() somehow magically discards path segments Nov 02 15:17:05 because it just baffles me that there isn't a remove method. Nov 02 15:21:40 haha, looks like someone asked my question here in april and no one knew eitehr Nov 02 15:21:43 http://logs.nslu2-linux.org/livelogs/android-dev/android-dev.20120426.txt Nov 02 15:22:06 hi, is there a place where you can find an ER diagram of MediaStore/ android internal db? Nov 02 15:22:44 hello all Nov 02 15:22:49 help with http://pastebin.com/NdNgdDpx Nov 02 15:22:51 line 4 Nov 02 15:28:20 bingels: it appears to be a stale comment. just remove it. Nov 02 15:28:41 it's pretty obvious that inputStream() is being closed in the finally Nov 02 15:28:57 but wait Nov 02 15:29:11 why do you invoke: BufferedInputStream, ObjectInputStream, and FileInputStream? Nov 02 15:29:19 * tdignan facepalms Nov 02 15:31:21 anyway, it looks like I can at least use a PathMeasure to get the right segments of the Path to copy Nov 02 15:31:33 but i'm not happy about having to copy it :| Nov 02 15:34:54 just use Object/File... Nov 02 15:42:27 tdignan without FileInputStream and BufferedInputStream? Nov 02 15:42:57 I've very rarely used BufferedInputStream myself. I often expect that callers of inputstream's read do some internal buffer Nov 02 15:43:16 as to the resource leak, I don't understand it either. If the stream is closed, what is leaked? Nov 02 15:43:29 bingels: you don't need the buffer Nov 02 15:44:14 bonjour, people! Nov 02 15:44:21 the problem with comments that don't document the intention of the code but the behavior is that they become stale and people don't update them, then you end up sitting there and wondering 'what resource leak?' Nov 02 15:44:27 I frankly wish bufferedinputstream wouldn't exist at all. And that there should be no way to do read() which reads just 1 value. People who do 'new byte[1]' and read(b) get what they deserve. Nov 02 15:44:52 tdignan thanks Nov 02 15:45:26 bingels: also note that with the new Closeable streams, the same code would read: try (ObjectInputStream ois = ...) { ... } without a finally block to close it Nov 02 15:45:28 tdignan, no, the problem is that they serve no purpose Nov 02 15:45:29 sadly, android isn't there yet Nov 02 15:45:44 int x = 5; // declares x as an integer and assigns it the value of 5 Nov 02 15:46:07 versus // 5 is currently the maximum number of photos we will prefetch Nov 02 15:46:32 i just watched the "world of ListView" and now i ask myself: is its possible to use the view holder Nov 02 15:46:33 anything other than "why" should be clearly obvious by your code Nov 02 15:46:46 yes, keex, it's possible Nov 02 15:47:04 i accidentally pressed enter, prematurely :D Nov 02 15:47:18 all the same without BufferedInputStream showing warning Nov 02 15:47:19 yea, that's what i tell her, too Nov 02 15:47:43 hi Nov 02 15:47:55 bingels: excuse me, what tool is generating this warning? Nov 02 15:48:02 can i limit app in Play Store to donwload only one device? Nov 02 15:48:07 alankila eclipse Nov 02 15:48:48 bingels: really? I haven't seen such a warning ever despite not even doing 'finally' blocks to close streams, because I generally don't have to care about behavior in exceptional cases. Nov 02 15:49:16 do you have some enhancement to eclipse that can provide this sort of information? Nov 02 15:49:18 pepigno75, no Nov 02 15:49:22 canadiancow: sometimes I leave them when I think the line of code might confuse someone else Nov 02 15:49:25 alankila you checked my code? Nov 02 15:49:33 or that I might forget what it does one day Nov 02 15:49:39 alankila 4.2 version Nov 02 15:49:43 if you need "what" or "how" in a comment, your code needs to be rewritten :P Nov 02 15:49:44 i just watched the "world of ListView" and now i ask myself: is its possible to use the view holder and hold a reference to the the listItem's linear-layout AND to A textview to be added to that listItem's linear-layout. sort of pushing them... Nov 02 15:49:45 bingels: oh, I read it. It doesn't look like it's leaking to me. Nov 02 15:50:02 So, IDK, I'm confused about it Nov 02 15:50:09 canadiancow: trust me, I leave very few comments of this kind. Nov 02 15:50:17 :) Nov 02 15:50:21 s/of this kind// Nov 02 15:50:23 ;) Nov 02 15:50:57 I guess a flow analyzer concludes somewhere that it is possible that in some execution path, under some conditions, the inputStream's close() is not reached. But I think it's probably mistaken. Nov 02 15:51:23 unless someone can show me the set of circumstances where it doesn't get closed but gets opened nevertheless... Nov 02 15:51:23 maybe must closing all Streams in code ? (http://pastebin.com/NdNgdDpx ) Nov 02 15:51:32 every one Nov 02 15:51:53 nah, the closes should cascade if I have understood it correctly Nov 02 15:51:58 or must close only Parent ObjectInputStream, and its might be enough? Nov 02 15:53:22 I am having a problem in Android 3.1 that is causing my notification text to be cut off when I send a notification from my app. Nov 02 15:53:44 lint is the tool spitting out the stream-not-closed warning Nov 02 15:53:45 I other versions the text will scroll if it is too long. Any Ideas on how to fix this? Nov 02 15:53:46 and it's incorrect Nov 02 15:53:54 there is no way for that stream not to be closed after that finally block Nov 02 15:54:39 I already tried setting a custom layout using remoteViews and setting the textView "elipsize" property to marquee... Nov 02 15:55:18 tophyr sorry, what you mean? Nov 02 15:55:42 bingels: that we think the lint tool is making a mistake Nov 02 15:55:44 i mean, ignore the warning. it's incorrect Nov 02 15:56:07 alankila tophyr ok thanks guys Nov 02 15:56:19 you can get the same warning by doing InputStream a = new FileInputStream(file); InputStream b = a; b.close(); // lint warning that a is not closed Nov 02 15:56:50 hmmh. I guess it doesn't really do a very thorough analysis. Nov 02 15:57:08 * tophyr shrug Nov 02 15:57:11 it's a hard proving problem, anyway. Nov 02 15:57:23 in many cases it can't. what if you stuck the IS into a map, and then retrieved it later, etc Nov 02 15:57:26 yeah, exactly. Nov 02 15:57:57 Map! I'm a map. Nov 02 15:58:00 it sounds like there's no flow analysis at all, more like some vague syntactic stabs Nov 02 15:58:26 In an Android web view, the form elements such as radio and checkbox are super small. anyone know how to fix this? Nov 02 15:58:52 'right, I see InputStream a = new', there must be a 'a.close()' downwards in this block. Or something. Nov 02 15:58:53 map: http://www.youtube.com/watch?v=4XrfuEUOqWo Nov 02 15:59:21 Precisely. Nov 02 15:59:21 Map: you are a map! good for you! such a good little map. Nov 02 15:59:27 :D Nov 02 16:00:36 Are you an iOS Map or a Google Map? Nov 02 16:00:49 A Google Map. Nov 02 16:00:54 wait, no swiping... damn Nov 02 16:01:10 Map Nov 02 16:01:19 HashMap Nov 02 16:01:28 A location map. Nov 02 16:01:33 Not a hash map. Nov 02 16:01:41 Map map = ...; Object o = map.get(x); Nov 02 16:02:08 can someone tell me why this is not allowed to work? We know that the code must succeed because everything in java is castable to this type. Nov 02 16:04:02 alankila what exaclty not works? Nov 02 16:04:15 Map map = null; Object o = map.get(null); works Nov 02 16:04:17 :) Nov 02 16:04:35 Hmmh. Really? I must be mistaken. Nov 02 16:05:05 It's not supposed to compile because that implies use of the type parameter defined as anytype Nov 02 16:05:10 compiled successfully Nov 02 16:06:14 Well it does work. I agree. Nov 02 16:06:27 I thought I saw when working with android that this ? stuff prevented code like that from working Nov 02 16:06:37 at least on non-android java it seems to work Nov 02 16:06:46 And I did wonder about it, because I could not see a reason why that wouldn't work Nov 02 16:07:11 Strange. I'll revisit this issue at some later point. Nov 02 16:08:48 * bluesceada is trying to recover a probably hardware damaged samsung galaxy s Nov 02 16:08:52 guessing filesystems Nov 02 16:09:02 anyone has a link for me for all the filesystem unix utilities? Nov 02 16:09:13 i only got e2fsck on the samsung currently .... Nov 02 16:09:26 read now or perish, http://paulgraham.com/gh.html Nov 02 16:09:28 want to check yaffs2 and fat filesystems of it Nov 02 16:12:44 alankila: why did you think that wouldn't work? Nov 02 16:13:32 Sicp: Python programmers smarter than java programmers? Seriously, what I see in this area is python mainly getting adopted by django hackjobs making presentation sites. The java devs move on to serious stuff. Nov 02 16:15:09 toootally not something you want to take out of context here Nov 02 16:15:22 besides, it's Paul Graham, just imagine how much experience this guy's got under his belt! Nov 02 16:15:43 tophyr: I was wondering just that question Nov 02 16:15:58 Experience in making money, I've learned that that isn't often related to quality, let alone code quality. Nov 02 16:16:00 because I saw that use of the ? type parameter value as even Object wouldn't compile, and I couldn't understand why not. Nov 02 16:16:20 Now that I see that it does compile, I just go 'huh'. Well, that's what I expected all along. Nov 02 16:16:26 heh Nov 02 16:16:43 i've always understood '?' to be implicitly 'Object' Nov 02 16:17:11 why so easy to decompile and crack the code Android apps? Nov 02 16:17:14 Sicp: not to mention [citation needed] Nov 02 16:17:30 bingels: because it's easy to decompile and crack java apps Nov 02 16:17:45 dex2jar Nov 02 16:17:47 it's actually harder to decompile android apps, you have to use dex2jar first Nov 02 16:17:47 bingels: nature of java, though I guess Google could have put apps in a more robust container than .zip Nov 02 16:18:14 Dalvik format Nov 02 16:18:41 its this could be the solution Nov 02 16:19:02 but... Nov 02 16:19:25 C and C++ are also easy to decompile, it's just that it decompiles to assembly code that's not very interpretable by most humans. Nov 02 16:19:27 HDroid: er Nov 02 16:19:38 every time... Nov 02 16:20:06 anyway, there's nothing wrong with using a zip. No matter what format you used, it would be documented and therefore easy to disassemble Nov 02 16:20:12 i'd call that 'disassemble' vs 'decompile'.. though that's really just semantics i guess Nov 02 16:20:15 so you might as well use something standard Nov 02 16:20:16 C and C++ decompiling only to assembler,which for most is difficult to understand Nov 02 16:21:22 in some parts of code dex2jar can only decompile to assembler Nov 02 16:21:47 how to make this for all code Nov 02 16:21:50 ? Nov 02 16:22:02 I wonder if those are actually native libs. Nov 02 16:22:10 likely they are Nov 02 16:22:14 You're better off proguarding it, really. Nov 02 16:22:56 Or just not caring Nov 02 16:22:57 proguard of course Nov 02 16:23:02 Your code probably isn't that important Nov 02 16:23:15 Not caring would work for most things, I guess. Nov 02 16:23:36 But I've figured out quite a few non-public web apis by decompiling. Nov 02 16:24:01 bingels: java being decompile-able is unavoidable due to the design choices of the language. the translation between Java and P-code is much more one-to-one than the translation between C and ASM Nov 02 16:24:51 proguard it and it'll be hard enough to follow that nobody who's not being paid a lot of money to specifically reverse your algorithm, will do it Nov 02 16:25:23 if your algorithm's important enough that you think someone might do that... write it in C :P Nov 02 16:25:39 More like... hide it behind a server. Nov 02 16:25:46 on ndk? :) good idea Nov 02 16:25:47 And if your algorithm is that important, writing it in c probably wont help either :p Nov 02 16:25:48 really Nov 02 16:25:50 by that point, however, like was previously mentioned, the algorithm can still be reversed.. just by someone who knows asm. Nov 02 16:25:56 HDroid: +1 Nov 02 16:26:45 HDroid its - for autonomous apps Nov 02 16:27:24 *not good Nov 02 16:28:02 autonomous = you gonna get ripped if it's important enough :P Nov 02 16:28:22 if you don't mind us asking.. what is it? not trying to say you're not important or anything, but most likely it's not worth worry about this :p Nov 02 16:29:08 Adobe spends $$$$$$$$$$$$$$$$$$$ trying to keep the licensing code in Creative Suite secure. Nov 02 16:29:09 hello Nov 02 16:29:14 and it still gets cracked..... *every* time. Nov 02 16:30:14 Cracked, sure, but cracking is easy and it's not where the money is. I wonder if their imaging algorithms get stolen, though. Nov 02 16:30:47 But I doubt anyone stealing them will become a major competitor. Nov 02 16:31:11 who's imaging alg ? Nov 02 16:31:12 or would have purchased the $20m adobe suite anyways Nov 02 16:31:12 So it's not that much of an issue. Nov 02 16:31:20 Adobe's Nov 02 16:31:23 cracking is worth money, stealing their imaging algo's aren't. those are likely patented and thus commercially unusable Nov 02 16:31:40 *commercially unusable in America :P Nov 02 16:31:45 touche sir Nov 02 16:32:03 if algorythms are very good they should be shared with the world Nov 02 16:32:21 yeah, after the inventor gets paid for them ;) Nov 02 16:32:41 Which takes exactly 20 years! Nov 02 16:32:47 :) Nov 02 16:32:53 now you're on the trolley Nov 02 16:33:00 where is lov these days Nov 02 16:33:07 ^ +1 Nov 02 16:33:15 there is no lov these days Nov 02 16:33:18 Sandy got him :( Nov 02 16:33:21 :D Nov 02 16:33:23 lol Nov 02 16:33:57 yourenotseriousright Nov 02 16:33:58 uhm, none of Adobe's "imaging algorithms" are novel or unknown Nov 02 16:34:58 fwiw, even a program implementing all of them would probably not be as used Nov 02 16:35:13 that's because it's not the ideas/algorithms that make the program, it's the implementation :/ Nov 02 16:45:05 so i got my continuous speech recognizer working Nov 02 16:45:43 :-) Nov 02 16:45:52 now just need to code in all the voice commands, and i'll have made my hands free commander of doom Nov 02 16:46:05 "launch nukes" Nov 02 16:46:07 I wish there was a nice onboard one, Nov 02 16:46:16 relying on Google sucks Nov 02 16:46:37 jelly bean has onboard for input (voice typing) Nov 02 16:46:41 SimonVT, did sandy really get him? :( Nov 02 16:46:57 not sure if the onboard database is available for SpeechRecognizer Nov 02 16:47:14 app responds "launch them yourself" Nov 02 16:47:15 regedit: it does? Nov 02 16:47:25 so then i say "sudo launch nukes" Nov 02 16:48:07 is there any constant for the default textcolor? Nov 02 16:48:32 SpeedEvil: read it somewhere Nov 02 16:48:35 canadiancow: Depends if his wife is called Sandy Nov 02 16:48:53 * monsti hits himself with a stick - there is no such thing as a default textcolor - it's always a theme dependent item Nov 02 16:48:56 regedit: turn off net, hit the mic on keyboard, instafail Nov 02 16:49:41 monsti: And view state dependent Nov 02 16:49:54 SpeedEvil: you on JB? Nov 02 16:50:02 yes Nov 02 16:50:05 nexus 7 Nov 02 16:50:18 SimonVT: yeah ;) so back to thinking... Nov 02 16:50:35 if you go to settings->language->voice search, there's an option for offline Nov 02 16:51:52 hmm Nov 02 16:52:02 probably has US selected by default Nov 02 16:53:40 I can find where to download voices Nov 02 16:53:47 for recognition Nov 02 16:53:56 but don't see 'turn on' Nov 02 16:55:14 hmm Nov 02 16:55:30 now I just need to RMA this device and get one with working. IC Nov 02 16:55:32 mic Nov 02 17:13:23 how do you set the dark theme on a damn switch compoundbutton? Nov 02 17:40:22 forgive the off topic - what solutions exist nowadays for (fixed) grammar processing, i.e. text adventure game command engine or, in my case, a voice controlled app ("do this" "do that" "make me a sandwich") Nov 02 17:42:44 omg if you create an app that can make me a sandwich, i'll buy it Nov 02 17:43:20 when its done Nov 02 17:43:31 there's an app called make that can make you an ice cream sandwich Nov 02 17:43:34 though you need to pay now Nov 02 17:44:19 i need something like Zork Nov 02 17:44:24 hmhm, there's plenty of this stuff but I've yet to see a usable library :\ Nov 02 17:44:24 engine that is Nov 02 17:44:31 for java/android Nov 02 17:45:09 Mavrik: what's unusable about 'em? Nov 02 17:45:33 mostly you need to provide your own tagging dictionary Nov 02 17:45:53 and they're not really built with android in mind Nov 02 17:46:25 tagging dictionary? sorry i might be a bit too new to these concepts Nov 02 17:48:00 whats the real/fancy name for such engines? i need to search for such things for android but dunno what their called Nov 02 17:48:11 language processors? grammar parsers? Nov 02 17:49:05 natural language processing, topic extraction, something like that Nov 02 17:49:16 there's a precise term for what you want but I can't remember it atm Nov 02 17:50:01 i'm not really trying to do full natural language processing, i will be limiting myself to specific ideas/terms/concepts Nov 02 17:50:12 like sandwich making Nov 02 17:50:30 mhm Nov 02 17:50:32 that's just a plain ol' parser for a specific grammar Nov 02 17:50:57 so on the one hand i am limiting to a static set of commands/keywords Nov 02 17:51:01 on the other hand Nov 02 17:51:02 regedit: you probably just need to get a part-of-speech tagger Nov 02 17:51:06 and some synonym library Nov 02 17:51:11 there are many ways to say make me a sandwich Nov 02 17:51:23 regedit: and that's where you get in to natural language stuff Nov 02 17:51:47 "a sandwich you shall make for me" "produce a sandwich" "execute sandwich making" etc Nov 02 17:51:53 oh i see.. Nov 02 17:52:24 aww, would have been easy in Nov 02 17:52:46 Python, from kitchen import sandwich as sammich Nov 02 17:53:00 :-P Nov 02 17:53:11 regedit: fwiw, you're not going to be able to handle every case Nov 02 17:53:15 heh Nov 02 17:53:20 i have a class with all static variables and methods Nov 02 17:53:20 regedit: you should consider what the bare minimum of what you need is Nov 02 17:53:26 regedit: and work on implementing that. Nov 02 17:53:29 is there another way I should organize this? Nov 02 17:53:32 zinx: yes i can deal with that Nov 02 17:53:43 regedit: otherwise, this is a very deep hole that you will get stuck in for all eternity. Nov 02 17:53:50 i don't think a class makes sense, there is no state Nov 02 17:53:51 i hear ya... Nov 02 17:54:03 i guess i can start with fixed exact phrases Nov 02 17:54:36 regedit: i would start with having some verbs, and ways to give it parameters in a semi-natural way Nov 02 17:54:44 make chheavy sandvich for chhevy Nov 02 17:54:59 like, a verb 'make', and you could say 'make a sandwich' and it would consider 'a sandwich' to be what to make. Nov 02 17:55:13 zinx: now you're starting to get into that hole... :D Nov 02 17:55:17 regedit: nope Nov 02 17:55:33 regedit: it would only take specific verbs and specific nouns Nov 02 17:55:51 zinx: what have i gained with what you're saying over text.equals("make me a sandwich") Nov 02 17:55:54 regedit: and only in specific combinations Nov 02 17:56:00 regedit: yes Nov 02 17:56:17 regedit: you can do error reporting better Nov 02 17:56:33 regedit: for instance, you could say 'don't know how to make "me a sandwich"' Nov 02 17:56:46 regedit: and they would realize, hmm, maybe i should have left the "me" off. Nov 02 17:57:27 i see Nov 02 17:57:30 regedit: letting the user know what your program can and can not handle, and how it interpereted what you said, is very important. Nov 02 17:57:39 right Nov 02 17:57:40 regedit: people can adapt even if your program can not Nov 02 17:58:40 regedit: also, for an Android device, you can even have a menu with context-specific verbs that you can do :) Nov 02 17:58:49 regedit: so they don't even have to type them out! Nov 02 17:59:13 huh? sorry i'm not following (still rather new to android dev) Nov 02 17:59:25 haven't messed much with menus yet Nov 02 17:59:53 RustyShackleford: there's nothing wrong with that, it's sort of like a namespace Nov 02 18:00:15 regedit: no different from the basic menu concept on other systems, just makes more sense on a mobile device Nov 02 18:00:21 regedit: than typing stuff Nov 02 18:00:47 zinx: so what are you saying, that i can construct a menu and then parse speech to refer to those menu options Nov 02 18:00:48 Is this not valid in 0ncreate? if ((intent != null) && Nov 02 18:00:49 (savedInstanceState.getBoolean(INTENT_EXECUTED) == false)) Nov 02 18:01:11 and thus i kinda 'integrate' moar? Nov 02 18:01:13 regedit: nah, you can have a menu for the stuff you support Nov 02 18:01:33 qkzoo1978: why do you think it's not valid? Nov 02 18:01:43 regedit: that's all Nov 02 18:01:50 right i see Nov 02 18:02:34 It crashes when it executes that statement w/ nullpointer exception, but is ok if i remove the savedinstancestate check Nov 02 18:02:48 anyway gtr Nov 02 18:02:58 thanks zinx / Mavrik Nov 02 18:05:01 qkzoo1978: well I think you just stumbled across your solution Nov 02 18:06:18 But why would it throw nullpointer? According to manual, savedinstance .getboolean returns false if key doesnt exist Nov 02 18:07:14 I meant bundle .getboolean Nov 02 18:07:59 savedInstanceState can be null Nov 02 18:08:13 If there is no saved state Nov 02 18:08:17 (such as first launch) Nov 02 18:09:30 guh Nov 02 18:09:32 So i could say && (savedInstanceState == null) because I got the same nullpointer error when I tri3d that. Nov 02 18:09:44 why is some shit so hard to find Nov 02 18:09:54 If savedInstanceState is null you should not call methods on it Nov 02 18:10:18 just because i set Theme.Light on my damn app doesnt mean i want my 's to all be black text.. Nov 02 18:10:38 y u no use theme.holo.light Nov 02 18:10:54 So how check if its null? Nov 02 18:11:12 qkzoo1978: .... Nov 02 18:11:19 yeeah.. Nov 02 18:14:34 evancharlton, lol Nov 02 18:15:10 have you guys worked on theming the damn .. I have a differnt include layout for v14+ for making imported holo checkboxes switch to ICS style switches Nov 02 18:15:28 I just want to change the color of the text in the switch .. Nov 02 18:15:40 what style or textappearance does the switch import from Nov 02 18:16:11 Check the source Nov 02 18:17:34 is it possible to store Objects in a database? Nov 02 18:20:43 So, LinearLayout is pretty annoying.. if it has 2 child views and you use weight, the second view will always be >= the size of the first view (at least on 2.3).. Wonder how it works with 3 views Nov 02 18:21:34 depends how you are playing with weight (and weightSum in the parent) in the child, SimonVT Nov 02 18:21:38 depends on* Nov 02 18:21:43 Equal weight Nov 02 18:21:51 Forgot to mention that Nov 02 18:22:30 ok so if you want something like 50%50% for the child, normally you precise in the parent weighSum="1.0", and in both child you put 0dip in the height (for vertical, or width for horizontal) the value of 0.5 Nov 02 18:23:06 child3 >= child2 >= child1 ;/ Nov 02 18:23:07 but I think you know it, i'm on 2.3 and played a lot with weight (costly in perf :/) but I did not have your bug Nov 02 18:23:19 Yah, I know how it works Nov 02 18:23:23 for sure :) Nov 02 18:23:26 I'm fixing a bug in ABS Nov 02 18:24:11 Jake backported linearlayout's divider Nov 02 18:24:35 To make room for the divider we put a 1px left margin on every view but the first Nov 02 18:24:55 can someone explain why onShareTargetSelected returns a boolean when "The return result is ignored. Always return false for consistency."? Nov 02 18:24:57 http://developer.android.com/reference/android/widget/ShareActionProvider.OnShareTargetSelectedListener.html Nov 02 18:25:00 Anyway, for the tabs we also need every tab to be the same width Nov 02 18:25:02 (this is pure curiosity) Nov 02 18:25:20 So I iterate through the views, find the largest, and remeasure every view to that size Nov 02 18:25:21 yes, we need consistency! :) Nov 02 18:25:29 yes but why not make it a void method... Nov 02 18:25:52 Anyway, the largest width is including margins Nov 02 18:25:56 SimonVT, can be costly (despite lint warns us with exponential remeasurement or something like that) Nov 02 18:26:16 I make hierarchyviewer crashes... so many nested weighted layouts I have :| Nov 02 18:26:28 But, with 2 views with equal weight, one is 2px smaller than the second Nov 02 18:26:39 Remeasure it 2px larger, and you got tabs that scroll when they shouldn't Nov 02 18:27:37 ah indeed, this is why I did not seen it with my eyes, if so; it's at the order of pixel(s) Nov 02 18:32:01 adq: as a general rule, if hierarchyviewer is slow or crashes, it's your app that needs fixin', not HV Nov 02 18:35:45 yes, because crashes are acceptable Nov 02 18:36:28 to be fair, there was a bug in HV I fixed in 4.2 Nov 02 18:36:35 that could lead to NPEs Nov 02 18:38:01 error: Error: Resource is not public. (at 'style' with value '@android:style/ Nov 02 18:38:01 Widget.Holo.Light.CompoundButton.Switch'). Nov 02 18:38:03 >_> Nov 02 18:44:01 Why cant i "put" an item in onSavedInstanceState in my oncreate? Nov 02 18:44:24 ..thats what was generating my npe Nov 02 18:45:25 cuz you have to use onSaveInstanceState() Nov 02 18:46:23 im going with this: Nov 02 18:47:16 qkzoo1978: http://developer.android.com/training/basics/activity-lifecycle/recreating.html Nov 02 18:51:06 Thanks, i needed a refresher Nov 02 18:56:31 do libraries get compiled into the android apk file? I included two source libraries in my project so I'm wondering if I need to just drop my apk file on the share of the source libraries also Nov 02 18:59:58 hey, anyone using aokp and can tell me howto modify the kernel config? Nov 02 19:02:19 written_tabletpc: #android-root Nov 02 19:13:32 fwiw: i've packaged up my little experiment on using truetype for vector graphics into a small g+ post, with links to a sample. https://plus.google.com/102207019656909757485/posts/6pSGTmVrY7T Please do let me know if you spot egregious blunders anywhere Nov 02 19:15:20 How do I force httpurlconnection to NOT cache and get the file new every time? Nov 02 19:15:40 Since I use the file as an update counter with tiny modifications (change 1 to 2), and it won't read them because cached Nov 02 19:20:01 does httpurlconnection use caches by default? didn't realize that. does getUseCaches() return true for you? Nov 02 19:20:08 kbs: hey, looks interesting. one of the problems with icon fonts on the web is that they are usually rendered blurry. is that a problem on android too? Nov 02 19:20:30 kbs, lemme check Nov 02 19:21:16 codebutler: android generally uses multi-resolutioned bitmaps to render icon drawables -- so it's great if the size/resolution matches the bitmap, not so great otherwise. Nov 02 19:22:09 right… i'm talking about the font Nov 02 19:23:18 ah. Well, I believe android uses the freetype renderer internally; so it's as good/bad as that implementation, I guess Nov 02 19:23:52 it's generally pretty good at large sizes Nov 02 19:24:12 small sizes are a bit hit and miss, but that's true for any font that doesn't have proper hints, I suppose. Nov 02 19:24:42 you can try scaling up (or down) that sample page to check how it behaves... Nov 02 19:25:03 useCaches is indeed true Nov 02 19:26:02 kbs, sooo just setting it to false should fix it? Nov 02 19:26:19 RazielZ: worth a shot :-) of course, try setting it before you connect() ... Nov 02 19:26:24 Yeah Nov 02 19:26:43 I'm also changing a referer (hotlinking disabled? NOPE!) so I can do it before/after that and before connect Nov 02 19:28:28 heh, macrumors summarized the Nexus 10 reviews … and even they could not spin any of them negatively; so it must be a great device and/or they are being fair this time. Only thing they mentioned was a lack of apps. Nov 02 19:29:05 lack of apps? Nov 02 19:29:13 codebutler: I've been happy with my two test devices (color nook, and my friend's htc phone) using the truetype method to scale graphics nicely. Nov 02 19:29:19 tablet optimized apps Nov 02 19:29:47 Lazy coders Nov 02 19:29:50 Lazy coders everywhere Nov 02 19:29:52 which is pretty much what the verge said too under cons, which was a short list Nov 02 19:29:56 Even I optimized mine for tablets somewhat! Nov 02 19:30:23 It has more columns/rows in the gridview Nov 02 19:30:25 For tablets. Nov 02 19:30:26 ;) Nov 02 19:30:29 :) Nov 02 19:30:34 XD Nov 02 19:30:34 woohoo Nov 02 19:30:43 go RazielZ go Nov 02 19:30:53 Well it's a start, isn't it?! Nov 02 19:30:54 :D Nov 02 19:31:00 yeah ! Nov 02 19:31:48 it would have been great if google did this around the time of the xoom though :| Nov 02 19:35:47 i think for the first time i'm inclined to tablet optimize my app, i wonder if a 2560x1600 emu will be usable Nov 02 19:39:16 seems like a viable recruiting method: https://plus.google.com/u/0/109124286422639953134/posts/cT1zehEGHrV?cfem=1 Nov 02 19:39:32 *shakes head8 Nov 02 19:47:44 I'm trying to parse a few xml files and a CSV file. Does it make sense to go xml/csv --> Object --> database? Nov 02 19:50:52 RustyShackleford, that's generally a good approach Nov 02 19:51:08 you never know when that object might come in handy Nov 02 19:51:39 lol TachyonDev Nov 02 19:51:41 RustyShackleford: how many rows ? Nov 02 19:54:26 >_> Nov 02 19:54:34 fucking gas shortage is stupid Nov 02 19:57:52 g00s: like 15, ugh Nov 02 19:58:05 hmm.. in api 11 apparently Activity.onRetainNonConfigurationInstance was deprecated, and in FragmentActivity it's set to final Nov 02 19:58:07 bad news bears Nov 02 19:58:27 tophyr: there is a reason for that Nov 02 19:58:41 what was it? Nov 02 19:58:53 i think they want you to use Fragment.setRetainInstance or something Nov 02 19:58:58 yeah, they do Nov 02 19:59:22 i am using it to retain AsyncTask instances and change the Activity that they reference back to once they've completed, however Nov 02 19:59:49 otherwise if i'm in portrait, start an asynctask, rotate + get a new activity... crash Nov 02 20:00:37 maybe a worker fragment would be better Nov 02 20:01:42 or better, maybe create a special Loader Nov 02 20:01:47 hmm. possibly Nov 02 20:02:06 Loader might be a better option, yeah Nov 02 20:02:09 haven't looked into that yet, will do now Nov 02 20:05:05 What's my storage options on android? for app settings and stuff Nov 02 20:05:30 app settings usually go into Preferences Nov 02 20:05:59 http://pastebin.com/iiqnitZ3 my CSV file looks like this Nov 02 20:06:44 RustyShackleford: thats terrific Nov 02 20:06:47 I'd like to combine each both of those lines into one row Nov 02 20:07:28 are there any good tools for parsing CSV? I'm having a really bad time trying to implement my own Nov 02 20:07:54 g00s: you mean shared preferences? Nov 02 20:10:08 yeah Nov 02 20:10:22 i still don't see much in the way of reassigning a Loader to a different Context Nov 02 20:10:29 think i'm kinda boned here Nov 02 20:10:43 worker fragment seems like hacking the design of fragments Nov 02 20:11:02 tophyr: the loader manager handles … some of this stuff Nov 02 20:11:10 uh, i'm rusty :( Nov 02 20:11:18 oh, good point, haven't read about LoaderManager yet Nov 02 20:12:07 probably best to find a tutorial on extending AsyncTaskLoader, or some example … the loader framework code is pretty terrible Nov 02 20:12:22 its a spaghetti of template methods and broken encapsulation Nov 02 20:13:42 hm Nov 02 20:13:45 well that's encouraging Nov 02 20:14:22 instead, for now, i'm just gonna ostrich about it.. one of my co-workers found FragmentActivity.onRetainCustomNonConfigurationInstance (aka just stick "Custom" in there) Nov 02 20:15:14 i think the android team just wanted to make it a bit of a pain in the ass to continue using non-config instances, in order to force devs to realise about the fragment stuff Nov 02 20:19:16 They need to use onRetainNonConfigurationInstance to retain loaders and retained fragments Nov 02 20:19:26 Nothing to do with making it a pain in the ass Nov 02 20:20:06 It's to help you not break the support lib :) Nov 02 20:21:52 oh, haha Nov 02 20:22:08 well in that case it's exactly what i've done with my own Activity subclass Nov 02 20:24:54 irony: a book on mobile user experience is DRM'd by mit press; and drm is antithetical to UX Nov 02 20:35:19 adq: as a general rule, if hierarchyviewer is slow or crashes, it's your app that needs fixin', not HV <- totally agreed ;/ more than 300 views in total! The only ways I would imagine is to use one big surfaceview where everything is rendered inside, but I drastically lack of openGL skills (drawing on canvas is ok but rendering is not perf); or maybe separating in different activities (but might cause lot of GC which create too much latenc Nov 02 20:35:19 y in my specific case) Nov 02 20:47:33 Hey gang, I'm making a call to imageView.setBackground(Drawable d) and getting "Call requires API level 16" How can I do something like that in Android 8 min Nov 02 20:51:47 Perhaps, .setImageDrawable(...); Nov 02 20:52:12 Or setBackground(int); Nov 02 20:53:03 setBackgroundResource(int); even Nov 02 20:53:36 Or any of the other methods available Nov 02 20:53:37 http://developer.android.com/reference/android/view/View.html#setBackground(android.graphics.drawable.Drawable) Nov 02 21:00:13 fakingfantastic: that's a Lint error. Just set it to be a warning Nov 02 21:00:52 evancharlton: so Android 8 supports it. No biggie, I just did a reference to the drawable ID as per Knossos suggestion Nov 02 21:00:54 ? Nov 02 21:01:17 evancharlton: you have it backward. setBackgroundDrawable was essentially renamed to setBackground in API16. so you should still use setBackgroundDrawable instead for compatibility Nov 02 21:01:31 and ignore the warning on that Nov 02 21:01:40 Or you can test for API level Nov 02 21:01:44 And switch depending Nov 02 21:01:55 That would be the safest option Nov 02 21:06:39 Hi. is it possible for a ListPreference to get the entries from @string/string-array instead of array.xml file options? Nov 02 21:09:43 asanchez1987: hey, the name of the file is arbitrary. Nov 02 21:10:28 google people: there is a typo in the documentation here. under elements it says instead of http://developer.android.com/guide/topics/resources/more-resources.html#IntegerArray Nov 02 21:11:06 I've tried changing the android:entries="@array/listOptions" for android:entries="@string/listOptions" but it does not work Nov 02 21:11:14 ok, last question - i promise… So I'm making a custom Layout that extends ViewGroup. If I want to programmatically add children to this layout, how do I position them? Nov 02 21:11:21 No, because @string references single strings, not string arrays Nov 02 21:11:27 @array is for arrays Nov 02 21:11:39 You position them in onLayout Nov 02 21:11:47 Via View#layout Nov 02 21:11:54 fakingfantastic: you can also extend LinearLayout etc. Nov 02 21:12:35 SimonVT in Eclipse, if I use the graphical ui for inserting strings, if I insert a string-array it is placed in the strings.xml file Nov 02 21:12:47 Yeah? Nov 02 21:12:58 asanchez1987: it would still be under R.array Nov 02 21:13:09 strings.xml is just some arbitrary name for an xml file Nov 02 21:13:16 SimonVT: oh, so if I make a method addChildImage(ImageView) … I should call requestLayout() at the end of it to trigger a call to onLayout, where I will then place the child Nov 02 21:13:25 You can call it thisistotallynotstrings.xml and still put your strings in it Nov 02 21:13:46 fakingfantastic: You should use ViewGroup#addView to add views Nov 02 21:14:10 SimonVT: thats what Im doing Nov 02 21:14:13 I have the same in strings.xml and in array.xml. If I put android:entries="@string/listOptions" it does not work Nov 02 21:14:14 (it calls requestLayout for you) Nov 02 21:14:17 does that auto call it Nov 02 21:14:21 ahh bingo, thanks Nov 02 21:14:28 asanchez1987: Because is an array Nov 02 21:14:29 of strings Nov 02 21:14:34 Thus, you reference it with @array Nov 02 21:14:54 SimonVT: this is my first Android project, and day 2 on onMeasure/Layout stuff. Thanks for the help Nov 02 21:15:06 fakingfantastic: what type of layout are you creating? Nov 02 21:15:21 you can do a lot with the built-in layout classes Nov 02 21:16:12 ok, thanks. Nov 02 21:16:35 codebutler: It's a MapLayout: I have a custom map for a hotel, with pins on it. Need to pan / zoom / click pin. I know there is MapView, and apparently theres a way to just use that with customizations, but I just decided to go this route in lew of learning MapView and how to customize Nov 02 21:17:06 I'm learning Android as i go, so I have a lot of "hindsight" ill re-evaluate when Im done Nov 02 21:17:31 sounds like you don't want native Nov 02 21:17:45 Custom views are awesome :) Nov 02 21:20:37 fakingfantastic: Just saying, onMeasure/onLayout is the easy part :p Nov 02 21:21:09 SimonVT: yeah man, i'm surprised how straight forward it is, once you wrap your head around it Nov 02 21:22:02 Are your pins views as well? Nov 02 21:22:08 Sicp: yeah, while I'm new to Java / Android, I've learned from working on a lot of frameworks, sometimes it better to start as low level with a lib as you can and work your way up. Keeps a lot of the "gotchas" at bay, and you learn it a lot better IMHO Nov 02 21:22:31 SimonVT: yeah, image views, cause all they really need is a touch event, nothing fancy Nov 02 21:29:54 Are you handling drawing the map in your MapLayout? Nov 02 21:31:09 hi all, anyone know any good blog posts etc about dealing with caching bitmaps? Nov 02 21:31:29 I'm reading this: http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html Nov 02 21:31:47 but could do with some other sources of info if there are some Nov 02 21:32:46 not a post, but this might help: https://github.com/JakeWharton/DiskLruCache Nov 02 21:32:56 What does getTag return if it can't find the tag for that key, null or false? Nov 02 21:33:19 I have a function that is supposed to be able to tell if any view in the view group is a horizontalscrollview, but it seems not to be working… any help? https://gist.github.com/4004475 Nov 02 21:35:15 fakingfantastic: Why would it return false oO Nov 02 21:35:46 lol, so "null" i take it? Nov 02 21:36:01 yep Nov 02 21:36:22 sampullman: many thanks Nov 02 21:36:24 thanks man Nov 02 21:37:59 hwrd|work: If the viewgroup has 2 child viewgroups, and the second one is a horizontalscrollview Nov 02 21:38:04 You'd return false on the first Nov 02 21:40:29 SimonVT: There isn't a better way to do that then… is there? Nov 02 21:40:49 SimonVT: I'd have to return nothing at some point, right? Nov 02 21:42:28 Only return the result from isAnyViewHorizontallyScrollable if it's true Nov 02 21:45:19 what's the idiomatic way in android to not duplicate code for an edit dialog and a new dialog? Nov 02 21:45:36 subclass them? fragments? something else? Nov 02 21:45:38 SimonVT: I think.. I get it. Nov 02 21:46:11 muhoo: subclassed DialogFragments? Nov 02 21:47:09 sounds reasonable, thanks Nov 02 21:49:48 i might be losing it... are dialogs supposed to disappear when you tap outside of them? can we prevent that functionality without setting cancelable=false? (i want to be able to hit back and go out) Nov 02 21:51:34 dialogs are supposed to be modal, iirc Nov 02 21:51:46 optionsmenus, however, are not Nov 02 21:52:00 at least by default, and as far as i've seen. click outside them and they go away Nov 02 21:52:17 well, i've got a dialogfragment, and when i touch outside it, it's closing Nov 02 21:52:38 that's the default behavior Nov 02 21:53:19 tophyr, that's intended Nov 02 21:53:36 huh. really? i've never been able to click outside one. Nov 02 21:53:43 its since ICS i believe Nov 02 21:53:46 possible to prevent it? not seeing anything jump at me in Dialog or DialogFragment.. though it's 3pm on a friday Nov 02 21:53:58 setCancelable, like you said Nov 02 21:54:06 but that also kills the back button Nov 02 21:54:13 which is not intended Nov 02 21:54:30 wonder if i could just handle the back key in that case? Nov 02 21:54:31 true, you probably have to override onBackPressed and cancel it yourself, then Nov 02 21:54:42 not the end of the world Nov 02 21:54:44 why dont you want default behaviour? Nov 02 21:54:49 at least, that's the first thing that comes to mind Nov 02 21:55:26 Could anyone help me with a build error? http://pastebin.com/NdaeYrXN Nov 02 21:56:08 canadiancow: i have an activity presenting this dialog, and the dialog shows a list of users i can use the activity as. the activity requires the user to select one of the users, otherwise it's useless Nov 02 21:56:29 so why do yo uwant the back button to work? Nov 02 21:56:37 it doesn't make much UX sense to tap on the activity, outside the dialog, and have the whole thing go away - but it does make sense to hit back and have the whol thing go away Nov 02 21:56:50 but you just said it's useless if they do that Nov 02 21:57:08 if i hit back, both the dialog and the activity finish Nov 02 21:57:25 right now, if i tap outside the dialog (but on the activity), they also both finish.. and that's "weird" Nov 02 21:57:36 totally Nov 02 21:57:38 well, that shouldn't be happening Nov 02 21:57:53 oh.. no. it's "weird" from UX standpoint Nov 02 21:57:56 they should do the same thing Nov 02 21:58:07 the activity finishes because the dialog didn't set a user Nov 02 21:58:10 because it's going to be a lot more weird when it doesn't behave like every other app Nov 02 21:58:36 sometimes android default behavior is wierd UX, but like canadiancow said, it's probably better to stick with what the user is used to Nov 02 21:59:14 well.. won't work for this case Nov 02 21:59:22 yes it will... Nov 02 21:59:26 but sounds like there's a workaround.. setCancelable(false) + onBackPressed Nov 02 21:59:30 but the worst is when they use non-holo dialogs, so the buttons are in the opposite order :( Nov 02 21:59:34 i'm actually stunned by how complex and tangled dialogs are in android (since ICS anyway) Nov 02 21:59:55 muhoo, theyre not that "complex" or "tangled". they're just fragments now Nov 02 22:00:14 i think they're fine..it's fragments i don't like :/ Nov 02 22:00:29 fragments are the best thing evar! Nov 02 22:00:33 you've clearly never worked on an app that has a multi-pane version for large screens Nov 02 22:00:35 if only google would put @Deprecated on 90 % of android API and then delete them, I'd think the remaining 10 % might be tight and usable Nov 02 22:00:49 you cant just "delete" stuff Nov 02 22:00:52 around 90 % however of it needs to go Nov 02 22:01:18 it takes like 2 years to delete stuff. i know a method that was deprecated in eclair and deleted in 3.0 or 3.1 Nov 02 22:01:25 but thats like the only case ive seen Nov 02 22:01:30 i can tell you, as someone coming into this relatively new, it's a huge API with lots of history Nov 02 22:01:56 I honestly think that vast majority of it is useless. There's, what, 3 different ways to do dialogs now Nov 02 22:02:15 once with fragments, once with activity-managed dialogs, and once with manually managed dialogs Nov 02 22:02:18 it's madness Nov 02 22:02:18 i mean, some of this is normal cruft of a mature platform Nov 02 22:02:42 if fragments are the future, just fucking go and deprecate every non-fragment thing Nov 02 22:03:17 I'm ok with this Nov 02 22:05:50 alankila, like what? Nov 02 22:06:05 fragments dont make much else not useful Nov 02 22:06:10 and a lot of stuff was deprecated Nov 02 22:06:19 the dialog methods in Activity are deprecated now i believe Nov 02 22:06:41 I doubt we'll see many APIs being removed.. Google knows devs have to support old platforms.. Removing the only way of doing certain things on these old platforms is only going to make supporting them more annoying Nov 02 22:07:07 * muhoo has to develop for 1.6 Nov 02 22:07:21 SimonVT, Service#startForeground() or setForeground() or wahtever it was Nov 02 22:07:23 a new, not-yet-shipping product. uses donut. Nov 02 22:07:27 it was removed at some point in HC Nov 02 22:07:27 as long as @Deprecated appears on the methods you aren't supposed to use anymore, they can entirely be removed from SDK and in some beautiful distant future from the android runtime too Nov 02 22:07:39 lolwat, 1.6 Nov 02 22:07:51 alankila, i suppose that's true Nov 02 22:07:59 onCreateDialog(int id) This method was deprecated in API level 8. Old no-arguments version of onCreateDialog(int, Bundle). Nov 02 22:08:00 Sicp: http://store.archos.com/archos-internet-tablet-p-90.html Nov 02 22:08:07 donut is resource efficient Nov 02 22:08:10 onCreateDialog(int id, Bundle args) This method was deprecated in API level 13. Use the new DialogFragment class with FragmentManager instead; this is also available on older platforms through the Android compatibility package. Nov 02 22:08:11 but honestly I do think google should simply stop supporting old versions after a cutoff. Today, they should announce discontinuation for 1.5 and 1.6 Nov 02 22:08:32 when was the last 1.6 device sold though? Nov 02 22:08:45 * tophyr facedesk Nov 02 22:08:47 getDialog().setCanceledOnTouchOutside(false); Nov 02 22:08:53 Since: API Level 1 Nov 02 22:08:58 tophyr, lol Nov 02 22:09:01 canadiancow: they are still on sale now Nov 02 22:09:07 definitely friday afternoon. Nov 02 22:09:15 archos is a criminal manufacturer Nov 02 22:09:37 Removing APIs from the sdk forces developers to use reflection to support old platforms :( Nov 02 22:09:39 are they still producing 1.5/1.6 stuff? Nov 02 22:09:43 yes they are Nov 02 22:09:44 I know because I have one of theri tablets. Not my choice, my boss was just too stupid to listen to me when I told him to never touch that crap Nov 02 22:09:57 resistive touchscreen too Nov 02 22:10:19 wow Nov 02 22:10:43 tophyr: http://www.ebay.co.uk/itm/Unlocked-Single-Sim-A-GPS-Cell-Phone-Android-2-1-Qwerty-keyboard-3G-Mobile-New-R-/260987200742?pt=UK_Mobile_Phones&hash=item3cc40ca4e6 Nov 02 22:11:11 ebay doesnt count Nov 02 22:11:15 but i agree with SimonVT Nov 02 22:11:16 oh i know there's plenty of 2.x stuff out there Nov 02 22:11:18 that's new Nov 02 22:11:28 a new device, I mean Nov 02 22:11:32 deprecate everything Nov 02 22:11:40 deprecate ALL the things! Nov 02 22:11:42 but if you remove it, it causes problems Nov 02 22:11:47 they are sold in vast quantities n china Nov 02 22:12:02 like when i updated my app from 1.6 to 2.1 to 2.2 to 2.3 to 3.1 BAM METHOD NO LONGER EXISTS Nov 02 22:12:12 but i still had to support 1.6, so i had to reflect Nov 02 22:12:34 according to dashboard, < 2.2 is now 3.5 % Nov 02 22:12:37 * muhoo reflects for a moment Nov 02 22:13:00 2.2 is significant those Nov 02 22:13:02 2.2 still sucks, but at least it isn't 2.1 Nov 02 22:13:03 alankila: of installed base, or of new sales? Nov 02 22:13:04 tho Nov 02 22:13:15 muhoo: of people who have contacted google play store recently Nov 02 22:13:19 so minSdkVersion="8" Nov 02 22:13:20 muhoo: devices hitting the play store Nov 02 22:13:24 it's a proxy for active devices Nov 02 22:13:41 it's all that matters if Play is your only distribution channel Nov 02 22:13:44 good metric then Nov 02 22:13:49 it may underestimate china Nov 02 22:14:22 and depending n what's meant by 'access' - users with a mature set ofapps Nov 02 22:14:23 are there carriers who don't use play? Nov 02 22:14:26 canadiancow: That's not entirely true either Nov 02 22:14:30 ? Nov 02 22:14:34 muhoo: china Nov 02 22:14:42 well, that's a lot of people :-) Nov 02 22:14:44 Some regions might have higher concentrations of some API levels Nov 02 22:14:59 google should really do regional android version stats Nov 02 22:15:08 i'll bet they have the data Nov 02 22:15:09 fair enough SimonVT Nov 02 22:15:12 nexus 7 was nky sold in SME countries Nov 02 22:15:13 wish I could pre-order the n4 instead of having to wait until the 13th to get an e-mail notification that I can place my order Nov 02 22:15:14 Of course they do Nov 02 22:15:20 I think it was p_l who dev'd in poland, which had a quite large 1.6 base Nov 02 22:15:27 lol 1.6 Nov 02 22:15:30 so jellybean will be more common other Nov 02 22:15:34 here Nov 02 22:15:35 poland was always a bit backwards Nov 02 22:15:45 pragma-, cut it out Nov 02 22:15:50 archos is in france, IIRC Nov 02 22:15:55 according to arstechnica, android has taken a sharp increase in mobile browsing. Might be the arrival of these inexpensive, nice tablets Nov 02 22:15:57 or germany Nov 02 22:16:05 THIS JUST IN: Poland to purchase 2.4 million hot water heaters, invade Germany as soon as they figure out how to drive them. Nov 02 22:16:09 after all, apple felt forced to respond to that threat as well, by releasing the ipad mini Nov 02 22:16:16 * pragma- snickers at tophyr Nov 02 22:16:38 wow, do people still tell polish jokes? Nov 02 22:16:45 that's the only one i know Nov 02 22:16:54 so, apparently not, because i've never heard another Nov 02 22:16:56 A dyslexic pole walks into a bra Nov 02 22:17:03 i thought those were deprecated decades ago Nov 02 22:17:08 ok let's stop with these jokes... Nov 02 22:17:13 yeah, please. Nov 02 22:19:19 though i guess we could hate on fragments, instead of ethnic groups Nov 02 22:19:24 two fragments walk into a bar... Nov 02 22:19:28 Gang, I have a lib project that I'm including. Everytime I build my project it says my lib projects apk doesn't exists. I need to keep running "Clean" on it before I can run my app. How do I fix that? Nov 02 22:19:48 I don't hate fragments. They beat activities 10-0 for the simple reason that you can tell android to retainInstance them Nov 02 22:19:57 i think with most jokes like that you can substitute whatever group you want and they all work. hell the dyslexic one, you don't even need the descriptor at all.. it's already hating on a disability Nov 02 22:20:05 no more objects vanishing, or need to serlialize shit for orientation changes Nov 02 22:20:24 alankila: no, instead you need to serialize shit in order to instantiate the fragment :-/ Nov 02 22:20:29 you can make jokes about something without having to "hate on" it Nov 02 22:20:29 I like that there's onCreate and onCreateView Nov 02 22:20:37 fakingfantastic: don't sweat the apk thing, that's an Eclipse quirk Nov 02 22:20:45 if you build it with ant, it doesn't complain Nov 02 22:20:54 most people aren't uptight and can take a little making-fun of Nov 02 22:21:14 the fact there's onCreate/onCreateView separation imho slavages fragments for me Nov 02 22:21:57 yeah, i can't really say i hate them, only that they made my life a bit more complex, and i'm still trying to get the hang of dialogs in android Nov 02 22:22:02 s/hating on/making fun of/.. if you grow up not experiencing a real prejudice, doesn't seem like a big deal. if you do, even jokes aren't funny Nov 02 22:22:07 fragments don't need salvaging, they alreaday rock Nov 02 22:22:37 besides, activities also have a way to save/load instance data just as easily Nov 02 22:22:44 just make sure you implement onSavedInstanceState Nov 02 22:23:13 because we didn't on our first app, and it was crashy Nov 02 22:23:23 good to know Nov 02 22:23:49 with fragments you potentially don't have to even think about instance state saving Nov 02 22:24:23 it depends if you fragment has predicate data that you are passing to ut Nov 02 22:24:25 it Nov 02 22:24:54 if the fragment makes it own service call and gets data itself every time you are probably ok Nov 02 22:25:50 but if you have a flow of fragments each needing data from the previous fragment, you will need to put that data into savedInstanceState bundle Nov 02 22:26:02 which also means you should know how to parcel your models Nov 02 22:26:49 see, this is why it seems very complex to me Nov 02 22:27:01 Bundles are already parcelable. No need to do anything but stick the crap into a Bundle, if you have to Nov 02 22:27:06 there's all this stuff you have to know, worry about, and watch out for Nov 02 22:27:11 just to make a dialog Nov 02 22:27:15 unless you have a custom model Nov 02 22:27:20 Parcelable is one of the worst APIs I have seen Nov 02 22:27:37 Parcelable should be automatic imho Nov 02 22:27:53 ... kind of like Serializable is? Nov 02 22:28:13 Serializable is just an automatic Parcelable that uses reflection to find fields to write. Nov 02 22:28:27 and reflection is slow as hell Nov 02 22:28:28 that's why it's slower Nov 02 22:28:29 Serializable makes the phone do more work than parceling Nov 02 22:28:32 under Harmony and Dalvik Nov 02 22:28:45 and Serializable also works in android, though it is regrettable taht Activities don't just serialize autoamtically. (Or any other platform objects) Nov 02 22:28:53 if Harmony and Dalvik cooperatively made reflection reasonably fast, the difference would end up being pretty small. Nov 02 22:28:54 and three different ways to do it. savedinstancestate! parcealable! bundles! retaininstancstate! i mean, dude, i just wanted to put up a dialog, take a bunch of user input, and save it to a db :-/ Nov 02 22:29:18 one of our devs is working on a scrip that will use reflection to make our models parcelable for us when we run an ant script at build time Nov 02 22:29:18 muhoo: I understand your pain. It is why a subset of android programmers think the API is complete crap Nov 02 22:29:36 if it turns out to work well we will put it out there Nov 02 22:29:44 it's NOT crap. just this part of it seems to be. the rest of it i've found pretty good. Nov 02 22:29:58 the activity lifecycle stuff is regrettable. Nov 02 22:30:12 we have used this to make parcels too: http://engineeringblog.yelp.com/2011/04/parcelgen-a-code-generator-for-android-data-objects.html Nov 02 22:30:16 it's powerful for users, and could have been much better for devs, but google was like 2 degree to the left when they fired Nov 02 22:30:20 and have been falling over backwards compat ever since Nov 02 22:30:26 iOS is much better at this stuff, I'm afraid. Certainly nothing like the utter level of bullshit that android expects everybody to understand. And the engineers who develop android seem to think the complexity level is OK and just add more of it Nov 02 22:30:41 java Nov 02 22:30:52 alankila: iOS has its own set of challenges. some of them _VERY_ severe. Nov 02 22:30:57 it's a java way of thinking. abstract and hide, bury the complexity under the rug of a new abstraction Nov 02 22:30:59 jasta +1 Nov 02 22:31:02 Xcode being one of them. Nov 02 22:31:14 when I wrote some iOS applications I never saw challenges that were anywhere as severe as what android forces me to contend with Nov 02 22:31:25 sorry, an iOS application. I only wrote one Nov 02 22:31:30 but I did it 3 times, for 3 platforms Nov 02 22:31:33 ios is able to keep their APIs clean in this regard because they can count on absurdly high OS adoption rates Nov 02 22:31:40 iOS's UI toolkit is also paradoxically both more primitive and more sophisticated than android's. It has way more niceties, but fundamentally it's terribly messy Nov 02 22:31:54 *shrug* Android API is actually pretty logical if you've ever done Java development Nov 02 22:31:59 it's orthogonal to the language Nov 02 22:32:06 and iOS method names are so long that you wouldnot even be able to tweet most of them Nov 02 22:32:17 Mavrik: I think if android is somehow symbolizing java develpoment, then java development itself is in trouble Nov 02 22:32:25 everything about it seems more complex than necessary Nov 02 22:32:26 I think not. :) Nov 02 22:32:48 i couldn't stand java until i realized that once you FINALLY make the compiler happy, then shit just works Nov 02 22:33:02 muhoo: wonders of static typing? Nov 02 22:33:03 so, bravo for moving bugs from runtime to compile time. Nov 02 22:33:06 [tophyr chatOnIRCServer:inChannel:sayingMessage:usingEmoticons:toOtherUser:] Nov 02 22:33:11 goodbye channel Nov 02 22:33:28 tophyr: oh god, ObjC naming conventions drove me bananas Nov 02 22:33:51 I love java for making static typing humane, relatively speaking. If it had some more type inferrence smarts, then I'd be pretty ecstatic Nov 02 22:33:53 can we just take pause at the absurdity that is objc for a minute? NSString* foo = nil; [foo length] yields nil. on what planet does this make sense? Nov 02 22:34:06 anyway, for dialogs, i think i've got it. and, thank you guys for making me feel like i'm not going crazy, this stuff really is complicated Nov 02 22:34:09 jasta: it was a reaction to ADA or something Nov 02 22:34:23 jasta: even better [0 length] == 0 Nov 02 22:34:26 jasta: there was a period in history when people *really* hated their programs crashing for any reason Nov 02 22:34:36 alankila: oh great, so we're first descendents of a language from the 70s. super. Nov 02 22:34:43 so they preferred programs to do something rather than crash Nov 02 22:34:47 objc dates back to the next in the 90s Nov 02 22:34:53 nextstep Nov 02 22:35:02 alankila: on any non-trivial software project, this particular "feature" drammatically increases developer bug turnaround time. Nov 02 22:35:08 i could graph it for you at my current company. Nov 02 22:35:12 jasta: it was a mistake, for sure Nov 02 22:35:24 I have no argument against that. It was overreaction to too strict languages. Nov 02 22:35:51 much of the language is that way to me. Nov 02 22:36:05 it's more python/perl like than java/c. Nov 02 22:36:07 what I hate about objC is the semantic cute games it plays Nov 02 22:36:29 foo.bar.baz is a value. foo.bar.baz may work or not Nov 02 22:36:33 and some of the iOS specific APIs are just disgusting. the whole singleton paradigm, for example. Nov 02 22:36:36 I mean, foo.bar.baz = 5 may or may not work Nov 02 22:36:37 objc inherited a lot from smalltalk. Nov 02 22:36:52 it depends on if foo.bar is a setBar returning some equivalent of C struct Nov 02 22:37:09 oh, oh...and categories!? Nov 02 22:37:13 are you _FUCKING KIDDING ME_?! Nov 02 22:37:31 the number of ios developers ive met that defend this as a reasonable feature is truly disturbing. Nov 02 22:37:53 and honestly, I do not think there is any subsitute for real garbage collection Nov 02 22:37:58 it boggles the mind that we still argue about it Nov 02 22:38:04 unsurprisingly, none of these engineers have ever been chiefly responsible for the architecture of any large non-trivial platform Nov 02 22:38:24 alankila: hehe, oh yeah, ARC? haha, you idiots... Nov 02 22:38:30 on java, you can *really* just ignore the question Nov 02 22:38:40 alankila: i HATED that!!! self.view.rect.size.width = 40; // NOPE Nov 02 22:38:40 on ARC, you have to do some funny casts that indicate if a pointer is managed or not Nov 02 22:38:43 oh lords Nov 02 22:38:45 i loved reading Apple's compiler engineer talking about why ARC is so much better than real GC. What a buffoon. Nov 02 22:39:10 tophyr: yep, that was utter fuckup Nov 02 22:39:18 on java, there are specific cases where you cannot ignore the consequence of GC freezing the whole world, and it's not even to force it to pop-up to at least control the "when it happens" Nov 02 22:39:21 So utter fuckup it is mind-boggling they have gone with it Nov 02 22:39:28 jasta: never expect a man to understand something if his salary depends upon him NOT understanding it Nov 02 22:39:37 s/even/easy/ Nov 02 22:40:16 adq: yeah, that's a common problem with M&S-type GCs Nov 02 22:40:20 adq: that's a practical problem that has become practically irrelevant as time has moved on. The garbage collectors available to us today are deterministic (if you want to) and very fast, often in order of milliseconds Nov 02 22:40:30 Had lots of fun managing and reusing objects on Xbox which had same problems :\ Nov 02 22:40:38 so the idea of an apple engineer defending some indefensible apple design decision seems unremarkable to me. dude's getting paid to do that. Nov 02 22:40:46 alankila: it's cute how many ios engineers also defend ARC ;) Nov 02 22:41:12 well sure ARC beats not having it, I guess Nov 02 22:41:13 ARC makes a lot of sense... if you have a language that is built with it in mind :P Nov 02 22:41:20 I mean, you only want to write so many -dealloc functions Nov 02 22:41:22 any more of this nonsense and i will hesitate to call them engineers :) Nov 02 22:41:23 (like Python ;) ) Nov 02 22:41:25 eh. arc's not that bad in my eyes. GC and ARC both have tradeoffs Nov 02 22:41:31 and you KNOW the fucking compiler could write your whole dealloc for you Nov 02 22:41:38 ARC has the pointer complicatedness you mentioned... GC freezes the world Nov 02 22:41:55 both disadvantages Nov 02 22:42:04 ARC is probably better than not ARC, but it isn't as good as GC from programmer convenience point of view Nov 02 22:42:10 tophyr: problem with language/compiler design (like with OSes) is that you get to some really hard engineering questions with serious tradeoffs Nov 02 22:42:11 tophyr: uhh, why does GC have to freeze the world? that's a terribly old class of GC algorithms. Nov 02 22:42:21 now, when you treat ARC as GC, like 95% of new devs do... yes, problems Nov 02 22:42:22 most are threaded and generational. exceptionally efficient. Nov 02 22:42:23 causing holy flamewars with apple-to-oranges comparisons :D Nov 02 22:42:50 jasta: you need to freeze the world at one point in any case Nov 02 22:43:01 with generational GCs you can just control how long that freeze lasts Nov 02 22:43:02 jasta: /me shrug. i'm not a GC engineer, i only know the simple parts Nov 02 22:43:27 The G1GC's trick is that the freezes can be extremely short because some of the GC's work is done when objects are constructed and references passed around Nov 02 22:43:37 Mavrik: well sure, like an asynctask has to freeze the main thread. hardly worth considering. Nov 02 22:43:47 unfortunately G1GC programs run slower Nov 02 22:43:59 jasta: true, GC freeze depends on just how much you trash the heap though :) Nov 02 22:44:06 alankila: g1gc? Nov 02 22:44:19 all i can think of is the gc implemented on the g1... Nov 02 22:44:26 but anyway I wrote audio-producing application and it could run with 50 ms latency requirement on regular jdk, so I no longer really worry about GC Nov 02 22:44:41 tophyr: it's the new gc they added late in jdk6 Nov 02 22:44:49 tophyr: oh my god, that isn't worth remembering. Nov 02 22:44:56 lol Nov 02 22:44:57 that thing was a DISASTER. so far behind the industry state of the art at the time Nov 02 22:44:58 yeah, the new JDK6 GC is pretty awesome Nov 02 22:44:59 alankila: really? that's fast. Nov 02 22:45:08 garbage first collector tries to segment the heap in such a way that entire sections of it can be freed without doing any work during GC Nov 02 22:45:29 muhoo: yes, but the heap size had to be tuned right. For instance, 256 MB heap would collect too slowly whereas 128 MB heap would be fast enough Nov 02 22:45:30 for java, anyway. in c on linux, i have had < 4ms latency for audio apps with RT kernel and jack Nov 02 22:45:36 that's pretty neat Nov 02 22:45:36 yeah, from the little I know, you need a crazy large heap to switch from "non-generational" to "generation" GC Nov 02 22:45:36 Mavrik: not really. it is possible, and quite common, to have a threaded GC design which doesn't "stop-the-world" with O(n) performance Nov 02 22:45:46 and yes, jasta, that's why i was thinking "freeze the world", lol Nov 02 22:46:02 tophyr: the GC as of gingerberad is threaded. the GC as of honeycomb i believe is generational. Nov 02 22:46:27 would be neat to study Nov 02 22:46:28 I have 300ms latency of GC if I'm not carefull with audiotrack in streaming mode, which breaks the UX for the human listener Nov 02 22:46:46 jasta: yeah, but that's not what I was saying :) Nov 02 22:46:49 tophyr: suffice it to say, yours and Mavrik's comments on the stop-the-world tradeoff are simply not correct. Nov 02 22:47:12 one implementation we all shamefully had to adhere to once upon a time was. but that's it :) Nov 02 22:47:27 and it was embarrassing even at the time Nov 02 22:47:37 at least GC cycles on android programs these days are fast. No more 90 ms GC, more like 9 ms Nov 02 22:48:02 GC in security can also be problematic (thinking of retaining too long sensible information in memory) if you cannot force it Nov 02 22:48:06 better yet, use MAT to monitor your allocations and manage/remove them appropriately Nov 02 22:48:18 (and how to be sure nothing is left after oO) Nov 02 22:48:20 sensible information Nov 02 22:48:21 adq: you can in theory blank the objects that hold keys Nov 02 22:48:27 for sure Nov 02 22:48:34 sensible doesnt' mean what you think it does Nov 02 22:48:34 adq: instead of just forgetting the reference, you zero the byte array of what-have-you Nov 02 22:48:35 you already *should* blank objects that hold keys Nov 02 22:48:39 alankila: that's because its generational Nov 02 22:48:57 every security/crypto object i've seen has a method that it tells you to call once you're done with it Nov 02 22:49:06 alankila, that what we tend to do in C language, but still it's not enough from a security point of view Nov 02 22:49:11 since the GC isn't under your program's control Nov 02 22:49:26 adq: it's imperfect, but a comparison to C's free() for instance would not blank the memory either Nov 02 22:49:32 so there's some API complexity required for this problem Nov 02 22:49:37 bbl Nov 02 22:49:43 memset() Nov 02 22:49:53 yeah there are lot of secure free (look vsftpd implementation, and it's trivial) Nov 02 22:50:03 is there even an equivalent to memset in java? Nov 02 22:50:07 and many other things in GC programs need deterministic destructors anyway Nov 02 22:50:08 memset(key, 0, sizeof key); Nov 02 22:50:11 muhoo: no Nov 02 22:50:16 that's why jdk7 has Closeable, and I *really* hope we see it in Android soon Nov 02 22:50:40 muhoo: sort of, Arrays.fill(x, 0) Nov 02 22:50:42 I heard jdk7 is even less secure and more buggy than jdk6 Nov 02 22:50:49 * muhoo goes to look at the source of connectbot Nov 02 22:50:58 Oracle JDK7 had some very interesting security bugs :D Nov 02 22:51:05 pragma-: irrespective of that, Closeable is interesting Nov 02 22:51:12 I'd call them fails but that would insult engineers that ever had a "fail" :D Nov 02 22:51:20 common, filling an array with random byte is not enough, you have to ensure depending the medium of haming distance between value, you need to be sure the ref is not allocated at same place, etc.. zillions of things Nov 02 22:51:26 come'on* Nov 02 22:51:46 making sure your writes are actually commited to main memory is also quite important Nov 02 22:51:48 adq: security people have requirements that are generally at odds with most systems Nov 02 22:51:58 but I don't want to divert the topic, just wanted to add that GC can be problematic from a security point of view, that's all :) Nov 02 22:52:03 I've had some fun debugging secure code where compiler "optimized-out" memset's :D Nov 02 22:52:14 if zeroing the key is not enough, then there's very little we can do, other than write native code to hold very sensitive information with its own rules Nov 02 22:53:33 Theoretical coding question - is it possible to directly control the output voltage/level of the headphone jack, as well as read the impedance of the mic that's available on the same jack? Nov 02 22:53:41 connectbot doesn't seem to do anything interesting to get rid of ssh keys. hell it looks like it stores private keys in sqlite3 Nov 02 22:54:04 Mavrik: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_21.html <-- really interesting article on that subject :) Nov 02 22:54:27 :-) Nov 02 22:54:35 tophyr: read those :D Nov 02 22:54:51 loved em Nov 02 22:54:56 coming back from deepest pits of C/C++ hell to Android is always a positive experience :D Nov 02 22:55:06 coming up with an idea for a first app, didn't want to figure out what I wanted to do isn't possible Nov 02 22:55:23 Android have made me like Java! true story here! Nov 02 22:55:39 (like, halfway through coding) Nov 02 22:56:13 hmmwhatsthisdo: likely not in a device-portable fashion. your code is too far abstracted from the audio firmware Nov 02 22:56:42 java isn't even a bad language imho. It's very simple. Perhaps too simple, but that's what I call a positive problem Nov 02 22:56:51 you could probably target a set of devices and get "close", but you'll still be limited by the abstraction Nov 02 22:56:53 hmmwhatsthisdo, if you build your own kernel module it might be possible, otherwise from the SDK i strongly double it's possible Nov 02 22:56:58 it's easy to complexify something that was simple previously, but it's very hard to do the reverse Nov 02 22:57:00 doubt* Nov 02 22:57:39 Hi guys, sorry if this is dumb, but I have a pending intent that I want to get a result from. From SO, I got this: firstActivity starts the pendingIntent to ProxyActivity, which then in its onCreate(), calls startActivityForResult() for secondActivity. After secondActivity finishes, how can I actually pass certain values that I want from secondActivity to firstActivity? Nov 02 22:57:40 so, making something like a learning universal IR remote that would connect via 3.5mm and have one/two IR LEDs and a photoresistor probably wouldn't be able to be directly controlled by an app? Nov 02 22:57:42 I personally do not believe that the impedance knowledge is available Nov 02 22:58:00 that implies measuring the current that passes in the headset jack and reporting it, really. Nov 02 22:58:23 exactly, and that's not something the firmware will likely report to you, even if the hardware is capable of it Nov 02 22:58:50 * hmmwhatsthisdo ponders Nov 02 22:59:02 ##electronics hmm Nov 02 22:59:09 would recording the mic data to a file, then reading said file work? Nov 02 22:59:30 it wouldn't be very hard to do with an arduino, most liekly Nov 02 22:59:32 and the question of powering something via the headset jack is also questionable. There might be high-pass analog filters, aka capacitors, involved, so fixing a potential might mean there's only a transient current Nov 02 22:59:41 ^^^ Nov 02 22:59:48 hmmwhatsthisdo, if it is possible to match/convert what is sent from the "stuff" plugged in your jack in distinct signals (like audio) maybe it's possible to interpret the value on the Android side (even at high level of abstractions) to do few things, same in the reverse way, sending audio signal to your "stuff" plugged in the jack Nov 02 22:59:54 but it's really hacky Nov 02 23:00:09 that's the other thing i was going to mention - all the microphone jacks are ac-coupled, meaning they have very poor ADC response at low (<100hz) frequencies Nov 02 23:00:39 I think IR pulses are faster than 100hz Nov 02 23:01:04 i looked into trying to hack up an ECG using microphone wires, but without some extra hardware, the microphone picks up only noise because the signal i'm looking for is in the 1-10hz range Nov 02 23:02:04 http://bitshift.bi.funpic.de/en/dslr-remote/hardware/infrared---passive.php Nov 02 23:02:21 something like that, essentially Nov 02 23:02:23 hmmwhatsthisdo: if you can get the microphone to detect a usable (voltage) signal from your photoresistor (maybe with a *very* small battery for the current) you'd certainly be able to process it Nov 02 23:02:52 sounds really challenging without an interface oO Nov 02 23:03:08 adq: the guy made a controller for Nikon DSLRs Nov 02 23:03:43 sends the pulse out over infrared, but something tells me he just put the IR pulses into audio files and played those Nov 02 23:03:50 the challenge would be in your hardware, i think. even if it works on one device, another device's audio chip might not Nov 02 23:04:12 Hello Nov 02 23:04:13 hmmwhatsthisdo, at least you can try to see what kind of values you retrieve and if you can "exploit" them Nov 02 23:04:22 hmmwhatsthisdo: you talking about the guy on hackaday? that's exactly what he did Nov 02 23:04:23 so that is an IR transmitter Nov 02 23:04:26 Do you recommend any book for beginning to develop apps for android? I know java basics Nov 02 23:05:11 alankila: yes, it's an IR transmitter that connects to the 3.5mm port. I was thinking of something like that, along with a photoresistor to "learn" commands from other remotes Nov 02 23:05:13 adq: there are oscilliscopes for linux which work with ALSA. IIRC ALSA is the underlying driver below android, accessing the audio hardware. so, it may be possible to get some information through from that, possibly with JNI Nov 02 23:05:39 hmmwhatsthisdo: you probably need the photoresistor to be powered somehow Nov 02 23:05:42 hmmwhatsthisdo: ^^ Nov 02 23:05:45 muhoo: it's underlying driver for most hw, but not everything - at least in theory, there's alternative sound interface Nov 02 23:06:15 the power pushed into the mic loop probably isn't enough in the first place? Nov 02 23:06:17 yes muhoo, and audiotrack is really near alsa despite so high in the layers (SDK), imagine you receive a signal (a waveform), it might be enough if you can processed it Nov 02 23:06:21 hmmwhatsthisdo: if the IR signal can get past the high-pass filter, you'd definitely be able to process the mic signal on the fly Nov 02 23:06:40 Wodash: most books seem out of date already since the platform moves so fast; I'd recommend using the documentation on developer.android.com to get started Nov 02 23:06:40 hmmwhatsthisdo: maybe it is. I am not sure how these things work, to be honest Nov 02 23:06:48 i say go for it. neat project. Nov 02 23:06:51 yea Nov 02 23:06:56 yeah! Nov 02 23:06:58 Can some kind soul give me a hand: http://pastie.org/5174268 . The onLayout for my custom view group is returning 0's for it's child's height and width Nov 02 23:07:04 I'm thinking of having a method of learning commands from remotes Nov 02 23:07:09 then making them sharable Nov 02 23:07:19 so, instant universal remote Nov 02 23:07:25 wouldn't be hard to get a voltmeter and measure the power (if any.. i wouldn't think the mic jack would be powered, but i don't know) given to the microphone Nov 02 23:07:43 i do know that the mic ADC expects voltages back on the order of ~10mV Nov 02 23:07:44 the mic is a resistor, it'd have to be IIRC Nov 02 23:08:06 hmmwhatsthisdo: mic's are capacitors Nov 02 23:08:06 hmmwhatsthisdo: makes sense.. i'm no EE Nov 02 23:08:19 fakingfantastic: they are? I thought they were resistors Nov 02 23:08:34 distance between diaphragm and conductor Nov 02 23:08:51 they're both guys ;) coils of wire act as both resistors and capacitors... who's no EE after all Nov 02 23:08:52 I have my Bachelors in Audio Enginerring :) Nov 02 23:08:56 if they are capacitors, and the Q value changes based on sound wave, then I guess they are fixed to a potential Nov 02 23:08:57 this is why we often talk about impedance with mic and not resistance iirc Nov 02 23:09:16 tophyr: by definition the flow of signals separates the two Nov 02 23:09:28 It's the same reason a conducer can be a speaker or a mic Nov 02 23:09:33 It's all in the flow :) Nov 02 23:09:33 yeah, i'm just being snarky while i learn, lol Nov 02 23:09:55 In the meantime, can someone help me out Nov 02 23:10:25 fakingfantastic: has onmeasure been called on the children? Nov 02 23:10:28 fakingfantastic: have your children been measured? Nov 02 23:10:29 DAMN Nov 02 23:10:31 lol Nov 02 23:10:39 heh Nov 02 23:11:10 hmmwhatsthisdo: you can get minimal power off the headphone jack, there's a number of things out there working on it Nov 02 23:11:41 hmmwhatsthisdo: you can also use a LED as a weak input source on the mic and learn LED commands that way, there's still a bit of a problem replicating it b/c of the carrier wave Nov 02 23:12:02 hmmwhatsthisdo: you can make a carrier on one channel and invert it using the logged patterns Nov 02 23:12:44 I don't have URLs handy. Generally it's a very very weak output and I found it not worth the hassle. If you want to make a proper universal remote adapter, i suggest using bluetooth and slapping a nice lipo pack on it so you can blast IR at full power. Nov 02 23:12:45 true, send a square wave with a high duty cycle, put it through a diode, and you have a dc voltage Nov 02 23:13:17 There's still the issue where there's a whole bunch of encodings and carriers, but that's the way to do it. Nov 02 23:13:26 Can you tell I've thought about building such a thing for a while? :P Nov 02 23:13:42 actually, change the duty cycle of the audio pulse width, and you now have an analog signal, varying the voltage. Nov 02 23:13:55 muhoo: there's several parasitic sensor projects Nov 02 23:13:57 dragorn: I was planning on having it be like, a Square-sized plug-in, not an entirely separate item Nov 02 23:14:11 hmmwhatsthisdo: you're going to have power issues with that, is the problem Nov 02 23:14:29 You can get a few mA off the headphone jack but not really enough to drive IR LEDs nice and bright Nov 02 23:15:01 oh, I see what you're saying now Nov 02 23:15:01 http://web.eecs.umich.edu/~prabal/projects/hijack/ Nov 02 23:15:25 22khz tone generating 7.4mW Nov 02 23:15:36 you could do some tiny button batteries in the device and use them to drive the LEDs Nov 02 23:15:41 so you end up with an external bluetooth device with its own battery for android "peripherals", eh? Nov 02 23:15:56 muhoo: that's what I did for zigbee sniffing Nov 02 23:16:04 I'd really prefer not making it a separate device Nov 02 23:16:13 though, I wonder if button cells could do Nov 02 23:16:25 muhoo: http://kismetwireless.net/screenshot/kisbee-assembled.jpg Nov 02 23:17:23 muhoo, tophyr: how would I measure it? Nov 02 23:17:27 hmmwhatsthisdo: you may be able to generate enough amps off the headphone jack to power a small uC that then controls a darlington network connected to the batteries Nov 02 23:17:33 I've added another view and it's showing up fine Nov 02 23:17:47 hmmwhatsthisdo: so your battery drain would be very low, tied directly to the duty cycle of actually transmitting Nov 02 23:17:59 I am calling thatView.layout() in my onMeasure though … (is that how?) Nov 02 23:18:00 fakingfantastic: subclass the view, overide onmeasure, add a log there Nov 02 23:18:06 on the child Nov 02 23:18:14 hmmwhatsthisdo: and if you're throwing a tiny micro in there you might as well put the IR logic in it, making timing and soundwave issues less of a problem on the android side Nov 02 23:18:24 muhoo It's just an ImageView, it should be handling it, right? Nov 02 23:18:35 dinner time for me tho Nov 02 23:19:25 i don't know of a less clunky way to do it, but i'd subclass imageview, and only override onmeasure, then see wtf is goign on Nov 02 23:19:42 but there may be a way in eclipse/intellij/whatever debugger to just put a breakpoint in onmeasure Nov 02 23:20:50 muhoo: I'm pairing with someone on this code (who isn't around), but he's already added an ImageView to this child and its showing up fine. He didn't need to subclass for the child. I'm just trying to add another subview Nov 02 23:20:52 hmmwhatsthisdo, http://www.irdroid.com/ :/ Nov 02 23:21:10 muhoo: ohhh nm, i see how he did happened Nov 02 23:21:22 wow, i can't talk… nm i got it :) Nov 02 23:21:53 fakingfantastic: yeah, this onmeasure/onlayout stuff takes some getting used to Nov 02 23:24:31 some ppl seem even to use the camera for infrared oO https://play.google.com/store/apps/details?id=it.inforbit.remotecontrol Nov 02 23:25:03 (receiving only, not sending of course lol) Nov 02 23:26:36 s/ppl/scammer/ Nov 02 23:36:35 Is there a simple way to set the font of a ViewPager? My Google-fu is failing me. Nov 02 23:39:22 viewpagers dont have fonts Nov 02 23:39:44 I mean, in the title strip Nov 02 23:43:44 Are you using viewpagerindicator? Nov 02 23:44:57 Oh, no, just the Android Support Library. Is viewpagerindicator good? Nov 02 23:45:10 Depends what you want to do Nov 02 23:45:24 Basically I just want a customizable title strip for a ViewPager. Nov 02 23:48:03 This actually seems like exactly what I want Nov 02 23:48:05 Thanks Estel Nov 02 23:49:20 Thank J^akeWharton, not I Nov 02 23:54:23 JakeWharton_: someone tried to hide a highlight from you Nov 02 23:54:36 :( Nov 02 23:59:24 highlight-gate Nov 03 00:08:43 ennerd Nov 03 00:43:27 I have a strange behavior happening: Launch app via ACTION_VIEW intent (clicking on suggestion from global quick search), then I back button until the app has closed, use recent apps to go back to it, it's launched with ACTION_VIEW again. Why is this? Nov 03 01:00:35 aoclown: hey, re: earlier. You can get the width and height easily by overriding onSizeChanged Nov 03 01:00:40 I had to do it today Nov 03 01:01:44 Oh really?? Nov 03 01:01:50 yep Nov 03 01:02:00 That's great. Any awkward API level restrictions? Nov 03 01:02:05 nope Nov 03 01:02:05 Not like I care, just curious. Nov 03 01:02:13 api level 1 Nov 03 01:02:17 Zing. Nov 03 01:04:04 Hey tdignan, you seem like an educated cat, I'm doing a lot of getWritableDatabase and db operations on the ui thread because the app can't do anything until that stuff completes. Nov 03 01:04:17 SHould I be using some sort of runnable/runonuithread for all that? Nov 03 01:04:50 depends how long you think it will take Nov 03 01:05:10 i once tried using a progressdialog in a case like that, and the flicker where it appeared/disappeared was more jarring than locking the UI for 20ms Nov 03 01:05:21 Yeah. Nov 03 01:05:25 That's my thought process... Nov 03 01:05:37 I mean, the worst part is ordering... Nov 03 01:05:47 Since I update every row in that "category" with a new order Nov 03 01:05:52 Er sorry, a delete. Nov 03 01:05:59 Almost every* Nov 03 01:06:07 Wow, not a single part of that sentence was correct. Fail. Nov 03 01:07:05 Anyone please has faced this issue before and solved it ? http://stackoverflow.com/questions/5743027/how-to-rotate-text-using-canvas-in-android Nov 03 01:17:47 aoclown: sorry, I was coding. appears you've been answered, though. Nov 03 01:18:28 canadiancow: so throw in a Thread.sleep() call and stick some adds in the progressdialog! Nov 03 01:19:47 keep in mind just because a database read is fast now, doesn't mean it will be once you fill it with millions of rows. Nov 03 01:20:39 no, we're goign about this the wrong way Nov 03 01:20:54 aoclown, why do you need to block the ui until it completes Nov 03 01:23:15 you guys should all enable strict mode Nov 03 01:23:44 how would that help Nov 03 01:24:11 set it to crash on error, then fix anything that crashes. Nov 03 01:24:23 Unless you're using google maps >_> Nov 03 01:24:32 unless you're using google maps. Nov 03 01:24:50 codebutler++ Nov 03 01:24:53 codebutler, we're talking about an instance that has already been identified Nov 03 01:25:10 strictmode helps you find these cases, but aoclown already knows where it is Nov 03 01:25:52 i don't do anything on the ui thread that could potentially block the code for more than a few ms. Nov 03 01:26:01 well i'm suggesting this as a way to better understand what to take seriously Nov 03 01:26:50 write slow code, more time for the user to click your admob ads Nov 03 01:29:33 Can they click them if the UI is locked? :P Nov 03 01:30:00 romainguy, can you ban Tassis Nov 03 01:30:26 Estel: no, you have to write your slow code in a thread Nov 03 01:30:38 :) Nov 03 01:30:43 "while this progressdialog is up, why not click an ad?" Nov 03 01:31:05 "make your apps go faster, with app accellerator" Nov 03 01:31:11 Supremely engineered shit ads Nov 03 01:31:16 'android phone slow, have viruses?' Nov 03 01:31:29 or ctate? Nov 03 01:32:23 evancharlton ? :\ Nov 03 01:34:13 canadiancow: Sorry, I was gone for a bit. I don't need to block the UI. Nov 03 01:34:22 But nothing should be done on it before the action completes. Nov 03 01:34:27 thats what i meant by "block" Nov 03 01:34:30 Simplifies my code. Nov 03 01:34:34 OH? Nov 03 01:34:36 Oh*? Nov 03 01:34:45 like why cant you jsut let it happen in the backgroudn Nov 03 01:35:04 Well.. Nov 03 01:35:10 I'm doing it in response to ui events. Nov 03 01:35:16 Onclick handlers etc. Nov 03 01:35:21 Which I assume is the ui thread. Nov 03 01:35:32 So I didn't ADD code to make it happen in the background. Nov 03 01:35:41 So given my assumption, I'm locking up the ui thread like that. Nov 03 01:36:18 yes Nov 03 01:36:36 Yeah. Nov 03 01:36:50 So I'm wondering if it's worth using runOnUiThread/Handler whatever background nonsense. Nov 03 01:36:59 To avoid doing that. Nov 03 01:37:14 Seems pointless though, since I don't want them using the UI until it is done. Nov 03 01:37:18 use AsyncTask Nov 03 01:37:29 Thanks, I'll consider it if I go down that path :) Nov 03 01:37:38 if you want to disable the UI, you should do that explicitly and display a progress indicator Nov 03 01:37:50 otherwise your app will feel broken, and the system may display an ANR notice Nov 03 01:38:10 codebutler: What if I decided not to show progress because every update is supposed to be really stupid quick and likely always will be? Nov 03 01:38:22 But still did background and disable ui? Nov 03 01:38:39 I suppose you could try that and see how it looks Nov 03 01:38:42 looks/feels Nov 03 01:38:50 Is there a nice way to lock the entire ui? Nov 03 01:38:56 Seems like that would be too convenient. Nov 03 01:39:05 aoclown: 'supposed to be' Nov 03 01:39:07 while (true) {} Nov 03 01:39:09 :D Nov 03 01:39:20 lmao. I mean disable, not lock. Nov 03 01:39:28 well, you can call setEnabled on a view Nov 03 01:39:36 aoclown: several apps ANR when I use them while stuff is installing n backgroung Nov 03 01:39:39 SpeedEvil: Well, consider most of my operations are adding a row, editing a row, delete a row. Nov 03 01:39:48 Yeah true enough. Nov 03 01:39:55 I want to do this the right way. Nov 03 01:40:00 Because after I'm done coding this Nov 03 01:40:07 file ops can get very slow Nov 03 01:40:07 I rterun this laptop and can't fix bugs lmao Nov 03 01:40:44 codebutler: Will that disable all child views as well? Nov 03 01:41:00 maybe it would if you used duplicateParentState Nov 03 01:41:03 but I've not tred Nov 03 01:41:06 Ah. Nov 03 01:41:07 tried* Nov 03 01:41:19 All my commands are issued from the action bar/context action bar too. Nov 03 01:41:24 I wonder if that'd be a problem... Nov 03 01:41:25 Hm. Nov 03 01:41:29 Anyways. I'll mill it over. Nov 03 01:41:40 For such a simple app, there's sure a lot of work to be done. Nov 03 01:41:42 -_- Nov 03 01:41:54 This is no ruby on rails, that's for sure. Nov 03 01:41:54 lol. Nov 03 01:41:55 no, it's just for drawable states Nov 03 01:42:03 I wonder if it would just LOOK disabled Nov 03 01:42:11 Not sure. Nov 03 01:42:23 Anyways, off to the doctor. Nov 03 01:42:33 Let's hope my Korean abilities can make it through another trip there. Nov 03 01:43:08 Thanks for all the help guys. Nov 03 01:49:10 is the intel hardware accelerate execution manager really not compatible with linux as it says in my android sdk manager...? Nov 03 01:51:22 hm, it seems available for 64 bit only on the site. Nov 03 01:51:23 oh well. Nov 03 01:56:28 if my widget force closes during development Nov 03 01:56:47 i can continue before : 1. uninstall it 2. reboot Nov 03 01:56:58 is there a quicker workaround **** ENDING LOGGING AT Sat Nov 03 03:00:01 2012