**** BEGIN LOGGING AT Sun Feb 14 02:59:58 2016 Feb 14 03:07:34 hm anyway.. android-related question: (or rather java-related I guess:) if I have a dumb DAO, where would be the best place to write a method to persist it (into a XML file)? Feb 14 03:07:58 e.g. writing a helper, a save-method in the DAO, a save-method in some AbstractDAO.. or something like that Feb 14 03:10:27 oh.. or I could create a DAO-factory I guess Feb 14 03:11:12 TacticalJoke this is going to be an interesting book, preordered it http://www.theguardian.com/technology/2016/feb/12/digital-capitalism-douglas-rushkoff Feb 14 03:27:32 hey guys, quick question: if I want to hide a relativelayout based on a condition in the onbindviewholder method of the recyclerview, where do I initialize the relativelayout? Feb 14 03:27:48 I tried "RelativeLayout bottomView = (RelativeLayout) view.findViewById(R.id.bottom_view);" but that doesn't work in the fragment Feb 14 03:31:47 g00s: Looks like my kinda topic. Feb 14 03:32:05 Controless: In `onCreateView`. Feb 14 03:32:08 +Holder Feb 14 03:32:46 Controless: RecyclerView and Fragments are two separate topics. Feb 14 03:33:48 ah sorry. Feb 14 03:34:19 i added it in the oncreateviewholder but not it says cannot resolve method findviewbyid. and when I add 'view. Feb 14 03:34:24 in front, it cannot resolve view. Feb 14 03:34:36 hmm Feb 14 03:37:00 What are you trying to do? There's so many things you could be referring to right now. Feb 14 03:38:08 i basically have a recyclerview with items in it. I want to hide a relativelayout based on one of the item attributes. im having trouble initializing the relativelayout though. Feb 14 03:38:23 Where is the RelativeLayout? Feb 14 03:38:42 its in the view thats being inflated Feb 14 03:38:50 Being inflated where? Feb 14 03:38:58 In the RecyclerView or in a Fragment. Feb 14 03:39:11 oops i meant its in the layout being inflated*** Feb 14 03:39:23 fragment Feb 14 03:39:49 In that case, you'll probably have to have some kind of callback mechanism in the RecyclerView adapter that the Fragment subscribes to. Feb 14 03:40:20 When this event happens, the Fragment's method is called and the Fragment hides the RelativeLayout. Feb 14 03:42:20 ahh okay, got it. thanks TacticalJoke Feb 14 04:15:25 Hi, has any one of you uploaded aar file to Jcenter which has source code in private repo ? Feb 14 04:47:02 are there any guidelines for logging? Feb 14 04:47:20 should you leave some logging in place to aid debugging in the future? Feb 14 04:52:03 log the heck of out it debug the flock out of it and the remove every last bit from the logging… look at the amount of crap that come other apps like facebook in the logcat.. Feb 14 04:53:40 isn't there a way to remove the log statements from your production build? Feb 14 04:55:10 They should call it BlogCat. Volumes of text nobody wants to read. Feb 14 04:55:39 Plesae do remove the log statements from the production build… look at the amount of crap in logcat output as soon as you connect a device. Feb 14 04:55:58 the codebase at work is so funny. People use their own name as the tag so they can easily filter it Feb 14 04:56:04 then they push it into the repo Feb 14 04:57:23 go smack them around the head. Feb 14 05:07:40 Hello! FFmpeg has "channel layout flags" that represent which speak channels are encoded in an audio stream. prefixed by AV_CH_* Feb 14 05:08:06 AudioFormat has correlating codes with different values, prefixed with AudioFormat.CHANNEL_OUT_* Feb 14 05:08:39 http://pastebin.com/9YhgsARR This class is meant to perform the conversion of an FFmpeg u64 mask to an AudioFormat mask Feb 14 05:09:42 Nothing complicated happens in this code, however, after decoding an audio stream with an ffmpeg channel layout of 0x3f (the first 5 speakers in the AV_CH_* list) Feb 14 05:10:27 nvm one sec :P Feb 14 05:17:07 Would be cool if javac had a --concise option. Feb 14 05:28:34 TacticalJoke: It has one, it's called kotlinc :D Feb 14 05:56:52 https://gist.github.com/07e0ef3f63d4896a629b Feb 14 05:57:14 I think I'm pretty happy with how this is turning out for abstracting out side effects Feb 14 06:19:43 also gets rid of the stupid overriding boilerplate, will extend this to fragments, services and views after I'm doing doing it well with activities Feb 14 07:29:38 Interesting. Feb 14 07:32:32 The things I did recently was design a bound activity and bound fragment, which automatically handle binding to a service for you, or listening to the creation of the service. So you just have your own method that gets called as soon as the connection is open. Status of the loading events is simply done via sticky events. And thanks to my observable types everywhere, each fragment and activity just defines how to render each part of itself, and on Feb 14 07:32:32 every update, those parts will automatically update. Feb 14 07:38:12 working on your own project is so refreshing Feb 14 07:38:17 I get to make all the decisions Feb 14 08:52:28 volley gradle build failed Feb 14 08:52:37 in latest git clone repo Feb 14 08:53:44 org.gradle.api.tasks.TaskExecutionException: Feb 14 10:32:36 Hello, anyone knows a possible reason for android studio to tell me android:theme isnt allowed in an "attribute android:theme is not allowed here" Feb 14 10:34:15 http://pastebin.com/raw/sRwLYbeN Feb 14 10:35:25 Same thing with android:allowBackup, android:icon, android:versionCode and android:versionName Feb 14 10:48:50 it’s fukin -9 degrees outside Feb 14 10:49:17 hey Feb 14 10:49:45 b4b,I bet colder in wi Feb 14 10:50:35 that cold i think same where i am cold here to. Feb 14 10:52:03 b4b: where u at? Feb 14 10:52:15 east coast us Feb 14 10:52:16 wisconsin Feb 14 10:52:35 by Madison Feb 14 10:52:36 here it's extremely hot, very weird tbh Feb 14 10:52:52 we are on the middle of winter and it's 21º C like wtf Feb 14 10:53:25 Has anyone read the book call android programming the big nerd ranch guide? Feb 14 10:53:27 hottest winter ever recorded in valencia, spain Feb 14 10:53:32 yepper Feb 14 10:55:25 I not sure if it going to warm up today. Feb 14 10:55:39 I know it going to be warmer on monday. Feb 14 10:58:33 hello everyone. When people login to my app via facebook. Where and how i can store their data? Feb 14 10:58:48 hack em Feb 14 10:59:53 Twirl,Why hack them? Feb 14 10:59:56 Twirl: no i dont talk about hacking. I mean where can i store the action they make in my app. I am not talking about stealing their data from facebook servers. They loign my app use my app and creates stuff etc. Feb 14 11:00:29 My own users have a relation in my database. But facebook logins will wont even have a row in my users table Feb 14 11:01:00 Should i create a row for all facebook logins automaticly Feb 14 11:01:56 I didn't know you can make apps for facebook:) Feb 14 11:02:47 perlsyntax: ? Feb 14 11:03:21 yes Feb 14 11:03:24 well, funny enough if you make them "login with facebook" you can ask them for their facebook acc info and then login to it Feb 14 11:05:33 Twirl: yes. So for example if i have an app users can share a photo. Normally i put this photo to my server and link it with the user who shared it. So what happens if a user who logged in via facebook shares a photo in my app. I put it to my server also but there is no user to link it with in my database. Feb 14 11:06:28 are you asking or telling me? Feb 14 11:07:40 Twirl: l am asking. İ dont know how to handle this Feb 14 11:08:32 there are probably an infinite amount of ways to do it Feb 14 11:08:52 the most convenient would be to store the facebook profile id on your server Feb 14 11:09:27 but its better to just take a look at what some business has made or something Feb 14 11:09:28 Twirl: hmm. so i need have another table for facebookUsers Feb 14 11:10:00 try to find something already made by someone that knows what they are doing Feb 14 11:10:43 Twirl: okay. Thank you for your help and time Feb 14 11:11:02 torak: wut? it's 50 € Feb 14 11:11:27 Twirl: is bitcoin okay? Feb 14 11:12:00 paypal Feb 14 11:13:21 Dogecoin pls Feb 14 11:26:27 danijoo_: today I was bored again: Feb 14 11:26:30 http://imgur.com/a/wJXGL Feb 14 11:27:06 Plus found a way to crash the YouTube app: Feb 14 11:27:08 http://imgur.com/a/yOrpQ Feb 14 11:27:30 ... why? Feb 14 11:28:36 bug bounty Feb 14 11:28:38 :) Feb 14 11:30:59 for clicking ads? :P Feb 14 11:31:50 Just bored Feb 14 11:32:31 It's like Cookie Clicker, but with the satisfaction that some program at Google is marking your clicks as completely worthless. Feb 14 11:35:24 Also, every time I click, Google has to pay a fraction of a cent for electricity, but can't get any money from the advertiser. It's the most evil thing I'd do. Feb 14 11:42:04 danijoo_: also, I don't do bug bounty stuff anymore. I did send bugs to Google, they said "not critical" but also "if you dare to publish, we'll sue you, they're critical", so I don't care anymore. Nowadays, if I find a bug, I'm not gonna tell anyone anyway. Feb 14 11:43:06 small companies or independent devs care. But big ones.. yeah, they dont :/ Feb 14 11:45:24 Especially Google, they treat their users like Amazon treats their inventory. Feb 14 11:48:26 Hi... in the Raw XML/RSS feed data I would get strings looking like this -> ” Feb 14 11:48:56 cart_man: that is XML character reference, meant to be interpreted as the unicode codepoint 8221 (decimal) Feb 14 11:49:02 What are they called and do they always start with an Ampersand(&) and end with " ; " Feb 14 11:49:22 you are not supposed to need to parse them yourself. User XML parser, it should decode these to text Feb 14 11:49:22 alankila: Is there a way I can either use them or remove them? Feb 14 11:49:31 fix your encoding Feb 14 11:50:02 there are multiple syntaxes for the character references. The unifying theme is that they start with & and end with ;, but what you see in between can vary Feb 14 11:50:24 e.g. < is a character reference for <, could be written also has hexadecimal ሴ style or decimal Ӓ style Feb 14 11:50:31 alankila: Well that is ok I mean I can just search for & and ; and remove them Feb 14 11:50:41 I'm too lazy to look up the actual character code for < though, but it's probably like 40 Feb 14 11:51:01 is a new line, if I remember correctly Feb 14 11:51:05 no, you need to replace the & and ; with the actual value being referenced, you can't just remove them. Feb 14 11:51:26 So android does this with XMLParser ? Feb 14 11:51:29 justjanne: that is not a new line, that is carriage return. Feb 14 11:51:36 Android has a parser for those, but you can create or read them manually, too: Feb 14 11:51:51 cart_man: yes, never parse XML by hand, regex, or any other way. Always hand it to XML parser then use either DOM api or XPath API to extract values or whatever Feb 14 11:52:07 Well I think for my purpose I could just remove them...I only use about 10 words at most Feb 14 11:52:19 alankila: Hmmmm ok Feb 14 11:52:22 String.format("&#%0000x:", 'H') Feb 14 11:52:46 Wait, that's subtly wrong, but you get the idea. Feb 14 11:53:14 And no, you can't just remove them if you want symbols like <> in your strings Feb 14 11:53:17 yea no I get it...seems like a am going to have to make quite a big lookup table of sorts Feb 14 11:53:24 String.format(&#x%04x;", character code) Feb 14 11:53:31 also missed " there Feb 14 11:53:33 well foo Feb 14 11:53:38 lol Feb 14 11:53:42 Everyone's subtly broken. Feb 14 11:54:38 basically I get this -> Ulysse Nardin Hourstriker “Horse” Limited Edition and I will turn it into this -> Ulysse Nardin Hourstriker Horse Limited Edition Feb 14 11:55:16 getElementsByTagName("title").item(0).textContent() Feb 14 11:55:20 feel free to write it better Feb 14 11:55:52 If you want to reject characters by class for some reason then consider parsing it properly and then writing a reject based on e.g. unicode code block that the value appears in Feb 14 11:56:45 alankila: Yea that is what I am heading Feb 14 11:56:54 That is btw a huge hack but I often just use something lazy like getElementsByTagName() when dealing with DOM api. There's also often xpath-inspired API available so you could write like obj.findValue("//title/text()") but I'm not sure if Android actually has it Feb 14 11:57:39 I don't write a whole lot of programs that deal with X(HT)ML on android or in fact much any android programs at all Feb 14 11:58:44 alankila: Well avoid XML ! Its sucks fkn hell! Feb 14 11:59:55 Hmm huh, it looks like android now has the full java xml APIs out there... even implementations? Feb 14 12:00:00 I think this didn't use to be the case Feb 14 12:01:10 alankila: learning to use it kinda sucks sometimes though Feb 14 12:01:52 yeah you only want to write DocumentBuilderFactory.newBuilder().newDocument().load(inputStream) and catch the exceptions that throws approximately once Feb 14 12:04:01 though I'm half sure android didn't use to ship with the implementations of this API... but it says that the java.xml stuff was there from version 1 Feb 14 12:04:04 odd Feb 14 12:04:21 why have the API if it has no implementation -- I must be wrong Feb 14 12:09:58 lol Feb 14 12:10:12 alankila: Is there some table on the internet that I could use? Feb 14 12:10:41 alankila: Ok waaaaait... its that easy Feb 14 12:10:57 alankila: - > DocumentBuilderFactory.newBuilder().newDocument().load(inputStream) really it? Feb 14 12:11:25 Then I get a parsed sentence with all the &xxx; gone? Feb 14 12:13:15 you don't use tables for this stuff Feb 14 12:13:34 these are unicode codepoints. Your strings are in unicode codepoints. And XML parsers decode character references for you. Feb 14 12:20:37 hello, how to switch between EDGE and GPRS (2.75g and 2.5g)? Feb 14 12:26:16 lol any y’all nerds watching jack frost? Feb 14 12:40:22 cart_man: the only built-in codepoints that any compliant xml parser must be able to handle are, by the way, lt, gt, amp, apos and quot, or <, >, &, ' and ". Feb 14 12:40:50 these are all the characters that are used to delimit xml special thingys like elements and attributes, and & is the escape character itself, so the set is quite minimal. Feb 14 12:41:12 the ' is rarely seen in XML docs because few tools even generate it, but it's techincally just fine Feb 14 12:54:10 alankila: I Have alread built a parse that works really well when it comes to the onces you mentioned Feb 14 13:00:45 not sure if it has been worked ohn Feb 14 13:00:45 alankila: I see that they say one should avoid using DOM parser since it eats allot of memory ? Feb 14 13:00:45 That was in 2008 thoug Feb 14 13:24:39 part Feb 14 13:53:23 hm.. totally weird.. I did all that's necessary to be able to adjust the textColor of a TextView (added a color-value for 2 states: normal and state_enabled="false") and it displays correctly in the preview of the activity, but does not do so in the emulator Feb 14 13:58:51 alankila: Ghez the builder.parse(); takes AGES! Feb 14 13:59:19 lot to parse? Feb 14 13:59:28 what kind of numbers do you get Feb 14 14:07:03 ahh.. seems I was too stupid to give the labels proper individual IDs... Feb 14 14:07:37 now it properly changes the textColor to grey when TextView widgets are disabled Feb 14 14:07:39 Hi. I have a GCM question: the tutorial has a Registrationintentservice. Should I run it only once or at each app startup? (it Asks for a token and subscribes to topics) Feb 14 14:10:57 alankila: Well it actually it never comes out of whatever it is doing ...some kind of while loop stuck ? Feb 14 14:11:11 I doubt it. But I don't know what is going on. Feb 14 14:11:31 Can not imagen that it is that much to process Feb 14 14:11:40 it might be contacting external resources. Some parsers do that sort of thing because XML is internet technology Feb 14 14:11:56 can be turned off. Arguably should be turned off too Feb 14 14:12:17 similarly entity expansions in theory can lock up XML parser by forcing it to constructs strings that are gigabytes long from relatively short runs of XML Feb 14 14:12:31 Is there some other kind of Document builder like Lib that I can use? Feb 14 14:12:59 probably Feb 14 14:13:09 alankila: Well with that said... it seems like my RAM just keeps on becoming more and more soo Feb 14 14:13:13 usage I mean Feb 14 14:13:53 it's probably just something that you are doing wrong but I wouldn't know what. Feb 14 14:14:20 Well I am just sending a Legit InputStream to it and awaiting its return Feb 14 14:14:56 well, maybe the inputstream blocks for some reason then Feb 14 14:15:08 what is it, ByteArrayInputStream in reality? Or something from URLConnection Feb 14 14:16:21 it should be fine though. I often do XML-using API interaction just by establishing a HttpsURLConnection and handing the inputstream from the connection straight to parser Feb 14 14:17:06 I don't even look at it... which is of course hard to debug and log in case there is something wrong with it but basically there never are problems in the XML itself in my experience. Problems with connection maybe but you can usually tell when it says http status code 500 and not 200 or whatever Feb 14 14:20:35 alankila: Something from a URL... this seems to be quite common actually.. .So I need a Tidier .. sighh... Feb 14 14:20:54 So you need to "Tidy" the xml and then pop it into DOM and HOPEFULLY it will come out ok\ Feb 14 14:22:15 scraping here I come Feb 14 14:36:38 Hello. Feb 14 14:37:25 What's the probability that an app tested on one kitkat device will have differences on other kitkat devices? Feb 14 14:37:32 Do I need to test multiple devices or just one? Feb 14 14:39:46 100% Feb 14 14:40:36 different manufacturers have made different changes for their roms. so yes there are differences. does they affect you? maybe Feb 14 14:40:37 @ Rashed - if you can afford it money- and/or time-wise, because you need to ensure it works as expected, do so :o Feb 14 14:50:45 Rashad: there are a lot of other variables- free space, network quality, etc Feb 14 14:51:16 I see. Feb 14 14:51:18 you can face different issues even with 2 users of the same device Feb 14 14:51:18 Thanks. Feb 14 14:51:55 Rashad: AWS device farm is a nice solution but you will need to write automated tests for your ap Feb 14 14:53:05 and have lots of money to use it :p Feb 14 15:16:34 http://www.cultofmac.com/411832/this-iphone-date-bug-will-permanently-brick-your-device/ lol Feb 14 15:44:15 g'day Feb 14 15:44:22 What are we whining about today? :P Feb 14 15:45:49 same thing as everyday Feb 14 15:49:54 pfn: Can we whine about bugs in the Kotlin plugin for AS? Feb 14 15:50:22 go ahead :p most people won't care though Feb 14 15:51:47 loke``, better wine in #kotlin or slack chat if you want your whines to be jeard Feb 14 15:51:50 heard* Feb 14 15:51:57 I don't care about that :-) Feb 14 15:52:15 I'll wait until the next release. Feb 14 15:52:48 nothing to whine about unless the bug has been filed Feb 14 15:53:21 I need to file a couple bugs for the scala plugin Feb 14 15:53:27 _1_ ticket per day. Feb 14 15:53:39 Anyway, I'm going to sleep now. See you around :-) Feb 14 15:55:29 pfn: you work for google, do you? Feb 14 15:55:45 no, I don't Feb 14 15:57:02 ugh why does android have to be so untestable Feb 14 15:57:44 http://ezscreens.appspot.com/view/82b0/types+fail Feb 14 15:58:09 the types are relatively simple, but intellij marks them as errors :( Feb 14 16:17:30 hello Feb 14 16:21:10 is there a sight with more detailed statistics about screen distribution (maybe per api level) then the one at d.android.com? Feb 14 16:21:18 are u nerds making it cold outside? Feb 14 16:22:47 danijoo_, https://opensignal.com/reports/fragmentation.php like this page? Feb 14 16:23:01 erf 2012 Feb 14 16:24:09 adq, yeah thanks. found one for '14: https://opensignal.com/reports/2014/android-fragmentation/ Feb 14 16:24:45 yeah they publish reports sometimes, no 2015 or 2016 though :x Feb 14 16:24:52 yeah :/ Feb 14 16:24:58 or 2017 :s Feb 14 16:27:15 adq, they just hided it :p 2015 http://opensignal.com/reports/2015/08/android-fragmentation/ Feb 14 16:28:30 the screen size chard is not really useful though :/ Feb 14 16:30:59 Does everyone here hate fragments? Feb 14 16:31:42 I think I've heard a lot of people say they prefer views Feb 14 16:31:50 I tend too, but with time & patience, my hate seriously decreased Feb 14 16:32:09 I wonder what is the most hated thing about Android dev Feb 14 16:32:16 AS ? Feb 14 16:32:19 untestability, probably Feb 14 16:32:23 AS? Really? Feb 14 16:32:27 Why? I love it Feb 14 16:32:28 AS is great Feb 14 16:32:44 documentation then? Feb 14 16:33:12 maybe the true answer is: themselves Feb 14 16:33:13 The only thing I don't like about the documentation is that there's not enough good examples Feb 14 16:33:37 I've went through the documentation using their code snippits and ended up being stuck because I didn't know what else I needed Feb 14 16:33:58 I don't hate much about Android dev in general, #1 thing is being on an outdated and bastardized java probably Feb 14 16:34:23 other than that is occasional api inconsistency Feb 14 16:34:34 but overall, android is extremely pleasant Feb 14 16:39:48 adq yeah my peave is the docs. i came across a class recently where the return values were all undocumented. It said: returns : int. thats all :D Feb 14 16:40:02 javadoc specifically, the guides and tuts are OK Feb 14 16:41:34 adq i guess also, wish they just updated the docs instead of endless streams of goofy videos / medium posts / google+ / official SO answers, etc Feb 14 16:41:56 pfn: you don't like being basically unable to test things? Feb 14 16:43:04 depends, I have huge suites of uiautomator Feb 14 16:43:14 I have 0 interest in unit testing Feb 14 16:43:24 why is that? Feb 14 16:44:30 it wastes more of my time getting it set up then finding. bugs in my code Feb 14 16:45:14 it takes time to set it up because of android Feb 14 16:45:21 so... QED? Feb 14 16:45:25 not really Feb 14 16:45:31 it takes no time to setup Feb 14 16:45:42 but it doesn't reveal issues at a unit level Feb 14 16:45:48 100% agreed g00s Feb 14 16:45:59 pfn: huh? that's exactly what unit tests are for Feb 14 16:46:06 if I were writing javascript or python, I would be crippled without unit tests Feb 14 16:46:20 in Java, it gets me just about nothing Feb 14 16:46:54 autrilla, it doesn't reveal issues at a unit level because my shit always works at a unit level, it's integration that is am issue Feb 14 16:46:59 I guess I just can't write perfect code at the first try! Feb 14 16:49:12 pfn: I call tests that cover functions that call other subfunctions unit tests too Feb 14 16:49:32 I don't call it integration test until it hits the network, file system, or someone else's code Feb 14 16:50:35 as for testing on android, not particularly hard unless you want to test ui Feb 14 16:51:18 pfn: or you know, activities Feb 14 16:51:22 pfn: or fragments Feb 14 16:51:29 testing any of that isn't hard Feb 14 16:51:38 instrumentation tests and done Feb 14 16:51:53 pfn: uhhh there's things like startActivityForResult that don't let you pass a callback and are thus untestable Feb 14 16:52:14 that's not unit testing Feb 14 16:55:07 pfn: what isn't? Feb 14 16:55:24 You could have some sort of ActivityInstantiator interface that you could mock to test stuff like that Feb 14 16:59:12 autrilla whether unit tests hit disk / network - pretty arbitrary definition. DHH has some good things to say about "test induced design damage" Feb 14 16:59:18 http://david.heinemeierhansson.com/2014/test-induced-design-damage.html Feb 14 16:59:51 there's also damage induced from making stuff untestable and a mess Feb 14 17:00:10 as always, its not absolutes Feb 14 17:00:35 i came to this blog actually, not to read about unit testing, but on how to organize packages & architecture of a java app Feb 14 17:00:54 that is, by layer or by module (or mix). and the test difficulties of doing it by module Feb 14 17:01:15 like most things in life, seems each idea has a set of contradictions ;) Feb 14 17:01:27 having startActivityForResult only be able to call back to a hardcoded method in the activity that starts it is not good design Feb 14 17:02:18 with things like.. integers for identifying where that result came from Feb 14 17:02:56 just be happy it works for you :D doesn't even work in nested fragmentd Feb 14 17:03:56 autrilla, there's nothing to mock, you test onActivityResult, not the whole cycle Feb 14 17:04:31 that has nothing to do with android making it hard to test Feb 14 17:04:31 pfn: what? no. I want to test that when I press a button, an activity is started with certain things passed to it Feb 14 17:06:52 pfn: the bad thing about that is I can't test a fragment by itself Feb 14 17:07:53 sure you can Feb 14 17:08:01 new Fragment, make your calls Feb 14 17:08:09 afeter upgrading AS to 1.5 when i hit run the devices chooser pops immediately, then the app builds Feb 14 17:08:19 i want to build app, THEN choose device Feb 14 17:08:25 is there a setting for that? Feb 14 17:08:26 not if it starts an activity and relies on a result, because that gets passed to the activity Feb 14 17:09:07 dunno, maybe espresso has something for that, but that's an integration test Feb 14 17:09:21 it's not a unit test Feb 14 17:10:10 how is seeing how a fragment reacts to the result of the activity it started an integration test? Feb 14 17:10:49 that's the definition of an integration test Feb 14 17:10:59 the unit you would be testing is onActivityResult Feb 14 17:11:10 s/would/should Feb 14 17:11:54 but that's on the activity, which shouldn't really care about it Feb 14 17:12:19 I can't test the fragment's behaviour because Android forces me to put some of it on the activity Feb 14 17:15:05 huh, now what are you talking about, and assuming you started the activity from the fragment, the result would have gone to the fragment Feb 14 17:15:30 anyone knows how to set gimp as external editor for android studio on ubuntu? Feb 14 17:17:45 nvm Feb 14 17:58:14 http://imgur.com/AbI6ZNF Feb 14 17:58:17 yum Feb 14 18:03:33 hot espresso on 31-below morning Feb 14 18:17:19 <_maddy> trying to send some work to an IntentService from my Activity, but it never gets there (onHandleIntent-function on the service), I am following these instructions: http://developer.android.com/training/run-background-service/send-request.html Feb 14 18:23:41 _maddy make sure your IntentService is in AndroidManifest.xml - other than that, little else could go wrong Feb 14 18:24:06 <_maddy> g00s: thanks, just got it working... I had the service in the manifest, but outside Application tag... needed to be inside Feb 14 18:24:18 is there a better library for working with sqlite3? Feb 14 18:24:54 better than what library? Feb 14 18:28:57 the built in classes for sqlite3 Feb 14 18:29:15 android.database.sqlite Feb 14 18:30:13 sqlbrite is a good one Feb 14 18:30:23 or ormlite if you are looking for something with ORM Feb 14 18:31:00 Is Realm on Android any good? I liked it a lot on iOS. Feb 14 18:31:55 trying to let libraries do as much work as possible Feb 14 18:32:14 I got my RESTful api taken care of with retrofit and simplexml in an afternoon, nice Feb 14 18:32:41 in general, android-arsenal is a good place to klook for libraries Feb 14 18:33:50 I might also try learning butterknife Feb 14 18:33:57 dude Jake Wharton is such a beast Feb 14 18:34:04 how is he everywhere in android Feb 14 18:41:47 RustyShackleford: I was just typing a question related to butterknife Feb 14 18:44:08 I'm just starting out with android development, and Butterknife is something that's made it a lot easier to work with (when it comes to views). What other tools are out there that are like butterknife - in a sense of increasing productivity, and improving readability/management of code? Feb 14 18:54:09 Mathew: depends what you're trying to make easier Feb 14 18:55:24 Mathew if just starting out, i'd recommend learning the 'android way' of doing things, and then when comfortable choose your own way Feb 14 18:56:02 i wouldn't initially focus on any shiny libs that are en vogue this week Feb 14 18:56:55 also, know java well Feb 14 18:57:45 I'm running a foreground service to stream music Feb 14 18:57:57 this only seems to run well when I have the notification drawer open Feb 14 18:58:06 hello chatters :D Feb 14 19:02:58 I've got some static data that I need to use in this app, I get it in text file format Feb 14 19:03:11 should I parse it on my machine and include it as an sqlite database? Feb 14 19:03:22 or include the text files, parse them on first run of the application? Feb 14 19:07:49 parsing it with python or some scripting language might be easier Feb 14 19:11:36 * MangoMartini :} Feb 14 19:12:22 RustyShackleford, what kind of data? do you even need to have it in sql? Feb 14 19:12:45 so this is going to be an app for my city's public transit. Tells you when the bus/train is coming Feb 14 19:13:14 * MangoMartini :} Feb 14 19:13:18 these jerks did not include a function for getting the stops. getArrivals() takes a stopid as a parameter Feb 14 19:13:31 thats not an answer Feb 14 19:13:32 maybe I don't need to have it in sql Feb 14 19:13:41 but I need to have a list of all the stopids Feb 14 19:14:18 theoretically this data could change, so I would want a way to import this data from a new distribution of data Feb 14 19:14:44 oh I left this part out. Those stopids are found in a csv file on their website Feb 14 19:22:09 theres also data from the REST api that I probably want to cache. So I'm gonna say this is a good reason to use sql Feb 14 19:23:00 no idea. you still didnt answer the question ;) Feb 14 19:25:24 danijoo_: hah my bad dude. Whats your question? Feb 14 19:25:32 what kind of data? Strings Feb 14 19:26:04 Names/id's of bus stops, Urls for that route, lat/lon coordinates Feb 14 19:26:12 useful stuff I might want to know Feb 14 19:29:59 it matters how you process that data and if its enough to keep it all in memory at once Feb 14 19:32:16 danijoo_: well I could probably keep it in memory Feb 14 19:32:36 there are about 12k lines in this stops.txt file Feb 14 19:32:58 but only 1.24 MB Feb 14 19:33:04 put it in a db ^^ Feb 14 19:33:11 perhaps more if I keep all of it in a data structure Feb 14 19:33:35 these fuckers. There's an api for getting bus stops Feb 14 19:33:39 but not train stops Feb 14 19:47:20 people wont be amused missing busses because they need to wait for an update of the app everytime the busplan changes Feb 14 19:47:23 just sayin Feb 14 19:50:21 danijoo_: er I don't follow. Feb 14 19:50:31 but I may have found an api that has the info I need Feb 14 19:50:58 what i mean is data like that should be fetched live to be up-to-date and not stored in an apk Feb 14 19:50:58 I agree it would be better to fetch all the data from the internet. Then I need to decide what to cache, and how often to check that data for updates Feb 14 19:51:43 danijoo_: well like I said, their developer guide links you to a zip archive with a bunch of data in text files Feb 14 19:52:01 I'm working with what I have Feb 14 19:54:20 you will get lots of bad reviews once that data changes. :/ Feb 14 19:56:02 yeah we'll see how I handle this. Maybe a crawler that will alert me when the text file package is updated Feb 14 19:56:54 and then? Feb 14 19:57:02 it will still take weeks to ship the update Feb 14 19:57:18 so then I'll just scrap this project and find something else Feb 14 19:57:34 I guess thats why I shelved it in the first place Feb 14 19:57:43 if I can't get reliable data, whats the point? Feb 14 19:58:26 why does it take weeks to ship the update? I've never had an app in the play store Feb 14 19:58:34 because not everyone will update immediately? Feb 14 19:58:57 because users are lazy and lots of them dont update often Feb 14 19:59:27 at work we have a dialog built into our app Feb 14 19:59:28 I have users that still use the app and are 5 versions or more behind Feb 14 19:59:40 where we force the user to upgrade Feb 14 19:59:55 after they're like 4 versions behind Feb 14 20:00:06 boggles my mind, my phone updates my apps automatically Feb 14 20:01:14 you could host the data on a server and build an api arround it Feb 14 20:01:18 and then update it daily Feb 14 20:01:36 or make the app update it daily from the zip they provide on their webside Feb 14 20:03:12 the former sounds easier Feb 14 20:03:25 maybe Feb 14 20:04:20 i'm not really a web programmer. Would probably be good to learn Feb 14 20:04:33 I consume rest api's, I don't build them hah Feb 14 20:06:25 both has pros and cons Feb 14 20:07:09 the biggest pro is if they server data ever changes (for example the path to the zip), you can update the server and all clients will be working again immediatly Feb 14 20:07:29 but its harder to program and you need to pay a server Feb 14 20:09:25 I am new in java how do I fix this error?: http://pastebin.com/RhFzu4jh and my javacode is: http://paste.ofcode.org/3rX2ZJJX3W39BUwhgfhADf Feb 14 20:13:16 after View rootView, or in onViewCreated, you need to btnLogout = (Button)view.findViewById(R.id.XXX); then set your listener Feb 14 20:13:16 Jonathan-: `btnLogout` is never set. Fields are `null` by default in Java. Feb 14 20:13:38 simple java question, y u no learn some java first Feb 14 20:13:55 Oops, didn't see canvs2321's reply. Feb 14 20:14:03 same time Feb 14 20:15:03 okay thanks :) Feb 14 20:32:25 evenin' Feb 14 21:05:15 hm, i'm trying MPAndroidChart but don't like the API. Instead of feeding it all these ArrayLists of data (which may not even contain data viewable at the current zoom level) ... i'd like an API more like an adapter, that says, "ok we need to plot values 30 - 40 .. give us those" Feb 14 21:05:33 anyone see an API like that ? Feb 14 21:06:10 have you tried hello charts Feb 14 21:06:28 Ashiren does it provide a callback like API like ^^^ Feb 14 21:06:36 oh Feb 14 21:06:46 dunno, guess not Feb 14 21:06:54 but has animations Feb 14 21:07:01 don't care about animations Feb 14 21:07:33 just chartjunk ;) Feb 14 21:10:18 jquery gon’ spank some faces Feb 14 21:11:55 maybe this one g00s: https://github.com/diogobernardino/WilliamChart but it also comes with fancy animations Feb 14 21:12:12 https://github.com/diogobernardino/WilliamChart/wiki/(2)-Chart Feb 14 21:13:10 someone needs to port rrdtool on android :> Feb 14 21:13:14 adq interesting, haven't heard of that one before Feb 14 21:13:42 well, i tried it few monthes ago just quickly, it's not very optimized for performance Feb 14 21:13:47 genymotion is great Feb 14 21:13:57 yeah genymotion is decent Feb 14 21:14:01 almost as fast as a device Feb 14 21:14:03 other thing i dislike about MPAndroid is feeding data is just list of Y values; so it assumes same frequency Feb 14 21:14:06 faster you mean? Feb 14 21:14:12 you have the power of your host computer Feb 14 21:14:20 adq: you think its faster? Feb 14 21:14:36 maybe I need to teak the settings Feb 14 21:14:41 it is totally for me, but you can set up number of core & stuff in the settings of the vm in virtualbox manager Feb 14 21:14:57 i always restrict it to 1 core and give only 512MB of ram for the vm Feb 14 21:15:03 and it's still too fast Feb 14 21:17:39 I guess it is pretty responsive Feb 14 21:17:52 i'll have to try something a little more resource intensive Feb 14 21:18:47 ts? Feb 14 21:18:55 wrong chan ^^ Feb 14 21:19:04 dont let it happen again! Feb 14 21:41:49 not strictly dev related but im building a kiosk app that is set as the device owner. i want it to auto-update through google play which i have working when there is no pin lock set on the device (system security settings one) however it doesn't work if this is set. anyone familiar with the nuances around this? Feb 14 22:20:37 How do I go about forcing power management for wifi to stay off for low latency? I've tried apps that set WIFI_MODE_FULL_HIGH_PERF in WifiManager but it didn't seem to do anything. Doing "iw dev wlan0 set power_save off" in shell turns off the power_management for a while but then it randomly turns back on. Any thoughts? Specs: Nexus 5 Android 6.0.1 Feb 14 22:21:43 Ajeck, wrong channel . this is app dev Feb 14 22:22:00 i've been writing apps for this too Feb 14 22:22:02 i'm trying any method Feb 14 22:22:26 so if there is an actual setting i can do in a an app I write i will do it Feb 14 22:22:56 show the code that isn't workin Feb 14 22:25:41 i was researching the WIFI_MODE_FULL_HIGH_PERF setting in wifimanager. I tested apps that claimed they set that setting in wifi manager. But I have to write my own if you want me to share code. I'll do that now. But in any case are there any other app settings besides using the WifiManager controller that you would be aware of? Does the kernel override app level power management settings? Feb 14 22:27:44 hi all, I have been researching the best way for a class to subscribe to changes in another class, but can't seem to find a standard solution. Feb 14 22:28:20 I have looked at broadcast receivers, but those need an application context, which i don't have in the POJO classes I am working with Feb 14 22:29:26 Essentially, i would like class A to send a message to all classes that happen to be listening to it Feb 14 22:31:37 Is it still rule that you can not change an Android app from Free to Paid? Feb 14 22:31:42 But you can change it from Paid to Free? Feb 14 22:32:30 I have also considered implementing a listener interface that classes implement if they want to receive updates, however this process seems complicated, since the listened to class would have to manage all the classes listening to it. Feb 14 22:35:02 yes Feb 14 22:46:59 anyone else use simplexml with retrofit? Feb 14 22:47:06 I sorta thought getters would be generated Feb 14 23:14:40 I'm using simplexml which uses lots of annotations. Can I use this same model class for the database? Feb 14 23:14:54 that is, use annotations for a different library on this same class? Feb 14 23:19:44 Alright so I write the wifilatency app with the high_performance lock. As expected it didn't really do anything http://pastebin.com/qpcZmyv2 Feb 14 23:21:04 the only time I get any impact on turning off wifi power savings is with the shell command "iw dev wlan0 set power_save off" but that is only temporary since something overrides it after a bit Feb 14 23:22:02 your lock will be cleared if the activity is killed Feb 14 23:22:33 danijoo_: i put a breakpoint in the test case so the activity didn't turn off. plus i left it full screen Feb 14 23:23:55 danijoo_: i would have to do other stuff to make sure it persists if i minimize the app. i just wanted to do a quick test to see if it did anything Feb 14 23:24:23 i see Feb 14 23:26:48 danijoo_: i just can't seem to find a way to just turn off all wifi power management "the android way" and not just have some script running in the background that keeps executing "iw dev wlan0 set power_save off" Feb 14 23:28:28 the android way is to let system handle wifi managment i guess ;) Feb 14 23:28:40 btw how do you test if it worked? Feb 14 23:28:51 only by looking at powersettings in adb Feb 14 23:29:28 danijoo_: i have a computer pinging the phone and the latency of the phone. when power_savings is off the latency goes to 1-8ms when on it jumps between 60-700ms Feb 14 23:29:39 *and checking the latency of the phone Feb 14 23:30:50 and why do you want to have it off? (just curious) Feb 14 23:31:36 danijoo_: i have an old nexus 5 phone i don't use anymore and installed a archlinux chroot on it to use it as a basic server. Feb 14 23:32:12 danijoo_: services kind of get messed up when power savings are on so i want to disable it completely since it will always be plugged in Feb 14 23:34:25 if you are rooted and all this stuff anyways, the most straight forward way would be to cood a custom rom without powersaving i guess Feb 14 23:34:44 or sell the phone and buy an actual tiny server :p Feb 14 23:35:25 danijoo_: selling the phone wouldn't be as fun Feb 14 23:35:43 true :) Feb 14 23:36:54 danijoo_: i have to imagine there is a way to turn off the power savings without doing a rom Feb 14 23:37:17 no way inside an app i guess Feb 14 23:39:28 you might be able to modify an existing rom Feb 14 23:39:38 but then again thats #android-root Feb 14 23:42:58 I can't decide which ORM to use! Feb 14 23:43:15 also can't decide if I need two models, one for xml and the other for the database Feb 15 00:15:13 anyone using gcm in here? i can't figure out why i don't receive messages when sent to a topic. Feb 15 01:08:33 can y’all nerds dig it? Feb 15 01:11:15 can you Feb 15 01:22:10 Hello, is this a good channel to ask about the google play games plugin for unity? Feb 15 01:38:53 So I'm contemplating Sugar ORM or ormlite Feb 15 01:39:12 now I'm going to want to display this data in a listview. What do I do about the cursorAdapter? Feb 15 01:55:42 sugar is ultra slow afaik Feb 15 01:56:25 RustyShackleford: you dont need cursor adapter if you load all data first Feb 15 02:09:28 gordon_: alright as long as theres a way to connect it together Feb 15 02:09:35 ormlite looks the nicest to me Feb 15 02:16:37 So i'm using simplexml, which also uses annotations. Can I mix simplexml and ormlite annotations on the same class? Feb 15 02:18:53 Hi all, I have encountered an odd bug and was wondering if anyone else has dealt with it. I have an expandable listview and the heading for each displays the count of the children in the group. If i expand a heading, it will change the counts on other headings when none of them should change at all just from expanding/collapsing Feb 15 02:29:29 RustyShackleford: I used cupboard Feb 15 02:29:32 dont use it ;) Feb 15 02:39:57 2 merican kidz dun tha worst they can **** ENDING LOGGING AT Mon Feb 15 02:59:59 2016