**** BEGIN LOGGING AT Tue May 12 02:59:59 2015 May 12 03:00:37 desmin88 yeah ... the most struggling website i know of for sure May 12 03:02:02 not very frontpage of the internet if there website is down constantly May 12 03:03:34 i should write a program to detect the frequency i press f5 and see if that corelate to reddit being down May 12 03:03:51 hah May 12 03:07:13 wow been a solid 15 mins reddits been down May 12 03:07:42 who cares ... May 12 03:08:33 all users of reddit May 12 03:08:36 thats who May 12 03:10:04 yah May 12 03:11:37 does anyone have experience using AppCompatDelegate? May 12 03:12:37 seand: not many people do, the update to appcompat just came out recently May 12 03:13:18 yeah... i guess i just need to send chris banes a message on twitter May 12 03:13:25 wow you really cant do it http://stackoverflow.com/questions/9744721/relative-project-dependencies-in-gradle May 12 03:13:32 i'm trying to use it with DatePickerDialog May 12 03:13:39 seems im gonna need to copy this into each of my apps? May 12 03:13:50 seems like the worst build system May 12 03:15:45 because it doesn't support that one thing you want? May 12 03:16:32 everything is the worst thing ever May 12 03:16:33 hail satan May 12 03:19:25 usgrant +1 May 12 03:20:30 do i need AppCompat for API levels above 15? May 12 03:21:05 if youre starting your first commercial android app my advice is stop now, iphone and android have similiar dev costs, but android has impossibly higher maintenance costs May 12 03:21:05 it depends May 12 03:21:22 ThinThread: thats trash May 12 03:21:34 thats lived experienced May 12 03:22:07 ThinThread: you're bashing android itself? or was that directed to me? May 12 03:22:17 hes just salty May 12 03:22:33 grass is always greener on the other side etc etc May 12 03:22:35 desmin88: what does it depend on? May 12 03:23:00 what are you doing in your app May 12 03:23:03 1) are you actually an android developer and not a repurposed ios developer May 12 03:23:17 'repurposed' +1 again May 12 03:23:27 i’ve taken over many, many projects where the original dev was just an ios developer that some idiot pm assigned to do the android app May 12 03:24:07 I’ve done both, and so far I kind of like Android more because of the open sourcness. It’s fun digging deep into the source and seeing how the internals work. May 12 03:24:08 maintenance costs can approach parity assuming the android app is competently done May 12 03:24:50 i am both, but have found it easier to get jobs as an android developer May 12 03:25:37 how many times did iphone replace its ide or build system with a seperate product in last decade verse how many times did android May 12 03:25:49 not a fair comparison May 12 03:25:55 xcode is hilariously not backwards compatible May 12 03:26:20 that and you HAVE to use it for iOS (at the very least for signing) May 12 03:26:20 actually, xcode went through quite a bit of iterations in the past decade. May 12 03:26:35 desmin88: using a fragment, that's about it May 12 03:26:38 back in teh day, you had 2 programs, interface builder, and xcode to do code. ;) May 12 03:26:51 ReScO: IIRC you should use appcompat fragments over the native fragments May 12 03:26:57 modern xcode bears little resemblance to OG xcode May 12 03:26:59 why? May 12 03:27:09 certain devices and builds of android have slightly different implementations/quirks May 12 03:27:12 ensures google can’t fuck you too bad May 12 03:27:12 :) May 12 03:27:18 you get a consistent API across devices May 12 03:27:19 while appcompat standardized it May 12 03:28:03 even if you’re targeting a reasonably modern version of android, use the compatibility library May 12 03:28:05 it's the support-v4 library, not appcompat May 12 03:28:11 and they're called support fragments May 12 03:28:26 that is correct May 12 03:28:27 im a dingus May 12 03:28:41 AppCompat has SupLib-v4 in it May 12 03:28:45 that is true May 12 03:28:46 no May 12 03:28:50 well May 12 03:28:51 it has a dependency on it May 12 03:28:54 it’s a dependency May 12 03:28:54 yes, it has May 12 03:28:58 no May 12 03:29:02 appcompat-v7 requires support-v4 May 12 03:29:21 However, you can also include the action bar in your activities by instead using the v7 appcompat library, which is compatible with Android 2.1 (API level 7) and also includes the Fragment APIs. May 12 03:29:21 is the plural of dingus dingi? May 12 03:29:43 i don't think you're using that word right May 12 03:29:51 im not May 12 03:30:17 im using it colloquially May 12 03:31:23 howdy jake, I was wondering how do I find me someone that can nominate me to join this fancy elite androidstudygroup that I’ve heard about? :) May 12 03:31:39 do you have the requisite animal sacrifice? May 12 03:32:00 Not anymore, I used to, when I had mice problems.. May 12 03:33:29 my dog is an awesome mouse catcher! May 12 03:33:49 mine was a mouse lover, she used to cry over the dead mice in the mouse traps. :( May 12 03:34:48 she’d share her food with the little ones too … May 12 03:36:03 that's a pretty wussy dog :P May 12 03:36:15 seriously. my cat is a stone killer May 12 03:36:20 Bull terrior too ;) May 12 03:37:34 Discovered this awesome thing called ViewOutlineProvider, only to find out that it was an API 21+ feature… Those false hopes when discovering something that you never knew existed that could of made youre life easier… May 12 03:37:49 solution: fuck all users on < API 21 May 12 03:38:38 I know, and I was hoping to flaunt a more FABulous button. May 12 03:39:49 ~9% of my users have <= API 15 May 12 03:51:57 is the m9 the only latest flagship with front speakers? May 12 03:56:19 usgrant: the lib you suggested does not load the barcode scanner into a fragment, it still starts the activity May 12 03:59:32 another day after i've slept (6AM...) May 12 04:27:31 Anyone know how to make a menu item go to the main activity when clicked? May 12 04:27:48 I've read StackOverflow, but I'm still a bit confused. May 12 04:50:56 what's the best event to override of a Fragment to ensure getArguments() isn't null? May 12 04:51:16 use a static factory method that always set a Bundle May 12 04:51:22 Make sure you always add arguments to it when you instantiate it May 12 04:51:50 so putting a Fragment directly into a layout is considered 'bad'? May 12 04:52:02 We usually have a static create(... arguments) on it, then you create a Bundle and store the arguments in it May 12 04:54:14 what if you are using in your layout to instantiate (then using findFragmentById())? May 12 04:54:59 @CedricBeust: I like that static option May 12 05:04:08 full 12 hours fighting w gradle May 12 05:04:09 im exhasusted May 12 05:04:14 will pickup again 2morrow May 12 05:21:15 how do you spend so much time fighting gradle, it mostly just works May 12 05:21:41 true May 12 05:24:59 pfn: Very far from my experience May 12 05:25:06 what would be the downside to getting an activities extras in a fragment (instead of using setArgs/getArgs)? May 12 05:26:51 CedricBeust, what aspects have you been fighting with? May 12 05:27:25 Just today, I modify a line of the file, the build fails with a mysterious "Can't use Copy (or Exec, or whatever): doesn't implement Task" May 12 05:27:35 Mystifying. Doesn't matter which line I modify or remove May 12 05:27:59 Then I realize when I do that, IDEA automatically imports Copy or Exec or whatever from Exec and that turns Gradle crazy May 12 05:28:09 but only for certainlines, not others May 12 05:28:26 but that's idea, not gradle May 12 05:28:28 I wasted an hour being mystified by that, with Google searches and StackOverflow completely useless May 12 05:28:39 nah it's Gradle and this ugly Groovy language May 12 05:29:01 Other examples: code completion sometimes working but very often not May 12 05:29:16 random sections of the build highlithed with warnings I can't fix May 12 05:29:39 The mystifying init/configuration/exec cycles, made even more mystifying with doLast/doFirst May 12 05:30:01 tasks that move from one phase to the other if you omit << May 12 05:30:15 It's an absolutely crazy design May 12 05:30:39 sounds like sbt is better already May 12 05:30:46 sbt is way, way worse May 12 05:30:53 not even May 12 05:31:15 % and %%, sensitive to newlines and spaces... seriously? May 12 05:31:21 Not even close May 12 05:31:48 not sensitive to spaces May 12 05:32:10 but the parser is primitive and enforces a blank line between settings May 12 05:32:29 It's like Makefile that was sensitive to tabs, except at least Makefile has the excuse it was in the 90s May 12 05:32:30 % vs %% is a convenience May 12 05:32:35 every time an experienced person says something bad about something, I'm glad I never even learned it, and know from now to stay away from it ;) May 12 05:33:01 shmooz: Some complex things are worth learning. Gradle and sbt, I have serious doubts. May 12 05:33:30 CedricBeust, you should give it a whirl again for android, you'd be surprised how good it is May 12 05:33:48 pfn: I'll write my own build tool before such a day comes :) May 12 05:34:06 I have zero confidence in the sbt authors and engineers (even with Josh leading it) to understand what good design is May 12 05:34:31 sbt is what happens when someone who knows more about the language than build tools tries to write a build tool May 12 05:34:36 it's kind of endemic in the Scala ecosystem May 12 06:03:25 eh, he tried a different approach, and it's very successful in its own right May 12 06:04:01 how can I differentiate in onPause() between my activity opening a new one and the user navigating away from my activity? May 12 06:06:43 we can always go back to maven ;) May 12 06:07:12 no, thanka May 12 06:07:17 I have a lot of beefs with maven but a problem I never had with it is writing pom.xml. There's a schema, top notch auto complete, a regular use of attributes and tags May 12 06:07:33 only thing maven brought of value is the repo May 12 06:07:50 the schema doesn't validate in the face of mojos May 12 06:07:50 with gradle, I never know when I can write a(b), a b, a = b, a { b } May 12 06:08:10 forgot one: a.b May 12 06:08:31 pfn: Eclipse has no problems completing with mojos May 12 06:08:51 throw a new plug-in, the new schema gets imported, auto completed automatically adjusts May 12 06:10:49 but Maven's declarative-only aspect is crippling May 12 06:14:38 any one suggest me a good app drawer library. easy one. should support API 8 and above May 12 06:16:41 t2mkn: you'll only lose 0.3% of potential users by going API 10 (source: http://developer.android.com/about/dashboards/index.html) May 12 06:17:03 Groovy brings down Gradle May 12 06:17:18 JakeWharton: Agreed May 12 06:17:21 And 0.0% of actual users May 12 06:17:59 JakeWharton: not quite true as those numbers are from devices that accessed Play Store in the last 7 days May 12 06:18:14 so that 0.3% is people who know how to access play store May 12 06:18:22 ok so, any lib suggestion for API 10 and above May 12 06:18:35 duncannz: those people are not using your app May 12 06:18:46 They are no-value users May 12 06:19:05 It is a waste of time to target lower than 15 May 12 06:19:23 I have something like a quiz app, where the user after he/she fills a few fields moves onto a second Activity. How can I test the 2nd Activity without having to manually enter values to those fields *every* time ? May 12 06:19:32 Espresso can help me with that ? May 12 06:19:33 I agree with you that it's a waste of time for just 0.3% of active play store users, but I can't agree with you that none of them would use your app May 12 06:19:37 pre-fill them May 12 06:19:37 yes thats true May 12 06:19:47 using settext or via xml May 12 06:19:50 There are so many hurdles to making a good app that those extra 7 users are not worth the hours of supporting that old crappy version May 12 06:20:33 duncannz, JakeWharton: I suppose you could also argue that a $30 android phone usually comes with kitkat now May 12 06:20:33 thats true too May 12 06:20:40 tx, even if i do it like that i have to manually click "next" after each question May 12 06:20:41 so there's even more of an argument to not support early APIs May 12 06:22:10 t2mkn: I haven't made any apps with a drawer but using AppCompat seems like a good idea to me: https://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html May 12 06:22:18 I could be wrong, someone correct me if I am May 12 06:22:28 here is a tutorial on it https://developer.android.com/training/implementing-navigation/nav-drawer.html May 12 06:22:29 That's in support-v4 not appcompat May 12 06:22:52 oh ok, but still would you use it or a third party lib? May 12 06:23:07 Yes. Use that one! May 12 06:23:20 alright there you go t2mkn May 12 06:25:48 thanks got that. May 12 06:52:23 " Apple now taking 93% of all profits in the entire smartphone industry." May 12 06:52:26 holy May 12 06:52:28 shit May 12 06:59:50 how come May 12 06:59:59 I doubt that __very__ much May 12 06:59:59 like android market is like 80% of all smartphones ? May 12 07:00:04 don't even bother citing your sources. May 12 07:00:16 probably apple.com :D May 12 07:00:23 apple.com I bet May 12 07:00:57 g00s is secretly an Apple employee May 12 07:01:07 wanting to get some of you guys to move over to the dark side. May 12 07:02:44 people, i need to download and parse RSS-xml. But i dont want to download whole RSS-xml everytime. I'd like to download head of rss and parse it until find existing node in local rss-xml. May 12 07:02:46 lol, i read it here http://uk.businessinsider.com/samsung-china-sales-q1-apple-xiaomi-idc-plummet-2015-5 May 12 07:02:47 light side* May 12 07:02:54 looks like samsung is in deep crap May 12 07:03:09 the dark side is way cooler though May 12 07:03:29 But i dont know how to do it right way. How to join fresh head of rss and local copy of rss, to keep fresh copy of rss localy May 12 07:03:30 Darkwater: Apple is def. dark side. May 12 07:03:44 only idiots think companies are light and dark May 12 07:03:52 thank. May 12 07:04:27 g00s: I think Nvidia as green and AMD as red May 12 07:05:02 looks like Xiaomi and Huawei are rising May 12 07:05:31 but its interesting to see Samsung slip in South Korea May 12 07:06:01 So what you're saying is May 12 07:06:11 Apple don't have 93% of all revenue in the market. May 12 07:06:22 people how do you work with rss? you alwat download whole rss file? 250Kb! May 12 07:06:47 yes! May 12 07:08:00 tx the article said profilt, not revenue // May 12 07:08:04 * g00s shrugs May 12 07:08:23 g00s: Ah well, now t hat I think about it May 12 07:08:28 Apple is just one company May 12 07:08:34 Android is thousands of companies May 12 07:08:38 tens of high-value ones May 12 07:14:57 hi,i want to put a progress bar to dashboard for my sync adapter,how i can update it from bacground service ? in case of if app is running or not running etc. May 12 07:15:30 you make it visible and gone May 12 07:15:37 you don't create it May 12 07:15:43 it should be defined in ya XML May 12 07:31:14 wow, SlidingPaneLayout is >2 years old ... seems like just yesterday; they grow up so fast! May 12 07:33:02 morning May 12 07:33:23 hey danijoo May 12 07:33:30 hey g00s May 12 07:33:39 tx thinks i'm a secret apple employee May 12 07:33:40 before you know it, there will be a Mr. SlidingPaneLayout, and little mini-SlidingPaneLayouts May 12 07:33:52 g00s, why? :D May 12 07:33:55 JesusFreke lol, Junior ! May 12 07:34:10 an apple spy! May 12 07:34:46 danijoo i was reading this story from HN tonight https://news.ycombinator.com/item?id=9529829 May 12 07:35:47 i was kinda blown away by them citing apple had 93% of profits of entire industry May 12 07:36:05 ah yeah. I read that too on a german site May 12 07:36:11 its crazy May 12 07:36:16 that does seem insane though, i could imagine, 60% ... 70% , but 93% ... May 12 07:36:50 what i'm wondering is if Xaiomi will sell a device in the US soon May 12 07:37:10 g00s: Calm down bro. May 12 07:37:17 danijoo do they have any devices over where you are ? May 12 07:37:28 g00s, apple devices? May 12 07:37:34 Xaiomi May 12 07:37:56 g00s, no phones. only a mi band May 12 07:37:56 Xaiomi devices are alright but they have Samsung S5 disease May 12 07:37:59 cheap build quality. May 12 07:38:13 and i thought the next Nexus device was going to be Huwei (sp) May 12 07:38:45 what happened to nexus 6 May 12 07:38:46 its Motorola isn't it May 12 07:38:47 motorola May 12 07:39:22 and i read a few things about nexus 5 new versions will be huawei May 12 07:39:35 today will be the day i'll fix my memory leaks May 12 07:39:38 (maybe) May 12 07:39:41 http://www.androidauthority.com/hauwei-nexus-quad-hd-snapdragon-810-607063/ May 12 07:40:01 danijoo do you have the canary lib installed :D May 12 07:40:25 no.. :( that will be part II of the anti-OOM project May 12 07:40:29 today its bitmaps May 12 07:40:40 although using picasso, my users still seem to get OOMs May 12 07:40:49 time to gird up your loins :D May 12 07:41:01 but I cant reproduce it :/ May 12 07:41:32 so.. first thing is rewriting my image stuff May 12 07:41:38 with a nice wrapper class for picasso May 12 07:41:57 and then ill play a bit with heap dumps May 12 07:46:07 some of those xaiomi phones look pretty nice if you ask me May 12 07:48:02 how can i handle media recorder At prepare() i have to sleep for 1 second.. i think its not a good way of handling it any other proper way to do so ? May 12 07:52:17 How would you guys handle this problem? I'm trying to create a beautiful class which converts every supplied EditText parameter to a string and checks if they're empty. Now, i only have three EditTexts. What if i had more? Would there be any way to make my function accept unlimited amount of parameters? Man, my own question is confusing me May 12 07:54:10 doesn't seem like you understand what you want May 12 07:54:58 I do, but bringing it to proper context is hard for me May 12 07:55:00 android-dev572 you can have an TextView.OnEditorActionListener shared among all the TextViews, onEditorAction takes which TextView May 12 07:55:10 My english is somewhat limited you see May 12 07:55:16 hello every body , i want to know what is new instance in android ? May 12 07:55:41 Far7ad, new instance of what? May 12 07:56:06 g00s: let me look into that, thank you for the suggestion! One second May 12 07:58:23 hey, i update my UI with a interface from my sync adapter(null check to interface,if its null,app doesnt run so nothing happens), and i will show a progress bar too.is it best practice of doing this ? May 12 07:58:42 danijoo, i want to know the concept of new instance May 12 07:59:18 has anyone used flow and mortar in a production setup? May 12 07:59:37 Far7ad, thats the concept of hiding constructors and singeltons behind static methods May 12 07:59:56 give me a second and i give you an example May 12 08:00:17 Far7ad, it's a part of factory/singleton concept. May 12 08:00:21 danijoo, thank you very much May 12 08:01:21 Far7ad, http://pastebin.com/SdAtAWBa May 12 08:01:42 this way everytime newInstance is called, you can be sure it returns the same instance of MyClass which is stored in mSingelton May 12 08:03:24 I don't think he's asking about singletons, because whoever mentioned it to him would not have referred to it as new instance in this strict way, usually that method is called getInstance even May 12 08:03:37 I think he just read "create a new instance of ..." somewhere May 12 08:04:08 if this is true he should head to ##java May 12 08:04:24 yea I think it's much more primitive May 12 08:05:19 g00s: not trying to be rude or anything, but could you give me an example? I somewhat understand what you mean and i've looked up OnEditorAction, but i'm not really sure on how to use it in my case. Could you enlighten me? if not, perhaps point me to a right direction? May 12 08:06:02 what is your case? May 12 08:06:27 explain by a scenario May 12 08:07:05 I'm trying to make a function, which accepts an unlimited amount of textviews. In that function, i simply check if the textview is empty or not. Just trying to make it easy for anyone to throw in textviews and let the function handle the checks May 12 08:07:24 TextEdits* sorry May 12 08:07:43 ah May 12 08:07:49 so editText.isEmpty() May 12 08:07:51 android-dev572, Arrays? Lists? May 12 08:07:56 what're you nuts May 12 08:08:04 me? May 12 08:08:32 I think this might be a startup idea... May 12 08:08:38 Far7ad, the actual concept is that if you have already an instance available with you with the same value, it's better to return the same instead of creating a new instance. see: https://ideone.com/JyHrHT May 12 08:10:10 mnhh, think i got an idea dani, going to try it out! thanks :D i'll come back with results May 12 08:12:10 lmao, odaym, sorry i just read your response May 12 08:12:40 No, i have a seperate function that handles the checking. It does it propperly, not tedit.isEmpty() hahaha May 12 08:12:42 but, textview from a view or directly form an Array? May 12 08:12:50 ah "properly" May 12 08:12:59 sorry, my english *cough * May 12 08:13:06 even checks if there are hidden characters that isEmpty() might miss May 12 08:13:13 how do you avoid java in android? May 12 08:13:23 hey all, I'm looking for the android docs for offline web applications May 12 08:13:30 in particular the header tags that declare the icon and stuff May 12 08:13:30 you can use Dash May 12 08:13:33 I hate java, but I'd like to make something for android. What can you recommend ? May 12 08:13:40 Odaym, it's a simple check, really. "textCheck.getText().toString().trim().length() > 0" along those lines. May 12 08:13:40 iOS May 12 08:13:42 is there the possibility of hidden character in a text view?? :D May 12 08:13:45 n^izzo: I don't think that's android stuff May 12 08:13:56 lol android-dev572 May 12 08:13:59 mnh? May 12 08:14:00 assuming you mean a cached website May 12 08:14:09 Odaym? :D May 12 08:14:16 yea I do Darkwater May 12 08:14:18 just agreeing with you May 12 08:14:20 with a lol May 12 08:14:29 sweet :D May 12 08:14:30 then I'd suggest looking at mdn May 12 08:14:39 does android team plan to replace java ? May 12 08:14:41 I feel really good if somebody from the irc agrees with me on something May 12 08:14:48 they've got some good documentation on web related stuff May 12 08:14:58 yea they're going to use bash for android May 12 08:14:58 squ: I doubt that'll happen in the forseeable future May 12 08:15:19 you haven't heard anything on that? May 12 08:15:24 I have May 12 08:15:31 Odaym: what? May 12 08:15:36 well they talk about using Python May 12 08:15:39 cause Java is stupid May 12 08:15:51 do they have something usable now? May 12 08:15:59 it was quite long time already with java May 12 08:16:04 they should have something May 12 08:16:10 nah they are waiting for Python to be completely completed May 12 08:16:13 yea they should May 12 08:16:25 I agree with you May 12 08:16:27 what do you mean, python is ok May 12 08:16:33 nah but not as good as they want May 12 08:16:44 at least they cancelled Eclipse, they should abandon java too May 12 08:16:50 yea they will May 12 08:16:56 cause its stupid language May 12 08:17:23 do you have a url on their python project? May 12 08:17:27 the people who made it I hear are like not even out of university yet May 12 08:17:42 or google io video May 12 08:17:48 squ: There's no way of avoiding java to learn Android development. Then when you know Android development, you can select among various languages targeting the jvm for Android. By then you probably think f*** it, I just want to get my app done. May 12 08:17:50 yea here https://ep2013.europython.eu/conference/talks/developing-android-apps-completely-in-python May 12 08:18:04 that's what you should do May 12 08:18:08 cause its better than java May 12 08:18:20 kjeldahl: I did android 3 years ago, now I thought they improved something May 12 08:18:27 I hoped May 12 08:18:33 I was naive May 12 08:18:46 you still are :D May 12 08:18:50 squ: Well, Android Studio looks a lot better if you're into those kind of things! ;-) May 12 08:18:58 getting into android from ios is a pain May 12 08:19:06 you are lucky if you never had experience with ios May 12 08:19:11 cos you will not get that pain May 12 08:19:15 squ: Speaking from first hand experience, the other way is too! May 12 08:19:31 lol May 12 08:19:50 studio is better than eclipse, I agree on that May 12 08:20:02 trying to fly an aircraft after all you did is riding a bike is a pain too :( May 12 08:20:18 danijoo: correct :) May 12 08:20:23 squ: I said it looks better. I'm not using it myself. :-P May 12 08:20:43 theres also kotlin if youdont like java May 12 08:20:50 kotlin? May 12 08:20:53 pythonloktin May 12 08:20:56 yea that's the new language bro May 12 08:21:04 java on speed! May 12 08:21:13 :o ? May 12 08:21:17 http://kotlinlang.org May 12 08:21:20 this one? May 12 08:21:25 you can now just press one button, whole app gets written May 12 08:21:27 yup May 12 08:21:28 do you have a url to android project? May 12 08:21:33 official ? May 12 08:21:41 official what? May 12 08:21:46 nothing May 12 08:22:22 its early morning here. You have to talk in whole sentences to me until i get another 2 coffees May 12 08:22:42 ah so you are not american May 12 08:22:48 oh my god. all my tests pass May 12 08:22:57 on first try! May 12 08:23:03 something must be wrong.. May 12 08:23:06 Mine too, all zero of them! :-) May 12 08:23:08 Odaym, no. europe May 12 08:23:14 ye, the tests themself :D May 12 08:23:30 yea thought as much May 12 08:23:35 icemanbp, so you say Assert.assertTrue(true) is not a valid test? :p May 12 08:26:20 no :D May 12 08:26:20 or something more tricky :D May 12 08:39:20 Assert.assertTrue(!false) May 12 08:39:47 now that I know I have superhuman programming abilities today, I should do something useful.. May 12 08:39:53 hm.. May 12 08:41:42 like drink a coffe :D May 12 08:42:26 hey icemanbp May 12 08:42:32 I see you've gotten the hang of coming here May 12 08:42:35 cool brah! May 12 08:43:25 what does it mean brah? :D May 12 08:44:21 everybody can come here Odaym May 12 08:45:15 Do you know if there is a way in RxJava to define an observer that runs the same code for all the three callbacks? May 12 08:45:45 I need an observer that just runs setRefreshing(false) in onError, onNext or onComplete May 12 08:45:57 I mean you come here regularly May 12 08:46:29 it's funny, may I can help someone :D May 12 08:46:46 is not this the idea of this channel Odaym? :D May 12 08:46:55 help and get helped, yea May 12 08:47:44 fantastic, this is a kind of magic and utopian world May 12 08:48:13 and plus learn english :D May 12 08:54:12 a bit annoying that java can't distinguish between different types of list for overloads May 12 08:54:24 Troffel, how do you mean that? May 12 08:54:38 List ... May 12 08:54:40 T <-- May 12 08:54:54 whats wrong with the T? May 12 08:55:07 its for the distinguishabilitation May 12 08:55:19 stands for Type doesn't it? May 12 08:55:22 fair point May 12 08:55:52 floating point May 12 08:55:56 didn't hit me May 12 08:56:31 how can i handle media recorder At prepare() i have to sleep for 1 second.. i think its not a good way of handling it any other proper way to do so ? May 12 08:57:32 what do you mean handle it? you just want to open it right? May 12 08:57:39 it's the closing that will give you problems May 12 08:57:50 or the reopening after an onPause() onResume() May 12 09:02:45 danijoo, Odaym: running the risk of making myself look like an idiot. Using List as param for a method doesn't seem to make up for having two methods as you would with a regular overload. What if the two methods both take a list, but the lists have nothing in common? May 12 09:03:15 meaning I want access methods and properties on them that they don't share. May 12 09:03:24 Troffel, you are not forced to provide T May 12 09:03:39 you can do public void myMethod(List myList) afaik May 12 09:03:47 yes May 12 09:04:04 you can do ArrayList<> myArrayList = new ArrayList<>(); May 12 09:04:24 or just List, or LinkedList\ May 12 09:04:42 that still leaves having to figure out which of my two expected types I just passed May 12 09:04:54 or Collection to be super-generic May 12 09:05:01 you can do instanceOf on the objects cant you? May 12 09:05:34 I can, but I wanted to avoid casting objects. May 12 09:05:44 casting? no, it's checking May 12 09:05:48 Troffel, then you should make 2 methods May 12 09:05:57 well, checking then casting May 12 09:06:04 and yes you are already going the path of branching condition May 12 09:06:15 make 2 functions, not 1 that does 2 things May 12 09:06:24 you're not paying money for the characters May 12 09:06:26 at this point I'm mostly going for stylepoints May 12 09:06:34 ye Odaym May 12 09:06:43 im a big noob when it comes to testing, i have robolectric in my project, which runs from /src/test/java. Now I also want espresso. Where do i place these files? May 12 09:07:39 main thing I wanted was an overloaded method I could call. But since the method signatures don't differ with list types. that is what my first statement was aimed it May 12 09:08:01 they will differ if the type passed to the list is different May 12 09:08:09 no Im not sure of that, I don't know May 12 09:08:25 if you are not forced to supply a Type then there is no difference between List and List regardless what you feed them May 12 09:08:40 I am supplying a type May 12 09:08:47 yes yes you're right, it cannot know May 12 09:09:00 unless Type is mandatory which it isn't, you are supposed to write 2 functions May 12 09:09:13 yep, May 12 09:09:25 thanks :D May 12 09:10:04 thank you, learned something new May 12 09:23:52 Hey everybody! I am looking for a way to implement URLs to my app. Does anyone have a link with informations about how to this? For example myapp://member/100/ should open member 100 in my app May 12 09:24:58 why urls? getMemberById(int id); ? May 12 09:25:03 why not * May 12 09:25:17 I am not sure what I should Google for to be honest.. So some keywords would be enough May 12 09:25:26 what are you trying to achieve? May 12 09:25:30 Because I want people to link stuff inside my app :) May 12 09:25:51 don think that is supported out of the box May 12 09:26:45 why not some intent with extras? May 12 09:27:00 regardless you'll have to try to parse and process the URL yourself May 12 09:27:02 somehow May 12 09:27:14 or I think, if it's just data, use a ContentProvider May 12 09:27:45 I just need to register the myapp:// to my app that's the thing May 12 09:27:52 How can I do something like that? May 12 09:28:32 http://stackoverflow.com/questions/2448213/how-to-implement-my-very-own-uri-scheme-on-android May 12 09:28:34 Found :) May 12 09:30:54 anybody know how to emulate the elevation with version before lollipop? May 12 09:32:01 usually you don't implement it May 12 09:32:13 but there are easy ways to make a shadow style May 12 09:32:16 and libraries for it May 12 09:33:54 I just put another layout under with shadow background May 12 09:39:16 no that's wrong May 12 09:39:36 you need a background drawable that has a shape item inside it and a background of a color that has opacity inside it May 12 09:39:49 RRGGBBAA May 12 09:40:07 http://stackoverflow.com/questions/15852122/hex-transparency-in-colors May 12 09:40:18 I should read about the material design some time.. May 12 09:40:44 Is it by the way easily possible to merge an app to material or is rebuilding the complete app easier? May 12 09:41:42 but is differente background and background drawable? :-/ May 12 09:42:04 no May 12 09:42:22 so... I dont understand you Odaym May 12 09:42:56 background drawable means its a shape you create in XML, inside it you can assign a "color background" May 12 09:43:09 yes May 12 09:43:27 exactly what I've do for the background of the shadow layer May 12 09:43:38 ah but you said you added a layout May 12 09:43:41 but over it, I put a smaller layout May 12 09:43:42 ye May 12 09:43:55 like a Matrioska :D May 12 09:44:00 you just need to assign that shape in XML to the element in question, it will be behind it May 12 09:44:02 http://pastie.org/10184048 May 12 09:44:08 apply that to any item and see May 12 09:44:33 it gives as if casting shadow on it to the bottom right May 12 09:44:51 and makes the corners a little rounded May 12 09:45:11 ok, let me check May 12 09:45:13 thanks May 12 09:46:49 Hey guys, anyone dealt with python on android? How big will my package be at the minimum? May 12 09:46:57 how can i togggle the visibillity of a specific view when the soft keyboard is shown/hidden? May 12 09:47:05 pie_: you mean jython ? May 12 09:47:13 or kivy May 12 09:47:53 gordon_: I don't know, I'm doing my preliminary reasearch right now May 12 09:48:10 googling and stuff May 12 09:48:19 afaik jython isnt in good shape May 12 09:48:52 python sounds a little heavy for android, but I want to give it a shot. May 12 09:49:45 gordon_: do you know any good guides for getting into this? May 12 09:50:00 not really May 12 09:50:30 if you want to just try python without android specific code (activities and stuff) you can try out kivy first May 12 09:50:39 http://kivy.org/#home May 12 09:51:02 kivy looks pretty good May 12 09:51:54 but it wont look like android app then May 12 09:53:22 Odayn, it's little strange, bacouse your solution hasn't gradient May 12 09:53:22 trying to run espressotests using ./gradlew connectedAndroidTest but i keep getting these error messages. What's up? https://gist.github.com/xorgate/6eb3c960739fdbcec869 May 12 09:53:37 gordon_: how so? May 12 09:54:31 it doesnt compile to java but probably uses native code and has it's own gui library May 12 09:55:03 to me it looks like it can use the android apis(if it doesnt by efault) May 12 09:55:59 I didnt dive into it. But let me know if you figure it out May 12 09:56:09 gordon_: ok, Ill make sure I remember :) May 12 10:01:00 avinashrbhat, thank you ;) May 12 10:03:56 what the hell is gradle project sync? May 12 10:06:54 jutsi, it syncs your ide with gradle May 12 10:07:52 its stuck on Gradle project sync in progress... May 12 10:08:03 It failed earlier, so i tried to rebuild the project, but its stuck now again May 12 10:08:07 how you know its stuck and not taking sometime? May 12 10:09:07 good point May 12 10:09:20 though i did wait for it during my entire lunch which was like 30 mins May 12 10:09:25 oh May 12 10:09:32 then its stuck :p May 12 10:11:13 see this is why eclipse > android studio imo May 12 10:11:26 I second that May 12 10:11:31 the gradle console says BUILD SUCCESSFUL May 12 10:11:35 jutsi, nobody in here will force you to use AS May 12 10:11:52 danijoo but i get bullied everytime i mention that i use eclipse :( May 12 10:12:03 yup May 12 10:12:07 ^^ May 12 10:12:13 danijoo, yeah they will, by bashing away any idea of using eclipse May 12 10:12:36 so yeah there is forcing going on May 12 10:12:47 wakelock, because all new tools are released for gradle May 12 10:12:55 and because its way easier tbh May 12 10:12:58 new tools? May 12 10:13:08 you just have some starting issues because you are new to it May 12 10:13:26 jutsi, things like unit tests that arent available without gradle May 12 10:13:54 hello, I have a "system.img" a "userdata.img" a "ramdisk.img" a "cach.img" how can I install them in a sdcard and use it in pandaboard ?? May 12 10:13:54 danijoo no i made my previous app with AS, now i was gonna go update the app with some cool new stuffs, but can't do anything cuz of gradle sync May 12 10:14:01 danijoo, that's not a reason to enforce yall's views on others, if someone doesn't care about these fancy tools and all that crap, then let them be, respect their choice May 12 10:14:06 might be worth mentioning that i updated AS May 12 10:14:14 torpico, still the wrong channel May 12 10:14:56 wakelock, theres a difference in not respecting and not supporting May 12 10:15:09 bullying == not respecting May 12 10:15:11 wakelock: oh common man, where should I go : (( May 12 10:15:28 wakelock, I have never heard someone insulting you for using eclipse :p May 12 10:15:40 torpico, see topic of this channel May 12 10:15:59 danijoo, ha, right :p May 12 10:16:13 torpico, says clearly in the topics of both this and the other channel May 12 10:16:24 lrn2irc May 12 10:16:48 everyone using eclipse or even used it once sucks! May 12 10:16:51 :p May 12 10:17:00 wakelock: which channele you think can help me, I myself really have no idea May 12 10:17:01 now you can say you got insulted :p May 12 10:17:11 torpico, #android-root May 12 10:17:15 how heavy an operation is findviewbyid? would it generally be better (if I need to reference it more than once) to assign it to a class-scope variable when the view is initialised (assuming it doesn't go away during the lifecycle) May 12 10:17:29 or is it too small a difference to really be worth much fuss? May 12 10:17:55 danijoo, fair enough, I suck May 12 10:17:55 i would say the latter, but im not too into that May 12 10:18:03 * wakelock grabs the straw and sucks on the milkshake May 12 10:18:20 its just that a lot of things are easier in AS than eclipse (personal opinion) May 12 10:18:36 especially adding libraries and keeping them uptodate May 12 10:18:42 or buildflavours May 12 10:18:48 exactly, personal opinion, but most people like to enforce that on everybody and can't respect any other point of view May 12 10:19:07 "AS is so much better and easier and just plain awesome, if you can't see or appreciate that then you must be an idiot" May 12 10:20:30 i will admit that adding and using libs is easier with AS, but handling gradle is generally more bothersome May 12 10:20:51 maaaybe not if you've used it for years, but i will say that this isn't the first time i've been slowed down by gradle issues May 12 10:20:52 gradle is just a gigantic overkill if you ask me May 12 10:21:01 wakelock, maybe for hello world May 12 10:21:24 danijoo, no seriously, everything gradle does could have been done in a much leaner and less difficult way May 12 10:21:41 gradle seems to have been invented for build farms or something May 12 10:21:45 wakelock, can you give an example? May 12 10:22:16 lets say I have 30 libraries in my project, and want to update them to the newest version (all of them) May 12 10:22:35 how is it easier to replace 30 jars and aars instead of let gradle manage it May 12 10:22:47 well, this whole idea of having a "service" that has a background "daemon" with which you communicate and send commands to and have to sync everything to was necessary May 12 10:23:00 danijoo, you're missing the point May 12 10:23:02 stuff like this should not be a library: https://github.com/polok/localify tons of useless code to load an asset. May 12 10:23:30 er, wasn't necessary* May 12 10:24:02 tbh no reason to discuss this May 12 10:24:22 its your opinion and I wont be able to change it May 12 10:24:25 same vice versa :) May 12 10:24:38 looks like it May 12 10:24:40 thats why there are different tools May 12 10:24:44 for different people May 12 10:25:00 I will most definitely not make the switch to AS just because I was forced to by random people on the internet :p May 12 10:25:03 but if most use one specific one, you have to accept that there is less support for the other May 12 10:25:07 deamon is there for including startup speed (of compiler) May 12 10:25:28 danijoo, I don't expect support, I just expect to not be bashed at the first mention of it May 12 10:25:35 well another (major) downside is that you can't import an AS project into eclipse because of gradle May 12 10:25:42 unless you copy file by file May 12 10:25:55 jutsi, the idea was probably that you'd never want to switch back May 12 10:26:00 IT'S JUST THAT AWESOME May 12 10:26:09 isnt there eclipse gradle plugin ? May 12 10:26:17 jutsi: that takes around 1 min for me to do. just sayin May 12 10:26:33 surf2b1 i'd say its project dependant May 12 10:26:46 thats because you usually dont switch build tools every day.. May 12 10:26:51 http://gradle.org/docs/current/userguide/eclipse_plugin.html May 12 10:26:53 seems like there is May 12 10:26:57 you are free to write such a tool :) May 12 10:27:13 well im having the same issue as this guy http://stackoverflow.com/questions/22016666/gradle-sync-wont-finish-after-0-4-6-upgrade and this is the only instance of this issue i could find May 12 10:27:17 seems its unsolved May 12 10:27:38 danijoo, it's not just eclipse, every time I ever asked for help in here I only ever got bashed because of what I'm using, even though my problem/question never has anything to do with what I'm using May 12 10:27:51 they were all purely dev questions May 12 10:27:52 wakelock, can you give an example? May 12 10:28:14 last I asked is how to get the last Point (x, y) of a Path May 12 10:28:50 jutsi: more info: gradle plugin, AS version and operating system May 12 10:28:51 all I got was "who knows how this sh*t works on gingerbread" and similar, and then got redirected to SO May 12 10:28:55 and dependencies May 12 10:29:27 wakelock, because nobody does anymore :D May 12 10:29:39 nobody does...what? May 12 10:29:40 GB :( May 12 10:29:55 I know that pain May 12 10:30:03 knows GB May 12 10:30:15 not having to deal with 2.2 or 2.3 is a big comfort ;D May 12 10:30:16 I never even mentioned GB, people just assumed May 12 10:30:39 also, what I asked really has nothing to do with any specific android release, as this stuff exists in literally all of them May 12 10:30:48 this makes no sense. If you would have asked about a class thats used in 4.4, nobody would randomly say "fuck gingerbread" May 12 10:31:13 danijoo, I asked about a class that is used across *all of android* May 12 10:31:42 maybe the answer wasnt for you May 12 10:32:01 ha, nice try, but it was May 12 10:32:05 or it was ravilov :D May 12 10:32:10 :p May 12 10:32:12 ravilov is always insulting xD May 12 10:32:23 everyone for everthing May 12 10:32:31 only when they have it coming ;) May 12 10:32:38 How come the Gradle Java app from Android Studio never closes when closing Android Studio? It's such a pain in the ass to always close its process because it takes up 1GB of memory and it doesn't compress a single bit. May 12 10:32:47 gordon_ AS 1.2 and 'com.android.tools.build:gradle:1.0.0' for gradle.. windows 7 as OS May 12 10:32:54 LOL, another one with gradle problems May 12 10:32:59 Muchoz, thats the gradle background process May 12 10:32:59 * wakelock rests my case May 12 10:33:02 it has a 3h timeout May 12 10:33:26 danijoo, I don't need it running in the background while I'm not working on anything. It just sits there slowing my PC down. May 12 10:33:45 jutsi: try to delete gradle cache and set gradle plugin to the newest one May 12 10:33:45 omg i remember ravilov, he's the worst May 12 10:33:50 I've kind of grown tired of this AS and Gradle. They're such memory hogs, just like Chrome. May 12 10:34:16 well, I need to say 'yes' here May 12 10:34:17 gordon_ will gradle cache be deleted on invaldiate + restart? Also how do i set gradle plugin to newest? May 12 10:34:18 Muchoz, I feel your pain May 12 10:34:20 memory is the problem May 12 10:34:22 and still take less space for me than Eclipse May 12 10:34:23 Muchoz, maybe theres an option to disable the daemon. May 12 10:34:26 i never tried that May 12 10:34:31 but it will increase your build time May 12 10:34:47 jutsi: in build.gradle classpath 'com.android.tools.build:gradle:1.2.3' May 12 10:34:59 theres already an issue for that gradle daemon not being shut down May 12 10:35:07 please star it so it gets noticed :) May 12 10:35:13 I was told I actually need to manually enable the daemon or else gradle by default gets spawned for every single build May 12 10:35:19 danijoo, any link? May 12 10:35:30 Muchoz, no. you have to google it yourself :( May 12 10:35:37 somewhere in the issue board May 12 10:35:45 wakelock: or compile from console :) May 12 10:36:08 wakelock, yeah but without the process it should disappear after the build if there is no daemon May 12 10:36:21 but the spawning process has some overhead and therefor slows down the build process May 12 10:36:59 danijoo, exactly, I was just trying out AS and saying how this gradle build is so unbelievably ridiculously slow, and people said I probably didn't enable daemon mode May 12 10:37:02 danijoo, that's a lost cause like all of the Google project issue trackers. May 12 10:37:06 had no idea you have to enable it explicitly May 12 10:37:18 I've posted many issues, I have yet to receive a legit response from a single contributor. May 12 10:37:30 Why is there an androidTest dir under src in Android Studio? May 12 10:37:32 I'm not posting them anymore on Google issue trackers. May 12 10:37:38 jutsi, to test code. May 12 10:37:43 jutsi, er, for tests obviously? May 12 10:37:44 Muchoz, really? I posted like 4 issues yet and got responses from chris barnes in 2 or 3 of them May 12 10:37:54 what sort of tests? May 12 10:38:02 Unit Tests May 12 10:38:09 what ele? May 12 10:38:11 else May 12 10:38:28 why can i add a contact picture only to my google contacts ? i can read from sim and phone but i can't give any data May 12 10:38:37 gordon_ i did those things, but it's still stuck on Gradle project sync in progress... May 12 10:38:40 danijoo, you can call yourself lucky. I post on long issues that are never looked at and have been in the system for 1-2 years minimum. May 12 10:38:51 /test is for unit tests running in jvm and /androidTest for test running on a device May 12 10:38:54 jutsi: does it work from console ? May 12 10:38:55 sci-fic, have you acquired all the necessary permissions? May 12 10:39:24 Muchoz, maybe it just depends on the issue. Android with all its tools is such a large project that they only can work on the most important once at time May 12 10:39:25 wakelock:i think yes May 12 10:39:29 gordon_ does what work from console? And which console? May 12 10:39:48 windows console -> can you install your app from console May 12 10:40:03 danijoo, then they should have a look at the issues first before updating the version. May 12 10:40:17 That's no excuse for issues that last 1-2 years May 12 10:40:23 wakelock: i debugged it , it returns true which means yes i updated this May 12 10:40:26 Muchoz, it is if its a small one May 12 10:40:28 gordon_ i haven't tried, but its a deployed app.. its already on google play, so i have been able to do this in the past... I just updated AS today and got this issue May 12 10:40:32 Let's be honest here May 12 10:40:39 or maybe they just dont know how to fix it right now :) May 12 10:40:41 or whatever May 12 10:40:41 Why does Android not have keyboard events? May 12 10:40:51 maybe it just didnt got enough attention and failed :) May 12 10:41:00 Muchoz, keyboard events? May 12 10:41:02 It is literally impossible to know for sure whether the keyboard is shown for example. May 12 10:41:03 jutsi: do you have any error or it just loops forever ? May 12 10:41:03 it has those.. May 12 10:41:10 Muchos can't you use inputchanged for keyevents? May 12 10:41:24 Key events, not keyboard shown events May 12 10:41:25 there are keyboard listeners May 12 10:41:35 gordon_ gradle console is empty and i have the yellow ribbon on top that says Gradle project sync in progress May 12 10:41:38 that you can use to cache keyboard key presses May 12 10:41:40 danijoo, show me. I've looked for a solid week. May 12 10:41:42 catch* May 12 10:41:46 sek.. May 12 10:41:55 See? Not even a good event for it? May 12 10:41:59 Is it hard? Probably not? May 12 10:42:09 Android is really starting to get on my nerves. May 12 10:42:28 Oh that AlertDialog? You need a library to customise the colors for example. May 12 10:42:31 Muchoz, for example EditText#setKeyListener() May 12 10:42:32 Muchoz: deal with it ;) May 12 10:42:38 No, I'm not implementing the buttonStyle defined in your theme... May 12 10:42:54 Muchoz: get custom fragment dialog May 12 10:43:13 ads a keylistener and youll get notified for every key press ont he keyboard May 12 10:43:15 but Muchoz can't you make an invisible inputfield and check for letters typed? May 12 10:43:18 so whats your problem? May 12 10:43:21 gordon_, this unexpected behaviour is something I would expect from a language like PHP, not Android. May 12 10:43:30 haha May 12 10:43:46 also alertdialog doesnt need a library.. May 12 10:43:48 Muchoz: so, time to switch to ubuntu phone? ;) May 12 10:44:01 it even uses colorAccent and colorPrimary since latest appcompat May 12 10:44:07 gordon_, time to switch to iOS perhaps. May 12 10:44:17 havent tried May 12 10:44:19 dont want to May 12 10:44:24 i think XCode is the only thing worse than AS May 12 10:44:42 there's AppCode May 12 10:44:44 I'm not talking about IDEs May 12 10:45:05 I'm talking about the sheer retardedness of Android in its current form right now May 12 10:45:06 yes, I know. May 12 10:45:07 so Muchoz just ignores my suggestions :( May 12 10:45:32 danijoo, for the keyboard it is still impossible to know for sure whether the keyboard is shown or not. May 12 10:45:49 You cannot be 100% sure that the user somehow closed the keyboard. May 12 10:45:49 Muchoz, not true May 12 10:45:56 Tell me how May 12 10:46:10 And then tell me why there isn't a simple API for it. May 12 10:46:17 onConfiguarionChange method May 12 10:46:27 is called everytime its hidden/shown May 12 10:46:46 still I'd rather use something open source than ios May 12 10:46:49 It is also called when your orientation changes. May 12 10:46:54 and the Configuration parameter passed to it has a flag indicatiing if keyboard is shown or not May 12 10:47:02 What if the user has a Touchwiz phone and multitasks? May 12 10:47:07 Configuration.KEYBOARDHIDDEN_YES May 12 10:47:09 onConfigurationChanged will also be called. May 12 10:47:24 simple if clause.. ;) May 12 10:47:36 danijoo, http://stackoverflow.com/questions/6279771/onconfigurationchanged-not-firing-for-keyboardhidden May 12 10:47:54 There even is a bug in there and it's still not fixed last time I checked. May 12 10:48:02 2 years almost since that post. May 12 10:48:24 See what I mean? It's irritating. May 12 10:48:35 no i dont see what you mean, sorry May 12 10:49:13 im gonna update / install some sdks in case that fixes my issues... May 12 10:49:56 is gradle a part of the build tools? May 12 10:49:56 I also dont know why you still try to develop for android if you hate it that much May 12 10:50:16 I don't hate it, it just gets on my nerves sometimes and I need a place to vent. May 12 10:50:22 needed* May 12 10:50:29 ever develop for windows phone? I find it so easy May 12 10:50:41 Muchoz, could you give me an example on when you want to know if keyboard is shown or not? I cant think of one May 12 10:51:18 probably to adjust a camera image or something, to having the keyboard up? May 12 10:51:31 jutsi, android does that automatically May 12 10:51:38 danijoo, there is a bug where when you center text in an EditText the adjustPan does not trigger once you open the keyboard, hide it and open it again. I can take that into account in my code because that bug hasn't been fixed in I think 3-4 years; May 12 10:51:44 jutsi: no, there's gradlew script which downloads gradle May 12 10:51:54 but for android studio gradle is bundled with it May 12 10:52:14 gordon_ so updating SDKs will have no effect on my issue ? :( May 12 10:52:26 you should update sdk's May 12 10:52:44 also, try update AS May 12 10:52:53 newest version is 1.2.1 May 12 10:52:57 or 1.2.1.1 May 12 10:53:18 where can i check the exact number? On help -> About i only got 1.2 May 12 10:53:19 Muchoz, I agree there are some old annoying bugs May 12 10:53:21 no points after May 12 10:53:26 but its the same for every piece of software May 12 10:53:35 that is not a privilege of android May 12 10:54:38 android has its issues, so has iOS and windows phone May 12 10:54:45 jutsi: so try to update May 12 10:54:58 ok tried "Check for updates" and it says i have the most recent version May 12 10:55:07 ugh... May 12 10:55:38 you accurately described my attitude towards AS with your previous statement :) May 12 10:55:44 But come on.. 4 years and still not fixed? Give me a break. May 12 10:55:54 Muchoz, pecause its a tiny one May 12 10:55:57 nothing OS breaking May 12 10:55:58 jutsi: http://stackoverflow.com/questions/19932793/syncing-android-studio-project-with-gradle-files May 12 10:56:15 The issue tracker doesn't seem to say so. Quite a few people reporting it constantly and multiple duplicates. May 12 10:56:35 It gets marked as duplicate, but then they don't give a single fuck. May 12 10:56:57 gordon_ found that earlier, and i've done invalidate caches + restart a ton of times by now, and sync option under android is grayed out May 12 10:57:09 because its not OS breaking May 12 10:57:54 there is a limited manpower. You cant fix every bug. And if they have to chose between a text not being aligned properly for one specific setup, and a memory leak draining battery life - its easy to make a choice May 12 11:04:14 memory leakz May 12 11:05:35 my keyword! May 12 11:07:10 gonna try downloading newest build tools and have gradle use those May 12 11:07:27 if that doesn't work, ill put the whole project into eclipse and uninstall Android Studio May 12 11:07:54 jutsi, do you still have the never-ending sync problem? May 12 11:08:02 didnt follow your chat, sorry May 12 11:08:22 danijoo yes May 12 11:08:27 :/ May 12 11:08:29 good luck May 12 11:08:44 thanks, i've a feeling i'll need it :) May 12 11:08:51 or screw it and just get normal intellij communiy ? May 12 11:08:59 never experienced that so i cant help :/ May 12 11:09:12 but have you tried manually cleaning gradle cache and killing the daemon? May 12 11:09:36 "have you tried turn it off and on again?" May 12 11:09:38 hehe thats one way of making a programmer feel like dean winchester, killing daemons :) May 12 11:09:40 ^^' May 12 11:10:02 remember that you need to restart it at least three times May 12 11:10:24 gordon_ think i've restarted for every solution i've tried so far, so atleast 7 May 12 11:10:26 and place your computer in a pentagram made of blood May 12 11:11:24 how long does a gradle sync usually take? May 12 11:11:40 Since there is java in my computer, I already treat it as possessed. May 12 11:12:12 jutsi, this highly depends on the number of libraries involved and if they are already cached May 12 11:12:28 between a few seconds and some minutes May 12 11:12:41 never took more then 10 for me i think May 12 11:12:56 on a pretty large project with submodules and like 10 or 20 libraries May 12 11:12:58 danijoo i haven't used any external libs for this particular project May 12 11:13:12 also on your network speed and CPU May 12 11:13:53 have you tried deleting .gradle? May 12 11:14:21 no May 12 11:14:23 i have not May 12 11:14:33 do it :) May 12 11:14:38 will take a long time after that though May 12 11:14:44 because it needs to redownload gradle May 12 11:14:45 which view do i find it under? May 12 11:14:47 project? May 12 11:14:51 yep May 12 11:15:02 the whole .gradle folder? :O May 12 11:15:07 yeah May 12 11:15:13 if will redownload gradle manually after that May 12 11:15:18 and then rebuild? May 12 11:15:24 yep May 12 11:15:47 you could do it from terminal to get a nice log of whats going wrong May 12 11:15:59 together with --stacktrace as parameter May 12 11:16:12 BUILD SUCCESSFUL Total time: 10.699 secs May 12 11:16:25 you deleted .gradle? May 12 11:16:29 and its 10s? May 12 11:16:54 mhm May 12 11:17:07 if this is the case, your project configuration is wrong. May 12 11:17:11 and it doesnt use the wrapped gradle May 12 11:18:22 ok, but the gradle console gives me nothing to go on May 12 11:18:31 where can i find whatever it is that i need to fix? May 12 11:18:55 please show your gradle-wrapper.proerties file May 12 11:19:06 also HOW? I already made and released this whole project on AS to the playstore. I just updated it and it started perpetually syncing May 12 11:19:08 its in the /gradle directory May 12 11:19:28 never update when you want to work :p May 12 11:19:43 ok so which view is that under? May 12 11:19:58 nvm found it May 12 11:20:04 the file is in /gradle directory May 12 11:20:23 http://pastebin.com/q3x1iPxc May 12 11:20:53 looks ok. May 12 11:21:50 no idea then. sorry :/ May 12 11:22:45 yeah it seems to be a rare issue May 12 11:23:06 you could try to reimport the whole project May 12 11:23:33 to let AS recreate the whole gradle stuff May 12 11:24:39 ok how? May 12 11:25:45 close AS, open the project in an explorer and delete /.idea, /.gradle, /gradle and every .iml .iws file May 12 11:26:11 ok May 12 11:26:12 then open AS again and select to import a project from gradle -> choose your /build.gradle file May 12 11:26:17 maybe make a backup first :p May 12 11:26:56 i never did this but TacticalJoke says this works like a charm :x May 12 11:27:09 well i'll be damned, it works May 12 11:32:52 Hey guys, May 12 11:33:23 hi May 12 11:33:39 why is it so complicated to customize a theme in android. I want to customize the Holo theme of android but many point me to this site http://android-holo-colors.com/ May 12 11:33:58 it's not complicated at all May 12 11:35:45 Hey, I have to following JSON: http://pastebin.com/4g83zLCz - I need to verify the status and message, and then create a list of service items (id/name), using GSON what is the order of operations needed here? May 12 11:36:34 how do i create something like this http://developer.android.com/design/media/tabs_scrolly.mp4 May 12 11:37:49 jutsi, using a library is the easiest way May 12 11:38:12 danijoo which one tho? May 12 11:39:39 https://android-arsenal.com/tag/111 May 12 11:39:44 chose one :) May 12 11:40:09 thepoosh: k, well I found it complicated then can you point me to some resources? May 12 11:40:22 ViewPagerIndicator by JakeWharton is prominent in here May 12 11:40:33 i like it May 12 11:40:40 MaterailTabs is kinda nice too. And more liteweight May 12 11:40:55 ViewPagerIndicator is nice to customize and extend May 12 11:51:07 guys if some of u updated contacts before, i try this http://paste.ubuntu.com/11094734/ it works good on my nexus but don't update in samsung s4 mini or vodafone smart mini May 12 11:52:40 i did some tests and i realized that code updates only google accounts(contacts).Sim or phone cannot be updated however no error occurred May 12 11:52:59 hi can anyone help me with android services May 12 11:53:26 ask a question about it May 12 11:55:01 i want to run a service, which will fetch some periodically, my application will shut down bt still the service should run and fetch the data. and if the user opens the application he can can use those collected data May 12 11:55:34 use a SyncAdapter May 12 11:55:35 the data is small number not big, it can be stored in the List May 12 11:57:16 is there a trivial way to intercept onClick events for and AlertDialog message? May 12 11:57:37 i want to create custom links but cannot use HTML for design reasons May 12 11:58:07 I'm working with SpannedString May 12 11:58:48 rathodvikas10: you can also schedule with AlarmManager May 12 11:59:26 you should ask MikeWallaceDev, thepoosh May 12 11:59:41 thepoosh, why cant you use Html links in your spannable May 12 11:59:45 MikeWallaceDev_: are you hear? May 12 11:59:56 he had a long talk about SpannableString May 12 11:59:57 I thin the only other way is to use a custom view instead of setMessage May 12 12:00:01 danijoo: because I'm using
    which is not supported May 12 12:00:12 i need to make a network call, can i do this with alaramManager May 12 12:00:16 thepoosh, you can make it supported May 12 12:00:22 but I think custom view is easier May 12 12:00:27 not sure May 12 12:00:34 even though you might be right May 12 12:00:41 i was using a WebView until now May 12 12:00:46 but QA said it was crappy May 12 12:01:02 thepoosh, id use a custom layout and set OnClickListener May 12 12:01:05 rathodvikas10: the AlamManager will trigger the service that will, in turn, send the request May 12 12:01:20 but you could also write a custom taghandler that supports your
      tags and make it a spannable May 12 12:01:20 but then I nned it only for the specific parts May 12 12:01:22 just a sec May 12 12:01:35 http://developer.android.com/reference/android/text/style/ClickableSpan.html or that May 12 12:01:54 adq: I tried setting a UrlSpan May 12 12:02:02 but it's not triggering anything May 12 12:02:05 I'll try this May 12 12:02:16 ok and then i will stop the alaram when the task is completed May 12 12:02:37 rathodvikas10, alarmManager isnt only for "alarms". May 12 12:02:51 it lets you set a time and a task that will run at given time May 12 12:03:21 you could say "run xyz in one hour", and when this is run, you set another alarmmanager task for the next hour May 12 12:03:26 http://imgur.com/uJZLRxi May 12 12:03:29 this is what is shown May 12 12:03:36 now i need to intercept click events May 12 12:03:38 syncadapter basically does the same but makes sure that you have a network connection May 12 12:04:02 and fix the typo on updateds thepoosh :p May 12 12:04:04 danijoo: SyncAdapter is hard to mannage May 12 12:04:13 thepoosh, true. May 12 12:04:34 but its better for battery and has some other advantages too May 12 12:04:42 true dat May 12 12:04:56 but i will never get why it forces the account stuff May 12 12:05:02 nonsense May 12 12:05:05 yeah May 12 12:05:27 even though we do use the AccountManager, I still don't understand why they are so tied togeather May 12 12:05:36 *together May 12 12:06:15 ok, i had a doubt, can i start a service without starting the application May 12 12:06:21 trying SdkManager gradle plugin by JakeWharton, but when i add sdkManager {} (as per documentation) gradle gives me this error (at the end) https://gist.github.com/xorgate/44df5356b93483de8206 any ideas? May 12 12:06:28 thepoosh, should those links open a browser? May 12 12:06:31 adq: UrlSpan extends ClickableSpan May 12 12:06:34 or do you need to fire a custom intent May 12 12:06:37 yet the onClick is not being called May 12 12:06:51 custom intent May 12 12:06:56 weird May 12 12:07:15 i also tried setting the manifest to listen to custom URI and intercept that May 12 12:07:18 no good May 12 12:07:20 whats your code for the onlick, the poosh? May 12 12:07:33 it's in a dialog May 12 12:07:56 just a sec May 12 12:07:57 you have a LinkMovementMethod right? May 12 12:07:57 pasting May 12 12:08:03 nope May 12 12:08:05 just a sec May 12 12:08:09 ahhh probably the cause May 12 12:08:24 i don't have any snippet near me, but i used it in a project monthes ago May 12 12:09:10 http://stackoverflow.com/a/5681946/1373568 something more or less like that May 12 12:09:38 adq: danijoo: https://gist.github.com/yishai-glide/4a03a76c6e51cac8a967 May 12 12:11:31 thepoosh, have you tried if the spannableString works if you set it on a textview instead of dialog? May 12 12:11:37 to narrow the prolblem down May 12 12:11:47 well, it then looks terrible May 12 12:11:48 :) May 12 12:11:59 checking now May 12 12:11:59 could be that you need to access the textview of the alertdialog to setMovementMethod(LinkMovementMethod.getInstance()); May 12 12:12:15 i see the text is passed to the builder setter May 12 12:12:50 maybe I'll do it with reflection May 12 12:13:00 because it could be the dialog not accepting spans and the span not working May 12 12:13:02 i dunno May 12 12:13:07 http://stackoverflow.com/a/2000784/1373568 May 12 12:13:09 yeah May 12 12:13:35 he passes a textview to setView May 12 12:13:50 instead of the text to setMessage May 12 12:13:56 yep. because you dont know what dialog actually does with your spannable May 12 12:14:02 it may just extract the textinformation May 12 12:14:15 if you use a textview you know whats happening May 12 12:15:19 brb May 12 12:15:25 how do you comment selected text in AS? May 12 12:15:35 ctrl + / May 12 12:15:41 ^ jutsi May 12 12:15:47 or ctrl + shift + / May 12 12:16:46 danijoo, what i found alarmManager itself is a service, so i am calling my service form another service. so why not start my own service and stop it when i need it May 12 12:16:47 its not working for me May 12 12:16:51 lol May 12 12:17:03 then go to your settings, search in it for keymap May 12 12:17:10 rathodvikas10, because every running service drans battery May 12 12:17:18 and alarmmanager service already runs 24/7 May 12 12:17:32 and is already implements and you dont have to do it :) May 12 12:18:02 ok May 12 12:18:29 it adds a bookmark for me -.- May 12 12:19:36 rathodvikas10: AlarmManager is a system class May 12 12:20:15 jutsi: https://www.jetbrains.com/idea/help/navigating-to-action.html this command week be your new best friend May 12 12:20:35 s/week/will/ May 12 12:21:30 i just went to shortcut editor and made one myself May 12 12:21:30 lol May 12 12:22:21 jutsi: :| May 12 12:22:34 ok, if i start any service form AlarmManager will i have to stop my local service manually May 12 12:22:37 hey guys i have this activity layout http://pastebin.com/47gK9S2b everytime i launch it get this error java.lang.IllegalArgumentException: width and height must be > 0 and the things about android.graphics.bitmap.cretabitmap i can't figure out where it's coming from May 12 12:22:48 adq: when setting a TextView as the View of the Dialog it works but looks bad May 12 12:22:55 will take another look May 12 12:22:57 rathodvikas10, why do you want to start a service from it May 12 12:23:01 just execute your task May 12 12:23:16 thepoosh, at least it works ; May 12 12:23:27 I have a viewpager that doesn't show change. But the instant I touch the screen (scroll event I take it) it instantly draws everything. May 12 12:23:29 you guys know anything about using pyqt on android? May 12 12:23:56 and calling invalidate() on it doesn't seem to do much. Anyone ideas? May 12 12:24:00 it want to fetch data every 2 min May 12 12:24:27 every 2 mins? holy shit May 12 12:24:29 hert: Can you pastebin the stack trace? May 12 12:24:35 please tell me the name so I never install it. May 12 12:24:36 and do some processing and send it back to server May 12 12:24:36 adq: it now looks like this: http://imgur.com/41C3ZXH May 12 12:24:52 unlike previous this: http://imgur.com/uJZLRxi May 12 12:24:54 lack of padding May 12 12:25:00 try to publish your update in the post method of the element May 12 12:25:01 hert: your answer is in your stack trace May 12 12:25:06 but not the entire day just for an hour or so May 12 12:25:07 textcolor also May 12 12:25:14 not much needed to fix it May 12 12:25:18 rathodvikas10, running a task every 2 mins will make every phones battery drain in a few hours May 12 12:26:03 so what is other alternative i need to get data form the server and do some processing and send it back to server, how can i do it May 12 12:26:24 you can create account May 12 12:26:31 Android can manage it May 12 12:27:10 adq: i forgot to apply the CotextThemeWrapper May 12 12:27:16 trying again May 12 12:27:34 nope May 12 12:28:14 android dev in a nutshell, even on an little "what's new", it takes hour to get it right May 12 12:28:21 a* May 12 12:32:31 :S May 12 12:33:13 danijoo, ok i found this, i thing this is the best way to do it, what you suggest on this?? http://simpleandroidtutorials.blogspot.in/2012/06/periodically-update-data-from-server-in.html May 12 12:35:35 danijoo, I think you should use SyncAdapter May 12 12:35:36 https://developer.android.com/training/sync-adapters/creating-sync-adapter.html May 12 12:35:55 is the dedicated component to sync your app with your server May 12 12:36:08 icemanbp, and i think you dont mean me :) May 12 12:36:40 probably :D I'm just hearing somebody have that problem May 12 12:42:04 Hi guys i just had the weirdest bugg. I was fixing some styles for my app and now the cursor on EditTexts are white and my checkboxes dont have any custom styles anymore. I have reverted to the old styles file via git but the styles are still weird. Anyone else had this issue?= May 12 12:44:01 Nope, but it'd be easier to figure stuff out if we could see the diff. May 12 12:45:01 Hmm it's just so weird. May 12 12:45:32 I did accidentaly change some build files. Could that be the issue? May 12 12:46:00 It gave me an error in the manifest file so i changed it but apparently the error was in the build manifest May 12 12:46:15 so i changed the build manifest by accident May 12 12:48:35 Something must have been corrupted but i have tried to clean the project and rebuild it. May 12 12:49:00 Because i only set the style for one activity and the activity that has issues is another one May 12 12:49:27 Hah it works now May 12 12:49:59 i changed something in the gradle file and then i changed it back. When i synced the gradle file it fixed the problem May 12 13:03:20 I found out what the problem i had was. It was related to this https://code.google.com/p/android/issues/detail?id=169760 if anyone else get the issue. May 12 13:04:21 is it possible to put a pagertitlestrip inside a fragment rather than the main activity? May 12 13:09:11 jutsi: yes May 12 13:09:32 how? i tried but got exceptions May 12 13:11:37 jutsi: you should pass getChildFragmentManager instead of getFragmentManager to ViewPager May 12 13:12:05 jutsi: not sure if it is good thing to do. there are some problems with nested fragments May 12 13:13:09 hai May 12 13:15:35 any tips to implement a "show password" checkbox function? May 12 13:16:06 icemanbp, simple checkbox and a listener on it that switches on/off the hide password feature of edittext May 12 13:16:42 ye, but once it change to TYPE_CLASS_TEXT, never able to hide again :D May 12 13:17:04 this is the type for the password TYPE_TEXT_VARIATION_PASSWORD May 12 13:17:47 huh? you can just set that again May 12 13:17:53 and it will be hidden again May 12 13:18:14 I wish so, but it's not the real life May 12 13:18:45 editTxt.setTransformationMethod(PasswordTransformationMethod.getInstance()) does not work? May 12 13:20:34 I using checkBox.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); May 12 13:20:41 and it doesn't work May 12 13:20:49 try my approach :) May 12 13:20:57 ye, just now May 12 13:21:01 what is the difference? May 12 13:21:07 setTransformationMethod(null) to show it in clear text May 12 13:21:54 yes, but what is the difference of two ways? May 12 13:22:06 the difference is one works, the other doesnt :P May 12 13:22:19 gne gne gne... May 12 13:22:23 no idea tbh ^^ May 12 13:22:30 ok :) May 12 13:22:54 i guess one is applied to the existing text and one is only applied to new input or sth like that May 12 13:23:20 how to add a Gradle dependency in an Android Project ? May 12 13:23:42 maybe my ways is the one to use when you create layout from code not from xml May 12 13:23:53 in build.gradle, dependencies :D May 12 13:23:58 icemanbp: Gradle DSL method not found: 'compile()' May 12 13:24:32 the line I added was: compile 'com.jakewharton:butterknife:6.1.0', right below the line: classpath 'com.android.tools.build:gradle:1.1.1' in my build.gradle May 12 13:25:03 compile inside of dependencies {} element May 12 13:26:32 ~pastebin May 12 13:27:05 argl, alright, I see, thanks May 12 13:27:26 I feel like and idiot now :| May 12 13:28:05 alright. attempting gradle build day 2 begins May 12 13:28:32 welcome to the club quelqun_dautre May 12 13:29:11 anyways im off, thanks for today guys :) May 12 13:33:26 I can't force my viewpager to redraw itself with force layout invalidate or requestlayout. but the instant I scroll the screen the tiniest bit the blank view pager instantly populates May 12 13:33:29 :I May 12 13:34:15 Anyone used Otto and EventBus? I just tried Otto and didn't like that lint marked @Subscribe methods as unused and little to non compile time errors for subscribers May 12 13:38:40 snowpong, are you using proguard? May 12 13:40:45 danijoo: not at the moment no May 12 13:41:28 show your code May 12 13:42:01 danijoo: which part? May 12 13:42:38 the otto part? May 12 13:44:34 snowpong, the methods will always shoe as unused May 12 13:44:57 snowpong, Can't do a thing about it May 12 13:45:04 pfn: I believe the intellij plugin from otto might fix it, but it's outdated atm May 12 13:45:29 ignore it May 12 13:50:53 Why is clojure not suitable on android for now? May 12 13:51:25 Why is it not apart from a long load time? May 12 13:53:39 Huh? May 12 13:54:08 Oh, "Clojure". I read "closure". May 12 13:55:00 i wanna write to a file and then share it May 12 13:55:05 text file May 12 13:55:17 i am confused which methods to use May 12 13:55:29 http://clojure-android.info/ May 12 13:55:44 This section says stuff: "Everything comes with a price. Clojure-Android has a couple of drawbacks and peculiarities you should consider before jumping into development." May 12 13:55:47 ARRRRRRGHHHHHHHHHH! May 12 13:55:50 hey May 12 13:56:18 STILL cant get usb debugging working on this damn pc May 12 13:57:39 "it takes some time for simple application to load (3-4 seconds, depending on the device" -- jeez. May 12 13:58:11 crocket: Check out Kotlin. It's a way better fit for Android. May 12 13:58:38 TacticalJoke, I heard about kotlin. May 12 13:58:42 Nick-S: Depends. May 12 13:59:02 TacticalJoke, Skummet is said to solve the slow loading time problem. May 12 13:59:15 TacticalJoke, https://play.google.com/store/apps/details?id=com.swiftkey.clarity.keyboard is written with Skummet and clojure. May 12 14:00:04 crocket: https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhCqTt29hG8P44aA9W0DM8/ May 12 14:00:44 TacticalJoke: on what? May 12 14:01:01 Skummet still has a 1-secomd delay, according to what I'm reading. May 12 14:01:17 second* May 12 14:02:08 Does android 5.1 support java 8? May 12 14:02:15 No May 12 14:02:20 TacticalJoke: theres openFileOutput but then how do i share the file May 12 14:02:24 When will android support java 8? May 12 14:02:26 5.3? May 12 14:02:45 Not in the for seeable future May 12 14:03:12 s/for seeable/foreseeable/ May 12 14:03:41 crocket: Check out that link I just posted. May 12 14:03:45 How is kotlin compared to scala and clojure? May 12 14:03:52 TacticalJoke, I skimmed through it. May 12 14:03:54 Nick-S: What do you mean by "share"? May 12 14:04:16 TacticalJoke: like getting a nify 'gmail' facebook menu so i can send the file as attached May 12 14:05:33 nifty May 12 14:06:26 Nick-S: http://developer.android.com/training/sharing/send.html May 12 14:06:57 has anyone here done paid/free version of their apps on the store? May 12 14:07:25 real world experience where the apps are both on the store and you are cashing in from ad clicks? May 12 14:07:30 OK but how do i know the equavilent file path to the file i write to when i go openFileOutput("myfile", MODE_PRIVATE).write(s.getBytes()) May 12 14:07:49 http://blog.gouline.net/2014/08/31/kotlin-the-swift-of-android/ May 12 14:07:51 crocket: Why are you so set on Clojure? From everything I've read, dynamically typed languages aren't really a great fit for Android development. May 12 14:08:03 TacticalJoke, What about scala? May 12 14:08:10 please don't call kotlin the swift of android May 12 14:08:13 Scala had been great on android. May 12 14:08:31 TacticalJoke: and what if i wanna reset (delete) that file May 12 14:08:36 i dont know its path May 12 14:08:45 There's a guy in here who swears by it, but I know of a few experts who say the runtime is too big to take it seriously on Android. May 12 14:09:07 You can't delete something if you don't know where it's at May 12 14:09:08 crocket: IMO, Kotlin is the most compelling Java replacement (if talking Android programming) by far. May 12 14:09:13 pfn: best "fix" I can see is using @SupressWarnings like here https://github.com/square/tape/blob/master/tape-sample/src/main/java/com/squareup/tape/sample/SampleActivity.java#L72 May 12 14:09:28 TacticalJoke, Why? May 12 14:09:37 TacticalJoke: should i just use FileWrite(new File("myfile"))? May 12 14:09:57 The runtime is small, its interoperability with Java is very good, it emits JVM-6 bytecode, etc. May 12 14:10:04 That document talks more about its suitability. May 12 14:10:35 TacticalJoke: modern rich language, also REPL on Android is fun -- change layout or method, hit refresh - you have it on the phone. but mobile performance points stands (also IDE support) May 12 14:10:37 Nick-S: Not sure; sorry. May 12 14:10:46 hehe :)( May 12 14:10:51 hit the guru :) May 12 14:11:05 sorry i'm just frustrated, it doesn't mean i need to be mean May 12 14:11:24 and don't say 'i am not a guru' all guru's say that May 12 14:11:29 haha May 12 14:11:45 shit i'm talking this to a person nicknaming himslef TacticalJoke... May 12 14:11:52 i'm risking myself heavily here May 12 14:11:58 Nick-S: why do you need to write to a file May 12 14:12:15 yiati: i wanna have a log file, and then be able to mail it May 12 14:12:39 or upload to drive or whatever May 12 14:13:41 Nick-S: check this lib out either to use or for reference, https://github.com/mattprecious/telescope May 12 14:13:53 crocket: Both Clojure and Scala are not recommended on Android May 12 14:13:56 please don't call kotlin the swift of android May 12 14:13:59 why? May 12 14:14:08 Jake says that, I repeat it May 12 14:14:11 it is the truth May 12 14:14:17 oh geez 10x May 12 14:14:19 trhuth because Jake says it? May 12 14:14:20 CedricBeust, Why is scala not recommended on android? A few years ago, Scala was recommended. May 12 14:14:26 we must idolize SOMEONE offs May 12 14:14:30 ffs* May 12 14:14:40 idolize me :o May 12 14:14:41 why is this channel the oenly place where kotlin is actually brought up? May 12 14:14:43 you are 2nd May 12 14:14:46 no 3rd May 12 14:14:49 crocket: No it never was really. A few reasons: 1) its runtime is 50k 2) it's not developed for mobile 3) Typesafe doesn't support Android 4) Scala will soon move to Java 8 May 12 14:15:00 Nick-S, theres also #kotlin :p May 12 14:15:14 cotillon won't help you if asking about how it can be applied on android, trust me May 12 14:15:16 #kotlin is a graveyard. :D May 12 14:15:18 #kotlin* May 12 14:15:30 are you guys saying its better to code scala cuz its gonna be more widely adopted? May 12 14:15:37 I'm hoping Kotlin takes off, and then we can say "I used to hang in #kotlin when it was silent all day". May 12 14:15:42 "I used Kotlin before it was cool." May 12 14:15:45 No, stay away from Scala. Kotlin is worth looking into though May 12 14:15:52 its just android being one of the runetime where kotlin has a future May 12 14:15:57 I'm not sure about kotlin, yet. May 12 14:16:04 because we can only use jvm languages May 12 14:16:06 i took a good look at kotlin and its way cooler than scala, but it seems like scala is much older May 12 14:16:07 and kotlin is a good one May 12 14:16:12 coding for android reminds of ancient parable "He who built his house on the sand May 12 14:16:14 for other stuff, you can just avoid jvm :p May 12 14:16:19 Nick-S: Correct, Scala is 10+ years old May 12 14:16:21 crocket: It's better than anything else. May 12 14:16:29 TacticalJoke, on android? May 12 14:16:31 Yeah. May 12 14:16:34 kotlin, android, scala, you still need to release something useful instead of debating how efficient your code is May 12 14:16:49 i had to learn swift so i took a look at scala in the same time and i must say its very tempting to write code in kotlin May 12 14:16:51 Clojure is virtuous, and why would you avoid JVM itself? May 12 14:16:55 It's about the efficiency of the entire development process. May 12 14:17:00 i think i'll write Whatslap in kotlin! May 12 14:17:02 And the programming language is a huge factor there. May 12 14:17:08 it's about what you do with all of this after you've decided what to use May 12 14:17:08 clojure btw is not as interesting for me May 12 14:17:09 jdk is the sweet spot imho May 12 14:17:14 er ndk May 12 14:17:15 nothing else May 12 14:17:28 they cant even keep their java build tools consistent for 5 years May 12 14:17:54 Those parentheses make me feel ill. ;| May 12 14:18:05 In any Lisp dialect. May 12 14:18:08 danijoo, Why would you avoid JVM on PCs? May 12 14:18:08 any of you guys writes a project with kotlin/scala/clojure? May 12 14:18:23 crocket, you cant say that generally May 12 14:18:38 danijoo, You said you would avoid JVM outside android. May 12 14:18:45 good question Nick-S May 12 14:18:52 crocket, no I didnt May 12 14:19:00 i sayed on can May 12 14:19:03 all i want is a fricking log file!!! :) May 12 14:19:03 one can* May 12 14:19:11 exactly Nick-S :P May 12 14:19:15 danijoo, In everyday conversation, that sounds like you want to avoid it. May 12 14:19:28 guys i program for more than 25 years May 12 14:19:29 what I mean is, if someone does not like java/jvm, he can avoid it and use May 12 14:19:36 wat May 12 14:19:45 for android you cant. so if you dont like java, you use kotlin or scala or whatever May 12 14:19:45 i always wanted to use as many languages to have amazing code May 12 14:19:52 but eventually all ways lead to the same dump hole May 12 14:19:58 this is why kotlin is a bigger deal in android then it is somewhere else May 12 14:20:01 yep, useless outcome May 12 14:20:09 c++11 / c++14 will serve u far and wide with unrivaled consistency May 12 14:20:10 TacticalJoke: here you go http://clochure.org/ May 12 14:20:33 and when working in a team or for company its quite rare to adopt small technologies cuz noone would be able to pick up from where you ditched May 12 14:20:42 Hah. May 12 14:20:44 thats why PHP is so fucking huge May 12 14:21:03 c++11 and javscript (node.js for serverside) are only languages anyone needs to know May 12 14:21:06 if you write a desktop up and you feel like "java sucks!", you dont look for that language in beta state that also runs in jvm May 12 14:21:11 CedricBeust, 1) 50k of runtime is not a big deal for some types of programs 2) Is there any language developed for mobile? 3-4) This is a valid argument May 12 14:21:13 for android, you dont have a choice May 12 14:21:35 i think the newest adopted thing on the block in past few years is mongo and nodejs May 12 14:21:49 crocket: It means Scala is pretty much for toy projects only. You will hit the 65k limit very quickly when you start at 50k May 12 14:21:51 Nick-S: Kotlin hasn't hit 1.0 yet. I think a lot of people will move to it once it does. May 12 14:21:54 ThinThread, you write your server scripts in c++ and compile them May 12 14:21:55 crocket: But go ahead, try it May 12 14:22:02 or do you use node.js for that? :o May 12 14:22:04 In fact, I've seen many posts on /r/androiddev in which people talk about using Kotlin for their projects. May 12 14:22:04 its really conveniant to run same js-code on client side in browser and server side in node.js May 12 14:22:09 Even though it's pre-1.0. May 12 14:22:09 if google makes it default, it would May 12 14:22:12 CedricBeust, Wait, I didn't hear about 65k limit. May 12 14:22:24 the default starter project for android studio May 12 14:22:25 Yeah, it would be nice if Google announced official support for Kotlin. May 12 14:22:31 Though not absolutely necessary. May 12 14:22:38 does any of you guys own the project? May 12 14:22:42 Google didn't invent Kotlin, so never will May 12 14:22:52 if they buy intellij it could happen May 12 14:22:53 bubbleguuum: Nor did they invent IntelliJ. ;D May 12 14:22:54 TacticalJoke, they wont because then they have to make sure it is 100% compatible May 12 14:23:16 its easier to just stick to java May 12 14:23:18 TackticalJoke: and Linux Kernels...but that's a rare exception May 12 14:23:22 danijoo: indeed May 12 14:23:38 theres a bunch of times in webdevelopment where if you dont use node.js youll wind up implementing same functionality 2x in different langues, 1nce in javascript for browser, and 2ndly in whatever server side language youre using. May 12 14:23:41 the programming language shouldn't be the deal May 12 14:23:41 Given that they're so close to the IntelliJ guys, though, I wouldn't be surprised if it happened. May 12 14:23:54 They don't own oracle or sun Microsystems and they didn't make java May 12 14:24:19 ThinThread, I still want to know what you use for things like cronjobs if you say all you need is c++, php, js and node.js May 12 14:24:24 crocket: So, we've decided. You're moving to Kotlin. Congratulations! :D May 12 14:24:26 from what i have seen kotlin is fucking great, i can't avoid saying that May 12 14:24:30 http://developer.android.com/tools/building/multidex.html May 12 14:24:38 There is multidex. May 12 14:24:40 they didn't make Java the language but invented theor own VM (dalvik) May 12 14:24:48 but its interesting for enthusiased programmer, not for dry project managers May 12 14:25:07 Has anyone expeirenced a problem with setting AdView objects focusable to false? May 12 14:25:19 also. if you are working in a company, kotlin is not suitable yet May 12 14:25:21 I added ads to my app but the AdView keeps stealing focus, even with setting the focosable option to false May 12 14:25:29 Nick-S: True, but maybe good programmers can demonstrate the productivity gains that Kotlin can bring. May 12 14:25:31 syntax still change with every milestone May 12 14:25:33 To managers or whatever. May 12 14:25:38 danijoo, Woo May 12 14:25:46 no php allowed May 12 14:25:49 and you cant search for a developer and say he has to be able to work with kotlin May 12 14:25:52 i never said anything about php May 12 14:25:57 Yeah, I think 1.0 is expected this summer (but we shall see). May 12 14:25:58 Is Kotlin a response to Apple’s Swift? May 12 14:26:01 because there are like a few thousand that can do that May 12 14:26:14 TacticalJoke: thats politics, my country is run by a bunch of idiots who only care to stay in their seats.. who cares bout proving anything. we haven't got the power May 12 14:26:15 ThinThread, so what you use for scripts ? May 12 14:26:16 I think it's a response to the general out-of-dateness of Java. May 12 14:26:19 There's a new trendy JVM-based language every week. Java will bury them all. May 12 14:26:33 for cronjobs use whatever you want, i would probably end up using custom scheduler, but u can use crontab or whatever other cluster managment software you have May 12 14:26:33 So, kotlin is not suitable for anything yet. May 12 14:26:39 kotline changes swiftly... May 12 14:26:41 bubbleguuum: Not really. There aren't many, and furthermore Kotlin is a lot more sensible for Android than Scala, etc. May 12 14:26:47 there is no reason to stay away from scala on Android May 12 14:26:48 ThinThread, I mean what language to write the script May 12 14:26:50 just fud May 12 14:26:55 danijoo; node.js May 12 14:27:07 pfn, State your rationale. May 12 14:27:10 oh dear.. May 12 14:27:14 i love node.js but sometimes its easier to write in php cuz its more adopted May 12 14:27:27 JavaScript, PHP, urgh... May 12 14:27:43 What a horrible mess. May 12 14:27:45 scala and kotlin made me think wow but eventually i alreay have all my code in java May 12 14:27:54 When I mean bury them all, I mean Java will still be there in 30 years because it is everywhere (bank, industries, server-side, etc) May 12 14:27:56 Nick-S: With Kotlin, you can write only new classes in Kotlin. May 12 14:28:00 The interop with Java is brilliant. May 12 14:28:07 You can have 50% Java and 50% Kotlin. May 12 14:28:13 TacticalJoke: i know i tried it :) May 12 14:28:15 bubbleguuum, like C. May 12 14:28:21 Java is like C on JVM. May 12 14:28:26 https://www.destroyallsoftware.com/talks/wat at 1:20 :p May 12 14:28:31 like C May 12 14:28:33 crocket, for what? it runs fine, there is no rationale May 12 14:28:45 pfn : java 8 May 12 14:29:07 crocket, when will we have java 8 support in android? 2025? May 12 14:29:08 pfn : Scala moves to java 8, and it means you're stuck with an older version of scala on android for the foreseeable future, which could be a disadvantage... May 12 14:29:08 :) May 12 14:29:08 I find Java 8 quite underwhelming. May 12 14:29:17 Oh, that's what you meant. May 12 14:29:19 crocket, not really a disadvantage May 12 14:29:30 you can still use an older version May 12 14:29:32 there's Java 9 planned for 2016, reaching an Android near you in 2025 :p May 12 14:29:33 its stable May 12 14:29:40 crocket, old version is still far more powerful than any available version of Java ever May 12 14:29:49 ^ May 12 14:29:49 pfn : If scala doesn't change much after it moves to java 8, maybe... May 12 14:29:56 "There is no disadvantage to using Scala on Android as long as you don't mind staying on the current Scala version for a few years" May 12 14:30:09 CedricBeust, that's also not necessarily true May 12 14:30:19 However, scala is mostly stable I guess. May 12 14:30:24 bytecode tricks can make it run on java6 vms May 12 14:30:57 I was just pointing out that there are disadvantages, and pointing them out is not FUD. Then you decide if you are okay with these disadvantages. May 12 14:30:58 java seems like a category 2 disaster on multiple fronts. they cant even keep their build tools consistent for 5 years and im supposed to code for it? plus is simply unnecessary. May 12 14:31:02 Google should really add Java 8 support... May 12 14:31:11 But saying that there are no disadvantages is not even FUD, it's plain wrong May 12 14:31:27 ThinThread, Like gradle, maven? May 12 14:31:32 yeah May 12 14:31:35 bubbleguuum, how should they do that? May 12 14:31:41 how would you code for it May 12 14:31:43 its not possible May 12 14:31:48 ThinThread, maven was a pain in the ass... May 12 14:31:52 why it is not possible ? May 12 14:32:05 bubbleguuum, java 8 would only be supported for new devices May 12 14:32:11 or updated once May 12 14:32:20 bubbleguuum: It's runtime changes. May 12 14:32:23 why can't dex generate compatible code ? May 12 14:32:32 with fragmentation you would have to write in old java for the old runtime, and new java for new runtime May 12 14:32:43 pfn : What's your opinion of clojure on android? not now? May 12 14:33:01 hi all, if i'm launching a service at the start of my app, is it appropriate to do this in some skeleton activity and then load the main UI activity? i'm having problems where main activity spawns off a new service every time there's an orientation change or resume May 12 14:33:11 I don't understand why dex coould not be modified to generate code compatible with Java 8 syntax May 12 14:33:29 bubbleguuum, I has more to do with money and resource... May 12 14:33:39 so May 12 14:33:47 as much as i am enjoying this i also must leave May 12 14:33:48 It could be so modified. But in order to use those changes you'd have to set minSdkVersion to the 22 of that day. May 12 14:34:01 When will we be saying "minSdkVersion 22"? Three years? May 12 14:34:31 why ? It could generate compatible dalvik bytecode. Unless Java 8 has some features that are impossible to do with current dalivik bytecode ? May 12 14:34:44 i just wanna say the music accompanying this talk was: https://www.youtube.com/watch?v=dv0fwOeIQkU May 12 14:34:52 enjoy :) May 12 14:35:06 bubbleguuum, feel free to write the converter :p its not as easy as saying "just generate compatible bytecode!" May 12 14:35:25 I didn't say it was easy :p May 12 14:35:37 I guess I'll have to try clojure and scala on android to convince myself really... May 12 14:36:24 The slowness of Clojure seems to rule it out instantly. May 12 14:36:50 TacticalJoke, With skummet, its load time is about 1 sec, which is reasonable. May 12 14:37:16 1 second longer than anything else May 12 14:37:21 What about general slowness? May 12 14:37:29 TacticalJoke, I will have to try May 12 14:37:42 It'd be wiser to try Kotlin, but each to their own. :p May 12 14:37:50 try them all May 12 14:37:54 and chose the one you like most May 12 14:37:58 jes May 12 14:38:00 try them all May 12 14:38:09 You Java is never a bad bet, If you want to get started with Android don't try anything other than java May 12 14:38:18 yiati, yes May 12 14:38:27 Don't try this at home. May 12 14:40:46 crocket: Trying things yourself is the best way to learn, do report back May 12 14:40:57 CedricBeust, jes May 12 14:41:39 whats cool about using c++11, opengl and cmake is i can have nexus7 and ipad2 plugged into my macbook air, make 1 change to my codebase, then depending if im in osx, iphone, or android, subdirs of my tree, i just have to type "make debug" 3x and the changed app is running on my laptop and both connected devices May 12 14:42:25 how to tell someone uses apple? ipad2 plugged into my macbook air May 12 14:42:25 :p May 12 14:42:38 he will tell you :) May 12 14:43:08 same goes for linux or windows machine May 12 14:43:18 People tend to stay quiet about Windows. :D May 12 14:43:24 ^^ May 12 14:43:33 unless they are struggling to get usb drivers working May 12 14:43:48 I'm using... *cough cough* cmd.exe... ugh, I mean PowerShell... no, Cygwin. May 12 14:43:53 C++ madness May 12 14:44:15 At my last company, people built android binaries with C++. May 12 14:44:28 android runs linux binaries, I guess? May 12 14:44:37 I'm typing this on Windows 8 May 12 14:44:40 crocket, it can, yeah May 12 14:44:51 and developing Android on Windows too May 12 14:44:56 u still need a Java layer but it can be pretty thin May 12 14:45:03 and its the source of all my difficulties May 12 14:45:12 JavJAva... May 12 14:45:18 I'm going to sleep May 12 14:45:18 Bye May 12 14:45:35 Windows master race! May 12 14:45:51 ThinThread, or its that you try to work against the system instead of with the system that causes all the difficulties :) May 12 14:46:34 TacticalJoke, looks like you have windows issues May 12 14:47:10 I was Linux only for a few years. Windows is just easier for certain things, though. May 12 14:47:32 the system = myopic / inflexible support. r u a pc or a mac? typical tribalism. May 12 14:48:43 Windows 10 also looks good. May 12 14:49:24 what if im on a mac but with windows as only installed system. Apokalypse! May 12 14:51:29 hey how about cuz were such a cool unique tribe well all use a different naming convention and incompatibly duplicate objects May 12 14:51:45 TacticalJoke, im wondering if the windows 10 android recompile thingy will work with kotlin ... May 12 14:51:46 we could even have our own build system and ide May 12 14:52:08 and programming language May 12 14:52:08 Hmm, yeah. May 12 14:52:16 ThinThread, thats basically apple. :D May 12 14:53:02 i feel very similarly about objective-c/iphone as java/android May 12 14:53:23 Has anyone ever used Android-ObservableScrollView? I'm trying to have 2 RecyclerViews but I haven't gotten a response on my issue for a week even though he committed some stuff. May 12 14:53:36 beside that java is not written by google and android is just linux with extras May 12 14:53:51 Muchoz, yes, but not with recyclerviews May 12 14:54:06 and AS is just intellij without extras May 12 14:54:25 I guess I might just have to write my own thingy then. May 12 14:54:48 And a pear is just a long apple! May 12 14:54:53 Does someone know another library for header image that transforms into a toolbar perhaps? May 12 14:55:09 Muchoz, whats your problem with the lib? May 12 14:56:09 danijoo, I cannot use multiple RecyclerViews. If I have an ObservableScrollView with a LinearLayout and some views in that and under that another RecyclerView (still in the ObservableScrollView) the RecylcerView is hidden. May 12 14:57:01 you try to put a recyclerview inside a scrollview? May 12 14:57:18 Yes........................ May 12 14:57:24 wait wait May 12 14:57:25 thats the problem. No library will fix this May 12 14:57:46 scrollview is made to only display _1_ view, and not multiple ones May 12 14:57:58 Alright May 12 14:58:20 But having a LinearLayout in that ScrollView doesn't solve that or doesn't that matter? May 12 14:58:46 Muchoz, how should android know which view it should scroll if one scrolls in the recyclerview? May 12 14:58:50 the inner or the outer one? May 12 14:59:37 dont put scrollables in scrollables. never, ever :) May 12 15:00:12 Hey May 12 15:00:29 Is it possible to make a custom view be its own onClickListener? May 12 15:00:37 sure May 12 15:00:39 because I tried setting it to "this" on the constructor May 12 15:00:49 and it doesn't respond May 12 15:00:52 class CustomView implements OnClickListener { ... } May 12 15:00:56 I also tried in a couple of callbacks May 12 15:00:57 this.setOnClickListener(this) May 12 15:01:07 yes, that's what I did May 12 15:01:19 where should I call the setOnClickListener method? May 12 15:01:30 is it ok on the constructor? May 12 15:01:31 in constructor May 12 15:01:37 right after super May 12 15:02:27 in all 3 constructors ofc May 12 15:03:47 What I do is call super(context, null) and super(context, null, 0) in the 1st and 2nd constructors May 12 15:03:50 is that ok? May 12 15:04:05 so I can just add the code in the 3rd May 12 15:04:18 no May 12 15:04:31 thats not how java works May 12 15:04:37 danijoo, how would I have multiple RecyclerViews for example then? May 12 15:04:55 haha May 12 15:05:01 neat, I've seen that in many examples May 12 15:05:05 gonna remove it then May 12 15:05:12 Papipo, you may have seen this(context,null, 0) May 12 15:05:22 mmm, correct May 12 15:05:24 My mistake May 12 15:05:26 ;D May 12 15:05:34 super will call the constructor of the upper class, not the one of this class May 12 15:05:35 that's why my code doesn't work May 12 15:05:57 :) May 12 15:06:08 Muchoz, without a scrollview arround them May 12 15:06:25 thx May 12 15:06:25 meh, hate the wait when publishing to sonatype May 12 15:07:08 I guess I can publish-local though, woot May 12 15:08:54 it's like 5-10m May 12 15:08:58 go have a coffee May 12 15:10:06 JakeWharton, more like a couple hours to finish mirroring May 12 15:10:22 shows up on repo1 in minutes. every time. May 12 15:10:37 has it, never noticed May 12 15:11:11 yep. everything else is slow (like search.maven.org which is ~4hrs) May 12 15:19:10 I always assume it takes as long as search. May 12 15:19:10 man I can't wait for that book to be out May 12 15:19:17 articulating design decisions May 12 15:20:14 I never have time to read books. ;| May 12 15:20:27 I wish we could hear about this stuff from our community May 12 15:20:47 how to deal with people in the company who don't believe that you are THE android guy, and just tell you to mimic the design you've been given May 12 15:21:21 where is the line between "this should be done like this on Android" and "it's our custom design, we want it like THAT" May 12 15:21:22 Odaym, just tell them you dont believe they are THE design guy as response :p May 12 15:21:35 trying Espresso, i got it working with the library and all, but it does not seem to be able to find the 'click()' call.. onView() and withId() and matches() and such are all found.. what's up? May 12 15:21:47 I remember when that BBM thing came out on Android. Looked horrible. May 12 15:21:51 osxorgate, you need to import other espresso libraries May 12 15:21:59 osxorgate, or you need to add static imports May 12 15:22:02 this needs a blog post or something, I don't know May 12 15:22:10 *frustrationnnn* May 12 15:22:21 "make it look like the iOS app" May 12 15:22:30 pfn ahh i see let me try May 12 15:22:41 this is a new concept for me ;0 May 12 15:25:05 exactly danijoo May 12 15:25:19 Im going to record something about this, cause writing text is tedious, Ill just talk them May 12 15:25:40 there are many blaring reasons why it's wrong and just insane May 12 15:26:43 you'll hear about this from me, just you wait May 12 15:27:30 rage quit effect :D May 12 15:27:38 but seriously, bbl May 12 15:29:32 lol ^^ May 12 15:30:56 Fucking Gradle and AS: https://i.imgur.com/KDq5BBZ.png PermGen Space Error every day May 12 15:35:40 <_genuser_> lol http://postimg.org/image/8vnsdjz1d/ May 12 15:36:24 ha May 12 15:42:14 Android Studio keeps removing my import line and instead using the full class path for one of my classes. Anyone know what gives? May 12 15:42:54 Is there a name clash? May 12 15:43:18 I've got some code that I want to register to listen for a button click. It basically does this: AppObservable.bindActivity(this, ViewObservable.clicks(button, false).map(onClickEvent -> getFormData())).flatMap(this::sendFormData).subscribe(); May 12 15:43:26 A-ha, got it May 12 15:43:53 When I had migrated some classes into a different folder for organization I missed updating that class' package name May 12 15:44:22 thanks pfn May 12 15:44:22 my assumption was that if I use clicks(button, false), it won't emit anything when I first subscribe to it, it should just wait until the ViewObservable.clicks() actually fires before it tries to do any of it subscription stuff... May 12 15:45:48 My AS just freezes when it wants to apparently. May 12 15:46:12 but instead, it fires as soon as I subscribe, when the form data is still empty and before the button is actually clicked May 12 15:46:20 anyone have an idea what I'm doing wrong? May 12 15:46:32 joshkovach: i would think that .clicks(button) would just wait May 12 15:47:33 without the second argument? May 12 15:47:39 are you sure it's firing? i know rx can be quite complex, i see that under the hood .clicks(button) just calls .clicks(button,false) May 12 15:47:48 maybe another observable is triggering May 12 15:52:51 not only is it firing, it seems that the listener is removed on subsequent clicks May 12 15:55:54 actually, no, it's not firing, it's apparently being ignored... May 12 15:56:14 I don't really understand what's going on here May 12 15:56:59 maps and transforms and stuff only happen after the first observer emits something, right? May 12 16:03:36 Did someone mention me? My icon thingy was rotating when I got here, but I can't see the mention... May 12 16:03:58 joshkovach, of course and they don't get removed unless you unsubscribe or the observer finishes May 12 16:04:58 so then, I have no idea what I'm doing wrong... May 12 16:07:15 Hi May 12 16:08:31 oh Schoumi, long time no see you May 12 16:09:03 adq: yep May 12 16:09:13 http://imgur.com/r0rFvEs <- android wear... where is the 70%? nice negative time, etc.... May 12 16:09:42 I wonder if this has something to do with it: java.lang.IllegalStateException: Observers must subscribe from the main UI thread, but was Thread[RxCachedThreadScheduler-1,5,main] May 12 16:09:52 yeah, that's probably it May 12 16:10:29 joshkovach, yeah, onError is useful :p May 12 16:11:14 can you subscribeOn/observeOn multiple times in a function chain? May 12 16:12:49 adq: still on french channel? any change on it? May 12 16:13:08 joshkovach, dunno, I don't rx :p May 12 16:13:47 Schoumi, yes lol, hmmm only worse May 12 16:15:06 adq: ok, no reason to come back there so May 12 16:15:28 up to you, irc is wide place with various ppl and moods ;) May 12 16:16:47 joshkovach: No, only once May 12 16:17:10 adq: to mutch time lost on this channel for little time well used :) May 12 16:17:49 adq: maybe if i have time to lose sometime i'll be back on it May 12 16:17:55 :') May 12 16:19:22 adq: bots still on it (it's the worse part!) May 12 16:19:48 adq: +? May 12 16:21:45 Schoumi, even worse for this part too, anyway, here (#android-dev) is a good place to request or bring help May 12 16:22:37 adq: yep May 12 16:23:04 Any quickfix for removing GC in logcat logs? (Android Studio) I'm going mad. May 12 16:23:29 adq: i came on it today for a question but i solved when i prepare it and re-reading a piece of code May 12 16:23:31 Define "removing GC". May 12 16:24:08 TacticalJoke: Explicit concurrent mark sweep GC freed.... May 12 16:25:02 adq: i use to be there but sometimes i'm disconnected from freenode and this channel require registered user and i have not put login automatically, so i need to reconnect there manually May 12 16:25:09 and i forgot last time May 12 16:29:23 Exclusive_, add something like: ^(?!.*(GC freed)).*$ May 12 16:29:29 into the filter of message May 12 16:30:32 Oooh, life quality up 1000%! Thanks adq. May 12 16:32:34 I'm having trouble using Interceptors with OkHttpClient (which is used by Retrofit). None of my interceptors seem to be triggering (no log output when I do Log.i statements). What could I be doing wrong? May 12 16:32:52 Using Retrofit 1.9.x? May 12 16:32:56 Yes May 12 16:33:28 Wait.....no May 12 16:33:32 Mixing up build.gradle argh May 12 16:33:32 achuinard: see if this helps any, example of doing a reauthentication http://stackoverflow.com/a/28285627/1747491 May 12 16:33:34 Sorry May 12 16:44:20 anyone with experience with Travis CI? May 12 16:45:03 nope May 12 16:46:34 http://www.apkmirror.com/apk/google-inc/google-io-2014/google-io-2015-3-1-2-android-apk-download/ May 12 16:46:45 should see if theres anything new May 12 16:47:37 I just heard settings with hamburger May 12 16:50:30 yeah, it's kinda weird May 12 16:55:21 Hello. Is there a good resource for an EditText that can autocomplete and hold multiple selected items? May 12 16:55:44 Preferably with a dropdown that shows a RecyclerView. Exactly like this guy: https://github.com/FrederickRider/AutoCompleteBubbleText May 12 16:58:33 Hello, i have some problems implementing a notificationlistenerservice for my application. I don't know how to start the service properly when my app starts and end it, when it gets destroyed. at the moment the listener does not get terminated when i destroy my main activity. May 12 16:58:35 MainActivity: https://bpaste.net/show/83f11999b2fc NotificationService.java: https://bpaste.net/show/0458f744616d AndroidManifest.xml: https://bpaste.net/show/1a251c5f12da May 12 17:01:42 Hey people! May 12 17:01:56 Cya ReScO. May 12 17:03:09 you guys got any experience with mobile money solutions? May 12 17:03:42 0daym: Define "mobile money solutions" May 12 17:03:43 well, the cash in my wallet goes wherever I go. it's pretty mobile May 12 17:04:00 i'm looking for a ZXing Barcode Scanner that can run in a Fragment May 12 17:04:01 pay with your mobile May 12 17:04:05 yo dawgs, i put a SlindingPaneLayout as the content of my NavigationDrawer , and i have sliding things over sliding things ... May 12 17:04:47 send an SMS, receive an SMS on the other end that the money has been received, the cash from one account is transferred to the other May 12 17:05:13 and check this out http://foaas.herokuapp.com/ May 12 17:06:07 hey folks May 12 17:06:21 I think that for "mobile money", the mobile part of the solution is at the mercy of the platform, it cannot contribute to how secure the connection between the participants will be, or how fast the messages will be sent May 12 17:06:27 it will just serve as an interface May 12 17:06:30 yea, ez May 12 17:06:46 need a library which reads an rss feed and sends out notification whenever the feed is updated May 12 17:07:20 anyone? May 12 17:07:56 any in mind? May 12 17:08:14 Anybody knows if AndroidAnnotations has any issue with Fragment Shared element transitions? May 12 17:08:39 hello, how do I define additional cflags in android.mk files ? May 12 17:08:47 I need to set the -pie and -fPIE flags May 12 17:09:04 is Observable::retry() something that should be called only at the end of the chain? May 12 17:09:13 ReScO... it doesn't work with fragments? May 12 17:09:59 RishabhTatiraju: i hoped i could instantiate a Fragment, which shows the viewfinder for ZXing's Barcode Scanner lib May 12 17:10:40 haven't worked with it yet May 12 17:11:13 hello, has anyone noticed a weird error with gdbserver when running on cyanogenmod "waitpid: Permission Denied" May 12 17:13:11 * ReScO is going nuts May 12 17:16:38 <_genuser_> hello people. May 12 17:17:04 Hello, person. May 12 17:17:42 nobody any idea? May 12 17:17:48 That was a Tactical Joke, tbh May 12 17:18:05 anyone here who knows how to deal with ndk ? May 12 17:18:07 :P May 12 17:19:46 Is there a way to list the activities of an application installed on my phone? May 12 17:20:02 So that I can start the correct activity, and not just point at all of them via the package name May 12 17:24:07 <_genuser_> TacticalJoke: person? kinda harsh. May 12 17:24:15 <_genuser_> do'nt make me sing, say my name... May 12 17:25:01 Found an answer for anyone curious: Used adb shell dumpsys package May 12 17:27:14 _genuser_: DJ Khaled. May 12 17:27:31 tjbiddle: what do you mean start the correct activity? May 12 17:27:33 <_genuser_> TacticalJoke: wait who's dj khaled? May 12 17:27:56 https://youtu.be/ZFHE28mQE5Y May 12 17:28:34 herriojr: I'm sending an intent to WeChat, for example; however in sending to their package "com.tencent.mm" it provides 3 options that they have registered to accept the Intent. I want to send it to a specific one May 12 17:28:50 <_genuser_> TacticalJoke: lol, go buy yo mama a house. May 12 17:29:07 do they have documentation on it? May 12 17:29:25 <_genuser_> TacticalJoke: so awkward. she's just sitting there awkwardly. May 12 17:29:35 the issue is, if you tie directly to an activity, and they change it, your stuff will fail May 12 17:29:39 herriojr: Testing now to see if I found the answer; but haven't yet. May 12 17:29:50 herriojr: I haven't found any, no: http://dev.wechat.com/wechatapi/documentation May 12 17:29:51 Yeah, he's a strange one. May 12 17:29:56 herriojr: Oh, good point May 12 17:30:17 <_genuser_> TacticalJoke: wiki says he's the president of def jam south. dude's doing somethign right to be up there, lol. May 12 17:30:21 If they don't have a published API for it then should I just stick with the main package? May 12 17:31:19 tjbiddle: that's the safest thing to do May 12 17:31:48 there might be a way to qualify it more May 12 17:32:28 TacticalJoke: i'm stucker than stuck May 12 17:32:29 TacticalJoke have you used SlidingPaneLayout before ? May 12 17:32:36 Nah, never. May 12 17:32:55 not sure what to do with the toolbars; when a pane is hidden i'd think its action items should go away May 12 17:33:01 Hey where is a good starting point in Android App development? May 12 17:33:09 weirdness of having to coordinate master & detail actions May 12 17:33:30 herriojr: I'll just leave it as-is for now. Haven't gotten word from our PM yet whether it's even necessary, so I'll leave it like that until someone says otherwise :p May 12 17:33:40 this channel is crap May 12 17:33:42 cart_man: What is your programming history like? May 12 17:34:03 woa what happened to emilsp May 12 17:34:06 lol May 12 17:34:20 Seriously, lol May 12 17:34:28 Came out of nowhere May 12 17:34:50 did they not get their question answered? May 12 17:34:57 I don't see a question from him anywhere May 12 17:35:02 He or she asked about the NDK and got no reply (I think). May 12 17:35:07 ah ok May 12 17:35:10 well some questions are difficult to answer without the source code... May 12 17:35:16 well, I wasn't here, so I couldn't answer :P May 12 17:35:39 Anybody working with the NDK is risking psychological breakdown, so it kinda makes sense. May 12 17:35:43 i mean, i ask questions here too...but they're like always related to code errors, May 12 17:36:28 TacticalJoke: i'm looking for a library that can scan Aztec Barcodes, ZXing excluded... May 12 17:37:03 Never heard those terms before. ;| May 12 17:37:20 TacticalJoke: ever heard about QR codes then? May 12 17:37:20 I like C, so I like messing with the NDK :P May 12 17:37:28 Aztec is a variation May 12 17:38:19 CedricBeust interesting http://android-arsenal.com//details/3/1788 May 12 17:39:38 TacticalJoke: http://en.wikipedia.org/wiki/Aztec_Code May 12 17:40:48 g00s: it's actually kind of interesting to come back after 2 years and see how development has evolved May 12 17:40:55 in terms of Android May 12 17:41:16 herriojr yeah ... but a lot of this is just trying to figure out how to corrdinate concurrency with lolcycle May 12 17:41:29 and then there is the MVP / mvvm side of it i guess May 12 17:41:53 g00s: yeah, right now I'm doing an MVP style application to try it out May 12 17:41:53 TacticalJoke, Well I code C on a daily basis and I recently coded allot of C++. I have done Java quite a long time ago...2 years or so and only 2 small projects May 12 17:41:55 basically new tools + old problems = new problems :) May 12 17:42:05 C++(QT) May 12 17:43:30 cart_man: Personally, I followed and then dived into an app. It wasn't too painful since I'd just come from C#/.NET. May 12 17:43:56 (Just the first one -- not sure how good the subsequent ones are.) May 12 17:45:14 I have an activity that contains a linear layout, on user interaction some linear layouts that contain edit texts are added. basically it's emulating how a listview works. after adding such a view, the edit text won't give up focus (indicated by a text cursor taunting me) unless another view is added or clicked. someOtherView.requestFocus() or wontLoseFocusView.clearFocus() doesn't seem to work. May 12 17:45:22 any idea what might cause that? May 12 17:45:45 and how I can get rid of focus May 12 17:45:49 Syzygy: is it the only focusable item in this layout? May 12 17:46:53 herriojr, yes and no. in the layout that is added, it's the only focusable view, but it's added to a layout with several focusable views May 12 17:47:22 who knows about Journeyapps? May 12 17:49:08 Release notes: http://tools.android.com/recent/androidstudio1211available May 12 17:49:30 :d May 12 17:50:43 herriojr, https://onedrive.live.com/redir?resid=D4D4E961385631A4!689&authkey=!AP2lEfis-UoB8VA&v=3&ithint=photo%2cpng May 12 17:51:00 so, do Dropbox and box and one drive all support saf? May 12 17:51:21 no big changes TacticalJoke or do I oversee sth? May 12 17:51:21 Syzygy: so if you manually click on another box, it won't change focus? May 12 17:51:30 Yeah, seems pretty minor. May 12 17:51:37 herriojr, if I manually do it, or if I add another view, it will change focus May 12 17:51:50 ok, the reason it gets the focus by default is it is the first item May 12 17:51:50 pfn, don't ask me, I don't even know. May 12 17:52:06 same issue if i select a later item May 12 17:52:08 * pfn installs for shits and grins May 12 17:52:50 first edittext gets autofocus by default May 12 17:52:51 Syzygy: so you are programmatically trying to set the focus? May 12 17:53:03 actually I'm just trying to lose it. May 12 17:53:12 oh, you just don't want focus at all? May 12 17:53:34 call requestFocus on something else May 12 17:53:41 like the viewgroup May 12 17:53:44 danijoo: that's not the issue May 12 17:53:49 he just doesn't want focus to show May 12 17:53:52 at all May 12 17:54:01 I want to show focus when something is selected May 12 17:54:15 by default something is always focused May 12 17:54:22 but if the user closes the keyboard (at least via ime option done) focus should go into nirvana May 12 17:54:46 I already tried requestFocus on something with focusable="true" but it's not working May 12 17:54:50 neither does clearFocus() May 12 17:54:58 Syzygy: well, you could fake it by making a transparent item that is focusable May 12 17:55:06 that's also not working May 12 17:55:21 would you mind linking your code? May 12 17:55:26 actually let me check, I'll try that again May 12 17:55:36 AARGH :( May 12 17:56:26 whats a journeypp ReScO May 12 17:56:27 nice, box and one drive both support saf May 12 17:56:33 ok, the invisible view is what i'm trying right now and it ain't working. May 12 17:56:37 dunno about Dropbox since I don't have an account May 12 17:56:50 herriojr, give me a second to put up my code and scrub it of unnecessry things. May 12 17:57:21 pfn if you use box + SAF, do you need their api ? May 12 17:57:42 i mean, do you need to integrate some box or dropbox API which integrates with SAF May 12 17:57:55 no May 12 17:58:00 saf just works May 12 17:58:16 so i can add that functionality to the app without worrying about expanding method counts May 12 17:58:26 from including n 'dropbox' like apis May 12 17:59:52 g00s, https://plus.google.com/+PerryNguyen/posts/RF2qkJPfw1v May 12 18:00:11 g00s, how are you even remotely concerned about method count May 12 18:00:56 i get requests all the time to integrate with these things, i figure if i added google drive, dropbox, and box.net i'd wind up with at least 30k methods May 12 18:01:04 you're not using any libraries from anything it sounds like May 12 18:01:29 no not yet May 12 18:02:06 method count is really not a problem May 12 18:02:10 i'm just guessing the support lib is like what 7k, google analytics maybe anothe 7k May 12 18:02:13 proguard, fix it no problem May 12 18:03:12 pfn is that a screenshot from qicr ? May 12 18:03:48 or multidex May 12 18:03:59 and no, that's a screenshot for the saf file picker May 12 18:04:16 anyway, method count is not a reason to deny your users features May 12 18:04:36 unless there's you don't want to implement the feature for other reasons May 12 18:09:15 time for a yummy espresso May 12 18:10:56 hey guys, I have a little bit of a strange question. I have to use the proximity sensor and it only returns 2 values in my case 0 when near and 6 when far. Is there any way of getting the exact values that the sensor actually shows? I mean I think it has to say a value so that the phone shows 0 or 6. May 12 18:11:38 I have my phone rooted and with a custom rom, so I can modify things in it if it's required May 12 18:11:48 hi all May 12 18:12:11 regarding bluetooth, anyone know about how secure it is? May 12 18:12:22 like could I set something up to sniff BT packets? May 12 18:14:07 herriojr, sorry that it took so long, since it's code for work I had to filter out certain parts first: http://pastebin.com/27ETXpPD May 12 18:15:19 luci1093: AKAIK, that's pretty standard May 12 18:16:20 @pROP AKAIK? what's that? May 12 18:16:43 Hi! Anyone knows how to use dagger(1.2) well? May 12 18:16:49 luci1093, afaik if you typo May 12 18:17:06 (As Far As I (or him in this case) Know) May 12 18:17:13 haha, yeah May 12 18:17:21 I'm pretty sure the sensor doesn't sense exact proximity, just an on/off May 12 18:17:33 My Nexus 5 returns only 5 or 0, nothing in between May 12 18:17:41 My old Nexus 4 was the same way May 12 18:17:44 why not 0 and 1? May 12 18:18:02 it seems weird that it returns 2 arbitrary numbers May 12 18:18:18 Probably because the sensor actually knows it's range May 12 18:18:19 yeah, but he must return some exact values for him to know it's at least close ... May 12 18:18:30 yeah ... that's strange May 12 18:18:44 my s2 return 0 and 6 and my firends htc one returns 0 and 7 ... so lol May 12 18:18:56 tricknology_, according to google, you can sniff BT. so if security is a concern, try encrypting your BT packets as well May 12 18:19:02 Arthur_Sa: Don't you think at least one person does? May 12 18:19:50 but doesn’t createRfcommSocketToServiceRecord(UUID) create an encrypted channel? May 12 18:20:06 luci1093: checking 0 and >0 is probably the best way May 12 18:20:14 @TacticalJoke Is that person here? May 12 18:20:21 I do not know. But if security is of concern, you encrypt it anyway. May 12 18:20:46 right.. May 12 18:20:52 thing is some devices are encrypted, some aren’t May 12 18:21:06 @pROP well that doesnt really help me, I kinda need exact values ... eh >.< May 12 18:21:08 and then you encrypt it again. and again. May 12 18:21:09 no sense putting an encryption key in the app May 12 18:21:10 and again! May 12 18:21:19 I was kinda hoping there is a way and mayybe someone did it before May 12 18:21:27 paired bluetooth connections are always encrypted May 12 18:21:33 but as far as I see on the web they ddidt really May 12 18:21:45 but I said I'd ask annyway, maybe someone has an idea or something :D May 12 18:21:48 pfn: sniffing the packets tend to be hard? I’ve never tried May 12 18:21:53 luci1093, 0 and !0 May 12 18:22:00 I know I can sniff my own.. maybe I ought to look at those and see May 12 18:22:16 and take this to #security May 12 18:22:53 nvm, they made it invite only now :( May 12 18:23:27 you have to hack into it to get in May 12 18:23:34 haha May 12 18:23:37 Syzygy: http://stackoverflow.com/questions/1555109/stop-edittext-from-gaining-focus-at-activity-startup May 12 18:23:45 manifest May 12 18:24:07 or request focus on a dummy view - doesnt always work though May 12 18:24:16 can request focus and then remove it again but the keyboard could flash May 12 18:27:22 Arthur_Sa: If the goal is not to get an answer, "Does anyone know X?" questions are good, solid questions. May 12 18:28:28 yum, espresso at home is so good May 12 18:29:32 pff, https://code.google.com/p/android-test-kit/wiki/Espresso is superior May 12 18:31:59 https://github.com/pfn/android-sdk-plugin May 12 18:32:02 oops May 12 18:32:03 Guys im having an issue with GridView May 12 18:32:07 I have 2 cols May 12 18:32:13 https://github.com/pfn/android-sdk-plugin/blob/master/sbt-test/android-sdk-plugin/android-test-kit/build.sbt May 12 18:32:20 got that too :p May 12 18:32:26 If an item in the right column has a larger height then the one on the left May 12 18:32:44 the next item in the left will be pushed down as much as the difference in height from the right item to left May 12 18:32:52 If that makes no sense, I can take a screenshot May 12 18:33:11 drose379, you want a staggered grid view May 12 18:33:12 I need basically a 2 col grid of items with dif heights and no spaces May 12 18:33:24 Hmmm.. May 12 18:33:46 Is that a new class? May 12 18:34:01 Or just a dif way of using GridView May 12 18:34:11 herriojr, it's not just on startup. I also can't get rid of it after switching focus. May 12 18:34:12 google May 12 18:34:18 Is it this pfn May 12 18:34:22 https://github.com/etsy/AndroidStaggeredGrid May 12 18:34:52 that thing hasn't been touched in a while May 12 18:35:06 and it seemed pretty buggy whn i looked at it May 12 18:35:23 use whatever floats your boat May 12 18:35:31 Arthur_Sa: Please ask the channel. (On a side note, zomg, just ask the freaking question.) May 12 18:35:31 but there are many implementations May 12 18:35:39 what lib did you have in mind pfn? May 12 18:35:52 I have no libs in mind May 12 18:36:06 You would implement it yourself and not use a lib? May 12 18:36:06 my job isn't to pick components for you to use May 12 18:36:12 well we can foget about moving to China to have the govt pay for us to learn Mandarin.. lol . http://www.skype.com/en/translator-preview/ May 12 18:36:18 Syzygy: http://stackoverflow.com/questions/7959478/android-what-is-the-difference-between-focused-enabled-pressed-and-selected May 12 18:36:19 Dude I was just wondering May 12 18:36:30 JakeWharton: I think you brought up in a conference talk that OkHttp has easy CharlesProxy integration? I have my mac, with charles installed and my android emulator on my device. What do I have to do to okhttp (hardcoding for right now is fine) to add charles as a middle man? May 12 18:37:12 eghdk, why not just change your wifi settings May 12 18:37:29 easiest way without accidentally shipping hardcoded values May 12 18:37:37 Syzygy: make sure you first understand exactly what state it is in May 12 18:37:44 although you could make a dev build flavor May 12 18:38:13 I'm open for both right now, but I believe that hardcoding it wouldn't require a device level proxy, but only app level. So I don't have to worry about other requests. May 12 18:44:12 eghdk, anyway, you can set the proxy on okhttpclient May 12 18:45:42 via setProxy()? pfn May 12 18:46:21 I usually would rather count on using charles via wifi settings though, since not all http requests I want to intercept are under my control (libraries) May 12 18:46:28 It's just that I'm so unfamiliar with http and what a proxy actually does, that I just want to make sure I'm not missing out on any tutorial or recipe that OkHttp might have that I'm missing out on. May 12 18:46:50 learn by recipe = fail May 12 18:46:57 pfn... hm okay, I guess thats a fair point May 12 18:47:38 pfn: I should be able to do this on my local machines emulator right? May 12 18:50:06 sure May 12 18:50:08 What it called when your application receives a notification from another application that an event has occured May 12 18:50:14 What's* May 12 18:50:15 well, maybe, don't remember what network the emulator connects to May 12 18:50:30 pfn: the maual proxy setting gives a warning over wifi. "The http proxy is used by the browser but may not be used by the other apps." is that fine? May 12 18:50:37 god, why do I get so much random voip spam lately, lots of calls from bullshit 4 and 5 digit numbers May 12 18:50:48 Would it be a bad idea to use a Lib that hasent been touched in 2 years May 12 18:51:01 depends May 12 18:51:15 On? May 12 18:51:27 your requirements May 12 18:51:27 duh May 12 18:51:47 pfn: Okay. Last question I'll have for you... should I put in any proxy settings into charles proxy as well so it only logs from my genymotion emulator? May 12 18:52:15 pfn i've been getting lots of shit in skype lately May 12 18:52:56 eghdk, no May 12 18:54:28 pfn: So all I need to set up a proxy is put the proxy address into my wifi settings on my emulator? **sounds too simple** May 12 18:54:35 pfn what if I just used this https://android.googlesource.com/platform/frameworks/ex/+/master/widget/java/com/android/ex/widget/StaggeredGridView.java May 12 18:54:44 eghdk, it is that simple May 12 18:54:59 drose379, I am not interested in giving you advice on which library to use May 12 18:55:07 drose379, it's a learning exercise for you to evaluate what library is appropriate May 12 18:55:17 What I pasted is not a lib May 12 18:55:23 it's still a lib May 12 18:55:27 Its a class May 12 18:55:30 From google May 12 18:55:30 same difference May 12 18:55:34 it's not your code, => it's a library May 12 18:55:35 I guess May 12 18:55:40 Ok May 12 18:55:49 heh. pfn Where can I find the proxy hostname and port to plug into the wifi setting? May 12 18:55:54 Is it possible to notify an application every time a process is killed? May 12 18:56:18 eghdk, emulator may or may not work because of nat May 12 18:56:23 eghdk, ipconfig on windows, otherwise May 12 18:57:11 Spynxic: I don't believe so. Why do you want to? May 12 18:57:29 Hmm. This may be tough. I have a different wired and different wireless network. So trying on an actual device may be tough. May 12 18:58:30 different wired vs. wireless network? that's lame May 12 18:58:44 why subnet it unless you use open wifi May 12 18:59:01 TacticalJoke: I'm curious if android does any kind of process management May 12 19:02:24 of course android does process management May 12 19:02:41 dont have wifi. using public wifi technically. May 12 19:03:24 pfn: know of a way to watch it? May 12 19:03:25 pfn: So I found my local ip and typed it into the wifi proxy setting. No go though... =( opening up a browser fails. May 12 19:03:42 eghdk, emulator has nat May 12 19:03:52 eghdk, and doesn't let you access your host May 12 19:04:44 pfn: Even genymotion emulator? May 12 19:04:53 dunno, I don't genymotion May 12 19:05:03 but yes, even genymotion unless you run bridged mod May 12 19:05:03 e May 12 19:05:08 dang. May 12 19:05:31 Should I attempt setProxy on OkHttpClient? May 12 19:05:43 would make no difference May 12 19:06:17 urg. all I want to do is see what I'm actually sending... =( May 12 19:06:24 do it from a device May 12 19:06:28 and bridge your wifi and wired networks May 12 19:06:30 problem solved May 12 19:07:25 pfn: I'm using public wifi. I don't have my own. Just wired, no wireless router. May 12 19:07:34 go out and get your own May 12 19:07:36 no wireless router of my own* May 12 19:08:59 eghdk: why not run tcpdump on the device? May 12 19:09:11 JesusFreke: ? May 12 19:09:11 (to be fair, I'm not 100% sure if you can run it without root access) May 12 19:09:27 there's a tcpdump in the android source, although it's not included on production builds May 12 19:09:31 I'm using genymotion. pretty sure I get root with that. May 12 19:09:35 but you should be able to build it and push it May 12 19:09:54 and yeah, if you have root, you can definitely use it May 12 19:10:08 can't run tcpdump without root, but emulator can run tcpdump May 12 19:10:14 since emulators are all rooted May 12 19:10:18 you can either grab AOSP and build it, or find a pre-built binary for android somewhere May 12 19:10:31 not familiar with building something like tcpdump and pushing it onto an emulator (if I'm understanding you correctly). May 12 19:10:32 but if you can barely understand http, understanding tcpdump is much more advanced May 12 19:11:00 Yeah. In a bit of a pickle here. May 12 19:11:00 consider this your chance to learn how, then :D May 12 19:11:20 I was hoping to get charles working so I can start to learn what gets sent. May 12 19:11:42 I'm sure that will work too May 12 19:11:55 I wonder why charles proxy can't just listen to all network requests on my machine. if it can, then why can it NOT monitor the emulator traffic? May 12 19:12:11 eghdk, because nat May 12 19:12:12 tcpdump is what I would use, but then again, I'm already familiar with building modules in the android source and all that good stuff. May 12 19:12:29 so it's what immediately comes to mind May 12 19:12:30 make -j 16 tcpdump if it's already in aosp May 12 19:13:51 pfn: http://possiblemobile.com/2014/06/effects-android-application-termination/ May 12 19:15:58 pfn: and JesusFreke another solution? Have OkHttp print out the entire request? Is that a possibility? May 12 19:16:11 and I can just log it in logcat? May 12 19:17:25 Spynxic good read, dave smith is great May 12 19:20:17 Guys, im trying to use a lib but my min API supported by the app is too low May 12 19:20:35 It says I can use tools:overrideLibrary="libname" May 12 19:20:38 but where do I add that May 12 19:21:44 did you google "tools:overrideLibrary" May 12 19:22:10 Yes May 12 19:22:23 and? the first link has some pretty useful info May 12 19:22:35 Yeah it does, thanks May 12 19:25:09 all thanks goto Al Gore May 12 19:27:26 Spynxic thats kinda funny, so if i am reading this right, your process (with foreground service) can be killed because ... it received a broadcast ? May 12 19:28:51 i read this may have changed again in 5.1 May 12 19:29:11 Hi! I have a question regarding the Recycler view. I've used the ItemDecoration for creating a divider. Now I want to create a circle around each TextView in a colum. Should I do it in the ItemDecoration or the Adapter? May 12 19:30:37 I was just talking about how seamless updating AS was last night, now I go to update to 1.2.1 and it fails May 12 19:30:38 lol May 12 19:30:39 g00s: No idea, I bookmarked it for later reading. The article made me realize process management means more than just closing idle applications to free resources May 12 19:30:44 eghdk: well, you might see if tcpdump is already on your genymotion image May 12 19:30:58 or if not, iirc I think it might be on the sdk emulator images May 12 19:31:10 if so, you could pull it from there and push to your genymotion emulator May 12 19:31:46 what I usually do is to dump out the packets to a file with tcpdump, and then pull it to my development machine and use wireshark to inspect the packet dump May 12 19:31:49 http://developer.android.com/reference/android/app/ActivityManager.html#isUserAMonkey() ? May 12 19:35:25 Spynxic: related: http://developer.android.com/reference/android/os/UserManager.html#isUserAGoat() May 12 19:36:34 JesusFreke: and pfn I'm going to try at a friends house. May 12 19:43:49 Hi! May 12 19:43:56 HELLO ! May 12 19:44:49 Anyone was in hackathon that was related to develop for android and can tell me about it? May 12 19:47:35 no May 12 19:49:11 close enough. May 12 19:58:49 praise the lawd May 12 20:00:27 a May 12 20:00:27 a May 12 20:00:27 a May 12 20:00:39 got a flat tire? May 12 20:01:17 With Dagger and MVP, how do I inject the view, which I am using Fragments and Activities to represent May 12 20:03:54 On a RecyclerView, what do I use to get the height of the list, or the bottom of the list as shown on screen? May 12 20:04:32 isn't Dagger for dependency injection? Butterknife is for view injection May 12 20:04:43 he means view as in MVP May 12 20:08:12 hm, how do you use a post flair on /r/androiddev ... for example [Discussion] blah blah blah May 12 20:08:56 aw man, did anyone respond to my cursorloaders questions? i got disconnected May 12 20:10:45 g00s: https://www.reddit.com/r/chiliadmystery/comments/1uq68v/how_to_flair_your_post/ May 12 20:10:54 what question? May 12 20:11:11 g00s: after you have a made the post. although I have never used it. May 12 20:11:13 Does anyone know how to convert an the day of the weet (int 0-6) to a String like "Monday" but in the Locale of the user? May 12 20:11:53 donniezazen cool thanks, huh there should be 'question' flair O.o May 12 20:12:03 icedp: is there any reason to shy away from cursoradaptors, especially in recyclerviews? May 12 20:12:27 Pwnies well, recyclerview doesn't have a cursorAdapter to begin with May 12 20:12:34 cursoradapters* May 12 20:12:46 so , easiest thing , when grabbing from database, is to use cursoradapter + listview / gridview May 12 20:13:03 g00s: dev question or general question? I think specific problems are discouraged in the subreddit. May 12 20:13:13 i was looking at this May 12 20:13:13 I think I got one.. May 12 20:13:13 donniezazen oh shit :( May 12 20:13:13 http://stackoverflow.com/questions/26517855/using-the-recyclerview-with-a-database May 12 20:13:19 second answer May 12 20:13:30 is that a good idea? May 12 20:15:14 if I'm showing 5 items on the screen at once, what would be the ideal amount to lazy load? Should I initially load maybe 10 items, and then load 5 more as the user scrolls? May 12 20:21:00 anyone know how to add a label in Keep? i See Inspiration (?) / Work / Personal. I'm interested in the UI around this. When i click an item for detail, i have the option to select a label - but nowhere to add / delete them May 12 20:22:26 i would be surprised - or maybe not , if google only gave 3 canned tags w/o any tag management UI May 12 20:22:35 you add on an item May 12 20:23:17 right, "Add Label" ... but then you can select but i dont see anything for managing those May 12 20:24:01 nav drawer May 12 20:24:46 yeah that lists them too :D .. but how to add a new label May 12 20:25:58 drilling into a label lets you delete and rename it May 12 20:26:05 so just one missing piece ... add May 12 20:27:06 AHA ! if you click 'Add label' from a note, you can select or type into the toolbar for a new one May 12 20:27:29 for some reason the keyboard did not show a few times, so i had no idea i could type into the toolbar . neat i guess May 12 20:38:13 you add on an item May 12 20:38:16 that's what i meant May 12 20:38:19 despite lack of words May 12 20:40:07 I’m implementing drag and drop for a recyclerview. I’m trying to get it to scroll if the user drags the cell down the list. I’m trying to make it so the user can’t drag the cell past the bottom of where the list is drawn. May 12 20:40:52 how do i get the bottom of the view bounds of the recyclerview? Not the bottom of the entire list of items, but the bottom of the view that is drawn? May 12 20:40:55 anyone used bing search api? May 12 20:41:09 I enter my username and password but it won't accept it May 12 20:45:09 I think you can take a lot of ideas from DragSortListView library, s73v3r May 12 20:45:21 its very well written May 12 20:48:42 Is there a way to fetch daily updates from the developer console? I'd like a daily update saying how many new installations and uninstallations etc. May 12 20:51:42 ^ good question.. May 12 20:52:17 scraping the site sounds like a bad idea :P May 12 20:52:46 very May 12 20:52:49 they often change May 12 20:52:50 Gotta love that daemon: https://i.imgur.com/vehLaxL.png and the error: "Could not find a usable daemon, I have connected to &00 different daemons but I could not use any of them to run build..." May 12 20:52:57 maybe google analytics will help? May 12 20:53:09 I have analytics in most of my apps May 12 20:53:22 then you know how many are active May 12 20:53:40 the "new users" don't match "new installations" in dev console May 12 20:53:45 * TacticalJoke throws holy water over Muchoz's computer. May 12 20:54:09 wow an exorcism ! May 12 20:54:12 That won't exorcise the d(a)emon called Gradle. May 12 20:54:37 hmm May 12 20:54:57 19s compile time, ugh. May 12 20:55:19 tricknology_, but I guess I can live with the data from analytics. Any suggestions on how to get frequent updates from that? May 12 20:56:06 Not sure, I think you stil have to pull a report May 12 20:56:09 from console May 12 20:57:12 oh hye May 12 20:57:16 Quacked: https://developers.google.com/analytics/devguides/reporting/core/v3/ May 12 20:58:20 hmm May 12 20:58:21 thanks May 12 20:59:04 np? sorry it wasn’t what you were looking for.. maybe an API call to the play store? May 12 21:15:53 yay :) https://github.com/daimajia/AndroidSwipeLayout/tree/master/demo/src/main/java/com/daimajia/swipedemo May 12 21:16:04 https://github.com/daimajia/AndroidSwipeLayout May 12 21:19:29 daimaija is really good May 12 21:20:02 I use the easing library he has May 12 21:21:05 so good.. May 12 21:21:11 there should be git tip inside github May 12 21:21:37 well, gn May 12 21:24:31 hmm.. “Version X is not served to any device configuration: all devices that might receive version X would receive version Y.” May 12 21:25:27 moving to beta fixed.. May 12 21:25:51 error was saving apk as draft instead of moving it to prod. right away May 12 21:26:03 moving to beta cleared it right up May 12 21:31:08 How can I manually start/stop NotificationListenerService from my MainActivity? May 12 21:34:34 matthias_arch: listener for notification actions? May 12 21:35:13 NotificationListenerService sounds like something 3rd party May 12 21:35:52 canvs2321: https://developer.android.com/reference/android/service/notification/NotificationListenerService.html May 12 21:36:15 Fires when a notification gets posted/removed May 12 21:36:32 ah i see, can't you just remove your listener? May 12 21:36:50 or are you confused with how to listen and stop listening all together? May 12 21:37:10 seems like that'd be a system requirement to listen to all notifications May 12 21:38:29 what is this for? May 12 21:39:58 Must be required by an NotificationListenerService, to ensure that only the system can bind to it. May 12 21:39:58 Constant Value: "android.permission.BIND_NOTIFICATION_LISTENER_SERVICE" May 12 21:40:01 stuff seems iff May 12 21:40:18 It's confusing. The service starts automatic. I want it to run only when my app is running/ toggle by button May 12 21:40:40 So not possible? May 12 21:40:48 i'm not saying that May 12 21:41:10 it just seems that kind of requirement would be more towards system apps/services,things that are elevated May 12 21:41:49 Hm ok May 12 21:42:12 What does this mean? May 12 21:42:18 i just jumped in, others maybe able to help you more May 12 21:42:32 what do you need this for? May 12 21:42:57 you want to be notified of all notifications? May 12 21:43:07 I want to make an app which reads my n. While i drive May 12 21:43:18 Yeah to get their texts May 12 21:43:49 something like that seems you'd need system priviledge, as seems security issue if you can read all notifications May 12 21:44:00 but like i said, i just jumped in on your question :) May 12 21:44:16 so give it some time May 12 21:44:23 Had to enable it in the settings. May 12 21:44:27 and sorry for wasting yours :) May 12 21:44:37 You didn't May 12 21:45:07 someone will know, just stay connected if you can May 12 21:45:50 Seems that the service runs forever in background and stops only if i forbid it in the settings May 12 21:46:24 Will be afk then... Just write to me.... May 12 21:47:58 Anyone use okHttp here? How do you handle no network retries? If my wifi/data is off, it automatically goes into the onFailure block May 12 21:48:58 eghdk, check network state before doing a request and handle it May 12 21:50:32 show a dialog telling the user they dont have a network, maybe with an intent to their data settings May 12 21:52:32 danijoo: Is there any Connectivity lib that most applications use? May 12 21:56:30 no May 12 21:56:40 its only 2 lines of code to get conectivity state May 12 21:56:43 hey guys May 12 21:56:53 yes\ May 12 21:57:06 I'm trying to import http://finance.yahoo.com/d/quotes.csv?s=EURUSD=X&f=sl1 into a string using app inventor, but cant really get it to work May 12 21:57:33 the link works perfectly and it outputs a cvs but as i said importing it doesnt work that well May 12 21:58:39 im sorry if this is sorta basic and noob-ish May 12 21:59:20 what is app inventor May 12 21:59:22 Jisifus: App inventor? the mit puzzle piece thingy? May 12 21:59:27 yeah May 12 21:59:32 i'm still a student so yeah May 12 21:59:38 its pretty fascinating though May 12 21:59:38 http://i.gyazo.com/27475f57e2939498f904b9f3782f166e.png May 12 22:00:01 I thought that died a long time ago. I don't think anyone here has used it in the past few years. imo May 12 22:00:12 well you know May 12 22:00:31 i've been doing console.writeline in c# a few weeks ago so its definitely an improvement lol May 12 22:01:08 Snack bars and FABs coming to AppCompat? http://www.reddit.com/r/androiddev/comments/35r1sv/looks_like_some_more_material_design_is_coming_to/ May 12 22:01:40 TacticalJoke, I dont get why they werent part of it in first place May 12 22:01:44 good to hear they come May 12 22:01:46 Yeah. May 12 22:02:03 danijoo: So even if theres no connection... I just intercept it and don't make the call till it comes back online? Does that sound like a good approach to no network? May 12 22:02:07 I hope we get material ProgressBars. :/ May 12 22:02:09 they suggest them in guidelines but you need a week of development to make alibrary for them May 12 22:02:13 yeah same here May 12 22:02:42 eghdk, depends on what you are trying to do. if its some kind of syncing data in background i would check every hour or so May 12 22:02:51 if its a click of the user, id show a dialog May 12 22:03:35 TacticalJoke i just saw that /r/androiddev post - but are these things just loose files in iosched or part of the support lib ? May 12 22:03:54 the whole material support lib release looked half finished for me. No material dialogs, no FABs... Kinda like they had a releasedate and didnt finish everything in time May 12 22:03:56 oh support i guess May 12 22:04:14 Yeah, I'm guessing so, since it's showing the right package naming. May 12 22:04:15 Yeah, it's not visible to the user, but I need it to happen ASAP. as soon as the network is back online. May 12 22:04:29 eghdk, why? :) May 12 22:04:33 danijoo seems like google half asses everything though :/ May 12 22:04:47 but yeah, support is quarter assed :) May 12 22:04:49 They should employ a bunch of perfectionists. May 12 22:05:09 it's "beta" -- isn't that how they get around full arsing things? May 12 22:05:12 "oh and btw.. we need all this stuff available in support lib, too. ETA: tomorrow" May 12 22:05:43 beta in android just means "we are not sure if it will crash, but we want to ship it NOW!" May 12 22:05:52 they should just put the whole java framework in the support library :D May 12 22:05:54 danijoo: the app let's you go in, but you're in an "offline" mode until the app makes the network login request. May 12 22:06:08 I guess I'll go figure it out myself, have a nice evening folks May 12 22:06:14 eghdk, make the request when user opens the app again :p May 12 22:07:14 eghdk, or use a broadcast receiver and listen for connectivity changes May 12 22:07:14 Yeah, but if for some reason the user just has a bad connection, or has their data turned off, they come in, nothing loads, but then they turn on their wifi or data from the notification tray, it should kick off the request. May 12 22:07:33 eghdk, http://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html May 12 22:08:31 oh look 'CollapsingToolbarLayout" May 12 22:08:55 Whoa. May 12 22:09:04 i've been happy with nispok snackbar though, we'll have to see if support is better May 12 22:09:08 AppBarLayout also sounds interesting. May 12 22:09:10 but yeah, id rather stuff be in support May 12 22:09:16 Is AppBar a Toolbar subclass? May 12 22:09:24 danijoo: Thanks. I know google has some docs on this... just really hoping to find out if there is an industry standard library for this or something. May 12 22:09:29 AppBar is either a ActionBar or Toolbar May 12 22:09:39 I appreciate your help. I'll probably throw something together for myself. May 12 22:10:27 TacticalJoke i found this earlier, thought it was pretty good https://github.com/tehmou/rx-android-architecture May 12 22:10:54 this is the approached i settled on after doing the wrong thing a few times May 12 22:11:44 they have something called a Fetcher though, i have something like that burried somewhere but its bad design May 12 22:11:50 (mine is) May 12 22:13:39 When I look at stuff like that, I feel so glad my app is topologically simple. :D May 12 22:13:50 I think I'd just have to use Rx if I was working on something fundamentally complicated. May 12 22:14:17 yeah i have stuff coming from br/edr , ble, mqtt ... May 12 22:14:21 System design is hard enough without the Activity/Fragment crazy-cycle. May 12 22:14:45 Damn. May 12 22:15:07 and balancing all those long lived / stateful connections May 12 22:15:09 Mine is just HTTP request --> HTTP response. So easy. May 12 22:15:12 :D May 12 22:15:48 i find the difficult part to be the wakelock policy, i had to think about when these things are active, as opposed to doing something important and need to keep the phone on May 12 22:16:43 the funny thing is, seems like there is always an app on my phone which has a wakelock. so its hard to test May 12 22:17:12 then one day, you are the only app running, and nobody else has a wakelock - and boom May 12 22:17:17 Hey guys, I've been reading a lot about http and rest today... but I have a silly question... isn't EVERYTHING rest? I mean I'm not sure if there was or is another way to do http calls, but rest seems like the only reasonable solution. May 12 22:18:01 eghdk no, not everything is rest http://martinfowler.com/articles/richardsonMaturityModel.html May 12 22:18:17 of course, lots of opinions though, and who cares if it works :) May 12 22:19:25 I'm just trying to understand rest.... and there doesn't seem to be much to it. just posts and gets really. but isn't that all apps really do? May 12 22:20:24 eghdk if you are designing a web service, then there is quite some care that needs to go into the details May 12 22:20:40 and books to help out with that, so its not just http verbs May 12 22:20:57 eghdk: An IRC client is an example of something that doesn't do those things. May 12 22:21:23 eghdk and also http://timelessrepo.com/haters-gonna-hateoas May 12 22:22:09 REST is a pattern eghdk May 12 22:22:52 or architecture May 12 22:23:12 Got it. But most applications are doing rest when all they do is post and retrieve data no? I'm just curious to see if something like FB uses rest or whatever. Or is there another big name protocol I should have my eyes on as well May 12 22:23:37 eh, I guess you could look at the github API May 12 22:23:42 REST isn't a protocol. May 12 22:23:43 Afzal: Got it. So not a protocol? May 12 22:23:49 nope May 12 22:23:58 Cool. SO it's a loose set of intructions really? May 12 22:24:17 kind of, yes, REST stands for Representational state transfer May 12 22:24:17 guidelines* May 12 22:24:24 it's a stateless architecture May 12 22:24:44 http://rest.elkstein.org/ May 12 22:24:52 What do you mean "stateless"? May 12 22:25:37 I understand this might be getting a bit off topic of android dev, so if anyone has a goto REST resource... please send it my way. I'll take any vetted reading material I can get May 12 22:25:45 FizzBuss in CSS/JS: http://jsfiddle.net/dj4wsL6h/9/ May 12 22:25:56 Buzz* May 12 22:26:59 TacticalJoke: Was that for me? Wth is fizzbuzz? May 12 22:27:27 It was for everyone. :D May 12 22:27:44 But thats not for me learning rest... right? May 12 22:28:03 Right. May 12 22:28:04 how do I include gson library? should I download it and add to android studio or I can modify gradle to include it for me? May 12 22:28:14 Modify Gradle. May 12 22:28:47 ok found it ty May 12 22:29:27 how about FizzBuzzRecyclerViewAdapter May 12 22:36:53 Some more questions fellow android devs! I've finally finished reading Head First Design Patterns. Cool book. But I'm having a hard time applying some of them (which I guess is expected). Something that REALLY stuck with me was to "program to an interface not an implementation". Doesn't this basically mean to make everything an interface? May 12 22:37:25 I read that book. :) May 12 22:37:37 eghdk, as much as you can within reason, obviously May 12 22:37:45 program to the List interface, not ArrayList implementation May 12 22:37:54 i will let this fizzbuzz stay open just to see if chrome is keeping spawning those boxes until OOM :D May 12 22:38:01 I think it stops at 100. May 12 22:38:02 program to the Activity or Context base class if possible, not your concrete Activity implementation May 12 22:38:07 not if I edit it :pp May 12 22:38:11 Oh. ll May 12 22:38:13 lol* May 12 22:39:07 also no. May 12 22:39:19 the 100 is the ms between method calls May 12 22:39:35 pfn: So I asked this question last week. But then would I program OkHttpClient to an interface as well? May 12 22:39:51 eghdk, no May 12 22:39:54 okhttpclient /is/ the interface May 12 22:39:58 Doh! May 12 22:40:28 O.O What do you mean it "is" the interface? May 12 22:40:36 good night everyone May 12 22:40:40 I never thought of it that way... but I'm still confused. May 12 22:40:46 Good night. May 12 22:40:48 ill repord back how many fizzbuzz chrome can handle :p May 12 22:40:52 all public api are interfaces May 12 22:40:52 :D May 12 22:42:00 eghdk, take the highest level of abstraction available that is usable, that's all that means May 12 22:42:16 eghdk, clearly, Cloneable is not a usable interface May 12 22:42:35 pfn: Doh! So since square made okhttpclient constructor public it's an interface? May 12 22:42:51 eghdk, no May 12 22:43:14 When you change out Callback for Observables #retrofitproblems #solutions May 12 22:43:38 Wait "take the highest level of abstraction available" that kinda makes sense. But I don't understand why cloneable isn't a usable interface. May 12 22:43:49 Not sure why List is valid then May 12 22:43:51 eghdk, look at the api available on it May 12 22:43:53 ... May 12 22:44:23 can you do what you need with the Cloneable interface? May 12 22:44:24 anyone working on an android watch app? May 12 22:44:28 the answer should be obvious May 12 22:44:56 eghdk, similarly, look at the api available on List, or Collection, or any base interface, is it sufficient to do what you need May 12 22:46:01 So what if I wanted to "switch" out my networking layer... with like OfflineHttpClient or something (idk I'm just trying to see if this would help testing?) May 12 22:49:58 It might be better to mock the web server. I'm having a hard time imagining someone subclassing OkHttpClient for testing. May 12 22:50:53 why won't my AS auto-upgrade to 1.2.1.1 May 12 22:51:04 Did you try Help > Update? May 12 22:51:41 yeah that didn't work the first time, the only button there redirected to the tools.android.com page May 12 22:51:50 but now it worked per usual o_0 May 12 22:52:11 TacticalJoke: Yeah, I guess that makes more sense actually. So I'll always use an HttpClient (okhttp) to get and send data... but the "endpoint" or server might change or for test Id use a mock server? May 12 22:55:25 So I'm trying to implement dependency inversion principle and "program to an interface" principle... but I'm working on adding OkHttp to my application. What would be the best way to use these two principles. Right now all I have is my Application class with OkHttpClient client = new OkHttpClient(); May 12 22:55:30 It's probably all simpler than you're thinking, eghdk. Programming to an interface is just about keeping code flexible. If my method is "public void shuffle(List t)", you can pass any list. If, on the other hand, I *require* an ArrayList, it's awkward. What if you want to pass a custom List implementation? May 12 22:55:41 s/t/list/ (or something) May 12 22:57:15 TacticalJoke: To basically take advantage of polymorphism? May 12 22:57:45 Sup TacticalJoke May 12 22:58:23 eghdk: Well, polymorphism is involved, but your goal would be to use whatever List you want. May 12 22:58:27 Hi, drose379. May 12 22:58:32 How you doing? May 12 22:58:38 Maybe I am looking too far into it TacticalJoke ... I'm just still a java/oop/programming beginner and even though I feel I "know" android, my code is very inflexible... and after reading design patterns... any time I write "new" Object I freak out. May 12 22:58:59 Why do you freak out? May 12 22:59:57 Design patterns book seems to hit on "new" being bad. It means some dependency is coming into play I guess. May 12 23:00:16 It just creates a new instance of a class May 12 23:00:18 which is an object May 12 23:00:30 Is that bad? May 12 23:00:53 So now all I want to do is add OkHttpClient to my app, but I'm "freaking out" at where I should actually add it in my code. May 12 23:01:12 Ohh ok May 12 23:01:15 Hmmm May 12 23:01:15 Do you have OCD, eghdk? May 12 23:01:20 lol ^ May 12 23:01:25 I ask because I totally recognise this. :D May 12 23:01:32 lol May 12 23:01:42 eghdk do you need help using OkHttp May 12 23:01:49 TacticalJoke: Nope. Just don't feel like I'm programming a good flexible maintainable testable program. May 12 23:02:05 Well you wont know until you try May 12 23:02:08 So just do it May 12 23:02:13 See what works, and what doesnt May 12 23:02:17 Nike May 12 23:02:17 Then go back and do it all over May 12 23:02:52 The sports wear off ocd programmers May 12 23:03:19 I wouldn't worry too much. Many of the design patterns you'll read about won't be very useful (especially on Android). May 12 23:03:28 Is there a way to get the width of each word in a textview? May 12 23:03:32 Also, dependency injection is awesome in some cases but not desirable in others (even totally undesirable). May 12 23:03:41 Plus di is supposed to alleviate that worry May 12 23:04:37 what Rx operator should I use to take in one item an return a new observable that will emit several different items? May 12 23:04:52 explodes: flatMap? May 12 23:05:00 TacticalJoke: Thanks. Thats a little calming. I do feel like most of the design patterns I read about aren't applicable to Android. May 12 23:05:03 flatmap, right? but what do I use to create the new observable? May 12 23:05:15 actually, i want to return a list of observables, not a list of items May 12 23:05:41 actually no May 12 23:05:58 one observable that emits several items, but i get those by the way of an observable for each item May 12 23:05:58 TacticalJoke: If I had to learn a few patterns can you tell me which ones are most applicable to Android in your opinion? May 12 23:06:38 Is there a way to loop over each word in a textview May 12 23:07:40 I guess "listener" (which is like observer lite), factory methods (if they qualify as a design pattern), singletons (maybe), adapter, facade. May 12 23:07:56 It's more of a "you'll know it when you need it" thing, I think. May 12 23:08:36 drose379: You could easily do that with regexes. May 12 23:08:47 Yeah, thats what im gonna end up doing May 12 23:09:10 Just stop whenever there is a space and grab what is before it, then remove it from the sring and loop again May 12 23:09:23 What were you thinking TacticalJoke ? May 12 23:09:34 I was thinking of '\b'. May 12 23:10:21 word boundary? May 12 23:11:08 W3rd. May 12 23:11:47 But that would look at the whole string May 12 23:11:54 I wanna grab each specific word in the string May 12 23:12:26 TacticalJoke question - in your mind, who should own the AppBar? Lets say you have a fragment up, its the only one. Should it be in the fragment layout or the Activity layout? any principles ? May 12 23:13:00 i keep winding up with this scenario where the toolbar has both local and global things in it May 12 23:13:13 so the global things, lik Settings, might go into overflow menu May 12 23:13:22 drose379: https://regex101.com/r/qU9zG9/1 May 12 23:13:30 but what if the fragment wants to put a Spinner in the toolbar? May 12 23:14:41 Hmm, I think I'd be tempted to keep things simple and let the Activity own it. I haven't used Fragments in ages, though. :D May 12 23:14:56 :D May 12 23:15:00 And let the Fragments ask the Activity to add stuff to it, I guess. May 12 23:15:55 drose379: Actually, I guess it should be `\b(\w+)\b`. May 12 23:16:49 So it looks at the string May 12 23:16:51 I have a list of Observable, I need to merge them, so I use .mergeWith but I'm not sure what I should be passing in May 12 23:16:54 and looks for items that May 12 23:16:59 We can actually get away with "(\w+)", I guess. May 12 23:17:10 just w+ May 12 23:17:13 ? May 12 23:18:41 w+ would match any number of word characters May 12 23:18:51 so whenever there is a space, it wouldnt match May 12 23:18:53 Correct? May 12 23:19:03 drose379: textView.getText().toString().split('\w+') May 12 23:19:23 err, not s\w May 12 23:19:24 \w May 12 23:19:29 \s+ May 12 23:19:35 or just " +" May 12 23:19:36 s? May 12 23:19:41 whitespace May 12 23:19:52 oh cause split() splits at a given pattern May 12 23:20:02 So whenever there is /s whitespace then it will split the string May 12 23:20:09 right May 12 23:20:16 Great May 12 23:20:18 just wondering May 12 23:20:18 and you'll get an array of strings May 12 23:20:22 would \b work May 12 23:20:30 since its word boundary, which is also whitespace before or after May 12 23:20:34 just try it ... May 12 23:20:38 possibly. not really familiar with that one specifically May 12 23:20:45 Ok, JW May 12 23:20:48 Hey thanks alot May 12 23:20:55 In that case, I would guess you might get the spaces included May 12 23:21:01 Ah ok May 12 23:21:07 Regex can be confusing, thanks May 12 23:23:15 hate it when public keys are not so public May 12 23:23:25 It wont let me pass in \s to the split May 12 23:23:31 Says illegal escape char May 12 23:23:33 \\s May 12 23:23:34 \\s May 12 23:23:37 Oh ok May 12 23:23:40 I tried /\s May 12 23:23:43 haha May 12 23:23:51 I thnk we all have at some point May 12 23:24:21 lol May 12 23:24:31 In Kotlin, you can say """\s""". May 12 23:25:23 taht hurts my eyes May 12 23:25:27 are those single or double? May 12 23:25:42 or4 double and 4 single? May 12 23:26:01 \\s+ for all whitespace May 12 23:26:23 you could use this: ^\s+|\s+$ May 12 23:27:33 Tripel. :D May 12 23:27:35 Triple* May 12 23:34:56 This is something you could do in Kotlin: http://pastebin.com/nvAWud8u May 12 23:35:16 Looks cool May 12 23:35:38 Nice and clean May 12 23:37:25 Hey does the entire screen width add up to a certain number of density pixels May 12 23:37:51 Like 100% of layout_width = (?)dp May 12 23:38:14 no May 12 23:38:30 I can get the width of a view thoughb May 12 23:40:04 Correct May 12 23:40:39 Cool May 12 23:41:30 Hmm May 12 23:41:32 TacticalJoke: is your app finished ? May 12 23:41:35 getWidth is giving me 0 May 12 23:41:46 But im in an adapter getView() method May 12 23:42:02 It's about 0.5% finished. :D May 12 23:42:03 But after I set all the items in the view, just before I return it, the view should have a width May 12 23:42:07 nope May 12 23:42:09 it shouldn't May 12 23:42:14 only after layout May 12 23:42:14 no? why? May 12 23:42:20 Ok May 12 23:42:21 Hmmm May 12 23:42:24 I need to get the width May 12 23:42:30 Trying to think of another way May 12 23:42:32 Why do you need the width? May 12 23:42:39 Making a formula May 12 23:42:50 Well each block takes up half of the screen May 12 23:43:01 So I could get the width of the full LinearLayout then divide that by 2 May 12 23:43:03 Yes? May 12 23:43:19 Couldn't you just use LinearLayout with layout_weight to get 50:50? May 12 23:43:30 I already have 50 50 May 12 23:43:39 I need to get the width in dp of each half May 12 23:43:50 Inside the getView method of a BaseAdapter May 12 23:44:02 So im thinking get the width of the full activity layout and divide by 2 May 12 23:44:13 Why do you need to? (The answer determines the best thing to do.) May 12 23:44:23 Word wrapping May 12 23:44:28 I have a gridview May 12 23:44:34 and each tile has text May 12 23:44:53 I only want the textview to be as wide as the longest word in the textview May 12 23:45:14 So im trying to create a formula that gets the number of chars in the longest string in the textview May 12 23:45:22 Then gets the width of the view May 12 23:45:30 then does some math and gives the textview a width May 12 23:45:36 Its gonna require some messing with :D May 12 23:46:05 the enter key is not punctuation May 12 23:46:08 what if its a long word that passes the edge of the tile ? May 12 23:46:28 Resize the font May 12 23:46:35 Sorry JakeWharton May 12 23:46:49 break the word in two with a -\n May 12 23:46:59 I could do that too May 12 23:47:32 Looks like the parent view in the getView is 540dp May 12 23:47:50 So 260 for each half, that sound right? May 12 23:48:47 Does getWidth() return in dp, it doesnt specify in doc May 12 23:49:13 drose379: you're trying to calculate the width of a view based on the number of characters in the longest word? May 12 23:49:15 It's in pixels. May 12 23:49:35 Are you using a fixed-width font or something? May 12 23:49:35 No JesusFreke May 12 23:49:41 yeah I am May 12 23:50:41 JesusFreke want me to explain it better May 12 23:51:21 drose379: yeah, nevermind. I'm busy with other stuff anyway :) May 12 23:51:47 No prob May 12 23:51:55 TacticalJoke so I gotta convert px to dp May 12 23:52:05 I'm not sure why you would. May 12 23:52:22 shouldnt I use dp instead of px May 12 23:52:32 Dp is responsive to each screen May 12 23:53:41 That reasoning assumes you're using hard-coded values, not "actual width / 2". May 12 23:54:30 If I get the width of the entire view in dp May 12 23:54:33 then do that / 2 May 12 23:54:42 would it give me half the width of the view May 12 23:55:35 You could get the width in bananas, divide it by 2, and end up with the correct measurement (in bananas). May 12 23:56:00 i would measure it in chickens , not bananas May 12 23:56:32 Bananas don't scream when you divide them. :[ May 12 23:56:38 If I just get the whole width and convert it to dp May 12 23:56:47 Then I can work with the dp for the rest and not the px May 12 23:57:01 Unless that wouldnt work May 12 23:57:29 Is there a method to get the width in dp to start? May 12 23:57:30 I don't understand exactly what you're doing, but I get the feeling something isn't quite right. May 12 23:57:40 why? May 12 23:58:27 Something about wanting the width in dp and resizing TextViews based on char counts and caring about the current TextView size. May 12 23:59:03 I only want one word to be per line May 12 23:59:06 Well no May 12 23:59:08 When I was your age, drose379, I was doing similarly crazy things. May 12 23:59:15 :) May 12 23:59:27 I want the textview to be as wide as the largest word in the view May 12 23:59:41 So if the largest wors is Word, and word happens to take up 5 px May 12 23:59:47 I want the textview to be 5px May 12 23:59:53 Are you going to measure the actual text? May 13 00:00:06 Figure out which is the largest word and measure its actual text. May 13 00:00:13 I am May 13 00:00:15 in chars though May 13 00:00:20 Im getting the char count May 13 00:00:32 Now I just need to create a forumula to convert that to dp or px or something May 13 00:00:54 why not just divide each work with \n and set TextView's layout_width to wrap_content May 13 00:01:07 :s/work/word/ May 13 00:01:15 thats a really good idea May 13 00:01:25 But I kinda wanted it to look like May 13 00:01:28 Longest May 13 00:01:37 Word Is May 13 00:01:41 This May 13 00:01:49 Like it looks like a block May 13 00:01:54 Instead of Longest May 13 00:01:57 Word May 13 00:01:59 Is May 13 00:02:01 tThis May 13 00:02:06 Maybe it would look good though, worth a shot May 13 00:03:22 The solution there would be "Longest[\n]Word Is[\n]This". May 13 00:04:14 You dont think I can come up with a formula :P May 13 00:05:42 Just need to accurately convert px to dp May 13 00:05:45 :) May 13 00:06:04 If I can get the density, then its possible May 13 00:07:01 Isn't this just a case of manual wrapping? May 13 00:07:14 "Hard wrapping" or whatever it's called. May 13 00:07:35 I was looking for word wrapping May 13 00:07:39 Couldnt find anything May 13 00:10:14 drose379: if you do android:scrollHorizontally="false" it should word wrap the textview auto May 13 00:11:12 To one word each line shmooz? May 13 00:11:14 drose379: and also android:ellipsize="none" with the above May 13 00:11:29 That would get one word each line? May 13 00:11:33 no, not one word though May 13 00:11:51 Would it make the textview width the width of the longest word May 13 00:11:54 it would auto wrap like a magazine would May 13 00:12:19 like a magazine? May 13 00:12:39 yeah like how flipboard would wrap its news into blocks May 13 00:13:08 not one word per line May 13 00:13:15 Hm, ok May 13 00:13:18 thanks May 13 00:14:33 g00s: FloatingActionButton is already in AppCompat (I just found it with Ctrl+N). May 13 00:14:41 "Floating action buttons are used for a special type of promoted action." May 13 00:14:56 In 'android.support.design.widget'. May 13 00:15:09 I'm just waiting for lollipop to die May 13 00:15:18 can't stand those floating action buttons May 13 00:15:37 they always look out of place and useless, and covering up stuff May 13 00:15:46 They are misused so much. May 13 00:16:55 `public class FloatingActionButton extends ImageView` May 13 00:18:17 yeah, i don't care about FAB either May 13 00:18:56 i would like those bottom sheets though May 13 00:19:14 diapers ? May 13 00:19:26 DiaperView, yes May 13 00:19:58 diaperView = null; System.gc(); May 13 00:20:01 actually DiaperLayout, because it contains children May 13 00:26:55 gmail keeps spamming my logs with strictmode policy violation exceptions May 13 00:29:47 they say "it's enough weather apps in there" and then distinguish a weather app with "Editor's Choice" :) May 13 00:38:30 icedp ha May 13 00:48:26 Guys I want to set the width of a TextView programatically May 13 00:48:33 What should i fill in for the layout_width May 13 00:48:50 LayoutParams.MATCH_PARENT May 13 00:49:04 if you want to fill the available width May 13 00:49:26 otherwise use the LayoutParams of the container accordingle May 13 00:51:43 Thanks shipit May 13 01:05:26 getFragmentManager().findFragmentById(R.id.leftpane).setHasOptionsMenu(false) ... hm clever May 13 01:12:00 until it npe May 13 01:12:07 then it won't feel clever May 13 01:16:19 chaining the methods wasn't the clever part, it was using the SlidingPaneLayout's listener to hide or show the right fragment stuff in AppBar. i guess i've only called setHasOptionsMenu() in Fragment.onCreate() and never thought it could be used externally to poke the fragment May 13 01:39:33 if we had 3 fingers on each hand we'd be using base 6 numbers ;P May 13 01:45:29 I read in an article about Dagger 2 that injecting from a superclass will not inject resources that are requested in a subclass - essentially that you must inject from the farthest branches of a hierarchy that request an @Inject resource. May 13 01:45:59 correct May 13 01:46:07 ok May 13 01:46:40 shmooz: if we had 4 finger per hand, we'd have discovered boolean algebra way ahead in civilization May 13 01:48:13 the practice I've come up with that makes most sense to me is to have an interface for a component, then declare a subclass of that component inside of a class requesting injections (and there declaring annotations, since annotations aren't inherited) May 13 01:50:16 what's a way to package dependent jars in a library? May 13 01:50:50 and not cause class loading / versioning conflicts May 13 01:50:59 <_genuser_> shmooz: base 6? except taht base 10 would feel weird. May 13 01:55:10 With Dagger 2, if I have a component that requires Modules, it seems the component doesn't always require me to set an instantiated module on the builder. What's the rule on that? not required if it has an empty/injected constructor? May 13 01:55:26 correct May 13 01:55:31 cool May 13 01:55:40 think I'm finally getting the hang of it May 13 01:57:45 in RxJava, if an onError occurs, does the subscriber automatically unsubscribe from the observable? May 13 01:58:42 yes May 13 01:58:48 i mean, correct May 13 01:58:52 (broke my streak) May 13 02:00:49 so I was trying to extract a form view from an activity today, where pushing the submit button would validate the form fields, and if successful, combine them into an observable that's subscribed to on the activity and flatMapped into a retrofit call May 13 02:01:20 however, there are a lot of different problems I've been having with that May 13 02:01:46 for instance, I want to abort early if one of the fields is invalid, and set an error on that field May 13 02:02:22 but if there's an error raised from the validation, the ViewObservable.clicks() gets unsubscribed May 13 02:03:02 I can do a retry() somewhere in the chain, but that blocks the subscription from calling if there are any errors May 13 02:03:57 so I need to have doOnError (I think) to recover from certain types of errors May 13 02:04:07 If I want to run GUI code from a seperate thread I use a Handler object. Does it matter which Thread the Hanlder object is created in? Do I need to create it in the GUI thread first then pass it as an argument to the other thread I want to run GUI code from? May 13 02:04:31 I'm getting this error at line #8 http://pastebin.com/JBKLM7C5 but only on a physical device it runs fine in the emulator can't make sense of it May 13 02:04:37 the only thread that can modify the UI is the main thread May 13 02:04:50 so you need to run your other work in other threads, rather than run the ui in another thread May 13 02:05:01 but even then, mapping a ViewObservable to a Retrofit observable and then recovering from errors on the main thread causes concurrent modification errors or thread errors May 13 02:05:09 dragorn: ok, so can you answer my question? May 13 02:05:12 if you DO need to update the ui from another thread, you need to do something like runOnUiThread(...) and post a handler May 13 02:05:42 dragorn: does it matter where I create the Handler object? May 13 02:06:18 dragorn: I use handler.post(new Runnable() ...) May 13 02:06:43 or do I need to do this another way? May 13 02:15:20 joshkovach: i would recommend staying away from errors May 13 02:15:51 joshkovach: errors are for unexpected things in RxJava, and a failed validation is to be expected May 13 02:16:17 ideally you would just model it as a normal event in the stream May 13 02:16:54 JakeWharton: is there a better way to abort a stream say, before it reaches the network service call? May 13 02:17:26 anyone ever had something like this a null pointer error on ui elements but only when running on the device not in simulator? May 13 02:19:40 hert: stateSpinner isn't being found in your layout. maybe API difference from sim/device? (just a guess) May 13 02:19:49 joshkovach: you want some kind of filter May 13 02:19:57 the stream should always be connected, but only trigger when all its conditions are met May 13 02:20:08 hmm, okay May 13 02:20:17 I can show an example tomorrow, gotta run for now May 13 02:20:32 dragorn: ? May 13 02:21:25 they both running in same API the 1st activity runs well on device but after button push to display the second activity i get the error May 13 02:22:08 JakeWharton: I think this is pretty close to what I have on my other computer - https://gist.github.com/shekibobo/87ec79f44018c56a238a May 13 02:23:05 so what I'd probably want to do is filter the validEmail() and validPassword() observables instead of calling onError on the subscriber May 13 02:26:54 Just revised with what I think you were suggesting May 13 02:32:50 "Most of Android components are quite hideous and of poor quality" lol May 13 02:33:16 lolz! May 13 02:33:22 is that a jake quote? May 13 02:34:09 joshkovach no, i was reading https://github.com/tehmou/rx-android-architecture May 13 02:34:27 ahh May 13 02:36:18 I've seen that yesterda May 13 02:36:20 y May 13 02:36:22 seems nice May 13 02:36:50 havent seen the sources yet but smells like Model-View-ViewModel ? May 13 02:37:14 ok so Handler, does it matter what thread I create it in? If I use post will it still run the code on the GUI thread? May 13 02:38:04 is there a way with Rx to ensure a particular event in the stream is handled on the UiThread? May 13 02:39:31 joshkovach: observeOn() May 13 02:39:43 also, what is the best way to handle an expected retrofit error? e.g. 401 is okay and expected, but I want to handle it so that it shows an error and doesn't kill the subscription May 13 02:40:18 joshkovach: response interceptor? May 13 02:41:32 shipit: re: observeOn(), would I call that before a transformation? can I call it multiple times in a stream? May 13 02:42:37 joshkovach: I suggest transforming on io() or compute() threads and when your data is ready to consumed, switch to ui() May 13 02:42:44 I forget exact syntaxes May 13 02:43:21 I haven't tried calling it multiple times in a stream May 13 02:44:31 I'd pipe the io events into an adapter and then let the android ui dataset based components takeover May 13 02:48:11 gordon_ yeah, is mvvm a bad smell ? May 13 02:48:21 no, why ? May 13 02:48:37 mvvm or mvp seeems good choice for android May 13 02:48:42 still not sure how you can really do it on android May 13 02:49:43 I've found this blog post lately: http://fernandocejas.com/2014/09/03/architecting-android-the-clean-way/ still havent had time for check it May 13 02:49:49 maybe a little May 13 02:50:46 what's good about it, it has separate gradle modules so it wont compile for gazylion years when unit testing data layer etc. May 13 02:50:57 at least it shouldnt May 13 02:52:50 ok so no idea at all May 13 02:53:31 next question, Toasts, are they clickable? or if there is a button behind a toast will the button get clicked when pressing on a toast (while it is displaying) May 13 02:53:34 ? May 13 02:54:03 pretty sure toast is just a textview, but could be wrong May 13 02:54:22 never seen a case where they could be interacted with May 13 02:55:04 phix toasts are more or less obsolete, use snacks May 13 02:55:12 joshkovach: I basically want to know if I want to click on a button that a toast is displaying on top of, where does the click go? the toast or the button? May 13 02:55:20 g00s: snacks? May 13 02:55:30 snackbar, etc May 13 02:55:30 good question May 13 02:56:12 phix i guess the next support lib will have it , but for now https://github.com/nispok/snackbar May 13 02:56:45 * Leeds goes to toast a bagel May 13 02:56:55 phix: the click goes through the toast to the object behind it May 13 02:57:21 it doesn't block clicks May 13 02:57:28 g00s: ok, I am using up to API 14 May 13 02:58:37 seems like Observable::onErrorResumeNext might be the way to handle a retrofit error like a 401 or network error **** ENDING LOGGING AT Wed May 13 02:59:58 2015