**** BEGIN LOGGING AT Wed May 13 02:59:59 2015 May 13 03:02:09 hmm, toolbars really don't work well with a 9patch bg May 13 03:03:24 shmooz: ok May 13 03:05:24 hey guys just got my first laptop (macbook). Any tips for android dev on it? May 13 03:05:38 yeah May 13 03:05:41 java 6 for mac May 13 03:05:55 install linux ;) May 13 03:06:09 https://support.apple.com/kb/DL1572?locale=en_US May 13 03:06:15 then terminal is your best friend May 13 03:06:17 make aliases May 13 03:06:29 terminal makes it almost linux :) May 13 03:06:38 phix: actually for me , on gingerbread it's not blocking and on kitkat it is blocking May 13 03:07:00 just use java8 and set `export STUDIO_JDK="/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk"` in your .zshrc May 13 03:07:02 yeah, almost May 13 03:07:11 don't install java6, it's bullshit May 13 03:07:48 get either oh my zsh, or prezto (i use prezto), not android related, but nice to have. May 13 03:08:07 well.. its beacuse I use elipse I need Java 6 May 13 03:08:17 also, don't use eclipse May 13 03:08:25 does apple jave Java 7, or is it stuck at 6 ? May 13 03:08:37 apple has 7 yes May 13 03:08:39 6 7 and 8 May 13 03:08:41 but eclipse kepeler asks for 6 May 13 03:08:51 does not come with yosemite May 13 03:08:53 can you set ECLIPSE_JDK? May 13 03:08:54 g00s: you'll lose 6 in the upgrade though May 13 03:08:55 bankai_ there is an Apple Java 8 JVM ? May 13 03:09:03 I think you need Java 8 to see things clearly on retina displays? May 13 03:09:03 tehre is May 13 03:09:17 there is a 6, 7, and 8 May 13 03:09:19 9 is coming May 13 03:09:21 http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html May 13 03:09:39 right but Apple ? The oracle jvms render fonts like shit May 13 03:09:40 Android Studio will look really blurry / blocky with older java on a retina screen, or so I’ve seen. May 13 03:10:09 not sure.. i have 6, 7, and 8 on my machine May 13 03:10:16 and I also use Eclipse on that machine May 13 03:10:22 i have Apple 6 and Oracle 8 for building May 13 03:12:13 oh wow didn't realise apple still did java... well there you go May 13 03:13:07 ok so go with java 8? May 13 03:13:21 lol, i think there is a lot of confusion :D May 13 03:13:45 is it possible to install app that wont be erased after do factory reset May 13 03:13:47 you most likely want Oracle Java 8 for building, and then you have to decide whether to run AS with it or run AS with Apple jvm May 13 03:13:47 ? May 13 03:14:05 slani: the app would have to be installed in the /system partition May 13 03:14:15 in /system/app May 13 03:14:22 t0astt: how can I do that May 13 03:14:27 you can't May 13 03:14:33 root and then? May 13 03:14:38 waht g-00s said May 13 03:14:54 slani: you would have to have the app move install itself to that May 13 03:14:58 um May 13 03:15:03 Cerberus app does it May 13 03:15:03 hm May 13 03:15:09 so maybe take a look at that May 13 03:15:15 ok May 13 03:15:17 it allows you to install it to /system/app May 13 03:15:23 from inside the app, i believe May 13 03:15:35 t0astt try Java 8, if it yells at you for J6 get apple java 6 May 13 03:16:23 I meet people that do java outside of android May 13 03:16:27 and my advice is May 13 03:16:31 "just kill yourself now..." May 13 03:16:33 really... May 13 03:16:47 lol y May 13 03:17:17 hey ron_frown :D May 13 03:17:27 biggest fucking pile of shit programming language on the planet, and believe me I"ve been around, and written code in AT LEAST 10 diff programming languages May 13 03:17:39 c/c++ and javascript are all less painful for me May 13 03:18:08 you cannot install an app to /system without a rooted phone. you cannot install an app to /system with a rooted phone if it uses dm-verity (ie, modern nexus builds, some others) because any modifiation of the /system partition will render it unbootable May 13 03:18:08 including doing nothing but remounting it, since that changes metadata on the fs May 13 03:18:10 try cobol :p May 13 03:18:15 g00s May 13 03:18:26 many devs hate java May 13 03:18:27 java is just like take something decent May 13 03:18:42 ron_frown: what makes android java and better than java ? May 13 03:18:49 propose a solution for x problem, it gets implemented like this which is like the worst fucking possible solution for x May 13 03:18:52 s/and/any May 13 03:18:54 very repetetive and boilerplate May 13 03:18:57 making you wish you never said shit May 13 03:19:16 java engineers overengineer every god damn thin and you end up with hit like gradle May 13 03:19:22 which will rape the shit out of your machine while syncing May 13 03:19:39 t0astt: but device must be rooted May 13 03:19:39 factory factories May 13 03:19:50 android java is very much as subset May 13 03:19:53 ew Factories May 13 03:19:55 ron_frown yeah but gradle is groovy May 13 03:19:57 and you get gogoles java frameworks for the most part May 13 03:20:12 slani, there is no way to put an app in /system on a nonrooted device, and it's a real bad plan on a rooted one May 13 03:20:16 I had to use spring at the office May 13 03:20:20 what an absolute disaster May 13 03:20:29 let me jsut call factory functions randomly May 13 03:20:41 builders and factories and providers for providers May 13 03:20:51 don't forget the SPIs :) May 13 03:20:52 heh May 13 03:21:19 dragorn: thanks. so there is only two ways. build custom ROM or rooted device :D May 13 03:21:31 anyway I digress May 13 03:21:39 another example of overengineering seemed to be OSGi May 13 03:21:41 slani, yup. and like i said, even on a rooted device, you can render it unbootable if modern security features are turned on May 13 03:21:42 I quite a job because I got tossed back into the java world May 13 03:21:55 and dont regret that 20-25k pay cut I took May 13 03:22:11 and now you have to take out your own garbage May 13 03:22:15 i've heard spring is a shitshow May 13 03:22:22 is it really that terrible ron_frown May 13 03:22:27 dude May 13 03:22:39 ha shmooz i see what you did there May 13 03:22:46 I have osmething build in .net running on linux and windows serving up objects fetcehd from a db and turned inot json May 13 03:22:59 I avg'd about 15-75ms May 13 03:23:02 per load May 13 03:23:08 no html no js May 13 03:23:17 spring the absolute fastest I could muster was like 900ms May 13 03:23:25 for same db same records May 13 03:23:52 I ahve screenshots of oracles cloud console basically reporting avg page response time May 13 03:23:53 What about Dart? May 13 03:23:55 for something basic like that May 13 03:24:15 and it was right around 19sec May 13 03:24:24 dart isnt a server sid language May 13 03:24:30 I like dart for what its worth May 13 03:24:37 genereally, i meant May 13 03:24:52 I think it sucks to compile other code into js because js sucks May 13 03:24:54 BUT May 13 03:25:05 they all end up crossing platforms and evolving into something else, let them be May 13 03:25:08 at least there IS a native runtime even if its only in chrome and canary or whatever May 13 03:25:44 I'm not th ebiggest fan of stuff like php or ruby or python May 13 03:25:51 lol May 13 03:25:54 only C left May 13 03:26:02 but I'd choose any of those over java May 13 03:26:14 my fav is still .net and now that its got first class support on linux May 13 03:26:15 shit May 13 03:26:17 why not May 13 03:26:43 i wonder if .net has any audio APIs May 13 03:26:44 .net was MS's attempt to compete with java May 13 03:27:04 fast, but can be catastrophic if not tested properly.. or written properly May 13 03:27:06 and they stole java for the most part May 13 03:27:12 they fixed java =) May 13 03:27:13 haha May 13 03:27:24 yeah and made it behave faster on the runtime May 13 03:28:50 fixed shit like reflection and generics and lamdas May 13 03:29:02 and anonymous methods and propery getters/setters etc May 13 03:29:06 whatever May 13 03:29:22 I wasnt here to try and sell anyone on .net May 13 03:30:12 notede May 13 03:30:33 just saw java by chance and it set me off =) May 13 03:31:13 ron_frown: use kotlin May 13 03:31:24 I dont get the poitn May 13 03:31:33 see it's not called java May 13 03:31:38 none of these alternative languages actually fix shit if they run on the java runtime May 13 03:31:47 its still slow May 13 03:31:49 shitty with memory May 13 03:32:00 thread heavy May 13 03:32:19 and completely swamped with shitty frameworks and stuff like gradle and maven May 13 03:32:41 well then you can do NDK and C/ASM, good luck May 13 03:32:50 really I think it woudl have been smarter of google to just say android was c++ only and provided reasonable class libraries May 13 03:33:05 i've seen great android apps May 13 03:34:24 yeah they should have used QT and C/C++ May 13 03:34:40 QT for mobile May 13 03:36:07 shit is always easier said than done May 13 03:36:12 but look at objc May 13 03:36:21 its a total pita to write code build apps with May 13 03:36:30 but at least stuff is expandable May 13 03:36:31 and fast May 13 03:36:42 ron_frown: the java runtime is one of the fastest around, with .net May 13 03:37:05 jaana that may be true... and just that the majority of java server frameworks are just complete shit May 13 03:37:08 thus the slowness May 13 03:37:20 I've seen stuff like intellij products that prove its possible to build good software May 13 03:37:22 in java May 13 03:37:27 ron_frown: A lot of them are very solid, use these ones May 13 03:37:45 ugh -- may I point to the fact that google, twitter, facebook, linkedin are all using java in production May 13 03:38:17 shipit: Not sure if will be useful, ron_frown seems to have a monumental chip on his shoulder May 13 03:38:23 well facebook uses php too as well =) May 13 03:38:25 totally May 13 03:38:28 just saying May 13 03:38:34 out compnay has a no java policy May 13 03:38:36 ron_frown they used it, php runs in a VM May 13 03:38:38 our* May 13 03:38:55 except where android is involved, obviously May 13 03:38:56 I would re-evaluate my career choices Tricknology May 13 03:38:58 Tricknology - I wont say for the forseeable future I will May 13 03:39:10 but lest just say I'll remain skeptical that oracle coudl ever make it worth a shit May 13 03:39:15 and with ms's recent moves May 13 03:39:17 they are out for blood May 13 03:39:28 ron_frown: dude, you're painting w such broad strokes May 13 03:39:38 I'd like to hear what you've built to scale? May 13 03:39:38 haha why shipit? May 13 03:40:06 Indirectly built products that HTC scaled to millions of their customers May 13 03:40:13 Tricknology because I've worked on super complex, mission critical systems w/ Java May 13 03:40:20 yeah thats waht I always hear May 13 03:40:22 its enterprise May 13 03:40:24 its enterprise May 13 03:40:30 people like ibm use it May 13 03:40:36 because ibm is somehow relevant today May 13 03:40:42 mh May 13 03:40:44 ron_frown:Are you planning to contribute something constructive in the channel some time soon? May 13 03:40:46 meh /rant May 13 03:41:04 ron_frown I'm not sure what you're trying to say exactly May 13 03:41:08 I'm over it May 13 03:41:10 I'm done May 13 03:41:16 shipit: I think it was in the small print where they warn you not to use it for mission critical May 13 03:41:22 CedricBeust - no... but I'll stop bitching =) May 13 03:41:54 shmooz: at an avg quad-core cpu, you have plenty of transistors for a decent performance app May 13 03:41:56 Criticism is interested when it's specific and technical. "X sucks" is hardly ever said by someone who has anything interesting to say. May 13 03:42:12 I've always held that w/ Java, design is far more crucial than anything else May 13 03:43:00 I have an app (not going to self-promote) on Android, written w/ retrofit, rx-java - about 50k downloads, all over the planet May 13 03:43:03 and get this May 13 03:43:10 zero crashes May 13 03:43:21 again, android is a diff story in my mind May 13 03:43:28 but I'm not trying to keep this going May 13 03:43:43 incl Azerbaijan and bunch of off kilter phone models and ROMs May 13 03:43:52 It's not that different, it uses an ancient version of Java and a totally different set of API, yet it's quite productive May 13 03:43:58 although obviously, Kotlin improves a lot on that May 13 03:44:35 CedricBeust if we could even get Java 8 - that'll be so awesome! May 13 03:44:50 Yeah it would, not holding my breath though May 13 03:44:55 GO might happen before that May 13 03:44:59 see May 13 03:45:01 ew go May 13 03:45:04 that woudl be a change I'd welcome May 13 03:45:12 JakeWharton why? May 13 03:45:15 JakeWharton you are gungho java guy May 13 03:45:18 of course you'd be against go May 13 03:45:25 have you used go? it's bad May 13 03:45:30 Go is a step backward compared to Java May 13 03:45:35 i'm gungho java because it works May 13 03:45:40 but a step up from Python, which is why so many Python devs are converting to it May 13 03:45:48 * shipit agrees w JakeWharton May 13 03:46:02 i've tried to like go. i gave it three solid tries to learn and build things with it. May 13 03:46:04 i understand the appeal May 13 03:46:11 but it's not for me and i'd hate to write android apps in it May 13 03:46:29 No exceptions, no generics, not a language for large scale software May 13 03:46:43 say no more May 13 03:46:55 what about Dart ? May 13 03:47:11 Dart is surprisingly not that terrible, but it just feels meh May 13 03:47:17 I think AS and gradle are great developments over the last year May 13 03:47:23 dart is still just web stuff is it not? May 13 03:47:25 meh, lots of 'experimental', 'new and cool' languages May 13 03:47:39 I just couldnt beleive how bad gradle was May 13 03:47:51 no May 13 03:47:53 I chose to use it because it was the modern way to do stuff May 13 03:47:53 dart is not May 13 03:48:10 http://arstechnica.com/gadgets/2015/05/googles-dart-language-on-android-aims-for-java-free-120-fps-apps/ May 13 03:48:16 ew no May 13 03:48:17 don't show that May 13 03:48:18 that's gross May 13 03:48:31 well it's nto cute May 13 03:48:37 not sure why they got so much press, you could do that crap in any langauge May 13 03:48:59 "It is possible to build and run the standalone Dart VM for Android devices. This setup is not yet thoroughly tested, but is available for experimentation." May 13 03:49:06 https://code.google.com/p/dart/wiki/Android May 13 03:49:13 everyone in mobile space is looking for a silver bullet May 13 03:49:21 wow May 13 03:49:22 werid May 13 03:49:24 weird May 13 03:49:37 but what you first linked is not the Dart VM May 13 03:49:42 it seems they are also looking to take dart to iOS too May 13 03:49:44 sorry May 13 03:50:01 it's in that ilink they mention Dart framework telling the difference between iOS and Android May 13 03:50:29 when they put "hello world" behind the notification bar May 13 03:51:08 Looks liek I might be installing Linux soon May 13 03:51:21 and getting an x86 machine haha May 13 03:53:06 if I subscribe to a retrofit observable without specifying subscribeOn(), what thread will it run on? May 13 03:53:13 background May 13 03:53:29 i dont like using jvm when most of what happens needs to be through JNI to native code. JVM for web services, great. embedded - not great :D May 13 03:53:35 the http executor in the RestAdapter, defaults to a normal cached thread pool May 13 03:56:17 if I wanted to update the UI before and after the retrofit network call, how might I go about doing that? May 13 03:57:04 trigger.observeOn(mainThread()).doOnNext(showProgress()).flatMap(o -> service.apiCall()).observeOn(mainThread()).subscribe(handleResult()); May 13 03:57:31 if your trigger gets calls on the main thread already (e.g., button clicks) no need for the first observeOn May 13 03:57:38 ayyyy May 13 03:57:38 https://fi.google.com/about/ May 13 03:58:21 so I would want to call observeOn() before the UiThread transformation? May 13 03:58:26 yes May 13 03:59:21 and that will affect just the next observable in the stream, while a subsequent one could take us off the main thread again? May 13 03:59:55 The formatting is hard to parse but are you sure multiple observeOn() work the way you think? May 13 04:00:07 yes, because the api call will move it to a BG thread May 13 04:00:35 You mean retrofit? May 13 04:00:38 yes May 13 04:00:40 cool May 13 04:00:50 does subscribeOn() work similarly? May 13 04:00:57 yes, but the opposite direction May 13 04:01:01 upwards, so-to-speak May 13 04:01:13 Careful there, only the first subscribeOn() works, the next ones are nops May 13 04:01:28 that's not strictly true May 13 04:01:42 trigger.subscribeOn() affects trigger, observeOn().doOnNext() affects doOnNext()? May 13 04:02:01 and everything "above" or "below", respectively May 13 04:02:25 for example, observeOn(main()).doOnNext(thing1()).map(mapper()).subscribe(subsriber()); May 13 04:02:29 all those get called on the main thread May 13 04:02:32 joshkovach: It's nebulous, experiment with it, see if you can make sense of it May 13 04:02:39 ok May 13 04:02:59 unless something affects the threading or an operator uses its own threading all calls will behave synchronously May 13 04:03:01 joshkovach: http://beust.com/weblog/2015/04/05/android-rx-and-kotlin-part-2/ May 13 04:03:11 it can be hard to tell exactly what's going wrong and why, which is why I'm trying to clarify my understanding of it all May 13 04:03:19 joshkovach you want to read this closely http://www.grahamlea.com/2014/07/rxjava-threading-examples/ May 13 04:03:47 you _can_ use multiple subscribeOns to achieve interesting effects, but it's a sign you're doing something wrong May 13 04:04:00 ok May 13 04:04:20 for example, we've done clicks.subscribeOn(mainThread()).flatMap(o -> dbCall()).subscribeOn(io()).observeOn(mainThread()).subscribe(updateUi()); May 13 04:04:56 that is functionally the same as clicks.subscribeOn(mainThread()).observeOn(io()).flatMap(o -> dbCall()).observeOn(mainThread()).subscribe(updateUi()); May 13 04:05:04 hard to see the difference in linear code on IRC May 13 04:05:16 main concern with subscribeOn() was with a ViewObservable.clicks() where I had a subscribeOn(io()) and it was complaining that I had to subscribe to the view on the main thread May 13 04:05:19 Yeah hard to parse and intentation is crucial here May 13 04:05:19 which makes sense May 13 04:06:12 joshkovach: Yes, ViewObservable has additional constraints like this May 13 04:06:23 if you can understand what happens under the hood with observeOn and subscribeOn it's much easier to think about May 13 04:07:03 JakeWharton: ok, that makes sense. Definitely a weird read on the first one knowing what I know now May 13 04:07:17 yeah don't do that first one May 13 04:07:29 just illustrating a point May 13 04:07:33 right May 13 04:07:38 that was very helpful May 13 04:10:48 JakeWharton: what are your thoughts on handling retrofit 401 errors with onErrorResumeNext() to update the UI and keep the subscription from dying? is that appropriate or is there a better way? May 13 04:11:05 i'm fixing Retrofit to not do that any more May 13 04:11:11 we use onErrorResumeNext though May 13 04:11:19 what's the fix? May 13 04:11:35 being able to model all responses as onNext's and not using onError May 13 04:11:47 Sweet May 13 04:11:50 and then you can do things like branch and .filter(success()) and .filter(failure()) May 13 04:11:54 interesting May 13 04:12:17 Retrofit got Observable support back in the 0.9.x days and we were very noob May 13 04:12:30 still awesome May 13 04:12:34 didn't realize the consequences and never bothered to change it because so many were using it May 13 04:12:34 We were having a similar discussion today about API's: when do you return an HTTP error and when you return a 200 with a JSON describing an error May 13 04:12:52 also a fun problem and topic that comes up over and over May 13 04:13:18 so will you return something like a Observable>? May 13 04:14:25 yes May 13 04:14:30 awesome May 13 04:14:57 2.0? or 2.1? May 13 04:15:03 Quite a breaking change though May 13 04:15:29 would be a huge improvement, though May 13 04:15:34 It's a good change but I wouldn't advocate people using the current version to switch to that, only get the new versino for a brand new project May 13 04:15:43 2.0 May 13 04:15:51 all the things are breaking anyway May 13 04:16:39 hell, break it all if it makes it better May 13 04:16:49 and i intend to May 13 04:17:01 just don't remove all the old versions from maven like the material-dialogs guy did May 13 04:17:06 so pissed about that May 13 04:17:14 maven central is immutable May 13 04:17:29 wasn't a problem until the last two hours of my last day at my old job May 13 04:17:44 not sure where they were hosting it that would let you do such a thing... May 13 04:18:04 maybe it was jcenter. I'm not sure what the problem was, but the 0.6 versions were completely unavailable May 13 04:18:55 0.7 broke everything May 13 04:20:53 yeah that's not a good approach to things May 13 04:21:02 either way, i have no choice even if I wanted to May 13 04:21:19 It's the right thing to do, glad it's happening May 13 04:21:41 just need to squeeze in the time to get it there! May 13 04:25:14 alright, I'm out. Thanks for all your help, everyone. Have a good night. May 13 04:44:00 see ya May 13 04:58:14 CedricBeust have you seen this ? any thoughts ? its pretty close to what i discovered on my own. https://github.com/tehmou/rx-android-architecture May 13 04:59:48 i think too i'm trying to decide who is hot observable, who triggers things, and how errors are handled in rx May 13 05:00:17 i dont have anything like their Fetcher May 13 05:00:29 Saw it but didn't look in depth May 13 05:25:34 "How I save 5h/week on Gradle builds" May 13 05:26:17 "with this one weird trick" May 13 05:28:13 Leeds is thinking, use ant right ? May 13 05:28:13 TL;DR --parallel --configure-on-demand, use the daemon, don't run tasks you don't need May 13 05:28:35 g00s: nah, I'm sure there are ways to make gradle not slow May 13 05:28:41 should have been a tweet, not an article May 13 05:28:53 "BUILD SUCCESSFUL / Total time: 50 seconds" May 13 05:29:20 if my build is not compatible with --parallel, will gradle tell me ? May 13 05:29:27 i use allProjects { } May 13 05:29:33 so i dont think i can use it May 13 05:29:50 what does that do? May 13 05:30:07 oh May 13 05:30:24 --parallel is a task execution strategy whereas allprojects {} is configuration mechanism May 13 05:30:45 -parallel doesn't work if modules are coupled May 13 05:30:53 modules are coupled in a few ways May 13 05:31:02 Leeds: All these ways involve rewriting gradle in something else than groovy May 13 05:31:02 currently May 13 05:31:09 task-based parallelization is coming May 13 05:31:19 there's no reason the task graph can't be "walked" in parallel May 13 05:31:26 thing is, I honestly don't care May 13 05:32:10 I'm just not that interested in build tools - I'll learn enough to let me build stuff, then get on with the rest of my life May 13 05:32:36 TestNG uses maximal parallelization of tasks, even dependent ones: http://beust.com/weblog/2009/11/28/hard-core-multicore-with-testng/ May 13 05:32:52 I have next to no clue how ant works, but I've been using it to build apps for, what, 6.5 years now? Works For Me[TM] May 13 05:34:24 What could cause an animation not being run, but onAnimationStart is still being called May 13 05:34:56 Petazz: Not running on the main thread? May 13 05:35:15 CedricBeust: Tried that, runs on main thread May 13 05:35:26 Was worth a shot May 13 05:35:30 At least the callback does May 13 05:35:43 And the .startAnimation(myanim) May 13 05:36:25 Could clearing previous animations mess it up? May 13 06:03:55 g00s: HAI May 13 06:04:04 hey thepoosh whats up May 13 06:04:09 tired May 13 06:04:14 stayed up late last night May 13 06:04:16 you? May 13 06:05:08 hm, honestly somebody told me i should be using himalayan salt, so i had to look it up - seems mostly BS May 13 06:05:29 what does that salt do? May 13 06:05:32 lol, not android May 13 06:05:32 for food? May 13 06:05:35 yeah May 13 06:05:49 that sounds BS, all salts are the same May 13 06:06:07 radium, uranium, polonium, arsenic, lead, lol May 13 06:06:29 its some health fad May 13 06:06:41 so many suckers :) May 13 06:06:54 well, technically, salt is the combination of a metal and a nonmetal May 13 06:07:00 so, not that May 13 06:07:13 you just mentioned metals May 13 06:07:21 seems for cooking the main difference is the size of the crystal May 13 06:07:43 but i'm no chef, i just heat things up :D May 13 06:07:48 idk, see salt is just fine May 13 06:08:07 mostly eat unprocessed food May 13 06:08:15 thepoosh speaking of food, this is cool from Israel http://www.gizmag.com/genie-instant-cooker/37444/ May 13 06:08:19 send me the pods ! May 13 06:08:42 that's weird May 13 06:08:50 oh May 13 06:09:00 i read about it a few days ago May 13 06:09:24 i really miss eating very good steaks May 13 06:09:38 other than that, i'm just pondering this article. tend to think about things for a while. https://github.com/tehmou/rx-android-architecture May 13 06:09:50 ohhh May 13 06:09:53 looks good May 13 06:09:58 g00s: here, read this: http://cimpress.com/techchallenge/ May 13 06:10:59 looks to me like a classic dynamic programming problem May 13 06:11:10 Hello May 13 06:11:13 but it's been too long since i was in college to remember that May 13 06:11:17 momken: hi hi May 13 06:11:18 hm i dunno, haven't done any dynamic programming :( May 13 06:11:36 I have a question about direction of textboxes based of language of the text May 13 06:11:45 g00s: http://en.wikipedia.org/wiki/Knapsack_problem May 13 06:11:53 yeah ... May 13 06:11:59 momken: ok, ask away May 13 06:12:12 thepoosh my bg is computer engineering, circuits, embedded, etc May 13 06:12:19 not cs :) May 13 06:12:33 In an existing open source app, when I change a string in strings.xml, e.g. "folder name" to "نام پوشه", it automatically shows the Persian text in top right of dialogbox, not top left, which is correct May 13 06:12:40 oh, should've gone to cs classes more often, the electrical engineering is crap May 13 06:13:10 I want to know whether android automatically changes alignments, based on language? May 13 06:13:25 Or there is a specific code in the opensource project? May 13 06:13:46 momken: http://developer.android.com/reference/android/view/View.html#attr_android:textDirection May 13 06:14:06 momken: are you iranian? May 13 06:14:17 momken, it can be automatic depending on layout options May 13 06:14:18 thepoosh, yes May 13 06:14:22 coool May 13 06:14:40 momken: wanna be my friend? I'm from Israel May 13 06:14:53 lol 😁 May 13 06:15:03 thepoosh, Yes, I am not a racist :D May 13 06:15:11 :D May 13 06:15:19 momken: you should put persian strings in values-fa_rIR May 13 06:15:20 thepoosh, However as long as you are a good person :D May 13 06:15:30 momken: i cannot vouch for that May 13 06:15:32 ask g00s May 13 06:15:49 thepoosh, I know about values-fa May 13 06:16:21 you should only put Persian strings there to avoid different language strings in the same app May 13 06:16:57 thepoosh, I know May 13 06:17:02 mmmkay May 13 06:17:33 thepoosh, The only weird thing is that how android understands to put persian texts in the right? May 13 06:17:57 that depends where, not all versions allow different text directions May 13 06:17:59 my neighbor always says he's from Persia, why wouldn't he just say he's from Iran ? May 13 06:18:14 that cracks me up May 13 06:18:22 and some TextViews are manually set to a specific direction May 13 06:18:53 g00s: there is a lot to say about Persia as an empire vs. Iran as the Islamic Republic May 13 06:19:13 it makes a lot of a difference to people who come from that background May 13 06:19:28 like the difference between being an Israeli or a jew May 13 06:19:48 some Israelis would rather describe themselves as jewish rather than israeli May 13 06:20:14 so if someone affiliates with Persia, are they rejecting the Iranian govt ? May 13 06:20:44 thepoosh, Do you say that direction of text depends to version of android? because I didn't changed anything except strings in strings.xml and it automatically shows all texts in right alignment in android 5 May 13 06:21:08 momken are you allowed to sell apps on Play from Iran ? May 13 06:21:28 g00s, As an Iranian/Persian I still doesn't know the exact difference May 13 06:21:37 you can manually set it or let the system do it for you (starting at api 17) May 13 06:22:16 thepoosh, So in older androids (older than api 17) it may doesn't change direction? May 13 06:22:30 thepoosh, In that case I should test my app on older phones May 13 06:22:33 I don't think it was supported at all May 13 06:22:38 for sure May 13 06:22:46 morning everybody May 13 06:22:53 morn May 13 06:23:20 11:22 PM here May 13 06:24:28 g00s, No, after those harsh nuclear issues, specially during damn Ahmadinejad's government, Iran got banned for any international businnes May 13 06:25:12 g00s, So no we can't sell apps on Google Play, because we can't have credit card in Iran (we couldn't have even before nuclear disputes) May 13 06:25:14 i don't follow these things closely, but i thught new talks were in the news. maybe things will change May 13 06:26:03 g00s, But we have a local version of google play for ourselves, name CafeBazar. Most iranians used that store instead May 13 06:26:46 momken is it something the carrier loads onto the phone ? May 13 06:27:15 g00s, No, people install it themselves May 13 06:27:33 interesting, is it censored in any way ? May 13 06:27:55 momken: haha. Just looked on http://cafebazaar.ir/ and found my app. May 13 06:27:59 g00s, because Google Play gets interrupted sometimes, even for users May 13 06:28:40 i'm just wondering, if people found a way around censorship by the government to create the infrastructure and distribute apps as they see fit May 13 06:28:45 g00s, no, why should it be censored? It obey's Iran's Government's law May 13 06:29:00 because Iran's law is flawed May 13 06:29:08 I don't know what you are talking about :D May 13 06:29:13 Hi all May 13 06:29:13 momken: What is this app about: http://cafebazaar.ir/app/hzad.ir.vasmas/?l=fa I don't have a translate option.. May 13 06:29:58 momken so if an app was offensive to Khomeini, could it still be on cafebazaar ? i'm guessing not ... May 13 06:30:07 I have a recyclerview and each item displays a video. I need any video that is playing to stop when another is played. How would you approach that? May 13 06:30:20 i'm always interested to see how people use technology to subvert opression May 13 06:31:09 subvert oppression by any means necessary please May 13 06:31:50 damn, my app isn't on cafebazaar so i guess i haven't made it yet May 13 06:32:36 an option would be to reuse a single VideoView, but I don't know if that's a good pattern May 13 06:36:48 anyone use android wear? May 13 06:41:01 crickets May 13 06:41:51 redengin: it sucks at this point May 13 06:41:55 I've met people who do... May 13 06:42:02 they sold under 2M devices in the past year May 13 06:42:13 Leeds: we have in the office about 10 watches May 13 06:43:37 thepoosh: sure, but does anyone actually use them by choice? :) May 13 06:43:47 not really May 13 06:44:04 it takes about an hour to sync them to a device May 13 06:44:15 and it usually requires a factory reset May 13 06:44:31 ah so they "only" sold them to a smaller country worth of people :D May 13 06:44:39 redengin: I'm using it right now May 13 06:44:44 almost nothing! May 13 06:45:23 Mavrik: Apple sold that amount in 1 month May 13 06:45:34 and? May 13 06:45:51 Audi probably sold that much A4s in a month as well! May 13 06:46:05 different approach May 13 06:46:10 and it's the most innovative, magical, beautifully-designed premium way to avoid taking your phone out of your pocket May 13 06:46:17 also, premium May 13 06:46:28 I need to get the Toolbar/ActionBar view whether it is the support ActionBar/Toolbar or native ActionBar. Looking for code review: http://pastebin.com/nXtEEduB May 13 06:48:07 can't you get phone calls with the apple watch ? May 13 06:48:25 g00s: apple watch sucks May 13 06:48:25 g00s: yes, it's premium May 13 06:48:31 we have a few of those as well May 13 06:48:31 surf2b1, About this app http://cafebazaar.ir/app/hzad.ir.vasmas/?l=fa . I usually don't use cafebazaar, but unfortunately this app has stolen arts of another artist May 13 06:48:43 no access to the mic and no camera May 13 06:49:32 momken: I only asked because it was at the top of the list when I went to the site and it looked.. interesting. May 13 06:49:32 they won't allow access to real native apps until they've done something about the battery life May 13 06:49:40 surf2b1: why not this: http://developer.android.com/reference/android/app/Activity.html#getActionBar() May 13 06:49:49 not interested in watches. but anything that is worn - apple probably has a better chance because of their provacy policy May 13 06:50:01 *privacy May 13 06:50:20 thepoosh: Because I need the actual view. ActionBar does not extend View. May 13 06:50:39 Leeds is android wearable open source ? May 13 06:50:44 Leeds: I don't think current hardware has capability to run... anything May 13 06:51:11 surf2b1, And unfortunately we don't have copyright law in Iran. Even for native products it's very hard to defend your right for your Intellectual Property May 13 06:51:44 surf2b1, I am sure that the cartoons used in that app is stolen from the original artist May 13 06:52:03 surf2b1, And that app has sold ~3000$ yet May 13 06:52:33 momken: I was interested in what the cartoons are about. don't want to get too off topic though May 13 06:53:43 surf2b1: why not use Actionbar.getCustomView() May 13 06:54:31 thepoosh: because that will return null if there is no custom view. May 13 06:54:41 oh May 13 06:54:43 :S May 13 06:54:44 gordon_, is there an interface for partial canvas? May 13 06:54:49 also not the ActionBar view May 13 06:55:20 gordon_, ie. not WALL_PAPER intent? May 13 06:56:26 surf2b1: it looks like toolbar is not a ViewGroup May 13 06:56:37 which means you will have a ClassCastException May 13 06:57:41 Toolbar is a viewgroup May 13 06:58:01 https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/v7/appcompat/src/android/support/v7/widget/Toolbar.java May 13 06:58:20 gordon_, err, not com.google.android.wearable.watchface.category.WATCH_FACE May 13 07:00:36 g00s: that is very weird, when I dumped the view hierarchy, it's shown as a view May 13 07:00:50 confused May 13 07:01:25 ViewGroup extends View... maybe that's why May 13 07:03:30 http://imgur.com/d00Zf4R May 13 07:03:36 that is very confusing to me May 13 07:03:45 because all the layouts are shown as layouts May 13 07:03:49 but the toolbar is not May 13 07:13:32 thepoosh, Just a question, you said that there exists android:textDirection for any view. But what I was speaking about dialogs May 13 07:14:34 thepoosh, I am wondering why Farsi title of dialog gets aligned right? I am not sure whether a dialog is a veiw or not? May 13 07:17:54 thepoosh, take another app with a toolbar, you will see the same thing May 13 07:19:20 and indeed, it does not resolve well the name of the view(s), writting View (not even viewgroup) for Toolbar May 13 07:22:14 redengin: I'm only using notifications for now May 13 07:23:13 cool, have you looked into the canvas api? May 13 07:25:44 can someone give me pointer on creating a view? I know how to do it by hand, but I'd like to use the tools May 13 07:31:36 redengin, be more precise and explicit, no idea what you want to know May 13 07:31:39 People working from home/cafes, how do you avoid burnouts? I am suffering it right now. Have to complete a backend but super frustrated... :( May 13 07:32:07 that's not burnout May 13 07:32:27 adq, I want to make a 2x2 grid of buttons that is backed by Preference May 13 07:32:33 and why working from home/cafes would lead to burnout more easily than a regular annoying job May 13 07:32:38 WantToCode http://www.amazon.com/Performing-Under-Pressure-Science-Matters/dp/0804136726 May 13 07:33:10 WantToCode, is the server hot? May 13 07:34:01 WantToCode: you mean working alone/remote? May 13 07:35:13 WantToCode, if you burn out, its because you don't know why anymore, you should find a new why May 13 07:36:00 redengin lol, did you read simon sinek ? May 13 07:36:27 g00s, no, that was my own experience May 13 07:37:20 I don't know of simon sinek, but perhaps I should read more May 13 07:37:22 Its working alone at home. BUrnout as in, you just don't even want to look at the laptop May 13 07:37:58 thepoosh: Thanks for looking at it. I did need to change the recursion though. Working now. http://pastebin.com/xTCGLvHH May 13 07:37:59 WantToCode: then step away from it... go for a walk, go to the beach, go on holiday May 13 07:38:11 WantToCode, think of the matrix image, random info dropping into order..... you get to be the sequencer May 13 07:38:46 Leeds, do it everyday, 1hr of running. redengin, wut? May 13 07:38:49 I want to run a pre-defined list of testcases on cts. I dont want to use a plan. ANy idea if i can use commandline to do the same May 13 07:39:16 Its working alone at home. BUrnout as in, you just don't even want to look at the laptop <- this is lack of will, not burnout May 13 07:39:30 WantToCode, the matrix intro, glyphs falling with highlights May 13 07:40:49 If you've truly burned out of coding, go for management, it just takes a reference or an mba? May 13 07:40:59 I don't know, maybe burnout is the wrong term, but I was very comfortable with work since last 1.5 years but the last 2 weeks have been really horiffying May 13 07:41:24 WantToCode, did you paint yourself into a corner? May 13 07:42:29 WantToCode, if you feel additions need too many hacks, replan, take a break, and refactor May 13 07:42:52 surf2b1: this code will only work if the programmer didn't put his own toolbar in the layout May 13 07:42:57 redengin, yeah. Thanks... May 13 07:43:52 google hates me these days May 13 07:43:57 WantToCode, you going to management or you gonna still be a coder? May 13 07:44:04 second app flagged for update rejected -_- May 13 07:44:28 Coder is fine with me. I don't understand even the 'm' of management May 13 07:44:38 Darkwater, any explicit reason? May 13 07:44:41 oops May 13 07:44:47 danijoo, any explicit reason? May 13 07:44:57 yeah. should be easy to "fix" this time May 13 07:45:12 WantToCode, if you can term the replan you're now a manager May 13 07:45:53 "LoLSummoners League of Legends" -> Do not use others' branding or product names at the start of your app. Instead, use "for [ product or brandinsert name ]. May 13 07:46:52 ah indeed May 13 07:46:56 character limit exceeded with a "for", so I have to find something new to not fall in list ranking :/ May 13 07:47:24 kinda all top 10 apps have "[AppName] League of Legends". Ofc I got flagged :p May 13 07:47:28 anyone here know how to create a PreferenceView? May 13 07:47:48 redengin, what kind of preferenceView? May 13 07:48:05 http://developer.android.com/guide/topics/ui/settings.html May 13 07:49:21 danjijoo, a fully custom view tied to a Preference class May 13 07:49:44 danijoo, I can provide a visual if you'd like May 13 07:49:51 thepoosh: working for me right now with a Toolbar I put in the layout May 13 07:50:07 redengin, see adq's link about building custom prefs May 13 07:50:45 danijoo, yes, I explains custom prefs, but uses DialogPreference as the extension May 13 07:51:09 you can use sharedpreferences yourself otherwise, and tie that to any ui May 13 07:51:16 use something else instead if you want something else May 13 07:51:18 but you will have to manage yourself many things May 13 07:51:24 like extend Preference class May 13 07:51:25 danijoo, I'm happy to read the dialogpreference source to find out, but I figured there must be a common pattern May 13 07:52:27 just extend Preference and implement the methods the systems wants to see implemented May 13 07:52:33 adq, yes, I have the shared preference part already implemented, but creating the view for it seems hackish May 13 07:54:23 how would you do otherwise? May 13 07:55:12 I just need to understand the lifecycle of preferences and which updates the view requires May 13 07:56:54 danijoo man is Preference just weird ass protocol May 13 07:57:05 i mean extending for custom ones May 13 07:57:51 g00s, I agree, it seems like it'd be easier to just create add a resource to the view May 13 07:57:55 g00s, yes.. it seems like being totally different from every other interface in Android May 13 07:57:55 surf2b1: even if you give it a different id May 13 07:57:56 ? May 13 07:58:19 thepoosh: yes, because it is looping through every view May 13 07:58:42 but the loop is looking for android.R.id.actionbar May 13 07:58:46 i think May 13 08:00:34 g00s, I like the mvc separation, but if I don't understand how the view connects to the preference in android May 13 08:01:52 thepoosh: no, first it tries the native ActionBar (getting the id) and if the view is null then it loops. Here is the class I'm using the code in: http://pastebin.com/WQdQmTHN Might be useful to someone. It sets the color on all MenuItem icons. May 13 08:12:11 Hello. How do I get the size of the current activity (width and height) ? May 13 08:12:43 Tobbi_: http://stackoverflow.com/questions/1016896 May 13 08:14:15 surf2b1: Okay, so that's exactly how I'm currently doing it. However, I'm using the size to position an element according to a percentage. And it seems to be returning wrong values or my calculation is not correct. May 13 08:15:32 Tobbi_: that gets the full screen. Do you want your parent view's width and height only? May 13 08:15:42 surf2b1: I assume, yes. May 13 08:15:53 view.getHeight() view.getWidth() May 13 08:16:07 Okay, let's try that. May 13 08:16:08 ^ only available after the view is drawn though May 13 08:16:14 not in onCreate May 13 08:17:00 Unfortunately, I believe it needs to be in onCreate. May 13 08:17:11 As that's where I'm positioning my elements. May 13 08:17:11 danijoo, please don't promote the bad API May 13 08:17:11 only after onResume May 13 08:17:16 good luck with this problem :D May 13 08:17:21 haha. May 13 08:17:23 redengin, ? May 13 08:17:42 where did I promote sth? May 13 08:17:44 most people are used to html layouts May 13 08:17:48 You can do view.post(new Runnable() { public void run() { // now the height and width are available } }) May 13 08:18:15 lol, the bad API ... what are the good APIs :) May 13 08:19:13 I see... May 13 08:19:27 g00s: http://developer.android.com/reference/android/os/UserManager.html#isUserAGoat() May 13 08:19:29 wow, I'm going to go smoke, if you you want me to talk about good API, I'll be back in 10 with a bak May 13 08:19:40 guys...please.. May 13 08:19:52 JesusFreke :D May 13 08:20:03 old but not deprecated API are good, time proof May 13 08:20:13 haha May 13 08:20:25 g00s: did you see the new implementation of that? May 13 08:20:37 no i havent May 13 08:20:41 s/Goat/Monkey/ May 13 08:20:43 spoiled May 13 08:21:51 JesusFreke: So, if you have this app installed you are a goat: https://play.google.com/store/apps/details?id=com.coffeestainstudios.goatsimulator May 13 08:21:57 g00s: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/os/UserManager.java#478 May 13 08:22:28 hehe :D May 13 08:22:38 nice one May 13 08:23:24 https://android.googlesource.com/platform/frameworks/base/+/988ae30ff7729ac0e9a44ee665c7e00f1961e7cd May 13 08:26:52 because heavens forbid the system incorrectly identifies the user as a goat May 13 08:27:59 relevant: https://play.google.com/store/apps/details?id=com.coffeestainstudios.goatsimulator May 13 08:28:27 just linked to that ^^ May 13 08:28:34 pretty funny May 13 08:29:00 back, reading the buffer... May 13 08:29:38 still wonder how in the world did a reference to that end up in the core api May 13 08:30:08 i just watched that video - the goat derailed a train ! May 13 08:30:18 the poor giraffe too :( May 13 08:30:38 it's what goats do May 13 08:30:42 the goat needs a blue laser attached to his head May 13 08:31:09 someone working at coffeestainstudios had connections? May 13 08:31:19 ok, goats are great, no one needs my rant on APIs May 13 08:32:01 the world needs a goose simulator May 13 08:32:12 g00s, get on it May 13 08:32:34 geese are scary May 13 08:33:12 * wakelock looks at g00s May 13 08:33:13 I agree May 13 08:36:27 does this channel do API refactor? May 13 08:36:49 redengin, you dont want that :D May 13 08:37:12 danijoo, I already am doing it May 13 08:37:17 i actually own goat simulator May 13 08:37:22 it's a stupid game May 13 08:37:29 or at least it was when it came out May 13 08:37:32 redengin, what api are you talking about? May 13 08:37:59 thepoosh: did you buy it before lollipop? May 13 08:38:04 thepoosh, name speaks for itself :p May 13 08:38:07 i bought it for pc May 13 08:38:13 it's on my steam library May 13 08:38:19 the wear API and more importantly the use of app-to-app transfer May 13 08:38:42 danijoo: it sure does but all the articles I read wrote how awesome it is May 13 08:38:45 it's not May 13 08:38:48 it's dumb May 13 08:39:14 ofc its dumb. In the same way the movie Sharknado is incredible bad May 13 08:39:22 but everyone have seen it May 13 08:39:32 danijoo: sharknado is an intentionaly bad movie May 13 08:39:37 you should watch the room May 13 08:39:52 thepoosh, so is goatsimulator kinda intentionally stupid May 13 08:39:58 now *that* is a bad movie May 13 08:40:04 also true May 13 08:40:14 they did in their spare time working on something else May 13 08:40:18 and got some hype May 13 08:40:34 goat simulator was actually an april fool teaser video May 13 08:40:42 don't remember May 13 08:40:45 but it got that much hype by players that they released it May 13 08:40:54 all i remember is that too many articles were about how cool it is May 13 08:41:00 when it's kinda stupid May 13 08:44:15 interesting... http://stackoverflow.com/questions/13375357/proper-use-cases-for-android-usermanager-isuseragoat#answer-16854187 May 13 08:44:58 so its just an awesome api naming May 13 08:45:22 because UserManger#isUserTooDumbToSpeak() would be insulting :D May 13 08:47:15 wakelock: in modern versions of android, isUserAGoat may actually return true (if the goat simulator app is installed on the phone) May 13 08:47:18 Is there a drop-in replacement for VideoView that has caching? May 13 08:47:35 Yeah, isUserAGoat returns true if Goat Simulator is installed May 13 08:47:51 Nothing to do with speech recognition or anything, just an easter egg May 13 08:48:13 Papipo, videoview buffers. May 13 08:48:24 i dont know about a caching one May 13 08:48:34 Papipo: maybe https://github.com/danikula/AndroidVideoCache May 13 08:49:45 sonOfRa, um duh, read the backlog as well as other answers May 13 08:50:37 I have a unit test that I run with gradle - is there a way to profile this to test how fast it is? May 13 08:51:03 sorry, I mean I want to profile the code to see what functions etc are taking the longest time May 13 08:51:04 System.currentTimeMillis :p May 13 08:51:30 danijoo: yeah I do that a bit, but I want more detailed information May 13 08:51:30 johnflux__, use traceview May 13 08:51:41 http://developer.android.com/tools/debugging/debugging-tracing.html May 13 08:51:59 but this has nothing to do with gradle May 13 08:52:36 adq: thanks May 13 08:53:11 and use the "old ones" (in android device monitor), the new one lacks of almost everything May 13 08:55:27 adq: does it need to be an android app to use this? My unit tests are currently not depending on any android stuff May 13 08:56:13 not sure what you meant, but the code you want to profile has to run May 13 09:06:18 is it possible to receive a response from an intent without using sendOrderedBroadcast? May 13 09:06:25 and without needing a seperate thread? May 13 09:06:54 i need the intent to return data... May 13 09:08:44 startActivityForResule() May 13 09:08:47 Result* May 13 09:10:11 danijoo: it's nice to see you're friendly again May 13 09:10:40 Nick-S_: setResult should help with that May 13 09:10:49 together with startActivityForResult May 13 09:10:58 but i dont want an activity May 13 09:11:01 just an intent May 13 09:11:16 theres no interface going May 13 09:11:28 i have registered broadcastreceievers May 13 09:11:37 so just regular eventbus or intent May 13 09:12:28 danijoo was unfriendly before? May 13 09:12:30 lol May 13 09:13:02 im always friendly.. May 13 09:13:06 yea May 13 09:13:07 unless im not May 13 09:13:09 :) May 13 09:13:33 yea that's an edge case May 13 09:14:05 sometimes im annoyed by google-for-me-questions May 13 09:14:55 I quote a guy from a game I was playing the other day as I quoted him yesterday "his skill is burden enough, no need to report him" May 13 09:15:20 league of legends? ^^ May 13 09:15:23 you didnt answer my question May 13 09:15:25 dota 2 May 13 09:16:36 Nick-S_, im not a robot May 13 09:16:51 if I dont answer, I might dont know ;) May 13 09:18:14 what does the intent do? May 13 09:18:19 launch a service? an activity? May 13 09:18:24 it intents May 13 09:19:11 no this intent is registered by a service and returns a string May 13 09:19:23 use a bus May 13 09:19:28 or bind the service May 13 09:19:51 its more complicated May 13 09:20:03 i am suing the ordered broadcast to have all services respond but just one is master May 13 09:20:53 what if i try to startActivity from service to share data ? May 13 09:25:53 I thought you want data back instead of starting a new activity May 13 09:27:29 ya i can go those two ways May 13 09:30:50 bus would be easiest to implement. May 13 09:39:41 bus stands for what? May 13 09:40:22 giy May 13 09:42:17 probably eventbus May 13 09:44:03 https://github.com/greenrobot/EventBus ?! May 13 09:45:30 for example yes May 13 09:45:45 there is also otto event bus May 13 09:49:23 he's been programming for more than 25 years by the way May 13 09:49:24 haha May 13 09:49:29 since PDP-1 May 13 09:49:36 who? May 13 09:49:43 Nick-S May 13 09:50:08 he's a real steve russel May 13 09:50:17 and yet has to learn how to google :( May 13 09:50:34 the irony of irony May 13 09:50:58 let me see if I've got this right... May 13 09:51:21 I have a CircleTransform class that I use to feed Picasso when Im loading an image into an image view that's supposed to host a profile image May 13 09:51:35 that's all fine. now I want the same but with that image view have a background "border" around the circle. May 13 09:51:52 I can have another image view loaded right behind that image view that I want, and tell Picasso to load "nothing" into it, can't I? May 13 09:52:14 nah I'll just make an XML shape for the background image, nvm May 13 09:52:19 thats stupid to suggest even May 13 09:52:19 i think so, but woudnt that mean a lot of overhead? May 13 09:52:25 yeah I think thats better May 13 09:55:40 lovely, want to sync data to the usb stick, and just as I'm about to plug it in, it falls into the cup of tea that happens to be there May 13 09:55:54 :/ May 13 09:56:41 amazingly, after wiping it thoroughly with a paper towel, it still works flawlessly May 13 09:57:15 wakelock, id not use it anymore May 13 09:57:34 hi May 13 09:57:40 how can i read files from lib/armeabi? May 13 09:57:49 the inner contacts will corrode and one day it will suddenly stop working May 13 09:57:54 danijoo, when it's done I'm going to sync everything on it immediately to my home server, after that it's free to fail ;) May 13 09:58:22 naah, tea is not corrosive, is it? :p May 13 09:58:44 whatsapp got material design May 13 09:58:46 wow May 13 09:59:05 is the universe about to implode on itself? May 13 10:00:10 where'd that happen May 13 10:00:18 I don't see it May 13 10:01:17 Odaym, got it with the normal updates. May 13 10:01:31 whatsapp's never had the greatest design May 13 10:01:36 really primitive May 13 10:01:52 brb May 13 10:02:38 function over eyecandy, my kind of people May 13 10:03:50 Odaym, http://postimg.org/image/i9nvevx1b/ May 13 10:03:52 guys, any tips for a custom toolbar? May 13 10:04:17 icemanbp, id use a pink color for it May 13 10:04:26 nice :D May 13 10:04:30 mine is blue May 13 10:04:34 those kind of tips? May 13 10:04:40 ahahah no :D May 13 10:04:57 nice, looks good May 13 10:05:09 I need inside it the battery status and the on/off function for the tablet May 13 10:05:20 please help May 13 10:05:34 davidmemo, ok May 13 10:05:38 is there any short-cut to do it? or I've to implement them? May 13 10:05:45 icemanbp, the latter May 13 10:06:03 they could've gone with the same design for 3 more years and no one would've cared May 13 10:06:05 it's WhatsApp May 13 10:06:06 have I to implement by myself? :( May 13 10:06:18 true May 13 10:06:22 yes May 13 10:06:43 danijoo: how can i read files from lib/armeabi please? May 13 10:07:04 i dont use ndk sorry May 13 10:07:22 if i knew about these bus systems May 13 10:07:25 that's unfriendly :-/ May 13 10:07:29 i implemented mine with broadcast events May 13 10:07:41 how are these implemented anyway? May 13 10:07:44 danijoo: can i read from java? May 13 10:07:45 as expected :P May 13 10:07:54 glad to see that no one is that much smarter May 13 10:08:02 davidmemo, i dont use ndk. May 13 10:08:16 danijoo: can i read classes.dex as a file? May 13 10:09:04 davidmemo, why would you want to do that? May 13 10:09:29 danijoo: i want to checksum May 13 10:09:34 get bytes and sha1 May 13 10:09:52 from the classses.dex inside your apk? May 13 10:10:25 those bus systems work across different apps? services? May 13 10:10:37 Nick-S_, must be in same task May 13 10:10:44 oh May 13 10:10:48 doesn't help me anyway May 13 10:10:56 IntentServices are in the same task May 13 10:20:33 i'm broadcasting thats cross app May 13 10:20:45 then you need boradcasts May 13 10:28:10 Hey, the tag variable gets the correct value, byt findFragmentByTag() returns null.. any idea why? String tag = fragmentManager.getBackStackEntryAt(fragmentManager.getBackStackEntryCount() - 2).getName(); Fragment f = fragmentManager.findFragmentByTag(tag); May 13 10:28:40 id is not a string, but an integer May 13 10:29:54 icemanbp: i'm using findFragmentByTag() May 13 10:30:03 ye, sorry :D May 13 10:31:54 by id rerturns null too May 13 10:32:20 did you you addToBackStack(TAG) May 13 10:33:23 yes Ashiren May 13 10:33:29 hmm May 13 10:34:25 I'm using fragment.toString() as the tag May 13 10:34:42 viran, dont use fragment.toString :) May 13 10:34:57 or did you override toString for your fragments? May 13 10:35:07 no, I did not... May 13 10:35:23 then dont use it May 13 10:35:30 you something you know the value of May 13 10:36:01 I just need the top fragment from the backstack.... so I'm getting the name from getBackstackEntryAt() May 13 10:37:43 viran, what are you trying to do? May 13 10:38:27 I have a few fragments that were added on top of each other, I need to get the top one, or the one before the top fragment May 13 10:39:12 would you did should work May 13 10:39:17 but try it with a static tag May 13 10:39:49 something you know the value of. like "MyFragment1" May 13 10:42:00 trying May 13 10:45:00 still null.... findFragmentByTag failes some how May 13 10:48:05 please show the whole code May 13 10:48:17 of the transaction and where you try to get it May 13 10:54:51 hello May 13 10:54:54 meh, just use some reference when adding fragment. [solved] May 13 10:54:59 ohai May 13 10:55:39 I am working on an open source project which unfortunately doesn't have a good documentation May 13 10:56:23 I want to make some documentations for it, like class diagrams, diagrams showing flow of a job (e.g. activity diagram, etc.) May 13 10:56:54 Is there any (free) app out there that can automatically generate some diagrams from code for me? May 13 10:57:47 momken, eclipse has a plugin for that May 13 10:57:52 maybe theres also one for intellij May 13 10:58:30 danijoo, a plugin which automatically creates diagrams? May 13 10:58:33 mesh momken May 13 10:59:02 it creates umls May 13 10:59:45 danijoo, I know that eclipse has some addon for it (I forgot its name) but didn't know that it can automatically create umls May 13 10:59:57 Odaym, mesh? May 13 11:00:05 momken, i never used it so i might be wrong :) May 13 11:00:17 "momken" means "possible" in Arabic May 13 11:00:17 And what about Visual Paradigm (community edition)? May 13 11:00:35 "mesh momken" means "not possible in Arabic May 13 11:00:59 Odaym, yes, but I am not Arab, and momken is my family name May 13 11:01:43 funny May 13 11:09:41 How do i make it so that when i press the back button inside an activity thats launched from a fragment that i come back to the same fragment instead of going to the first fragment May 13 11:09:42 ? May 13 11:10:39 thats default behaviour jutsi May 13 11:10:56 i somehow effed up the default behavior then May 13 11:11:11 ^^ May 13 11:13:05 did you add the fragment to the backstack? May 13 11:13:40 how do you get up the suggestions in android studio when you had a red line in your code? May 13 11:14:02 jutsi, alt-enter May 13 11:15:41 danijoo isn't the backstack only for the old fragment api? May 13 11:15:45 im using v4 May 13 11:15:51 no May 13 11:16:11 its for when you want your fragment being part of the backstack ;0 May 13 11:16:13 ;) May 13 11:18:23 Hello, I get this all the time "gradle files have changed since last project sync" after updating Android-Studio today. Anyone else have it or just me? May 13 11:19:09 vegetabl1salad19, are you editing build.gradle file? May 13 11:19:17 sounds like it May 13 11:19:23 try syncing your project May 13 11:19:40 this happens everytim eyou edit it, and will show up until you do the sync its ascing for May 13 11:21:51 danijoo, no. After every gradle sync it shows this message right avay. I synced it 10 times in a row May 13 11:22:59 thats strang May 13 11:23:00 e May 13 11:23:09 try to invalidate ASS cache and rebuild May 13 11:23:11 yes I know about all that. Have been working in AS for 2 years now. Just thought perhaps someone else got this after update May 13 11:24:17 I had an error last night when updating, not sure what error it was May 13 11:24:18 Did that aswell. Will try clean cache and do full system restart, perhaps that will help May 13 11:24:37 But anyway, now I can't use terminal May 13 11:25:03 I should maybe mention that im using a viewpager for the fragments, and if i select something on page 3 and go back i end up on page 1 May 13 11:26:14 jutsi, yes you should have mentioned that :P May 13 11:26:54 jutsi, and you should show your Activities code May 13 11:30:06 http://pastebin.com/9j6mGzvm May 13 11:30:13 ^ code May 13 11:31:10 line 21 May 13 11:31:20 there you set it to be on the first item every time it starts up May 13 11:31:30 remove it May 13 11:35:24 ehh, it still keeps showing up after full restart. Doesn't affect anything, but quite annoying May 13 11:38:58 does anyone know how big the marketshare of amazon app store is? May 13 11:39:50 <------> this big May 13 11:40:12 (compared to gps) May 13 11:40:20 danijoo everytime i talk to you i feel like an idiot.. But you're always very helpful :) May 13 11:41:05 jutsi, did it work? :) May 13 11:41:09 though actually this might be an exception, its still reverting back to page 1 (or 0) May 13 11:41:18 sigh May 13 11:41:29 hm.. May 13 11:41:43 are you pressing back or are you pressing home May 13 11:41:53 err. the "up" indicator May 13 11:42:00 back May 13 11:42:11 i moused over it in the genymotion thingie and it says back May 13 11:42:37 do you have "dont keep acitivies" checked in developer settings? May 13 11:43:22 Any ideas why I get the following error "Could not find method android() for arguments" when trying to build fresh AS project using the Gradle wrapper ? May 13 11:43:40 which one is that under? May 13 11:44:03 http://cdn.apptamin.com/wp-content/uploads/2012/09/Revenue-Comparison-iOS-vs-Amzn-vs-Android_updated-resized-600.png May 13 11:44:06 thats interessting May 13 11:44:33 http://static3.uk.businessinsider.com/image/54b6e2eadd0895862b8b4614-1200-900/bii-sai-cotd-apps-in-appstores-1.png May 13 11:44:38 jutsi, developer settings. but if you dont know that, it isnt checked May 13 11:45:00 I'm using Java JDK 1.8_45 , Gradle 2.2.1 , Android Plugin Version 1.2.3 May 13 11:45:02 VnM, but total number of apps says nothing about users :/ May 13 11:45:34 Revenue per active user doesn't really say much either, because the GPS will have way more users, than iTunes or Amazon May 13 11:45:43 yep May 13 11:45:47 thats my problem. May 13 11:46:00 no, its not checked May 13 11:46:06 I try to find out if its worth to create an amazone version May 13 11:46:43 jutsi, you can save the current selected item position in onPause and set it to that number in onResume May 13 11:47:03 although I dont know why you have to do it. For me, ViewPager keeps its state automagically May 13 11:47:38 most likely im not doing something right May 13 11:47:50 I imagine it's not too much hassle to make your Android app Amazon ready right? You'll reach all the kindle/fire and Blackberry users like that May 13 11:48:12 blackberry still exists? :O May 13 11:48:20 VnM, have to reimplement all the in app billing stuff for amazon store May 13 11:48:27 True May 13 11:48:38 and refractor the app in a way that I can easily build those two flavours May 13 11:49:51 thats like 2-3 days of work May 13 11:50:25 http://www.mobyaffiliates.com/blog/should-you-publish-your-app-on-the-amazon-app-store/ May 13 11:50:39 i read that like 1 minute ago :D May 13 11:50:44 Ahah May 13 11:51:01 I think its worth but actual numbers would have been nice May 13 11:51:09 anyway, i think ill do that May 13 11:51:22 soon (tm) May 13 11:51:50 Procrastination ftw May 13 11:52:10 that article doesn't even mention windows phone :( May 13 11:52:43 AsyncTask in onPostExcecute we got access to the UI-thread... would this mean that a forever while loop here would freeze the UI? May 13 11:52:49 jutsi, its from 2012 May 13 11:53:05 right May 13 11:53:34 windows phone had like <1% market share at that time ^^ May 13 11:53:53 Exclusive_, yes May 13 11:54:43 2014: Windows Phone store twice as big as amazon May 13 11:54:53 http://infogr.am/app-store-popularity May 13 12:01:23 oh goodness, soon we'll have caught up with ios appstore :) May 13 12:02:25 the biggest problem is that apple store sells 4 times the amount than GPS or any other store May 13 12:02:39 iOS users are more willing to give money May 13 12:04:53 Might be a stupid question, but how do I get 3.0/7.0 to equal 0.42857 instead of 0.5? May 13 12:08:39 but danijoo are you sure that what you described is the default behaviour of viewpager fragments? May 13 12:08:49 jutsi, yes. May 13 12:09:17 could it be because im on an emu that it doesn't follow ? May 13 12:10:13 Anthaas, https://ideone.com/ox16iX in what contex do you get 0.5 ? May 13 12:10:32 Anthaas, if you dont round it, it should result in 0.42857...... May 13 12:16:03 iOS users are more willing to give money <--- after all they did just drop some cash for a crappy but expensive device :p May 13 12:19:57 I’m so used to using slack, not having to scroll up and see what I missed on irc can get annoying :| May 13 12:20:51 AdamJB: try out irccloud May 13 12:21:04 cool May 13 12:21:30 oh wow, awesome! thanks! May 13 12:21:36 Just what I was looking for :) May 13 12:21:49 or be connected only when you plan to pay attention :p May 13 12:22:44 yah, I used to just leave my computer on back in the day, but now I have a laptop so that’s not possible anymore, and I switch between work and personal computer often. May 13 12:23:01 The stuff Jake was talking about last night about coming retrofit changes would be nice to read about like I just did :) May 13 12:23:22 ah yeah! do you have the free plan or paid plan? May 13 12:23:37 The much awaited sequel to Killermatch, with the original name Killermatch 2, launched today. For anybody wanting to help a fellow indie out with some ratings, the link is http://www.killermatch.com/ . Thanks in advance! May 13 12:23:40 Free, it's been perfectly sufficient May 13 12:23:55 I'm gettting E/dalvikvm﹕ Could not find class after I updated to Google Play Services 7.3.0 May 13 12:24:14 how can i open a link in my app when using setMovementMethod? May 13 12:24:16 I'm gettting "E/dalvikvm﹕ Could not find class" after I updated to Google Play Services 7.3.0 May 13 12:24:28 rohit7roy, wipe dalvik-cache? (does that even exist anymore with ART?) May 13 12:25:03 wakelock: how to wipe Dalvik cache ? May 13 12:25:13 rohit7roy, use google May 13 12:25:21 Sorry :P May 13 12:25:41 jutsi, that close button appears whenever you least need it, eh? :P May 13 12:26:16 wakelock indeed May 13 12:26:49 anynoe? May 13 12:26:50 anyone May 13 12:26:52 but no i just had like a million tabs open trying to figure out this issue with the viewpager.. Was easier to close all :) May 13 12:28:00 I mean, it's not a major issue, i could release with this, however i feel like i should iron it out first May 13 12:28:35 wakelock: but why should i wipe dalvik cache ? May 13 12:29:33 joroci: you use intents like you normally would May 13 12:32:16 but where do i create the intent? May 13 12:32:19 wakelock: my app is starting but it gets stuck on the LauncherActivity with similar errors like "E/dalvikvm﹕ Could not find class " May 13 12:33:28 in the link? May 13 12:33:52 rohit7roy, did you wipe dalvik-cache? May 13 12:34:07 no May 13 12:34:21 amazon store trolls :D May 13 12:34:25 this setMovementMethod(LocalLinkMovementMethod.getInstance()); will make links work May 13 12:34:26 what are you waiting for then? May 13 12:34:32 you can test your apk for amazon store compatibility May 13 12:34:56 i can't set a listener for all the textview , i need it just for links May 13 12:35:06 ok? May 13 12:35:15 the result was: "Compatibility test successful. Minor issues found. Your app can be submited but we found some issues that may prevent us from offering your app" May 13 12:35:15 then form a link so it starts an intent :p May 13 12:35:25 danijoo, lol May 13 12:35:41 danijoo, must be because of the blizzard stuff :D May 13 12:35:43 wakelock: my device is not rooted May 13 12:35:49 wakelock, its another one ;) May 13 12:36:00 there must be a simpler way May 13 12:36:18 in fact its because i have google in app billing in it. I just wanted to test what the result is May 13 12:36:26 jutsi, sure, modify the target app so it catches a certain form of urls May 13 12:36:43 but this makes the test kinda useless when the result is "yes, but maybe no" May 13 12:36:50 joroci: oop inheritance May 13 12:37:08 danijoo, interesting, wouldn't think google billing would be a red flag for amazon, but then again makes sense, to a point May 13 12:37:36 wakelock, it is. Its in their TOS May 13 12:37:39 danijoo, no, the result is "TEST PASSED, or it would be if your app was done right" :p May 13 12:37:48 like you are not allowed to use paypal in GPS May 13 12:37:53 meh May 13 12:38:06 they want their revenue share ;) May 13 12:38:08 wish they would all stop forcefully pushing their own payment solution May 13 12:38:19 wish they would all learn to play nice together May 13 12:38:23 wakelock, they want to make money ;) im fine with that May 13 12:39:09 I'm not, especially when I have paypal but the retailer is bound by some stupid ToS or other contract to only accept everything else :p May 13 12:39:36 makes for poor UX May 13 12:39:45 so you want them to offer you a store without getting money for it... May 13 12:40:02 so i need to create links myself and stop using movementmethod? May 13 12:40:12 I want them to set a deal with paypal for some percentage or something ;) May 13 12:40:24 joroci, no May 13 12:40:39 you create links in whatever way you want, it's what they link to that matters May 13 12:40:52 and then people begin to not use paypal but another payment method to work arround their fees May 13 12:40:54 and so on. May 13 12:41:49 danijoo, imagine if stores were bound to only ever accept one single type/vendor of credit cards May 13 12:42:09 (online or physical stores) May 13 12:42:23 so you have your visa but that one certain store only accepts amex May 13 12:42:35 and is in fact prohibited from ever accepting visa May 13 12:42:38 but thats not the case May 13 12:42:47 you can feed play store with every creditcard May 13 12:42:54 missing the point May 13 12:43:13 google wallet, paypal, amazon payment whatever... are just types of "online credit cards" if you will May 13 12:43:25 if I want to buy something from store X, i have to pay at store X May 13 12:43:39 wakelock, now they link to phone browser, question is how to change it May 13 12:43:48 hm, but I guess the vendor *itself* such as amazon won't ever accept other vendors... ok fine, I guess that makes sense :p May 13 12:44:07 yes. but google in app billing is not google wallet May 13 12:44:54 it's not? May 13 12:45:11 I thought it all goes through GPS which is then connected to my gwallet May 13 12:45:13 Ugh i can't figure this out today, it will have to wait until .. well monday May 13 12:45:22 i wonder why google wallet does not support internet banking May 13 12:45:36 none of my debit cards are supported by Google Wallet May 13 12:45:50 not surprised May 13 12:45:57 get a proper credit card :p May 13 12:46:04 RishabhTatiraju, because I can transfer money back to my bank account after google direct debitted it May 13 12:46:16 with a credit card I cannot May 13 12:46:35 can you? May 13 12:47:01 In India its like once the transaction is done, you cannot cancel it May 13 12:47:18 in germany you can revert it in 2 weeks May 13 12:47:25 Because of this reason i cannot get into Play Store May 13 12:47:34 oh, that's why maybe May 13 12:47:52 because basically anyone can direct debit something from your bank account May 13 12:48:43 i'm having an issue that's not making much sense, i get null pointer on all my ui element but it only happens on device not in emulator both have same api level anyone experience something like this? May 13 12:48:55 wakelock, yes wallet is linked but you are paying with your credit card, arent you? May 13 12:49:13 oh btw, how can i display notifications whenever an rss feed is updated? May 13 12:49:27 any libraries available? May 13 12:50:24 RishabhTatiraju, check for an update every x minutes and just show the notification May 13 12:50:28 no library needed for that May 13 12:54:31 okay May 13 12:55:00 in ImageView, how can I not stretch the image? android:scaleType="center"? May 13 13:02:00 danijoo, um, I dunno... with in-app purchases technically I do choose the credit card, but I thought that's merely a selection of what gwallet knows about May 13 13:06:34 wakelock: ur suggestion wasnt enough !!! Finally I had to roll back to paly services 6.5 May 13 13:14:16 wakelock yeah but you cant expect google to setup contract with every billing handler on earth May 13 13:14:19 that would be insane ^^ May 13 13:15:18 especially since they would have to track each billings made through paypal api, amazon api, flattr and whatever comes into your mind May 13 13:15:22 how should they do it? May 13 13:15:43 there have to be one api (google iap + wallet) for their system to track what purchases are made May 13 13:15:57 same for amazon with amazon iab May 13 13:16:24 Hello everyone :) May 13 13:16:37 hello LightYarn_ May 13 13:16:47 LightYarn_, hi there May 13 13:17:20 I have a question that's not only about Android but has to do with unity too...I hope someone can help me with that May 13 13:17:57 I want to override "onCreateInputConnection" but it seems I'm doing something wrong. This is my code => http://codepaste.net/bvb7b4 May 13 13:18:47 LightYarn_, no idea but if you dont get an answer from someone else, you can also try #unity3d May 13 13:19:08 Yeah...I'm currently in both rooms :D May 13 13:19:16 :> May 13 13:20:41 But this problem is so Android-specific that posting it here seemed reasonable somehow :-/ May 13 13:25:56 true May 13 13:36:03 wow, someone wants to pay me 200 to try out their analytics product, heh May 13 13:36:49 who? who? who? May 13 13:37:27 try out in production? May 13 13:37:38 or just tryout like "i make a hello world with it" ? May 13 13:38:35 in production probably, I'm not really paying attention to them May 13 13:39:05 fairsharelabs May 13 13:39:38 tbh 200 to get one user to test it sounds like scam May 13 13:40:23 how would that pay off for them May 13 13:40:36 200 Pesos? May 13 13:41:08 Yen :D May 13 13:47:09 finally succeeded w assembling working gradle files yesterday May 13 14:18:10 I have a drawable triangle made in XML May 13 14:18:19 but there is a bunch of empty space on its right May 13 14:18:29 it's made by rotating a rectangle May 13 14:18:48 how can I scale it or something so it fills the whole drawable element? May 13 14:22:18 Forget that May 13 14:22:27 I have fixed it by playing with the pivotY attribute May 13 14:26:11 nice May 13 14:26:12 :D May 13 14:29:03 Is there a simple way to offset the MapView's "Center" camera position? May 13 14:29:29 I've tried the GoogleMap setPadding, but doesn't appear to do the trick. May 13 14:31:41 Idea: Will have map in a background, with some card views over the map on the bottom of the screen. I was hoping to center the blue dot between the top of the card view with top of the map view. May 13 14:36:50 Ah, the setPadding() does work, just had it in the wrong spot. :) May 13 14:38:27 Is someone here using Segment.IO? I can't find their sdk libraries. Do I have to use their github page as a submodule? May 13 14:39:16 now i just gotta figure out why my android opengl app that worked a year ago has all black screen May 13 14:39:42 input still works, can see logs of me hitting buttons, just cant see them May 13 14:40:03 also my apps have been removed from the app store because i didnt update something in time May 13 14:40:40 every aspect of iphone has stayed more stable, build system, ide, apis, dependencies, working functionality, & appstore May 13 14:47:42 this trend will never end. gonna take more pain to right the wrongs. google should fire all their java programs and move android to c++11 May 13 14:48:05 programmers* May 13 14:48:24 C++? You have to be joking. May 13 14:48:49 there is nothing funny about this situation May 13 14:48:56 not our fault you suck May 13 14:50:07 keep using the old build/environment you had before May 13 14:50:11 and shit would continue to work fine May 13 14:50:24 this is a fun conversation to come into May 13 14:52:59 Last week I've released an app to both App Store and Play Store. There's plenty of shit for both environments, if that's where we're at! May 13 14:53:14 I wonder if ThinThread has used xcode before May 13 14:53:57 i feel very similarly about objective-c as java, just slapping my head asking why? May 13 14:54:55 Next is why, but it's still a valid question. :-) May 13 14:55:21 In 1993 I guess it was pretty "modern". May 13 14:55:30 i mean, it's still pretty impressive May 13 14:55:49 I just can't imagine C++ being a solution to anything. May 13 14:56:02 TacticalJoke: i agree May 13 14:56:39 i mean, unless you're a masochist May 13 14:56:49 then, sure May 13 14:59:47 Hi all. I Show a Fragment (fragmenttransaction add + addtobackstack). Then I click on the back button, the fragment is gone, thats oké. But then I want to show the same fragment again. The fragment has a ListView. The ListViews position is always at the top when becoming visible. C May 13 15:00:04 How can I make it apear on the position when the fragment leaved the screen? May 13 15:00:33 i attribute the reasons for iphones massively greater stability and lower maintenance cost to the fact that objc while essentially stupid, is just an extension of c++ and gains much of its stability benefits May 13 15:02:14 It has nothing to do with the language May 13 15:02:21 (in my opinion) May 13 15:03:06 FrancescoV, Easy Solution. Don't use fragments :P. Harder solution: save the listview position and when redisplaying it scroll to that position. May 13 15:03:18 its bunch of factors logically incidental to language but notetheless causal in practice May 13 15:04:39 like implications from binary compiling, or history of major implementations of language May 13 15:05:49 the quirks of how packages or upgrades are managed May 13 15:07:04 quinnjn, thanks May 13 15:07:17 AS in xml layout files replaces @string/some_string with the value "some_value" . When I want to change the String I have to use my mouse to ( Ctrl+Click ) to access the strings.xml May 13 15:08:05 with space, enter, etc I cant - the value of the string just refuses editing it May 13 15:09:33 You can also middle-click. May 13 15:09:35 FrancescoV: If you save the position then you can just do setSelection(position) or smoothScrolllToPosition May 13 15:09:39 If you have a middle mouse button. May 13 15:09:51 Doesn't ListView persist its own position? May 13 15:09:57 B is best May 13 15:09:58 I suspect the problem is that the data isn't being persisted. May 13 15:10:05 is there a solution without the mouse? May 13 15:10:08 (And is being reloaded.) May 13 15:10:38 csst0111: There's only what burntcookie90 said. May 13 15:10:52 codepete_: true, founded setSelection(position) too, that's what I need May 13 15:11:12 does anyone have experience with VpnService? I'm a little surprised to see starting the intent returned by prepare() creating the tun interface. i thought establish() was going to do that. May 13 15:11:38 TacticalJoke, doesnt works when editor uses the value of the string May 13 15:12:08 Good morning. If you guys could help me with a little problem I'm having i would be very grateful. May 13 15:12:09 in the meantime, i'm having a problem with starting that intent breaking communication in my webview. do i have to pass the intent around until i'm ready to create the tun? May 13 15:12:23 FrancescoV: nice May 13 15:13:08 csst0111: Ah, that's true. I guess you could disable this feature entirely. May 13 15:13:13 The "auto-expand string" thing. May 13 15:13:41 oh ok I thought there was a way without using the mouse :( May 13 15:13:53 I wrote a library to be used with android but when I export it from eclipse and add it to the new project build path im getting a NoClassDefFoundError May 13 15:15:32 I guess you can try Ctrl+NumPad(+), Right Arrow, Ctrl+B. May 13 15:15:35 But it's a bit of a handful. May 13 15:16:57 wow TacticalJoke ! ctrl+ NumPad(+) does the job! Not handy but better than mouse May 13 15:16:59 Anyone taken a look at that RxJava Architecture stuff? Any opinions? May 13 15:17:51 Note that you can use Ctrl+Shift+NumPad(+) to expand *everything*. May 13 15:17:56 can be used by just having a nested drawable, why can't scale be used in the same way? May 13 15:17:57 Without Shift, it expands only the selected thing. May 13 15:19:23 GitHub is very helpful today... May 13 15:19:29 https://github.com/zxing/zxing/issues/379 May 13 15:21:57 thats true I often use the "expand everything" shortcut in java files. Didn't think to try it on xml May 13 15:24:25 @all: have anyone ever implemented/seen the "option c rest pattern for android" from Google I/O 2010? https://www.youtube.com/watch?v=xHXn3Kg2IQE May 13 15:24:33 can someone help me find a way to get the raw bytes from a aztec code? May 13 15:25:01 by Virgil Dobjanschi May 13 15:25:58 the presentation leave some missing points bout how to deal with some rest commands May 13 15:29:30 TacticalJoke: how can i find out at what part of a library things go wrong? May 13 15:29:49 Hello I have a weird behavior with videoview , il always telling me I/VideoView( 6765): Layout changed,left=0 top=0 right=1065 bottom=523 , with the SAME values. May 13 15:30:02 lepourquoi, (I don't change my layout at all) May 13 15:30:54 Well i figured it out of anyone if anyone is curious. May 13 15:31:38 ReScO: If you figure that out, you have solved the universe. May 13 15:32:04 Lol May 13 15:32:15 Sure feels like it May 13 15:32:49 TacticalJoke: a getRawBytes() function keeps returning null where it shouldn't May 13 15:32:54 (The Videoview in inside a fragment) May 13 15:34:33 I'd check the source. May 13 15:34:39 Assuming it's open source. May 13 15:34:47 It is, it's the ZXing lib May 13 15:43:18 When unit testing RxJava in an MVP architecture, should I inject the Schedulers so I can use the immediate scheduler for my tests? May 13 15:44:17 Could someone please help me with this issue? :( https://github.com/zxing/zxing/issues/379 May 13 15:45:14 ReScO: Your initial report was so bad. May 13 15:45:21 Totally wasted an opportunity to get help. May 13 15:46:05 Github is not a help forum May 13 15:46:34 If you fork the repo, write a test that reproduces the error, then people might help you May 13 15:53:04 I'm calling LocationServices.FusedLocationApi.getLastLocation() from a service, the location is returned fine when the main app is in the foreground, but when the app is in the background, the location returned is always null. Is there a way to get a GPS location in a background service? May 13 15:53:19 TacticalJoke: i suck at making reports ._. May 13 15:53:34 especially when i don't know where to look and what the error exactly is. May 13 15:53:39 And my english sucks. May 13 15:53:49 for long explanations, at least.... May 13 15:54:43 So i’m really in a jam with an app that is supposed to download images from the web and show them in an ImagePager. I’ve confused myself to the point where I don’t have any overview. Is there anyone who would be willing to lend their eyes to my code and maybe point me in the right direction? May 13 15:54:50 JakeWharton: filters worked great for my form validated observables, thanks for all your help yesterday! May 13 15:55:19 great. that's definitely the better approach in almost all cases with regard to handling errors May 13 15:55:38 yeah, so much better May 13 15:55:57 ReScO: Read the documentation, read the code, read everything. May 13 15:56:16 and observeOn() made sure my filters could set errors on the fields without causing thread errors May 13 15:56:24 TacticalJoke: have been doing that for about 7 hours now, still no results May 13 16:07:07 What would be the easiest way to run animations smoothly after one another? May 13 16:07:25 I mean I first have an infinite rotation and then I want to scale it seamlessly May 13 16:08:58 hi May 13 16:09:19 how difficult is it to build a video conferencing app that lets you make video calls 1:1 ? May 13 16:09:56 does android come with a video streaming api? May 13 16:10:06 or does one need to code this from scratch May 13 16:14:32 Hey there. I'm having a problem with the style of a PreferenceFragment since AppCompat v22.1: The preferencefragment does not use my defined theme at all. May 13 16:15:12 I have tried setting the theme in multiple places (manifest, inside the activity, inside the fragment) but nothing helps. May 13 16:16:22 The only time the style actually gets updated is when i use android.R.id.content as the containerViewId. My own view Id results in a weird theme which i have not set May 13 16:16:38 any ideas? May 13 16:20:42 ok turns out the black screen thing was my fault May 13 16:22:15 so my last tirade and policy suggestions to google were triggered by problem i was unfairly attributing to android. but otoh its still somewhat androids fault for having such a high prior probability of being source of problem May 13 16:23:08 Why can't I inject views with butterknife in an espresso test? May 13 16:23:24 ButterKnife.inject(this, activityRule.getActivity); May 13 16:23:31 null pointers every time May 13 16:23:49 ThinThread: Kudos on the follow-up. May 13 16:36:19 joshkovach: turn on BK logging May 13 16:36:52 My guess would be that the annotation processor did not run for your test code May 13 16:37:02 is it just me, or is there a bug in the 22.1 support lib, where onActivityResult doesn't get passed down to the child fragments? May 13 16:39:29 AdamJB: I don't know about 22.1, but I've seen this kinda thing a lot of times before: http://stackoverflow.com/questions/6147884/onactivityresult-not-being-called-in-fragment May 13 16:39:59 Unless you're talking nested fragments (in which case no idea). May 13 16:40:30 i'm calling super, placed breakpoints inside the 22.1 FragmentActivity onActivityResult() and looks like the requstCode needs to be greater than 16 bits for it to even go through this path. May 13 16:41:16 Is the fragment or the activity calling startActivityForResult? May 13 16:41:31 Yup. May 13 16:41:51 in mockito, can you mock the same object.method response twice? May 13 16:42:02 To be more precise, I'm using the new Google Maps Settings API to launch the settings dialog thing. May 13 16:42:04 That was more of an either-or than a yes-or-no. May 13 16:42:50 Indirectly, startIntentSenderForResult() is called. May 13 16:43:38 when(myMock.doThing()).thenThrow(new Exception()); when(myMock.doThing()).thenReturn("It works!"); May 13 16:44:07 seems like the second time it's called, it's actually performing using the mocked out behavior May 13 16:45:07 Mockito.reset() seems promising... I think I'll try it out May 13 16:46:14 <_genuser_> has anybody upgraded their existing phone to android 5 (lollipop) ? May 13 16:46:19 ironically, it gets called when I set my request code larger than 65536 :) May 13 16:46:46 <_genuser_> I'm noticing my application is horrendously slow on the same hardware after an upgrade to lollipop. May 13 16:47:19 <_genuser_> backgrounds tasks that took 2 seconds now take 10 seconds. this is on samsung s4. meanwhile my note II is doing the same thing in 4seconds. May 13 16:47:52 <_genuser_> so I have newer hardware / OS and slower processing times. curious to see if anyone else has done some benchmarks May 13 16:48:40 If anything, I'd expect higher speed with AOT. May 13 16:48:43 In general. May 13 16:48:51 <_genuser_> aot? May 13 16:49:14 Ahead-of-time compliation (as opposed to just-in-time compilation) May 13 16:49:25 well, this is annoying... running espresso tests doesn't print out the message of an AssertionFailedError in the output in android studio... May 13 16:50:11 joshkovach: Are you running them with the normal IntelliJ test runner? May 13 16:50:22 <_genuser_> TacticalJoke: I see. I see data compressing, file i/o type stuff, that has really slowed down. the rest of the OS itself and my other app has stayed the same. responsive etc. May 13 16:50:46 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" May 13 16:51:00 @RunWith(AndroidJUnit4.class) May 13 16:53:42 TacticalJoke: Thnx for the link earlier. Though I think I found out why, after diving into the source of startActivityForResult() , there's another hidden method that is supposed to be called when launching from a fragment. May 13 16:59:40 @all: have anyone ever implemented/seen the "option c rest pattern for android" from Google I/O 2010? https://www.youtube.com/watch?v=xHXn3Kg2IQE (by Virgil Dobjanschi) May 13 17:00:07 the presentation leave some missing points bout how to deal with some rest commands May 13 17:01:10 if you try to query an item that has not yet being downloaded, and you get a database miss May 13 17:01:40 who should force the sync: the caller or the content provider? May 13 17:07:08 Hello May 13 17:08:01 Please tell me: what is the recommended way to stream videos in apps? May 13 17:10:01 There is a youtube video I made and I want to stream it without requiring the „Youtube” app. Please tell me: What is the recommended way to do this? May 13 17:11:43 what's a good mnemonic for save/cancel in the actionbar for modal fragments? May 13 17:11:57 like editing forms and settings that require saving May 13 17:13:00 ah, calendar has this May 13 17:21:48 ppklomPolak: streaming to what? server? PC? TV? directly to youtube? :o May 13 17:22:17 Ashiren to a View inside my app May 13 17:22:58 you want to play video :? May 13 17:23:20 Ashiren Yes May 13 17:24:08 use MediaPlayer May 13 17:24:20 https://developer.android.com/reference/android/media/MediaPlayer.html May 13 17:24:37 and example http://code.tutsplus.com/tutorials/streaming-video-in-android-apps--cms-19888 May 13 17:24:59 Ashiren becuase this „ case 3: startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube:42Xjdy_gG_o"))); break;” requires an external app May 13 17:25:58 thanks Ashiren. Does tjis MeeediaPlayer class allow autoplay ? May 13 17:26:10 *this Mediaplayer May 13 17:26:49 for youtube in your app there is youtube API but would still require native youtube app. May 13 17:28:28 Hello everyone! I could need some help. I am trying to migrate my (old) app to material design/flow and i am trying to use the NavigationDrawer but i am not sure how i can bring my old activities into it May 13 17:28:57 styler2go I'm a noob but I've read about AppCompatLibraray May 13 17:29:03 maybe you should try it? May 13 17:29:09 I am using that already :) May 13 17:29:21 :) May 13 17:29:26 but i am not sure as what i should use my old acitivties.. fragments? May 13 17:29:31 AppCompatacitivty? May 13 17:29:33 no idea :/ May 13 17:29:40 Wish I knew May 13 17:31:38 FYI: ok I'm reading the links through May 13 17:35:33 Any ideas why I just installed the android sdk, and it's in my user dir on osx, but when i try to run ./android I get permission denied, I try to run sudo ./android I authenticate, but then it says command not found to ./android May 13 17:39:01 Ashiren teh lin kin the video in teh example is „https://archive.org/download/ksnn_compilation_master_the_internet/ksnn_compilation_master_the_internet_512kb.mp4. Youtube links don't have such .mp4 file format. Do I need to get direct video URL from YouTube so it will also be .mp4? May 13 17:39:02 eghdk: chmod +x /Users/{your_user_name}/Library/Android/sdk/tools/android May 13 17:40:13 ppklomPolak: for youtube theres youtube API. it would be hacky to get direct .mp4 from youtube May 13 17:41:03 ok then, Ashiren . How to use the example with API? May 13 17:41:09 treelzebub: Any idea why the sdk manager by default isn't open to being used? May 13 17:41:27 eghdk what do you mean? May 13 17:41:43 eghdk: you have to manually set +x permissions on all unix-like OSs. it's a unix thing, not an android thing. May 13 17:42:22 Well... I installed the android sdk. Why by default can I not launch sdk manager. All my other apple machines I've been able to do it without any chmod commands. I thought maybe someone knew why something changed May 13 17:43:14 technically it's not an install, but an unzip. May 13 17:43:20 eghdk, did sdk manager work before on Linux? May 13 17:43:34 How diddd you try to start sdk manager? May 13 17:43:47 I've always started it with ./android May 13 17:44:08 Ashiren ? May 13 17:44:31 and today, I got a new machine. I installed AS 1.2, but pressing the SDK manager button wasn't working... I went to try to start it via cmd line.... but I got permission denied. Just thought it was weird. May 13 17:45:15 eghdk what is the sdk-tools direcotry? May 13 17:46:04 ppklomPolak: sorry dunno much about streaming from youtube explicitly May 13 17:46:09 "/Users/eghdk/Library/Android/sdk" May 13 17:46:18 Ashiren ok thanks anyway May 13 17:46:39 eghdk and what is your username? May 13 17:46:49 I mean on your Linux OS May 13 17:47:26 I'm on osx. May 13 17:47:40 ok whaatever it shoudl work anyway May 13 17:47:42 My search view is not expanding into an actual search field when I click on it, I'm using the support library and I've followed all of the search tutorials I can find. Any idea of what I might be doing wrong? May 13 17:47:49 I mean I did the chmod and it worked. I'm just curious why it needed it. May 13 17:48:51 The icon appears correctly btw. May 13 17:49:05 GRRR, you should have made that clearer. It's because chmod changed the permissions of the sdk manager May 13 17:49:28 eghdk: seriously, it's because the files were unzipped, not created/modded by an installer. unzipped files cannot set +x May 13 17:50:14 on themselves. is for security reasons May 13 17:50:40 ppklomPolak: I know that. The advice to use chmowas from treelzebub, my first question here was "why cant I open sdk manager via command line" May 13 17:51:20 It wasn't "how to make it run via cmd line". I was curious if anyone knew any specific reason why it was acting weird from previous installs. May 13 17:52:07 treelzebub: Thanks. That makes sens "unzipped files cannot set +x on themselves" May 13 17:52:56 fileees can be zipped their permissions. Some extractors might ignore them though. May 13 17:53:37 so apparently a ViewObservable.clicks() will unsubscribe if my stream reaches the subscribe() event... Shouldn't something like that continue to work on subsequent clicks? Or do I have to resubscribe after every successful stream completion? May 13 17:53:42 Yeah, well it doesn't make sense to me because I downloaded android studio, and it installed sdk for me in the begining. For some reason it still didn't work though. May 13 17:54:53 how do i start an fragment? o.O May 13 17:56:11 styler2go by reading the docs May 13 17:56:18 styler2go: Start? You mean add a fragment to an activity? May 13 17:56:29 +1 g00s May 13 17:57:03 i made a fragement and a fragmentmanager but now i am missing the part what i have to add to launch it May 13 17:57:16 fragmentManager.beginTransaction().replace(R.id.container, ActivityBattle.getInstance()).commit(); May 13 18:00:42 holy.. it's working.. oh god i love stackoverflow :D May 13 18:02:34 styler2go: If you're holding a static reference to a Fragment then I guess you're gonna leak memory. May 13 18:02:57 Also, it doesn't make sense to call a fragment "ActivityBattle". May 13 18:03:28 i am merging everything right now, and before it was activity, not finally done so yeah, thanks for that hint :) May 13 18:06:28 I've followed the tutorials, but I can't get the search icon to expand into a search field when I click on it. How do I accomplish this with the android support library? May 13 18:08:15 i have this in my app recursor94. u can simply use something like: SearchView searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView(); May 13 18:08:30 and then append a listener: searchView.setOnQueryTextListener( May 13 18:11:54 Hello , when I launch a video (Videoview) I have a LOT of SurfaceFlinger warnings (like this : W/SurfaceFlinger( 1359): clip 209 15 906 537) , sometimes it is leading to crash of the system , any clue ? May 13 18:13:09 anyone can help me w/ this http://stackoverflow.com/questions/30221759/cant-animate-custom-view/30221904 ? May 13 18:13:29 its just a ccustom view im trying to animate. I'm extending TextView May 13 18:14:25 and I just removed the code which is on init() from MainActivity to the custom view - nothing else May 13 18:16:39 TacticalJoke: how were you able to tell that he was holding a static ref to a fragment? May 13 18:18:08 JakeWharton listening last night to a conversation with joshkovach & retrofit, it sounded like you were going to change the error handling policy to something like Observable getX() not returning errors ? if thats the case, have you decided where errors would go, some other Observable ? May 13 18:18:58 No, Observable> May 13 18:19:02 Observable May 13 18:19:32 eghdk: ClassName.getInstance() May 13 18:20:02 JakeWharton ok, and Result<> would have some code for error / success ? May 13 18:20:17 yeah i'm facing a similar situation :) May 13 18:20:32 g00s: if I get an error from my retrofit call, I do .onErrorResumeNext(), and if it's a 401, I show a toast and instead tried to return null, but that didn't work, so I returned an empty Token() instance and handle it in success if the token is invalid May 13 18:20:45 TacticalJoke: changed to new FragmentClass() May 13 18:20:54 I guess I could filter that as well... May 13 18:21:09 Yes. Data is better than onError May 13 18:21:44 TacticalJoke: Wait... getInstance isn't a method on Activity right... you assumed that he made it static/singleton? Just making sure I understand how you came to that concolusion... cuz I didn't catch that. May 13 18:22:48 JakeWharton thanks May 13 18:25:01 Does anybody know why MenuItemCompat.getActionView() might always return null, even if there is an action view there? May 13 18:25:06 I guess my biggest question right now is why my ViewObservable.clicks() subscriber gets onComplete() after it's first onNext() May 13 18:27:13 I have the search view set to showasaction:always, May 13 18:28:10 is there a way to use setScaleX on an ImageView and let it clip on purpose? May 13 18:28:27 eghdk: ClassName.getInstance would have to be a static method. "getInstance" is the typical name for a singleton implementation, which typically entails a static variable holding the instance (e.g., `public static Foo getInstance() { if (instance == null) { instance = new Foo(); } return instance; }`). May 13 18:28:29 I want it to stretch horizontally May 13 18:28:43 is there a linter or analyzer for themes and styles? May 13 18:29:19 Gotcha. Just wanted to make sure. Good catch man. I didn't pick that up. May 13 18:30:54 I’m running into issues where Android Studio says it can’t find styles that are part of the AppCompat v7 library May 13 18:32:41 Hope someone can answer this question for me. I have a service acting like a server. It's just sitting there doing cool stuff. I want to be able to display some output of what it does in a textView. I see three options. May 13 18:32:47 1. In my activity I start the service and pass it a textView so that it can update it from there. via the View.post() method 2. I start the service in my activity and register a callback of some sort so that everytime it "completes" or something I will know in the activity. 3. Make the service broadcast stuff with LocalBroadcastReceiver and the activity can just register to listen for it. May 13 18:33:54 eghdk, I use option 2 May 13 18:33:59 I found the answer to my problem, apparently I have to app:actionview class in addition to android:actionViewClass. That's pretty bizarre May 13 18:34:19 but it works. May 13 18:35:17 Nevermind, it isn't included in the android namespace at all in versions before api 11. That makes more sense. May 13 18:35:49 Any opinion on it TacticalJoke ? May 13 18:36:12 dragorn: Option 2? Really? I thought that that may be a bad way to do it. May 13 18:37:02 eghdk, I don't like passing UI into services because the UI may not be running at any given time May 13 18:37:39 eghdk, you can use local broadcast if you want, but unless you're doing multi-process stuff, callbacks through a binder work just fine. So does stuff like eventbus/ottobus. May 13 18:38:32 dragorn: I guess my question should then be... how would I implement a callback in a service so that someone can register for one. May 13 18:39:07 eghdk, I use the binder and then just make a callback class which implements them, instantiate it in the UI, and pass it via the binder May 13 18:39:23 eghdk, or more recently, just use ottobus to subscribe to the event generated by the service May 13 18:39:38 hey peeps May 13 18:41:29 dragorn: Oh so using the onbind methods in a service? I've never used them, so I'm just making sure I'm on the same page as you. May 13 18:42:32 dragorn: I would love to use one of those eventbus libs, but I can't on this project. can't have any external dependencies that aren't from google. :(: May 13 18:42:36 :( May 13 18:42:45 Do all of the search guidlines like creating a searchable.xml file still apply when using the support library? because my searchbar is not using the appropriate hint text. May 13 18:43:44 eghdk, yeah, you can either expose your service object directly, or use the binder object to broker talking to the service. May 13 18:44:52 Wait sorry dragorn I understood "use the binder to broker..." but you lost me at "you can either expose your service object directly". What do you mean expose it directly? May 13 18:46:08 you can get the service from the binder, or you can use the binder to call things in your service. May 13 18:46:15 I'd google for some service/binder examples May 13 18:46:56 eghdk, use a messagebug May 13 18:46:59 *messagebus May 13 18:47:05 But do you mean to expose my service as a singleton? May 13 18:47:07 eghdk, your service sends updates to the message bus May 13 18:47:17 and the activity/fragment/ui registeres on it to receive the events May 13 18:47:22 (or not if it doesn't exist) May 13 18:47:25 see EventBus or Otto May 13 18:47:31 Mavrik: Yeah, I want to use otto but the requirement for this project is no 3rd party libs, cept' for googles' May 13 18:47:33 hey peeps, i need some help with the ZXing library, who has experience with it? May 13 18:47:42 eghdk lolwut May 13 18:47:45 lolwut May 13 18:47:49 eghdk, lol, which moron said that :D May 13 18:47:55 eghdk, anyway, make your own then May 13 18:48:07 just copy/paste the sources from those library May 13 18:48:10 it's not really a hard pattern, especially if you loose coupling is what you want May 13 18:48:38 eghdk try to get rxjava in the project at least ;) May 13 18:48:43 lol. I know I know. I've used otto for event bus all the time. But now am confused by how to "do it by the book" you know? May 13 18:49:12 LocalBroadcastManager is the most event bussy thing May 13 18:49:13 by the book, its BDSM May 13 18:49:20 other than just normal listeners May 13 18:49:28 project specs are stupid. and big nerd ranch says not to use onbind for a service. but dragorn suggested to use it. May 13 18:49:38 Yes or No: is this a proper package name: com.gmail.ppklom OR com.gmail.ppklom.talithakum ?? May 13 18:49:49 I thought LocalBroadcastReceiver would work... but I'd like adroid-devs opinion. May 13 18:50:06 you can choose any package name May 13 18:50:36 ppklomPolak: it's a valid package name. whether it's "okay" as per the play store DDA, I can't say. May 13 18:51:07 JakeWharton: So for my question example that I gave... you would suggest to use LocalBroadcastReceiver? May 13 18:51:08 ok Ashiren I know but „6. Paste the SHA-1 key and your project’s package name separated by semicolon(;).” says I need to put my package name after semi cologne. What shoudl it be? May 13 18:51:34 hey guys, is it bad practice to use e.printStackTrace() in android production app May 13 18:51:41 i would not use local broadcasts May 13 18:51:48 way too much boilerplate and ceremony May 13 18:51:52 thanks Jesus May 13 18:51:53 I'm trying to get two people talking using Parse. Is someone familiar with Parse? May 13 18:51:53 i would just register listeners May 13 18:52:02 ppklomPolak: the second(?) line in your android manifest May 13 18:52:05 ppklomPolak: the package name is set in the application's AndroidManifest.xml May 13 18:52:12 Hmm... I wonder if someone crazy enough could use GCM for that May 13 18:52:16 You should use whatever's set there May 13 18:52:30 package="com.gmail.ppklom.talithakum" May 13 18:52:34 *cough* May 13 18:52:37 eeyup May 13 18:52:37 JakeWharton: Cool. So registering listeners would mean using onBind? May 13 18:52:41 the package name is set in build.gradle if you're using gradle May 13 18:52:45 not androidmanifest :) May 13 18:52:51 to what? a service? May 13 18:52:57 Mavrik: there is no build.gradle in the apk ;) May 13 18:52:59 ok So I'' input „com.gmail.ppklom.talithakum”bb into there thank you people May 13 18:53:17 Mavrik: why not both May 13 18:53:23 JesusFreke, yes, however Gradle plugin will overwrite the package set in AndroidManifest.xml at build time May 13 18:53:33 which leads to a bit of confusion for some people :) May 13 18:53:49 JakeWharton: I'm trying to have a service essentially run as a server, and then when the user is in the MainActivity the textView will print out what the server is doing. May 13 18:54:11 eghdk if your requirement to only use google libs is unflexible, you can investigate looking at Google Tag Manager events on DataLayer properties May 13 18:54:15 ppklomPolak: fwiw, I would recommend avoiding trademarked terms in your package name, unless you own the trademark or otherwise have permission to use them. May 13 18:54:19 so yes, a service to answer your question May 13 18:54:31 and since GTM is uh Google, then it should be ok :) May 13 18:54:51 eghdk: gotcha. i'm not really sure in that case. i'm not sure exactly how binding to services works since i've always just used other mechanisms May 13 18:54:57 JesusFreke is using my gmail as package name a trademark violation? May 13 18:55:05 but your use case is basically exactly what LocalBroadcastManager was created for May 13 18:55:16 Ittt is a recommmednation on top Google result May 13 18:55:24 really? May 13 18:55:29 Well. Now I just want to know how this shit was done before all these awesome libs were made. May 13 18:55:33 ppklomPolak: I'm not a lawyer, I have no idea :) May 13 18:56:02 eghdk, public static void registerServiceEventListener(MyAwesomeListener l) May 13 18:56:07 eghdk yeah, one of the first libs i ever dragged in was guava eventbus ;P May 13 18:56:07 on the service :) May 13 18:56:13 but my thinking is, if you can avoid it, why risk it? May 13 18:56:14 but it got the boot :D May 13 18:56:37 Not it's just a challenge to have it work with no libs at all. hahah. But Okay JakeWharton I appreciate your advice. LocalBroadcastReceiver is a pain with boilerplate but it's not too bad. I was REALLY just curious whether an activity can register for callbacks from a Service. May 13 18:56:54 Now* it's just a challenge May 13 18:57:07 But sseriously why would anyone think that I'm trying to make the impression Ii own  „gmail” trademark just becuase III use it as my package name? May 13 18:57:10 Service is just an object, so yes, it can. May 13 18:57:22 Is someone willing to help me with an idea to an app involving using Parse to get two people to conversate please? Thank you! May 13 18:57:40 raresian I wish I could help you May 13 18:57:47 eghdk https://developers.google.com/tag-manager/android/v4/#push May 13 18:58:04 raresian Have you read through teh docs? May 13 18:58:08 I would just use LocalBroadcastReceiver. Like JakeWharton said, that's essentially what it was made for. May 13 18:58:34 ppklomPolak: It's not really a technical problem May 13 18:58:49 aha May 13 18:58:59 ppklomPolak: Can I send you a private message ? May 13 18:59:04 yes May 13 18:59:17 if you can :P May 13 19:01:22 Okay Mavrik I'm going to try to come up with something later. Good point that it's just an object, so I should be able to do it. Do you know if I'll need to use any onBind methods though? Or I should be able to do it completely without it. dragorn what do you think about just setting up a plain interface in my service class for callbacks? May 13 19:05:22 when retrofit raises an http error, does it actually throw it? or does it return an Observable.error(RetrofitError)? May 13 19:05:36 it calls subscriber.onError May 13 19:05:46 ok May 13 19:06:17 https://github.com/square/retrofit/blob/2f4caa6f5df8e7f47a881266bbfc723f537b0b47/retrofit/src/main/java/retrofit/RxSupport.java#L51-L60 May 13 19:08:56 is there a good mechanism for a thread or intentservice to 'poke' the application to do something in the UI thread? May 13 19:09:22 Did we just go through this :P May 13 19:09:27 haha really? May 13 19:09:29 oof, sorry May 13 19:09:50 Mavrik judging by how often this question is asked ... the APIs have failed in some way May 13 19:10:12 g00s, mhm. May 13 19:10:34 g00s, on the other hand, people whine because they don't know how to make a FAB May 13 19:10:41 so I kinda lost my sympathy May 13 19:10:47 Mavrik those people will have their FAB soon May 13 19:10:57 but I say, DEATH TO THE FAB May 13 19:13:28 just use a fab library, why can't people just do that May 13 19:13:37 that one dudes is pretty reasonable May 13 19:14:41 Apparently they don't want to, because if it's not from Google it's from THE DEVIL May 13 19:14:48 (or so I heard) May 13 19:14:55 I don't think they complain because they can't make a FAB, but because they shouldn't have to invent something that should have a standard implementation. May 13 19:14:56 some people... May 13 19:15:41 thebishop: see http://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable) May 13 19:16:02 also, you could consider using a Handler May 13 19:16:29 i agree they shouldn't have to though. when the actionbar first came out, iosched implementation was a LinearLayout with a blue background or something :D and then that became something more added to HC, and then ABS ... and then we have ToolBar May 13 19:17:08 its pretty dumb to argue that standard idioms in android, as used by google, should be up to interpreatation by 3rd party libs May 13 19:17:12 The new AppCompat changes look really promising to me. Finally we're getting the stuff we need. May 13 19:17:21 Yeah, exactly. May 13 19:17:27 Also, I shared your hatred for FABs. :D May 13 19:17:32 At least in most cases May 13 19:19:13 I on the other hand think they're fabulous. May 13 19:19:23 absolutely ... not :D May 13 19:19:36 iswydt :p May 13 19:20:45 ErnestG: https://youtu.be/mYkB5f1X-yM?t=22s May 13 19:21:00 I guess I should leave now. Puns are a way of telling myself I've been at work for too long. ☺ May 13 19:21:30 where can I get a drawable triangle resource pointing to the right? May 13 19:21:43 I have lost my entire evening trying to tweak something I have here May 13 19:22:12 TacticalJoke: hah. Good one. Pretty recent too. May 13 19:22:51 Papipo: in xml you can pivot a square May 13 19:22:52 lol May 13 19:22:56 that's what i did and it worked out pretty well May 13 19:23:01 I have that May 13 19:23:31 the triangle spans just the half of the drawable May 13 19:23:51 can I clip/crop that somehow? May 13 19:26:30 Papipo, maybe check http://developer.android.com/guide/topics/resources/drawable-resource.html#Clip May 13 19:26:47 another option is to use this but then I need to be able to position it properly May 13 19:26:47 there are many ways to achieve what you ask, from rotating a square and clipping it May 13 19:26:58 it's for a video, the typical triangle overlay May 13 19:26:59 to drawing yourself the 3 lines of the triangle May 13 19:27:07 via using a custom view in a canvas, etc... May 13 19:27:18 sure, but none of them seem to be human friendly May 13 19:28:11 why not using a simple image? May 13 19:28:24 i cannot see something more user friendly than that May 13 19:28:46 I guess I want something elastic May 13 19:29:00 for any viewport, device, orientation, whatever May 13 19:29:16 where do you put your triangle? May 13 19:29:18 JesusFreke, thank you! and i have looked at handlers. i might go that route May 13 19:29:40 on top of a video May 13 19:29:57 I have a relative layout to position a frame layout just in the middle May 13 19:30:03 you might have performance issue, because this will create overdraw May 13 19:30:07 which spans half the width and height May 13 19:30:12 maybe you should find a way to inject it in the video frame directly May 13 19:30:17 :p good luck May 13 19:30:19 sigh May 13 19:30:28 seriously xD May 13 19:30:36 yes and no May 13 19:31:00 thebishop: well, if you look at the implementation of runOnUIThread, it's just using a Handler anyway :) May 13 19:31:01 but for sure, if you put a view on top of another where the one behind changes, you will have overdraw May 13 19:31:20 if the area is tiny, it should be ok though May 13 19:31:29 when the overlay is clicked, I set it to invisible May 13 19:31:33 and play the video May 13 19:31:39 thebishop: e.g. https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/Activity.java#5289 :) May 13 19:31:41 the triangle is for "play" button? May 13 19:31:45 correct May 13 19:32:00 you should really use some png with different dpi May 13 19:32:04 that should be more than sufficient May 13 19:32:29 http://romannurik.github.io/AndroidAssetStudio/icons-generic.html check clipart and search for play May 13 19:32:37 there are other "multimedia" controls May 13 19:32:51 and they are material icons May 13 19:32:51 thanks May 13 19:32:57 android beat me today May 13 19:35:03 at least I got that site May 13 19:35:06 thanks for the URL May 13 19:35:25 np, very useful May 13 19:35:42 and you're not alone spending crazy amount of time for ridiculous things May 13 19:35:58 seems more and more specific to android dev May 13 19:36:28 and that frustrates me a lot after years on this platform May 13 19:36:46 (have not even yet started to rant on tools and doc) May 13 19:40:04 is there a way to tell Android Studio that I really do not care that it can’t find a style, and to force it to render a preview? May 13 19:40:43 s73v3r, Take the style out temporarily? That's what I do usually May 13 19:41:01 it’s not my style May 13 19:41:09 it’s something from AppCompat v7: actionModePopupWindowStyle May 13 19:41:10 Ah, I dunno then May 13 19:41:58 I asked it before but lets try once more cause it's driving me crazy :/ May 13 19:42:02 anyone can help me w/ this http://stackoverflow.com/questions/30221759/cant-animate-custom-view/30221904 ? May 13 19:42:35 s73v3r you can tell it what style to use O.o May 13 19:42:49 every style I give it does the same thing May 13 19:43:16 it says “Rendering Problem: Failed to find style 'actionModePopupWindowStyle' in current theme” May 13 19:43:26 s73v3r, pick a style from the dropdown at the top of preview May 13 19:43:48 I’ve done that. Like I said, this issue pops up for every style I choose May 13 19:44:13 gottaGO, try to postpone in time your animation, when onCreate is called to start your anim, the view is not yet visible May 13 19:44:14 * pfn shrugs May 13 19:44:16 * pfn doesn't use preview May 13 19:44:30 how do you design layouts then? May 13 19:44:53 cause I’m really not wanting to add something, run, go to the screen, check it out, adjust, and repeat May 13 19:44:59 gottaGO, try to put a simple test button to start and test your animation May 13 19:45:06 adq, I animate way later onMapReady() May 13 19:45:12 s73v3r, create a simple layout for preview purposes May 13 19:45:15 adq, thats a cool idea!! ;) May 13 19:45:17 move it into final layout file as necessary May 13 19:45:54 adq, yes thats what im gonna do right now. May 13 19:48:40 adq: got it working in no time with the images T_T May 13 19:49:23 o/ May 13 19:50:25 The project needs support for UTF-8 chcracters. The „” causes „Error:(28) Tag attribute name has invalid character 'Z'.” How to fix this? May 13 19:50:50 switch your project and files to utf8 May 13 19:51:07 (in the settings, somewhere) May 13 19:51:20 adq in teh status bar UTF-8 is shown in bottom status bar for evry file May 13 19:53:16 What should I do? I have too many file names with these UTF8 characters but they are error causing when building May 13 19:53:34 well don't put non-ascii chars in package name ffs May 13 19:53:46 that's just silly May 13 19:54:43 lol, and i doubt you own gmail.com domain to use it as part of your packagename May 13 19:54:52 (don't do that) May 13 19:55:42 hi May 13 19:57:53 hi whats a good audio library for android os x linux and windows May 13 19:57:58 ppklomPolak: class names need to be ASCII May 13 19:58:00 i want cross platform May 13 19:58:15 hi p_l May 13 19:58:27 also, anyone here works with Knox/Samsung EMM? May 13 19:58:32 Can i have a SearchView in a Fragment? May 13 19:58:46 ActionBar SearchView May 13 19:58:51 p_l Ii know someone who works as Samsung Developer May 13 20:00:12 I need to find out if I can "give root" (aka system) permission to application pushed through EMM/Knox May 13 20:06:08 Hi! question: I recently updated our project, and I messed up the BackStacking. Before, the project consisted of 1 mapfragment, inside a navigation drawer view. Presisng Back would ¨close¨ the app, and after reopening it would restart. May 13 20:06:59 Now, we have the mapfragment and another fragement in a viewpager. Restarting the app after pressing back now shows an empty viewpager, no map, no other fragment May 13 20:07:25 adq, doesnt work even with a button listening for clicks May 13 20:07:47 Other fragments that are all added later are all added and popped from the backstack correctly, but we didnt do anything with the backstack upon adding the mapfragment, and it worked correctly. May 13 20:08:03 Now we instantiate the viewpager, which handles the adding of the fragments internally. May 13 20:08:32 How would I get it so that after pressing back and going back to the main screen of the phone, and then restarting the app, it really restarts? May 13 20:13:27 I really need help, i've tried everything and i'm actually stuck! please, someone help me! May 13 20:14:09 ZXing's barcode scanner lib keeps returning a null value for getRawBytes() and i can't find the problem, i've stepped through the code manually but i came up blank, someone PLEASE help May 13 20:17:57 what does this mean? java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.test.espresso.intent.OngoingStubbing android.support.test.espresso.intent.Intents.internalIntending(org.hamcrest.Matcher)' on a null object reference May 13 20:18:33 happens when I try to stub an intent in espresso: intending(toPackage(PACKAGE_ANDROID_SETTINGS)).respondWith(new Instrumentation.ActivityResult(Activity.RESULT_OK, null)); May 13 20:18:40 Hi, I’m using square retrofit trying to post to a form in exchange for a token. I’m getting this odd error where I post but I get back 405 GET not allowed http://pastie.org/private/v9gmo7xuqewb9uvj0i6umw May 13 20:19:45 pzero, uhm, the error is very straightforward? May 13 20:19:56 You're doing a GET request and the server allows only POST and OPTIONS? May 13 20:19:56 Is it? It says I’m sending POST, but can’t GET. May 13 20:20:03 It even TELLS you that in the header and that log May 13 20:20:09 no. May 13 20:20:15 I’m missing something embarrassingly obvious. May 13 20:20:17 ah. May 13 20:20:19 wow. May 13 20:20:21 yeah, I see now May 13 20:20:25 oh, ok. phew. May 13 20:20:43 pzero, it seems like a server issue tbh May 13 20:20:49 the server is working fine for an angular app which sends POST May 13 20:20:50 routing messup May 13 20:21:12 hi May 13 20:21:24 what partition holds APN settings? May 13 20:21:29 pzero, maybe it doesn't like the UTF-8 in the header? May 13 20:21:38 or needs a slash at the end of URL? May 13 20:21:44 having trouble flashing my Virgin Mobile USA phone May 13 20:22:56 pzero, if push comes to shove, take Charles proxy and see what exactly it's different between your and angular request :) May 13 20:23:12 what's a good library for image manipulations? May 13 20:23:22 Thanks Mavrik, I’ll experiment May 13 20:23:23 and animations May 13 20:23:44 lostProgrammer, define "manipulations"? May 13 20:24:10 Mavrik: you were right. / needed at the end. May 13 20:24:19 with espresso-intents, is there a way of preventing the intent from actually launching an outside activity? May 13 20:24:30 Thank you for saving me a few hours May 13 20:24:46 pzero, yeah, some frameworks are dumb like that, np May 13 20:25:34 TacticalJoke: around? https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/aztec/decoder/Decoder.java#L79 appears to be the issue, what do i need to do to add raw bytes functionality? May 13 20:26:49 zooming in and out smoothly, cropping selected part of the image and magnifying that part, like with an house of mirror May 13 20:26:59 which make ur nose look bigger...etc... May 13 20:27:18 any library like that? May 13 20:29:47 I can't get the raw bytes from a Aztec Barcode, https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/aztec/decoder/Decoder.java#L79 appears to be the issue, what do i need to do to add raw bytes functionality? May 13 20:35:15 clear May 13 20:37:28 fail May 13 20:38:23 crap! now I can't see the backlog! ;) May 13 20:39:32 can I delay activity launching when using IntentsTestRule like I can with ActivityTestRule? May 13 20:39:42 * wakelock hands JesusFreke some pepper spray, they say that helps May 13 20:41:07 guys, i'm trying to get the raw bytes from an Aztec Barcode, but the library is bugged, what can i do to get the raw Bytes? https://github.com/BRAINBLENDr/AztecCollect/issues/2 May 13 20:41:19 See issue for code and more info... May 13 20:41:54 maybe you should try asking the author of the library? :) May 13 20:42:12 nah, that would make too much sense May 13 20:43:17 JesusFreke: he's like, i'm not maintaining this shit anymore, Do it yourself May 13 20:43:24 hm, never before heard of this aztec code May 13 20:43:49 wakelock: http://en.wikipedia.org/wiki/Aztec_Code May 13 20:44:13 yeah I got it May 13 20:44:49 But yeah, the ZXing dev is letting everyone make Pull Requests, everybody maintains it May 13 20:45:15 It's above my knowledge (for now) on how to fix the getRawBytes() issue, if that is fixed, i can finish my app... May 13 20:46:10 they say some people work best in a pinch ;) May 13 20:47:09 wakelock: i've been stuck on this for two days, now i've pinpointed the issue, but i have NO clue how to fix it May 13 20:47:27 it's not my code, and i don't understand a damn thing on how this library works May 13 20:48:39 Chainfire: you around? May 13 20:48:51 You seem to know android like a boss, as far as i know May 13 20:48:52 looks like you'll might need to figure it out though May 13 20:49:12 i wish i could :( May 13 20:49:22 you can if you put your mind to it May 13 20:49:52 no, i really can't May 13 20:50:44 i hate to admit that i can't do something May 13 20:50:49 but this is above me May 13 20:51:59 Does anyone know who I can make it so I have a LinearLayout with 2 RecyclerViews and those RecylcerViews do not scroll, but simple wrap in height and when I scroll i scroll through the main layout, not the recyclerview. May 13 20:53:38 if i get a question mark on a logcat entry what does it mean May 13 20:53:43 for the application name May 13 20:53:54 it means its not a debug build? May 13 20:58:36 Nick-S: screenshot? May 13 21:04:02 guys, i'm trying to get the raw bytes from an Aztec Barcode, but the library is bugged, what can i do to get the raw Bytes? https://github.com/BRAINBLENDr/AztecCollect/issues/2 May 13 21:04:10 See issue for code and more info... May 13 21:04:20 i think its because i must run in debug mode or something?! May 13 21:08:44 its depressing how bad search sucks in 2015. trying to find examples of 'rxjava using opererator' yealds - all the wrong things May 13 21:09:38 probably every rxjava article evar has 'using' in the body somewhere May 13 21:10:01 g00s: could you look into my issue? i'm extremely stuck May 13 21:10:14 so what is the advantage of these aztec codes over normal qr codes? May 13 21:10:58 wakelock: it's for a PoC project, it needs to get the raw bytes of the aztec code May 13 21:11:00 g00s, what is "opererator"? :p May 13 21:11:10 ReScO, not what I was asking May 13 21:11:22 yeah yeah, my search term is spelled correctly :) May 13 21:11:43 correceretly? :D May 13 21:12:57 g00s, "rxjava operator" (so no "using") seems to yield decent results May 13 21:13:08 depending on what you're looking for of course May 13 21:13:22 g00s, i'm trying to get the raw bytes from an Aztec Barcode, but the library is bugged, what can i do to get the raw Bytes? https://github.com/BRAINBLENDr/AztecCollect/issues/2 May 13 21:13:23 i'm looking for the using operator May 13 21:13:37 ReScO i have no idea what that is , sorry May 13 21:13:41 how does one fix the AAPT duplicate image error? May 13 21:13:45 http://reactivex.io/documentation/operators/using.html May 13 21:14:08 wakelock yes, i have read that, and now i'm looking for examples :) May 13 21:14:17 lol May 13 21:14:18 g00s: if you look at the code, i think you can fix it May 13 21:14:41 i think it's rather simple for more experienced android devs May 13 21:15:35 i'l look at OnSubscribeUsingTest.java May 13 21:17:18 Hi, I'm getting a tricky problem ... I've a ListView inside a LineraLayout, inside a LinearLayout that is inside a card.view. Now the list is showing only one item if I set the wrap content fot the height of all the views, why if I set a fixed value, for example 200dp, it works fine ... What I'm doing wrong ? May 13 21:20:50 ReScO, did you start the intent with the request code 0x0000c0de? May 13 21:21:18 wakelock: wha? May 13 21:21:37 a lot more details are required in order for anyone to be able to help you May 13 21:21:58 you also need to look at the source of IntentIntegrator.parseActivityResult() May 13 21:22:27 i've got no idea how the ZXing internals actually work, i have pinpointed the issue, the only thing i need to know is how i can fix it, override it? May 13 21:22:52 got me a moto 360! May 13 21:23:11 shipit: there's a new one coming in a week or so! May 13 21:23:33 that's why the older ones are now affordable May 13 21:24:01 yeah.. May 13 21:24:10 tethering is lame May 13 21:24:10 but it's installing an update, hopefully it'll improve May 13 21:24:10 moto 360 <-> Xperia Z3 May 13 21:24:30 I'm cheap :) May 13 21:24:34 hm. I appear to be blocked on a `static synchronized` method when I'm calling a `static` method (not synchronized). this seems... wrong. am I misunderstanding Java, or is this a Gingerbread quirk, or...? May 13 21:24:49 wakelock: what information is needed? May 13 21:24:53 "Gingerbread"? May 13 21:25:07 * shipit hasn't heard that one in a long time May 13 21:25:12 yea indeed May 13 21:25:29 work supports it, as does a side project :) May 13 21:25:40 it's not a large %, but it does exist. May 13 21:25:59 also when we started, it was like 20% of our users. May 13 21:26:14 yuch, i'm so frikking stuck :( May 13 21:27:24 unrelated, but I just found a great way to make Android Studio builds like 10x slower: also compile GHC at the same time. May 13 21:27:44 shipit, I use (and love) Gingerbread, no intention on switching May 13 21:28:25 I hear ya wakelock, I feel the same way about kitkat 4.4.4 on my Xperia Z3 May 13 21:28:50 ReScO, like how do you start the scanning intent? I'm sure not going to dig around all of your code May 13 21:28:56 https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/aztec/decoder/Decoder.java#L79 the first argument is for raw bytes, what do i need to do to change null into a raw byte value, also, what needs to be added to the class so it passes a byte array? this is a 3rd party lib, i've added it as gradle dependency to my project May 13 21:29:38 wakelock: like this: https://github.com/BRAINBLENDr/AztecCollect/blob/master/app/src/main/java/com/brainblendr/azteccollect/MainActivity.java#L34 May 13 21:30:03 i'm intending do start it in a AsyncTask to prevent UI Blocking May 13 21:30:10 but i want to get the raw bytes first May 13 21:32:25 what if i got the source of that core lib and added it to my libs/ folder, can i edit that source then? May 13 21:32:30 @ wakelock May 13 21:32:46 does scanning any other kind of code work? May 13 21:32:58 everything works May 13 21:33:00 or do you only deal with this aztec stuff May 13 21:33:07 except getting the raw bytes May 13 21:33:13 um May 13 21:33:16 i only deal with aztec codes May 13 21:33:27 well that doesn't help then May 13 21:33:28 nvm May 13 21:33:40 wakelock: i've already pinpointed where the issue is May 13 21:33:47 i need to be able to edit the source May 13 21:33:56 ok, then clone it and go ahead May 13 21:34:12 clone it and then add it in the libs/ folder? May 13 21:34:16 there's really no reason to stick to anything precompiled May 13 21:34:26 I don't know where to put it or how it works May 13 21:34:36 meh. May 13 21:34:36 I'm also not using AS May 13 21:35:07 so you start the intent and the scanner does in fact fire up? May 13 21:35:26 yes May 13 21:35:30 everything works May 13 21:36:00 except that because of the line of code i linked to, the getRawBytes() method is never filled, and set as null there May 13 21:36:01 I'm having trouble figuring out exactly what code responds to the com.google.zxing.client.android.SCAN intent May 13 21:36:41 if you really want a jar in libs/, just make sure you have a `compile fileTree(dir: 'libs', include: ['*.jar'])` style line in your dependencies. works fine then. May 13 21:37:04 all i want, is in the file i linked to, change the first argument in that line from null to a byte[] rawBytes kinda deal May 13 21:37:06 oh wow, this lib is like huuuuuuuuge May 13 21:37:10 yeah May 13 21:37:16 what the crap May 13 21:37:23 it's only supposed to scan some codes... May 13 21:37:41 i can strip the lib down a lot May 13 21:37:42 72MB and counting... ZIP archive May 13 21:37:49 to only Aztec functionality May 13 21:38:09 120MB... May 13 21:38:21 oh yay, "just" 133MB May 13 21:38:38 but it is indeed a extremely huge project, hence why i spent the last two days pinpointing the issue why getRawBytes() was always null May 13 21:38:53 good afternoon folks -- any hints/tips on postMessage functionality w/ a web view? May 13 21:39:16 how does cordova do it? i think there's a polyfill i've used in the past, and iOS lets you post to script messages May 13 21:39:20 postMessage is very generic, what is your actual question? May 13 21:39:40 trying to use postMessage from our javascript within a webview to message the native app May 13 21:40:08 for example, how do we say 'hi thing thing happened' from our embedded JS application that we are loading in a webview? May 13 21:40:10 now i've found out why, but i need to add something to the class to get a raw byte array from the code data and change the null value to the byte[] rawBytes value May 13 21:40:11 youngnico: everything runs through the @JavascriptInterface stuff with WebView. you can write your own postMessage support pretty easily. May 13 21:40:43 ReScO, I'd say you just need to clone it and then google how to include it in your project May 13 21:40:51 seems like the safest bet by far May 13 21:40:55 youngnico: http://developer.android.com/guide/webapps/webview.html#BindingJavaScript even has a Toast example May 13 21:41:06 @groxx kk makes sense wondering if that's the generally best way to go about it May 13 21:41:13 oh thank you! May 13 21:41:15 TacticalJoke: i've found out WHY it's null now, but now i need to add something to the class where it goes wrong, could you help me find out what? May 13 21:41:40 TacticalJoke: https://github.com/zxing/zxing/blob/master/core/src/main/java/com/google/zxing/aztec/decoder/Decoder.java#L79 May 13 21:43:20 also, any clue which folder i need to add to libs/ if i'm using core? May 13 21:43:57 youngnico: it's the only way :) literally. Cordova / etc just have more general-purpose methods available that you can call. May 13 21:47:04 ReScO: Why is 'rawBytes' null in that situation? May 13 21:50:17 JesusFreke: don't suppose you'd know why a `static` method call is blocking while a `static synchronized` method is being called (same class, different thread)? it's happening on two Gingerbread devices, but not anything newer, ART or Dalvik, and I can't find mentions of it online (still looking) May 13 21:55:06 Strange, groxx. Are you sure it's not something else, such as a shared thread pool queuing up requests? May 13 21:55:12 was there a shorthand way of writing paddingStart="x" and paddingLeft="x" May 13 21:55:16 something with the | operator? May 13 21:55:30 I should say "enqueuing". May 13 21:55:45 TacticalJoke: yep, I'm sure. let me clean up a screenshot of what I'm looking at. May 13 21:56:14 groxx: does that static method use any synchronization in the method code? May 13 21:56:24 or does it call any synchronized methods, etc.? May 13 21:57:15 groxx ... http://imgur.com/jacoj May 13 21:57:18 :D May 13 21:57:27 that has been underutilized lately :D May 13 21:57:42 haha May 13 21:57:57 JesusFreke: nope May 13 21:58:15 groxx: are you sure? ;) May 13 21:58:33 a call to an unsynchronized method just isn't going to block. May 13 21:58:47 JesusFreke: it's using a support-lib version of LruCache which has minimal internal synchronization, but the blocking period is _seconds_, and matches exactly to when LibPhoneNumber is doing its (large) initialization. May 13 21:59:20 the LruCache calls that _could_ block are surrounding the lib init, not anywhere "within" it, and no other synchronization is happening. May 13 21:59:28 groxx: ah, ok May 13 21:59:41 so the static class initialization is taking a long time May 13 22:00:10 and the class must be initialized before any method in it can be called May 13 22:03:17 hmmm, I'm seeing duplicate screen view events on Google analytics May 13 22:03:28 man KotterKnife has really spoiled me when using ButterKnife May 13 22:03:32 one with the name that I've used when doing "setScreenName()" and one with the full class name! May 13 22:04:59 I can't wait to switch to Kotlin. May 13 22:05:07 It's just better. May 13 22:05:12 now I see that I have 39 sessions from a nexus 5 and 1 session from iOS? the app isn't even on the store! May 13 22:05:16 Though I can wait: I can wait until 1.0. May 13 22:05:33 JesusFreke: unfortunately it already is - I've got logging around the class init too. May 13 22:05:35 nexus 5 is mine, that's fine May 13 22:05:38 but iOS? May 13 22:06:33 has the app been submitted for review? May 13 22:06:46 groxx: what is already what? May 13 22:06:48 nothing close May 13 22:07:06 where is this screen logging coming from if not from my own code that's supposed to say "setScreenName()"? May 13 22:07:22 Afzal: Are you working on a big Kotlin project? May 13 22:07:34 TacticalJoke nah, just a gym app May 13 22:07:34 I think it's automatically done for every Activity, because I see nothing mentioned of the fragments I've set it on to May 13 22:08:37 I really want to use kotlin everywhere but it's just not ready. The inspections don't work and I'm not sure if android lint will be supported May 13 22:09:37 JesusFreke: Newer devices showing expected behavior: http://cl.ly/image/370d3g0a0E1F and Gingerbread (2 phones, same behavior): http://cl.ly/image/2S1s3G291X2p . and when the ordering of the gingerbread devices favors the non-blocking call before any blocking, it completes "instantly". May 13 22:10:18 JesusFreke: well, "instantly" after the class initialization block. May 13 22:10:57 well thats your problem right there, 5 asyncTasks :) May 13 22:11:05 maybe the pool isn't the right size May 13 22:11:14 that's the default pool size :) May 13 22:11:22 or its the wrong kind of executor, etc May 13 22:11:23 Doesn't it vary based on Android version? May 13 22:11:36 Unless you're passing a custom pool. May 13 22:11:38 I guess. May 13 22:11:55 (I say I guess because who knows what AsyncTask is capable of.) May 13 22:12:11 * g00s gives groxx rxjava prescription & cookie; try this and call back in the morning May 13 22:12:12 TacticalJoke: yes. older versions have it hardcoded at 5, newer have it based on CPU cores iirc. and OEMs seem to change it too, I have two ZTE phones that have 7 threads. literally every other phone has 5 though, which is a little odd. May 13 22:12:56 TacticalJoke: because at the line i linked to, the first argument is defaulted to null May 13 22:13:05 in the office here, that is. like 15 phones with a variety of manufacturers and OS versions (and infinity bugs between them all) May 13 22:13:24 groxx are infinity bugs like infinity stones ? May 13 22:13:52 g00s: they do tend to destroy literally everything, so maybe May 13 22:14:26 don't let Thanos get your apps May 13 22:14:29 ReScO: Yeah, I get that. I'm asking why the library has this null behaviour at all. May 13 22:14:43 Isn't there a reason it's null? May 13 22:14:58 Note that the JavaDoc states that this property is sometimes null. May 13 22:15:50 groxx: can't really follow what's going on in the diagrams, sorry :) May 13 22:16:06 groxx: Are you using AsyncTask's own thread pool or passing your own? May 13 22:16:40 JesusFreke: it's the systrace tool that comes with android, if that helps May 13 22:16:43 TacticalJoke: rawBytes is not implemented apparently May 13 22:16:45 TacticalJoke: the default pool May 13 22:17:04 groxx: yeah, but without being able to see the code, or the classes or methods that are being called, etc. it's all just abstract art :) May 13 22:17:07 TacticalJoke: how can i compile zxing's sources along with my own? May 13 22:17:18 i have a core folder with a src/ subdir May 13 22:18:27 JesusFreke: heh, true :) I could clean it up and pastebin it if that helps. but that aside: _if_ I'm interpreting it correctly, would this be the first you've heard of it? and/or any idea where I could find out if this is a bug that has been fixed? May 13 22:22:49 groxx: Are you certain it's not an AsyncTask issue? As an outsider looking in, this seems way more likely than any other hypothesis. May 13 22:23:04 compile fileTree()? May 13 22:23:04 TacticalJoke: reasonably. for one, the blocking is happening on the main thread. May 13 22:24:26 TacticalJoke: it's not thread starvation or anything like that. and if the timing changes, the main thread happily chugs along while libphonenumber is initializing, so it's not like it's using up the CPU 100% and not yielding (plus libphonenumber does a ton of disk access, which is (nearly?) guaranteed to yield) May 13 22:25:00 hey guys, app/libs/core/src contains library sources, what do i need to add to my gradle file? May 13 22:25:01 I almost spilled coffee on myself, moto 360 buzzed, and I was like - yay wassup! May 13 22:27:54 I love the Comic Sans MS, BTW. May 13 22:28:45 JesusFreke: https://gist.github.com/Groxx/aae45a726457228e2a75 calling methods don't have any explicit synchronization whatsoever anywhere except here, just whatever e.g. AsyncTask uses, or core android, etc. May 13 22:29:39 hey g00s May 13 22:29:48 hi gdrc May 13 22:30:31 hye all May 13 22:30:56 I am trying to import a project from git which has a build.gradle.. its classpath is com.android.tools.build:dradle:0.4 May 13 22:30:59 gradle* May 13 22:31:07 hey guys, app/libs/core/src contains library sources, what do i need to add to my gradle file? May 13 22:31:20 I want to fix the classpath.. I’m getting Resolve Error.. but I’m not quite sure how May 13 22:31:42 it’s looking in Android Studio’s directories but I didn’t install Gradle via AS May 13 22:31:45 maybe I should have.. May 13 22:32:05 standalone gradle and Android SDK May 13 22:34:04 groxx: https://android.googlesource.com/platform/frameworks/support.git/+/795b97d901e1793dac5c3e67d43c96a758fec388/v4/java/android/support/v4/util/LruCache.java#63 May 13 22:34:11 LruCache.get is synchronized May 13 22:34:25 And LruCache.put is. May 13 22:34:34 Wait, maybe not. Hmm. May 13 22:34:42 Okay, it used to be. Weird. May 13 22:34:52 They've changed that in the 'master' versoin. May 13 22:34:54 version* May 13 22:35:06 what is considered best practice for storing api endpoints in your app? May 13 22:35:08 JesusFreke: yeah, though they shouldn't be blocking like this. anyway, I'll add some tracing around the get/put calls, and we'll see. May 13 22:35:23 Although it has some synchronisation. May 13 22:36:29 Fixed it... May 13 22:36:33 Crudely May 13 22:36:44 Now on to fixing the issue of no rawBytes May 13 22:36:50 and all that on your own May 13 22:37:00 so there was no point in asking over and over again every so often :p May 13 22:37:03 TacticalJoke/groxx: I think it's a difference in behavior between the support library version of LruCache and the platform version of LruCache May 13 22:37:13 JesusFreke: actually, no, that isn't necessary. given the logs, it's not even reaching inside the isCached method while get is running. can't be cache synchronization. May 13 22:37:27 groxx: Why does normalizeNumber take several seconds? That doesn't look heavy duty at all. May 13 22:37:47 deleted build.gradle.. worked like a charm May 13 22:37:54 TacticalJoke: it's LibPhoneNumber. it lazily loads phone number normalization metadata from disk. May 13 22:37:55 should i gitignore that? May 13 22:37:58 some numbers might be harder to normalize, they're just that stubborn May 13 22:38:00 :p May 13 22:38:08 TacticalJoke: and it's _immensely_ expensive. hence the caching :) May 13 22:38:13 Doh. May 13 22:38:45 newer devices / people ho use "+12345345" style numbers: it's noticeably faster. but that depends on a lot, and it's still on the order of 1/2 to 1 second. May 13 22:39:04 tricknology_: Gitignore build.gradle? No wai. May 13 22:39:37 what if two people have diff versions of gradle? May 13 22:39:57 classpath messed me up.. it was com.android..etc May 13 22:40:00 but I had standaline May 13 22:40:17 That's what gradlew is all about, isn't it? May 13 22:40:22 Making sure builders use the same version of Gradle. May 13 22:40:28 wakelock: i added the source files in the same folder as my own May 13 22:40:34 yes. uninstall gradle from your system. May 13 22:40:49 ReScO, whatever works, right? May 13 22:41:01 wakelock: now i'm looking at a boolean[] rawbits, and i'm wondering if it's possible to add a function to get all raw bytes May 13 22:41:17 ok.. not sure if you are telling me to uninstall gradle and quit life or telling e that the gradle i installed is not the correct gradle for what I want? May 13 22:41:32 because there's a function present for getting the bits May 13 22:41:49 ReScO, ok, keep it up then May 13 22:42:16 wakelock: how would i turn a boolean[] bits array to a byte[] array? May 13 22:42:25 ugggh May 13 22:42:58 by shifting and ORing probably May 13 22:45:26 i think i fixed it o.o" testing now. May 13 22:45:57 "I think I fixed it" sounds like impending doom. May 13 22:46:46 YES!!!! May 13 22:47:40 and you kept saying you can't do it and it's beyond you May 13 22:47:49 and I kept saying it's possible if you put your mind to it May 13 22:47:58 excuse me for not finding your statements very credible :p May 13 22:48:11 not to mention apparently it's not too hard for you to "admit you can't do it" May 13 22:48:15 groxx: Is it worth posting the code that calls E164Normalized.isCached? May 13 22:48:18 * ReScO often underestimates himself May 13 22:48:38 wakelock: Are you whatitis? May 13 22:48:39 TacticalJoke: probably too work-related :\ I'm making a brand new app to test it out in isolation. May 13 22:48:40 if i fixed this issue, would it be a good thing to add a pull request? May 13 22:48:58 ReScO, next time you feel like saying "I can't", better think twice May 13 22:49:10 ReScO, probably pointless if what you said about the author is true May 13 22:49:15 TacticalJoke, I don't think so May 13 22:49:47 wakelock: he does allow pull requests May 13 22:50:09 then go ahead May 13 22:50:11 but, is converting a byte[] to Hexadecimal values a good idea for storage in a DB? May 13 22:50:21 sure May 13 22:50:24 or is Base64 better suited for the task? May 13 22:50:32 y'know, you don't need to discuss every single idea in here May 13 22:51:00 I'd just convert it to hex representation May 13 22:51:48 thanks :) May 13 22:52:22 hello there May 13 22:53:53 Guten tag. May 13 22:55:06 TacticalJoke, it's 1am in the morning why are you awake :D May 13 22:55:44 It's only midnight. I haven't been tucked in yet. May 13 22:56:13 so yeah for my question, can anyone help me with my phone, it doesnt want to let my pc get an adb connection while in recovery :( May 13 22:56:34 here's you some API docs as a bedtime story May 13 22:56:36 What's in recovery? May 13 22:56:38 TacticalJoke, you from germany? May 13 22:56:53 TacticalJoke, hm? May 13 22:56:58 ulli909, wrong channel May 13 22:57:11 wakelock, where am i supposed to go? May 13 22:57:11 Ich bin ein Engländer. May 13 22:57:16 (I had to google that.) May 13 22:57:21 oh May 13 22:57:25 :D May 13 22:57:43 ulli909, lrn2irc, and then read topic May 13 22:58:07 Isn't adb stuff on topic here? May 13 22:58:12 Generally. May 13 22:58:27 recovery and similar low level stuff isn't May 13 22:59:53 wakelock, where am i supposed to go then? May 13 23:00:08 ulli909, lrn2irc, and then read topic May 13 23:00:22 oh May 13 23:01:40 hey all, trying to figure out gradle dependencies in Android projects.. I have a library that, in eclipse is marked as such in properties. I then reference that in the other project’s properties in Eclipse. Now I want to do that in Gradle.. how to do that/ May 13 23:01:44 and a minimal app isn't showing the same behavior :| so I'm probably missing something / I should try again with libphonenumber in case it's seriously freaking out the vm. May 13 23:02:11 the lib sits in the sibling of the parent folder of the project May 13 23:05:01 nvm goign back to eclipse, lol May 13 23:05:12 nother 45 mins gone May 13 23:09:35 groxx is it trying to look up 867-5309 :P ? May 13 23:10:33 nothing on the other channel :/ May 13 23:11:25 g00s: that does indeed warm it up :) well, partially. it seems to load "my locale" vs "not my locale" data, so if you e.g. 867-5309 it, and then load a chinese number, it'll load _almost_ as much data again, another couple seconds. then later normalizations only take like 5ms each. May 13 23:13:06 hm. actually, I did just get the same behavior with a trivial app. same code as I gist'd earlier. now I've just gotta figure out why :| May 13 23:14:11 groxx: Are you just saying Thread.sleep(whatever) in the background thread(s) in this trivial app? May 13 23:14:34 TacticalJoke: Thread.sleep didn't cause it when I tried. adding libphonenumber + the caching wrapper into the mix did. May 13 23:14:41 but maybe I just didn't run the sleep version enough times. May 13 23:15:25 tricknology_, multiproject libraries in gradle work completely differently than they do in eclipse May 13 23:15:28 Hmm, I wonder whether changing the background threads' priorities would affect anything. May 13 23:15:34 tricknology_, take time to actually understand how gradle works by reading their docs first May 13 23:16:00 yeah, I’m at work right now.. don’t have time. need to build 8 apks. will do that later.. and later.. and later.. May 13 23:16:10 at home I’ve started using AS but not with dependencies May 13 23:17:40 then don't change it at work May 13 23:17:49 until you get it put on your schedule to migrate to gradle May 13 23:18:10 anyone know the class for quick settings in lollipop source? May 13 23:18:21 I know it was quickSettings in 4.4 May 13 23:18:38 interesting. so if I add a Thread.sleep to a static initializer, and I call the non-synchronized method while it's initializing to handle the synchronized method, I _do_ see a blocked-time equal to init + synchronized Thread.sleep times. May 13 23:19:29 hehe that will probably be the next guy, there is a task for it but no time whatsoever. I want to take a whole day off and work remotely on Gradle/Migrating to AS.. think that’s enough time to learn it? May 13 23:19:47 nvm May 13 23:20:06 lol http://i.imgur.com/OlMYTUR.jpg May 13 23:20:14 ha May 13 23:21:04 hm. but only if there is a second thread blocked on the synchronized call. May 13 23:22:06 heh gradle build some apks about 2.5MB too light.. installed crash.. no lib May 13 23:22:18 man still no flashlight API in android May 13 23:22:34 Afzal: really? even though they added it to the notification center? May 13 23:22:47 pfn will like this one http://i.imgur.com/igKYuBl.jpg May 13 23:22:56 groxx yup, this is the class to control the flashlight in Quick Settings: https://github.com/android/platform_frameworks_base/blob/a6ed1b9547dcd592031a415739cc7e672c068f7c/packages/SystemUI/src/com/android/systemui/statusbar/policy/FlashlightController.java May 13 23:23:09 unless that's not in lollipop May 13 23:23:09 g00s, I will? May 13 23:23:15 pfn yes, you will May 13 23:23:21 :D May 13 23:24:16 Afzal: wow, they run the full preview and everything? that's a rather CPU-intensive way to run a flashlight D: May 13 23:24:24 maybe Camera2 has something simpler. dunno though. May 13 23:24:40 I was expecting it to fire off the flash at a gajillion hz May 13 23:25:08 heh. yep, turn on flashlight -> camera apps break. that's awesome. May 13 23:25:55 groxx did you expect google to test such an inconceivable scenario :P May 13 23:26:30 sweet. the omg-slow-non-synchronized-call simplified app works on the gingerbread emulator too. May 13 23:26:42 This seems to describe the initialization synchronization: https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.4.2 May 13 23:27:18 g00s, and I don't get it really May 13 23:27:55 groxx yup, check this: https://github.com/pinguo-yuyidong/Camera2/blob/master/app/src/main/java/us/yydcdut/androidltest/otheractivity/FlashActivity.java May 13 23:28:30 I hate that bar that pops up in the developer console tellign you it iwll take hours May 13 23:28:39 it blocks the project selection May 13 23:28:44 wait no, where is the full preview in that code groxx ? May 13 23:28:48 Afzal: looks essentially the same. May 13 23:29:02 yeah it is the same, that original class does use camera2 APIs May 13 23:29:04 Afzal: https://github.com/pinguo-yuyidong/Camera2/blob/master/app/src/main/java/us/yydcdut/androidltest/otheractivity/FlashActivity.java#L86-L88 May 13 23:29:19 I imagined that the flash consumed so much power that CPU power consumption couldn't have much impact. I guess it might still slow down your bitcoin mining, though. May 13 23:29:29 Or maybe I'm getting old and out of touch. May 13 23:29:55 possibly having a not-window-attached surface makes the camera run relatively cheaply? though I'd expect that to be device specific May 13 23:30:16 sh1: obv. in-browser bitcoin mining is the future. May 13 23:30:51 TacticalJoke: thanks for the link, reading. May 13 23:31:02 Back in _my_ day you'd shrug off any power concerns as somebody else's fault just as soon as the display or keypad backlight (I'm that old!) got powered up. May 13 23:31:39 sh1: or someone held the spacebar: http://xkcd.com/1172/ May 13 23:31:56 Wait... that's not even funny. How long ago have keypads not existed for, now? May 13 23:32:57 Thankfully Amazon's been around forever, so I know where I can get my zimmer frame from. May 13 23:33:01 depends sh1.. Some of that battery gets converted to radio signals and heat when you have regular aps running. With flashlight it’s light and more heat. So it depends on the process I guess. May 13 23:33:10 net intensive process will kill faster than the battery May 13 23:33:13 ThreadPoolExecutor is such a letdown. You can have queuing with no thread reuse before queuing, or you can have boundless threads, or you can have limited threads with rejected tasks. May 13 23:33:30 Y I no can have queuing with thread reuse ASAP?! May 13 23:33:57 TacticalJoke: eh? really? May 13 23:34:17 isn't there a core pool size / shutdown-time configurable chunk? May 13 23:34:29 ha, in teh 45 mins it took me to give up on the gradle dependencies I’ve built and published 8 apks.. May 13 23:34:46 eclipse 1- AS - 0 May 13 23:36:00 You could have a core pool size of, say, 10. And you can allow these core threads to time out. But all 10 will be used (even if some are idle) if enough new tasks are submitted. May 13 23:36:35 Let's say that 9 threads exist and idle. You submit a new task. Now 10 exist, 9 being idle. May 13 23:36:51 That's if you want queuing. May 13 23:36:56 TacticalJoke: ah May 13 23:37:07 If not, one of the 9 will be reused (but you won't be able to limit how many are created unless you're willing to tolerate rejected tasks). May 13 23:37:32 TacticalJoke: I'd have to poke at it, but I do remember there being weird edges in the behavior May 13 23:37:56 Someone suggested changing this (officially, I think), but the response was "Meh, the code is too complicated". May 13 23:38:15 aka "obsolete" May 13 23:38:22 And, because of all this, I can't decide on an awesome thread-pool policy for my app. May 13 23:39:09 I want maximal thread reuse with limited total threads. It's not an easy decision because of the implementation of TPE. May 13 23:39:25 yeah, policy is hard. i share one HandlerThread worker among all my br/edr and ble connections so they don't clobber the radios May 13 23:40:22 I love the idea of sharing one thread among everything. :D May 13 23:40:26 if it was all designed well it shouldn't make a difference, but i noticed things destabilize when you ask too much of multiple devices ... May 13 23:40:32 Fuck concurrency! Y'all can wait. May 13 23:40:36 and then ALL the devices disconnect, even if idle May 13 23:40:56 its a pile of crap May 13 23:41:46 If I didn't have to worry about thumbnails and stuff I could probably get away with two or three background threads in total. May 13 23:41:52 hey guys, i'm having trouble getting an AVD running, whenever i try to test my simple "hello world" app on a virtual device i get "google play services has stopped".. haven't been able to find much help on Google - does anybody have suggestions? May 13 23:42:19 you can file a bug to play services team lol May 13 23:42:28 when i click OK it just keeps repeatedly popping up, so it's basically unusable May 13 23:42:30 let us know when you find the contact email :D May 13 23:42:58 lol May 13 23:43:00 JesusFreke: found a simplified repro with nothing but asynctask + Thread.sleep. tl;dr: if I have a sleep in a static init block + two threads blocked on the synchronized method, _then_ call the non-synchronized method, the non-synchronized call blocks for roughly "init-sleep + synchronized-sleep". I can stick this code up somewhere, but does this sound May 13 23:43:00 familiar? May 13 23:43:34 Maybe my policy could be this: "Boring" tasks have a tiny, queued thread pool. "Exciting" ones (thumbnails, load-more-comments) have a slightly larger queued thread pool. May 13 23:43:46 And core threads time out in all cases. May 13 23:44:19 TacticalJoke so are you using Future then with Executor ? May 13 23:44:27 Nah, not Future. May 13 23:44:39 Callable :) May 13 23:44:50 To cancel stuff I just use OkHttp's Call.cancel. May 13 23:45:05 And I also keep track of stuff so that canceled requests don't ever make it to my UI. May 13 23:47:17 It's actually really simple. I do all the keeping-track-of on the main thread, so there's no complexity whatsoever. May 13 23:49:34 But, damn, some of this code would be a way smaller in Kotlin. First-order functions (especially passed to *inline* functions) is want. May 13 23:51:28 Passing functions to inline functions and extension functions seem like two serious game-changers. May 13 23:52:13 retrolambda :] May 13 23:54:05 groxx: But look at stuff like this: http://pastebin.com/F7Fn9KFS May 13 23:54:25 forEach is an extension function that takes a function (that function being `{ println(it) }`). May 13 23:54:35 And it's all inline, so no object-allocation overhead. May 13 23:57:24 well, probably minus the iterator, since I assume it's using `for (a : b)`. but yeah, <3 compile-time macros May 13 23:58:49 You could even make a custom one: http://pastebin.com/knJDzrQR May 13 23:59:06 Oops, indentation fail. May 13 23:59:32 Yeah, it's using the iterator. May 14 00:02:37 CedricBeust any thoughts on slf4j ? May 14 00:02:41 Srsly, if Kotlin doesn't take off at 1.0, I will be surprised (and {even more} disappointed in humanity). May 14 00:03:09 i wont be surprised at all, but i am hopeful May 14 00:09:35 I hope they hurry up with 1.0, though. May 14 00:09:38 TacticalJoke did you see this ? http://kovenant.mplatvoet.nl/android/features/ May 14 00:10:10 Ah, yeah. Looks interesting. May 14 00:10:35 kotlin shmotlin! May 14 00:11:53 I'm gonna learn UNITY next May 14 00:11:59 wow. just googled for "shmotlin" to see if there happened to be anything with that name May 14 00:12:07 ... and the result was a log of this channel May 14 00:12:14 with your statement as the result. May 14 00:12:36 g00s: hm. so when do those run? probably possibly after the activity is gone? May 14 00:12:41 Apr 16 19:30:57 kotlin shmotlin May 14 00:12:47 lmao May 14 00:12:52 Apr 16 19:26:04 This is so nice in Kotlin: names.forEach { addToDatabase(it) } May 14 00:12:57 Haha. I'm so repetitive. :D May 14 00:13:00 google sees all, and indexes it before it happens D: May 14 00:13:40 I pioneer sayings May 14 00:13:49 :D May 14 00:14:06 That was the only thing said for 24 hours. May 14 00:14:22 I said 82 things. groxx said 106. May 14 00:14:38 g00s, 122. ;o May 14 00:14:49 Though, to be fair, some of those are pings. May 14 00:16:22 TacticalJoke: stop caring about 1.0 May 14 00:16:48 TacticalJoke: padding your LoC count, I see: 17:13 :D May 14 00:17:33 JakeWharton: Isn't it a big deal, because 1.0 stability? May 14 00:18:15 no, stability means they can't fix things that are broken in the language May 14 00:18:38 hey hey, Jetbrains isn't Sun :) May 14 00:18:46 it's not like when M13 comes out M12 stops functioning or anything May 14 00:18:59 and Kotlin has no VM so there's not really interop problems May 14 00:20:28 at the very least there's no rush May 14 00:21:26 yes, I'll learn it next year sometime after I learn unity May 14 00:22:05 I'm wondering if I can make a GUI app with Unity and use it like Cordova to deploy for all platforms May 14 00:23:16 shmooz just draw your widgets raw opengl :P May 14 00:23:33 unity shmoonity May 14 00:23:55 I was hoping someone had already made an OpenGL GUI lib May 14 00:25:53 maybe GLUT has been ported to Android :| May 14 00:26:24 fun Human.learnKotlin() { read(); experiment() } fun main() { val shmooz = Human(); shmooz.learnKotlin() } May 14 00:27:49 No semicolons needed without the one-line constraint, of course. May 14 00:28:05 wtf, why isn't my keyboard popping up in this fragment... May 14 00:35:08 hooray! there are more editions than previous versions! that's not confusing at all! http://blogs.windows.com/bloggingwindows/2015/05/13/introducing-windows-10-editions/ (also note the "There will also be versions ..." buried addition. how many can we expect? 10 versions? 20?) May 14 00:35:50 they said windows 10 will be the last windows May 14 00:36:42 evidently they meant "the last _dozen_ Windows" May 14 00:37:17 oh, textIsSelectable makes my edit text not editable, weird May 14 00:38:32 funky May 14 00:38:40 Hey guys, if I know the number of words being set in a textView May 14 00:38:54 and I do textView.setLines(number of words)) May 14 00:39:02 wouldn that make one word per line May 14 00:39:20 drose379: iirc that just sets the number of lines _available_ May 14 00:39:34 pfn: Its actually intended in the docs it says - "Indicates that the content of a non-editable text can be selected." May 14 00:39:39 drose379: why don't you just replace spaces with newlines, and make the textview multiline May 14 00:40:12 hmm May 14 00:40:27 shmooz I dont know how I would append a string together from multiple strings May 14 00:40:45 Cause im taking the whole string, then splitting each word into a string May 14 00:40:48 uhm with the + sign May 14 00:40:49 Then I need to add May 14 00:40:52 Oh shit May 14 00:40:53 Lol true May 14 00:41:18 and you can use stuff like contains or strstr to find stuff May 14 00:41:23 <[1]Tricknology> damn May 14 00:41:26 codepete, well, docs should be clear that it will make text read-only May 14 00:41:31 it's not even non-editable May 14 00:41:34 <[1]Tricknology> someone is asking for documentation on some FORTRAN code I modified 2 years ago May 14 00:41:36 <[1]Tricknology> ha... May 14 00:41:39 you can still paste into it, it just won't bring up the ime May 14 00:42:48 pfn: I agree. That is weird... May 14 00:45:42 shmooz I have a array of each string May 14 00:45:49 Im looping over the array May 14 00:45:56 And I have a blank string set to null May 14 00:46:12 Im trying to do blank += currentString+ May 14 00:46:15 \/ May 14 00:46:18 \n May 14 00:46:21 But thats not workin May 14 00:46:59 nevermind I can figure it out May 14 00:50:20 Used StringBuilder May 14 00:50:35 pfn: Well I guess its not so weird. The attribute is meant for a TextView to be copyable. EditText should already provide the capability. I guess I just don't have the context of what you're trying to achieve. May 14 00:50:58 codepete, it was just left in by mistake May 14 00:51:09 but it makes an EditText non-editable, which is odd May 14 00:51:09 pfn: Oh gotcha. May 14 00:54:26 Grammar corrections are being downvoted on reddit nowadays. Hmm. May 14 00:57:17 this does not bode well for the future. isn't "reddit user behavior becoming more civilized" one of the signs of the apocalypse? May 14 00:59:03 Isn't that less civilized? Pluralizing with apostrophes is barbaric. :D May 14 00:59:19 Unless we're talking lower-case letters, I guess. May 14 00:59:20 lol May 14 00:59:34 TacticalJoke: what are the reasons the UI thread can get blocked from an AsyncTask? May 14 00:59:56 you mixed up doInBackground and onPostExecute? May 14 01:01:25 groxx: nope... May 14 01:02:57 You might have to post the code, ReScO. May 14 01:03:04 ReScO: calling synchronized methods? though: why do you think this is due to AsyncTask? May 14 01:03:12 I'm gonna predict that it'll take someone less than 60 seconds to answer the question after looking at the code May 14 01:03:13 https://github.com/BRAINBLENDr/AztecCollect/blob/master/app/src/main/java/com/brainblendr/azteccollect/MainActivity.java#L93 @ TacticalJoke / groxx May 14 01:03:23 given that I don't want to write a custom type adapter to do this, the json i get from a server is kind a mess--there's a lot of unecessary wrappers / extraneous nested class containers May 14 01:03:47 https://github.com/BRAINBLENDr/AztecCollect/blob/master/app/src/main/java/com/google/zxing/integration/android/IntentIntegrator.java @ TacticalJoke / groxx May 14 01:03:49 is it better to clean this up by making a model class, or should i just use the raw pojo and create filters? May 14 01:04:31 Note that my prediction assumes two things: (1) the main thread really is being blocked and (2) the relevant code is posted. May 14 01:05:03 TacticalJoke: relevant code was posted May 14 01:06:16 What makes you think the main thread is blocking? May 14 01:07:17 TacticalJoke: no dialog is shown, animation on button hangs, takes about 2-4 seconds to spawn the scanner activity, wish i could start it directly... May 14 01:07:53 I guess i need to look in IntentIntegrator.java what intent extras are used, and start the intent myself? May 14 01:07:57 Where is scanBarcode called from? May 14 01:08:07 Oh, it's a View thing. May 14 01:08:34 ReScO: it might be due to stuff in onCreate of the capture activity May 14 01:08:41 scanBarcode is called through a android:onClick() May 14 01:08:47 nothing there looks slow to me May 14 01:09:04 android:onClick=""; * May 14 01:12:08 groxx: Did you figure out your problem? May 14 01:14:22 TacticalJoke: nope. I've reduced it to "class X has static init taking X ms, synchronized method taking Y ms, and non-synchronized method taking 0 ms" + "thread A calls synchronized method at time 0" + "thread B calls non-synchronized method at time X / 2" = "sometimes, thread B blocks for X + Y ms, instead of X (minus the X/2 it skipped)". more threads May 14 01:14:22 already blocked on the synchronized method seems to make it happen more often, and it happens in ~all OSes, on both Dalvik and ART. May 14 01:14:28 Guys im using a Drawable to give a border color to a View May 14 01:14:46 (setting the background of the view to the drawable) May 14 01:15:00 And in the drawable, I use May 14 01:15:08 to set background color of view, while still giving it border May 14 01:15:11 how can I run a js script in a webview and then take the output an put it into a java variable within my activity's class? May 14 01:15:20 Can I grab that drawable to change the dynamically? May 14 01:15:33 TacticalJoke: or, I've figured out the scenario, and a fix (e.g. use a Lazy { } initializer instead of a static { } block), but I have no idea wtf the reason is. I'll probably make a bug-report for it, see if it's "works as intended" or "wtf, we should fix that" May 14 01:16:07 Yeah, sounds odd. May 14 01:16:51 groxx: Can you reproduce it without that library (with just Thread.sleep)? May 14 01:17:05 TacticalJoke: yep. Thread.start() + runnables + Thread.sleep, nothing else. May 14 01:17:15 lemme finish putting it up on github, and I can show you May 14 01:18:55 how can I run a js script in a webview and then take the output an put it into a java variable within my activity's class? May 14 01:20:46 noahmg123: I think you can do it with this: http://developer.android.com/guide/webapps/webview.html#BindingJavaScript May 14 01:20:48 Though I've never tried. May 14 01:21:16 TacticalJoke: thx. looking right now. May 14 01:22:09 TacticalJoke: https://github.com/Groxx/SynchronizedBug May 14 01:26:09 how do I avoid id conflicts in custom viewgroups when doing state restore/save? May 14 01:26:43 groxx: Do you get the same results if you say "Process.setThreadPriority(Process.THREAD_PRIORITY_BACKGROUND);" at the start of each Thread.run override? May 14 01:27:07 groxx hm, still looks kinda complicated - have you tried ReentrantLock with a timeout ? May 14 01:27:52 Anyone wanna look at a "maybe" layout for me? May 14 01:27:59 Just testing it out, seeing if I like it May 14 01:28:33 All the Android meetings nowadays are about VR, Google Wear etc. May 14 01:29:08 TacticalJoke you wanna? May 14 01:29:12 A video thing, drose379? May 14 01:29:19 No, just a screenshot :) May 14 01:29:29 oh, need to prevent dispatching save/restore to child views May 14 01:29:32 Sure. May 14 01:29:35 Ok May 14 01:29:43 g00s: the lazy work-around works fine. at this point it's "this seems like a bug in the android JVM", or some part of the spec that I can't find, and that should be handled entirely aside from the work-around. May 14 01:29:46 so you know how the user can create lessons in a subject TJ? May 14 01:30:02 Yeah May 14 01:30:08 groxx i'm skeptical May 14 01:30:17 g00s: also, the solution to "this blocks" isn't "just force it occasionally", it's "fix it". May 14 01:30:51 TJ this is how Im displaying all the lessons so far May 14 01:31:02 Like, where the user can choose which lesson to use May 14 01:31:14 Its scrollable, depending on the amount of lessons May 14 01:31:32 Different colors of tiles represent the progress through the lesson May 14 01:31:37 http://i.imgur.com/vAqBIEq.png May 14 01:31:39 groxx more often, the kinds of bugs I saw on GB that didn't exist anywhere else were because those devices were single core May 14 01:31:51 concurrency related ones May 14 01:32:19 well, i should say - behaved differently, because once you have multiple cores, different bugs & behavior May 14 01:32:43 Nice idea, drose379. May 14 01:32:55 Thanks, what you think? May 14 01:33:06 g00s: Would setting background priorities for threads fix it, do you think? May 14 01:33:35 drose379: It's a nice idea, it's nice and bright, but the borders don't look "material" (though that's not a huge deal, really). May 14 01:33:45 I mean the black lines. May 14 01:33:58 Yeah those would be the borders May 14 01:34:01 g00s: this happens on 4.4.4 and 5.1, and I've tried it on both Dalvik and ART May 14 01:34:05 Should I try it without borders and just let them all touch May 14 01:34:20 s/happens/also happens/ May 14 01:34:24 groxx so what versions behave differently then ? May 14 01:34:33 what versions work ? May 14 01:34:44 g00s: apparently they all do this. the gingerbread ones just seem more likely to trigger it. May 14 01:35:07 I feel like without borders it will be confusing for a bunch of tiles that are the same color TacticalJoke May 14 01:35:09 and the more threads you have waiting on the static synchronized method, the more likely it is to block the static non-synchronized method. May 14 01:35:25 apparently. I've only tested it like 50 times, could still be random. May 14 01:36:15 Kinda confusing looking TJ, maybe like 1dp of space between each tile May 14 01:36:29 groxx: I think another thing I'd try is using "synchronized (lock)" instead of synchronized methods. May 14 01:36:43 drose379: Ideally, the borders would collapse (though I'm not sure of the best way to achieve that). May 14 01:37:04 collapse? May 14 01:37:04 TacticalJoke: might work. will test later. moving the static initialization into a nested class solved it as far as I can see. May 14 01:37:26 groxx do you really have code in a static initializer that is blocking ? May 14 01:37:45 drose379: As in "make them all appear the same size, even if next to one another". May 14 01:37:46 g00s: yep. PhoneNumberUtil.getInstance() can take ~10ms on a fast device, ~150ms on a slow one. May 14 01:37:59 dunno why, but I can't fix that. May 14 01:38:09 I think I acheived something like that with what I just did May 14 01:38:15 Wanna look at another ss? May 14 01:38:47 :) May 14 01:41:27 For anyone whos interested: http://i.imgur.com/YJoBH5g.png May 14 01:42:26 That looks much better. May 14 01:44:18 You see how its the same color as the background? May 14 01:44:49 Its not actually a border, just gives the border effect cause I added a tiny margin between each tile May 14 01:47:08 Thanks for looking TJ May 14 01:55:55 later guys May 14 01:56:19 TJ :) May 14 02:17:37 groxx, interesting problem May 14 02:18:05 groxx, probably caused by coalescing the init lock May 14 02:18:41 pfn: I dunno enough internals, but it does sound like a possibility May 14 02:19:04 pfn: I pasted a github project that shows it, if you're curious May 14 02:19:26 if don't block is called first, then it will only block for init May 14 02:20:08 if block is hit first then block plus init May 14 02:20:11 yep. seems consistent, but I haven't tried enough to be sure. more focused on sync-then-not, because it fits my code. May 14 02:20:35 because the block me call lock is coalesced into the init lock May 14 02:22:08 pfn: happen to know if this is part of / allowed by the java spec, or if this is actually a bug? I haven't read the full spec, and not sure where to look anyway :| May 14 02:22:20 don't know offhand May 14 02:22:21 it certainly seems undesirable, either way May 14 02:23:25 Synchronize on another lock object May 14 02:24:39 yah. i moved stuff into a lazy init helper class on that thought. seems to have worked. May 14 02:25:37 haven't had time to try synchronized (Class) or a separate lock object. probably will before I submit it as a bug. May 14 02:27:08 intermittent stuff like this is super annoying to try to fix :| May 14 02:40:13 how to use showcommands with mm May 14 02:40:28 i'm 'd like to see the build commands for a test May 14 02:46:55 what would be the most likely culprit if clicking on my recyclerview item brings me to a blank fragment? I set my adapter and layout manager May 14 02:47:59 i want the click to take me to another recyclerview fragment that shows a list May 14 02:51:07 akaizen: #android-root is probably the place for that **** ENDING LOGGING AT Thu May 14 02:59:58 2015