**** BEGIN LOGGING AT Tue Oct 18 02:59:59 2016 Oct 18 03:36:18 new GraphRequest( AccessToken.getCurrentAccessToken(), "/{friend-list-id}", null, HttpMethod.GET, new GraphRequest.Callback() { public void onCompleted(GraphResponse response) { /* handle the result */ facebookFriends=response.getJSONArray(); Log.d("FACEBOOK_FRIENDS","" Oct 18 03:36:27 what is that friend-list-id? Oct 18 03:36:42 I replaced that with "me"and it retrieves myself from the graph api Oct 18 03:36:51 what should I put to bring the friends that uses the app? Oct 18 04:09:50 Have you guys ever considered an alternative VCS such as Fossil? Oct 18 04:10:18 Just tried Git again (do it every now and then), and I can conclude that it still sucks. Oct 18 04:10:27 Mercurial also sucks (but a bit less, IMO). Oct 18 04:10:32 Fossil is a... well, fossil Oct 18 04:11:04 Yeah, it seems to have fossilized pretty quickly. Oct 18 04:11:10 I think when Fossil completely destroyed Zed's repo is pretty much when it went from unknown to... well, even more unknown Oct 18 04:12:27 Ooh, I'd forgotten about that. ;o Oct 18 04:13:56 I just want something better than Mercurial and Git. They both have (almost) the power I want, but Mercurial is too fiddly because of baggage, and Git has unnecessary complexity (for whatever reasons). Oct 18 04:14:22 What do you want that git doesn't provide? Oct 18 04:14:50 e.g., listing a bunch of files changed in a changeset. How do you do that in Git? I don't even know. Probably something like `git show --name-only --oneline HEAD` or something. Oct 18 04:14:59 It's pretty horrible. Oct 18 04:15:14 The UI is horrible. That's easy to fix. Oct 18 04:15:15 In Mercurial it's slightly less bad: `hg status --change foo`. Oct 18 04:15:43 Yeah. Oct 18 04:15:56 Only by switching to a GUI, though, right? Oct 18 04:16:01 Or shell scripting. Oct 18 04:16:07 No, aliases, porcelaines, ... Oct 18 04:22:39 Yeah, that definitely helps. I still think the world could do much better, though. Oct 18 04:23:16 I also think the staging area is a bad idea. It's more or less a awkward wannabe changeset. Oct 18 04:23:20 an* Oct 18 04:23:52 It might be nicer to interactively commit, and then amend that changeset. Oct 18 04:24:09 Then there's no extra concept: just changesets. Oct 18 04:25:10 Staging and unstaging can just be adding to or remove from a changeset. Oct 18 04:38:41 I'm just gonna stick with Mercurial, using Git where necessary, until the next big thing comes along. Oct 18 04:39:06 Hopefully that next big thing understands programming languages in its diffs and merges. Oct 18 04:40:34 TacticalJoke: it ain't no thang, just copy the project dir and date stamp it ;-) Oct 18 04:42:53 Just picked that changeset kind of at random. Oct 18 04:43:02 shmoooz: This is the kinda thing that gives me a dopamine response: https://android.googlesource.com/toolchain/jack/+/5d75222ab679b8a46a459c61aa24d0cbeddf648e%5E%21/ Oct 18 04:43:16 How can you live without that, shmoooz?! Oct 18 04:43:59 I only use vs's when I have to work with others at some workplace Oct 18 04:44:46 How Do I parse this in android? {"data":[{"name":"App Flock","id":"120930071657863"},{"name":"Edgardo Sofovich","id":"128294810941497"}],"paging":{"cursors":{"before":"QVFIUm1JRmJQUFZAvc0dHNGsxblRyWGZAydkhnTWxUTVIya196Sk9wR0xQSWt0cm50MERGR1VXV3VaRlNRYS1YQ3dHaTJHRU04enNZAVHR6SVRQenY2ejFXR3J3","after":"QVFIUl9IVHpzNDM0VGdSSDlObnBZAZAlo3ODl4SEtBRzJvTm1vb2JHQnh3R3hKQ2tCYWhVNWFjdGRsY2NMMndmWWhPcXVaVWRxRkZAjdnNOSEtaYnRKZADhzclp Oct 18 04:44:52 I'm getting a raw response Oct 18 04:44:59 j4f-shredder: Looks like JSON. Oct 18 04:45:03 I need only the data atribute Oct 18 04:45:06 Truncated. Oct 18 04:45:17 it's the facebook api response Oct 18 04:45:19 of friends Oct 18 04:45:32 public void onCompleted(GraphResponse response) { /* handle the result */ if(response != null) { String facebookFriends = response.getRawResponse(); Log.d("FACEBOOK_FRIENDS", "" + facebookFriends); } } } Oct 18 04:45:57 j4f-shredder: Your question becomes "How do I parse this JSON on Android?". Oct 18 04:46:34 yes, I tried to do response.getJSONArray("data") Oct 18 04:46:39 but it doesn't work Oct 18 04:47:09 I come from a javascript world Oct 18 04:47:11 You have to get the class, then the array, then the class, etc. Oct 18 04:47:56 String facebookFriends = response.getClass(). Oct 18 04:47:59 get class exists Oct 18 04:48:05 but it doens't offer the getJSONArray Oct 18 04:48:06 () Oct 18 04:48:21 I mean 'object'. Oct 18 04:48:32 http://www.json.org/ Oct 18 04:48:50 I know how to use json, I use it all the time Oct 18 04:48:55 but the android way is too confusing Oct 18 04:49:06 It's not really an "Android way". Oct 18 04:49:08 it doesn let me specify "get only the data attribute" Oct 18 04:54:04 j4f-shredder: There might be multiple things with the same name. Oct 18 04:54:53 couldyou give me the answer please? I haven't slept in 20 hours andI need a straight forward example Oct 18 04:55:16 if it's not too much trouble Oct 18 04:55:31 it's a meaningless thing, I need to see one exmaple Oct 18 04:56:06 Here's an example (no idea whether it works): http://stackoverflow.com/questions/14318495/get-value-from-deep-inside-a-jsonobject Oct 18 04:56:07 I don't like to waste too much time on thisthings..I have to develop morecomplicatedstuff and I cannot get stucked with this...I'm sorry If I seem rude Oct 18 04:57:59 Stuff like this is why I like XML. Oct 18 04:58:28 no, it's justjava that makes everything ultra complicated...in javascript is a breeze Oct 18 04:58:34 I hate java to be honest Oct 18 04:58:37 i don't think i've ever seen anyone say they 'like' XML... crazy Oct 18 04:58:44 too much code for simple stuff Oct 18 04:58:45 Because usually... someone, somwhere, wrote up a DTD that very rigorously explains WTF you're looking at. Oct 18 04:58:49 and too many class names Oct 18 04:59:13 HandlerOperatorManagerDisecterBiology Oct 18 04:59:28 Every time I have to dork with JSON I just wind up looking for matching identifiers and trying to piece it together into a coherent whole Oct 18 04:59:46 It's like Adobe reinvented XML Oct 18 04:59:52 trylodash in javascript....2 lines of code Oct 18 05:00:03 javashouldbe replaced byjavascript Oct 18 05:00:07 j4f-shredder: What lines would they be? Just curious. Oct 18 05:00:10 I hope that happens soon.... Oct 18 05:00:33 Dagmar: did you work on IBM json-x? be honest ... Oct 18 05:00:43 Nope. Oct 18 05:00:46 If the name is guaranteed to be unique, I think you could use string searching. Oct 18 05:01:04 _.each(json, (elem)->{ elem['name']} ); Oct 18 05:01:05 there Oct 18 05:01:13 The only interaction I've ever had with IBM was when I heard they opened an anti-virus lab here I made a little visit and dropped off a box with disks containing about twice the number of viruses they had. Oct 18 05:01:15 As a joke. Oct 18 05:01:17 you just got a value from ajson Oct 18 05:02:26 Something like 8,000 viruses I'd collected Oct 18 05:03:08 any ideas dagmar?? {"data":[{"name":"App Flock","id":"120930071657863"},{"name":"Edgardo Sofovich","id":"128294810941497"}],"paging":{"cursors":{"before":"QVFIUm1JRmJQUFZAvc0dHNGsxblRyWGZAydkhnTWxUTVIya196Sk9wR0xQSWt0cm50MERGR1VXV3VaRlNRYS1YQ3dHaTJHRU04enNZAVHR6SVRQenY2ejFXR3J3","after":"QVFIUl9IVHpzNDM0VGdSSDlObnBZAZAlo3ODl4SEtBRzJvTm1vb2JHQnh3R3hKQ2tCYWhVNWFjdGRsY2NMMndmWWhPcXVaVWRxRkZAjdnNOSEtaYnRKZADhzclpB"}},"summary Oct 18 05:03:19 I need to get the data attribute array Oct 18 05:03:24 how do I do in java Oct 18 05:03:39 Prayer might be a good place to start Oct 18 05:03:50 I've tried everything, it doesn't access the value Oct 18 05:03:54 Pray you can google up a java library that can turn that into a data structure Oct 18 05:04:11 either with getJSONArray("data") Oct 18 05:04:15 that should work Oct 18 05:04:18 following the logic Oct 18 05:04:21 but it doesn't Oct 18 05:04:40 j4f-shredder: How do you know it doesn't work? Run the debugger. Oct 18 05:04:43 If you run it through a prettyfier so that it's formatted and indented it'll make a little more sense Oct 18 05:05:09 I did Oct 18 05:05:12 it gives an error Oct 18 05:05:15 even before running Oct 18 05:05:21 ...because until you understand how it's organized you stand precious little chance of using a library to reach *inside* that mess to extract a single piece of it Oct 18 05:05:21 JSONArray facebookFriends = response.getJSONArray("data"); Oct 18 05:05:42 And what is the error? Oct 18 05:06:15 getJSONArraycannot be applied to String Oct 18 05:06:15 "this.isaSparseJaggedArray.ofNope()" Oct 18 05:06:22 j4f-shredder: Dude. Oct 18 05:07:29 I can't remember how this library works, but it's probably something like `JSONObject object = new JSONObject(string);`. Oct 18 05:07:37 j4f-shredder: Perhaps http://stackoverflow.com/questions/1568762/accessing-members-of-items-in-a-jsonarray-with-java will shed some light on how *truly* far that was from what you should be doing Oct 18 05:08:11 You have to actually tell it to parse the thing before you can try pulling an array out of it Oct 18 05:09:04 parseJSONArray? Oct 18 05:09:18 j4f-shredder: Did you not see my comment? Or his link? Oct 18 05:09:23 yes Oct 18 05:09:29 I saw it Oct 18 05:09:42 ohhh Oct 18 05:09:43 I see Oct 18 05:09:45 the difference Oct 18 05:09:48 I will try that Oct 18 05:09:53 hit enter a few more times Oct 18 05:10:43 JSONArray facebookFriends = new JSONArray(response); Oct 18 05:10:46 j4f-shredder: In general, you're gonna have to learn the Java programming language. Oct 18 05:10:47 that is not working Oct 18 05:10:58 yeah, but it's not a java thing Oct 18 05:11:09 You can't just stick keywords together with parameters and hope they work Oct 18 05:11:09 j4f-shredder: Is that what I typed? :| Oct 18 05:11:22 I tried Oct 18 05:11:24 you approach Oct 18 05:11:26 You probably need sleep. Oct 18 05:11:33 You have to use more dots if you want to do that Oct 18 05:11:50 j4f-shredder: You didn't try my approach. Oct 18 05:11:55 GraphResponse response Oct 18 05:12:03 if I send that to JSONArray Oct 18 05:12:14 I just don't know how to cast Oct 18 05:12:28 a GraphResponse to a JSONArray Oct 18 05:12:28 You're not getting a simple array back tho Oct 18 05:12:33 You're getting a pile of nested arrays Oct 18 05:12:58 how would that be? Oct 18 05:13:15 ohhh Oct 18 05:13:16 I see Oct 18 05:13:18 Run the JSON mess through a prettifier and it'll start becoming more obvious Oct 18 05:13:19 so Oct 18 05:13:34 you always needto convertit Oct 18 05:13:38 Granted it might be simpler to me because I'm used to coding in perl Oct 18 05:13:38 to a json object Oct 18 05:13:41 first Oct 18 05:13:49 and then see what happens right? Oct 18 05:14:05 cause I first converted it to a JSONArray Oct 18 05:14:14 but it's an object Oct 18 05:14:16 now that I see Oct 18 05:14:23 thanks for the patience Oct 18 05:14:27 I know I'm a total idiot Oct 18 05:14:31 I'm just good at javascript Oct 18 05:15:03 Well, this is more about complex data structures Oct 18 05:15:44 That stack overflow link is a good start for illumination Oct 18 05:16:01 JSONObject facebookFriends = new JSONObject(response); Oct 18 05:16:06 that doesn't work either Oct 18 05:16:14 I'm looking at that link Oct 18 05:16:24 to see if I can get anything out of it Oct 18 05:16:39 What's in the link shows something like -> JSONObject req = new JSONObject(join(loadStrings(data.json),"")); Oct 18 05:17:02 Notice that this is radically different from just shoving a large amount of string data into the argument list just to see what happens Oct 18 05:18:03 join(loadStrings(data.json),"") Oct 18 05:18:13 that loadStrings put it in an array of arrays Oct 18 05:18:16 you were telling about? Oct 18 05:18:26 it's like the concat in javascript? Oct 18 05:19:19 JSONObject facebookFriends = new JSONObject(join(loadStrings(response),"")); Oct 18 05:19:23 That doesn't work Oct 18 05:19:28 cannot resolve loadStrings Oct 18 05:19:41 for GraphResponse Oct 18 05:19:58 That stuff is irrelevant. Oct 18 05:20:05 new JSONObject(string); Oct 18 05:20:43 do you know how to parse the array I sent to you? Oct 18 05:20:48 It would be really helpful Oct 18 05:20:53 if you know the answer Oct 18 05:21:03 I need to finish this work for a client Oct 18 05:21:10 in 4 more days Oct 18 05:21:15 I have a lot of work to do Oct 18 05:21:28 I'm doing more coffee just to get it done Oct 18 05:21:51 more coffee != more productive (there's been many studies done on the topic) Oct 18 05:21:52 I just need a straight answer stackoverflow style...that case has nothing to do with mine Oct 18 05:21:54 that doesn't work Oct 18 05:22:02 http://stackoverflow.com/a/5015889 Oct 18 05:22:10 It'll be something like that. Oct 18 05:22:59 I understand the process but the problem Oct 18 05:23:06 is that the first line doesn't work for my case Oct 18 05:23:08 JSONObject obj = new JSONObject("{interests : [{interestKey:Dogs}, {interestKey:Cats}]}"); Oct 18 05:23:10 there is a string Oct 18 05:23:16 and facebook doesn't send a string Oct 18 05:23:28 it sends a GraphResponse type Oct 18 05:23:40 that's radically different Oct 18 05:23:45 from the cases presented Oct 18 05:24:08 GraphResponse has a getJSONObject method. Oct 18 05:25:58 On a side note, that capitalization is awful. Should really be 'getJsonObject'. Oct 18 05:26:12 JSONObject facebookFriends = new JSONObject(response.getJSONObject()); Oct 18 05:26:20 They do it because of org.json, the real culprits, of course. Oct 18 05:26:27 that doesn't work Oct 18 05:26:28 How does that make sense? Oct 18 05:26:29 j4f-shredder: Come on, dawg. Oct 18 05:26:36 I swear Oct 18 05:26:39 I tried everything Oct 18 05:26:52 I'm putting heart and soul here Oct 18 05:27:03 no brains, just heart and soul Oct 18 05:27:35 response.getJSONObject().getJSONArray("data") /* ... */ Oct 18 05:27:57 Since you're getting the JSONObject, there's no need to create it. Oct 18 05:28:27 I talked about creating it because I thought you had a String, not a GraphResponse. Oct 18 05:28:30 JSONObject facebookFriends=response.getJSONObject(); Oct 18 05:28:43 that worked Oct 18 05:28:48 it's bringing the json Oct 18 05:28:49 now Oct 18 05:28:55 now I need to extract the data Oct 18 05:29:26 ...and people thought I was mad for parsing JSON with regular expressions and recursion Oct 18 05:30:40 I don't know why it's forcing me to surrond this in try catch JSONArray arrayData= facebookFriends.getJSONArray("data"); Oct 18 05:30:45 that is completely random Oct 18 05:31:08 Because sometimes people create malformed JSON Oct 18 05:33:04 java really needs to evolve as a language Oct 18 05:33:22 no wonder why it's dying...everything takes 10 times more the job Oct 18 05:33:26 without any advantage Oct 18 05:33:35 Actually, i think it's the other way around Oct 18 05:33:45 Java has gotten absurdly advanced Oct 18 05:33:57 yeah Oct 18 05:34:03 that's what I meant Oct 18 05:34:11 It shares a common feature of Haskell Oct 18 05:34:13 but it's no practical for mobile apps Oct 18 05:34:19 it's better react native Oct 18 05:34:24 You're really not allowed to do anything half-assed Oct 18 05:34:32 j4f-shredder: You just don't understand Java. Oct 18 05:34:41 I don't to be honest Oct 18 05:34:43 Java is too wordy, but a lot of this stuff is needed. Oct 18 05:34:50 Static typing is a very good thing. Oct 18 05:35:02 yes, I don't argüe on that Oct 18 05:35:11 I would argue that checked exceptions are good (even if misused often). Oct 18 05:35:41 I just tried to learn but it seems I lost the train..there are too many java experts Oct 18 05:35:49 in javascript I have more oportunities Oct 18 05:36:03 I'll submit than probably 95% of ugly messes are caused by coders not checking for errors, and having the program just trundle along chewing on crap data until it melts down Oct 18 05:36:20 and yes...I think it's too wordy but why do you think it's neccesary? Oct 18 05:36:26 just out of curiosity Oct 18 05:36:28 The verbosity isn't necessary. Oct 18 05:36:35 I hate that part of Java. Oct 18 05:37:09 That's one place where JavaScript is better. Oct 18 05:37:32 But JavaScript has so many problems (e.g., the lack of static typing) that it'd be pretty awful for Android development. Oct 18 05:37:59 yes, but es6 is really good for web apps Oct 18 05:38:05 react+redux Oct 18 05:38:08 is a great combo Oct 18 05:38:17 i really like it Oct 18 05:38:26 I think is a matter of taste Oct 18 05:38:36 I think I'm too dumb to be a java dev to be honest Oct 18 05:38:45 Now just wait until you've stacked five or six more frameworks atop that Oct 18 05:38:46 I would like to be one, but my brain is not that big Oct 18 05:39:09 every java coder I met are really intelligent people Oct 18 05:39:26 You are trying to do two very complex things at once, man Oct 18 05:39:50 the problem is that I'm trying to build an android social app without knowing java Oct 18 05:39:58 I have a backend in node, a db in postgres Oct 18 05:39:58 j4f-shredder: Java is extremely easy. Any programmer could master it. Oct 18 05:40:05 firebase as a storage Oct 18 05:40:06 and this Oct 18 05:40:24 The other is that you're trying to parse a very complex data structure that came from _Facebook_ without apparently knowing it's overall shape Oct 18 05:40:30 If you're too dumb for Java, you're probably incapable of any programming (which appears to be false). Oct 18 05:40:32 and now I have to create a service that sends location data when the app is closed...I don't have any idea on how to do that...cause bound services are no good for that Oct 18 05:40:49 and also I have to create a wall like facebook and send push notifications to all the other users Oct 18 05:40:51 Just a regular service will do fine Oct 18 05:41:12 a regular? Oct 18 05:41:24 a respawnable service? Oct 18 05:41:33 cause I've seen two types on the docs Oct 18 05:41:36 started services Oct 18 05:41:39 and bound services Oct 18 05:41:48 I even took a course on that on treehouse Oct 18 05:41:53 and they only mentioned those two Oct 18 05:42:07 I am half tempted to give you copies of the source of the two apps I'm working with Oct 18 05:42:16 ...but I know I do some things that basically cause cancer Oct 18 05:42:30 lol Oct 18 05:42:45 yeah...I have to tackle one thing at the time Oct 18 05:42:51 it's a challenge Oct 18 05:42:56 a constant challenge Oct 18 05:43:12 I'm guessing much of your confusion is caused by that most of Android dev in particular is practically like trying to wire up a control panel without being able to see the front of it Oct 18 05:43:16 Wires, wires, everywhere. Oct 18 05:43:29 yes Oct 18 05:43:30 jajjaja Oct 18 05:43:31 It's almost upside-down coding Oct 18 05:43:45 more copy-paste I would say Oct 18 05:43:56 I'm 50% on my app and I haven't written a single line of code Oct 18 05:44:00 everything copy pasted Oct 18 05:44:09 stackoverflow Oct 18 05:44:11 docs Oct 18 05:44:15 different sources Oct 18 05:44:18 Yeah that's a thing you should probably stop. Work in VERY small steps Oct 18 05:44:20 but I couldn't write a single line Oct 18 05:45:00 I think I will take a 36 hours java course on treehouse Oct 18 05:45:06 they give spring as well Oct 18 05:45:12 but it's useless to me now Oct 18 05:45:13 'Hmm... maybe look up slidenerd on YouTube Oct 18 05:45:23 I've seen that guy Oct 18 05:45:28 it's my 3rd app in android Oct 18 05:45:36 If you can avoid giggling at Vevz acceent, he walks through everything a bit at a time Oct 18 05:45:39 and the first one was watching that guy A LOT Oct 18 05:46:16 I don't even know how I managed to do the other two apps.... Oct 18 05:46:27 and I don't know how I got this far with this one Oct 18 05:46:31 Until a few minutes ago I didn't know what a bound service was Oct 18 05:46:31 which is far more complex Oct 18 05:46:43 jajajajaja Oct 18 05:46:44 You definitely don't need it just to query GPS location and send updates somewhere Oct 18 05:47:03 on a closed app Oct 18 05:47:07 that's the difference Oct 18 05:47:11 I need the service Oct 18 05:47:24 if I put it on mainactivity Oct 18 05:47:26 it dies Oct 18 05:47:36 as soon as the other side unbinds Oct 18 05:47:49 and if I do a started service Oct 18 05:47:55 I dies on the onfinish Oct 18 05:48:06 Why did you call onFinish()? Oct 18 05:49:02 Actually... let's see here... Oct 18 05:51:47 the other thing worked...the facebook friends are already stored correctly Oct 18 05:51:52 thank you very much for that Oct 18 05:52:44 Dagmar, please, could you leave me an email. I want to discuss some architecture stuff some of this days when you have time Oct 18 05:52:56 it's just a couple of questions Oct 18 05:53:08 cause I need to sleep right now...I'm falling apart Oct 18 05:53:28 Hi, I attached a ViewDragHelper on my parent layout but shouldInterceptTouchEvent always returns false. Any idea why? Oct 18 05:57:08 thanks guys Oct 18 05:57:12 see you later Oct 18 05:57:12 ! Oct 18 06:00:39 Well, damn. I just pushed the class for the service I wrote to my website Oct 18 06:08:30 I'm still baffled as to why he'd have been calling onFinish unless he was *trying* to terminate the service Oct 18 06:17:05 Thank god for MemoServ Oct 18 06:38:29 Hello, I am trying to find a source build for my device but this is all I see: https://github.com/TheOddTaco/android_device_lge_m1 . Is this not complete? I can't seem to understand how to compile this. Oct 18 06:40:56 sounds like job for #android-root Oct 18 06:41:17 Thank you for pointing me in the right direction Oct 18 06:43:04 i bet theyll send you here :v Oct 18 06:56:42 why... dont my jsonarrays have .next() or .hasnext() methods anymore? Oct 18 06:57:02 that's flummoxing. Oct 18 06:59:54 because im silly... and .next and .hasNext() actually belongs to the .keys() iterator. Oct 18 06:59:59 Thanks me Oct 18 07:00:01 You're welcome. Oct 18 07:01:31 Hi, shouldn't `child.getTop() + (child.getHeight()/2) == ((ViewGroup) child.getParent()).getHeight()/2` be true if child Oct 18 07:01:44 *if child has a gravity of center and parent is framelayout Oct 18 07:03:16 Wait, does top change if i set some translation? Oct 18 08:04:19 guyz need help.. my company put me in mobile app development team using hybrid way, literally which i am not liking it..I love android native what should i do.? Oct 18 08:04:41 quit? Oct 18 08:06:40 its so boring to work on hybrid.. yak Oct 18 08:09:18 hi Oct 18 08:09:26 if i have two classes, like A and B Oct 18 08:09:54 where A initialized B Oct 18 08:10:09 can B call A method? Oct 18 08:39:12 Hi, I can't launch even startup project. "Error while waiting for device: Could not start AVD" Oct 18 08:52:21 hi all Oct 18 08:52:48 anyone here familiar with 'Caused by java.lang.OutOfMemoryError: Failed to allocate a 95787532 byte allocation with 16776320 free bytes and 68MB until OOM' type error? Oct 18 08:53:20 what is there to be familiar with Oct 18 08:53:27 you are using too much memory Oct 18 08:53:55 17 mb free and you are trying to get 95 Oct 18 08:55:26 bitmap processing? Oct 18 08:57:30 Well what's curious is Fabric reports 1.07GB free RAM. Oct 18 08:57:37 https://gist.github.com/bsodmike/2d8aa92fac6006cc2a0f3ee5129cce77 Oct 18 08:57:48 it's just a basic UI with a couple tap-targets. Oct 18 08:58:07 Binary XML file line #83: Binary XML file line #83: Error inflating class Oct 18 08:58:25 could this have more to do with Proguard and a class that hasn't been marked as '-keep' ? Oct 18 08:58:59 or is it unknown due to lack of resources to allocate to? Oct 18 09:01:40 michael_mbp: your app runs in a JVM, it does not give you all the mem Oct 18 09:02:21 xml inflation fails could happen because some code in the view (i presume) throws an error Oct 18 09:02:29 could be out of memory i guess Oct 18 09:02:37 try it without the ginormous bitmap :) Oct 18 09:02:40 xorgate: see the log trace I posted. Oct 18 09:02:47 it's not ginormous though lol Oct 18 09:02:51 300+KB Oct 18 09:02:55 is that ginormous :) Oct 18 09:03:30 how can we get the app to request for more resources? Oct 18 09:10:10 what matters is how big it is when decoded Oct 18 09:10:40 Thanks for taking the orderIDs out of test purchases, Google! Oct 18 09:11:09 you're welcome Oct 18 09:11:11 Now my testing is all messed up and test purchases do not follow the same codepath as normal purchases do Oct 18 09:12:28 michael_mbp: what are the size (in pixels) of the image? Oct 18 09:13:52 2480x2414 Oct 18 09:13:59 326KB Oct 18 09:14:16 that is ginormous! Oct 18 09:15:15 thats like 23 mb as a 4 channel bmp Oct 18 09:15:28 That's pretty big Oct 18 09:15:44 I have some TIFFs somewhere in the 100MB's. ;) Oct 18 09:16:35 michael_mbp: when decoded it gets a lot larger in memory, there is four 8bit channels for color, times your pixels. So the decoded image is more like (2480*2414)*4 Oct 18 09:18:23 (Android Studio) Can I create a directory named assets.in in my project? I need it to contain files used as templates for output which goes into assets/, and I want to be able to edit the templates. Oct 18 09:18:48 Can't find New -> directory or something like that Oct 18 09:21:36 hi Oct 18 09:22:03 can anyone tell me how to transfer objects from one activity to another? Oct 18 09:22:32 oizo: ahhh. Oct 18 09:22:41 thanks so much chaps. fantastic help here. Oct 18 09:23:24 Areeb: can't you put them into a Intent? Oct 18 09:23:58 zap: how? Oct 18 09:24:12 putExtra() puts only key-value pairs of strings Oct 18 09:24:26 is there a method to putting objects? Oct 18 09:24:35 other objects* Oct 18 09:29:56 Areeb: mmmh, can't you serialize your object into a string? Oct 18 09:30:16 Problem is, activities may be different processes. Thus, you can't just pass a 'pointer' Oct 18 09:30:59 Areeb: see Parcelable Oct 18 09:33:13 I cant use them.. I'm trying to transfer a Result object that I get after scanning a QR Code Oct 18 09:33:18 using the ZXing library Oct 18 09:33:35 alex_PP , zap: 6 Oct 18 09:33:44 ^* Oct 18 09:33:52 Hmm, Parcel looks the right way to me. Why you can't use it? Oct 18 09:34:57 thats the object Oct 18 09:35:06 whats* Oct 18 09:35:36 Areeb: pass the result intent to where it's needed and parse it there Oct 18 09:36:02 you can pass the intent through another intent easily Oct 18 09:36:24 the result intent? Oct 18 09:36:48 what do you need of the Result object? only text or something else Oct 18 09:37:44 onActivityResult gives you an intent Oct 18 09:37:49 I need the entire result object because the other activity uses a ResultHandler Oct 18 09:38:03 oh Oct 18 09:38:12 alex_PP: I'm not using onActivityResult Oct 18 09:38:21 It's an embedded scanner Oct 18 09:38:26 and you convert that into a ZXing's IntentResult with IntentInterogator Oct 18 09:38:40 bleugh Oct 18 09:38:41 why? Oct 18 09:39:05 well I need it that way Oct 18 09:39:19 in that case, just pull the data you need out of the result and stick it in your own parcelable Oct 18 09:39:47 I need the result object itself, I need the entire result object because the other activity uses a ResultHandler Oct 18 09:40:30 you can then unserialize it into the "original" object and pass it to ZXing, whatever that is Oct 18 09:41:07 or use public static object and YOLO Oct 18 09:42:23 that'll work only if both Activities are parts of same app Oct 18 09:42:34 i see the problem Oct 18 09:42:36 hmm Oct 18 09:42:43 if he asks that question i bet they arent Oct 18 09:42:56 of course this approach isnt something to be taken seriously Oct 18 09:42:56 Is it ok to use 'em as static? Oct 18 09:43:16 Areeb: is your QR scanning activity in same app? Oct 18 09:43:20 yes Oct 18 09:43:34 then go for static, it will save us a lot of typing :) Oct 18 09:43:36 But I think declaring the object as public static would be a bad practise, no? Oct 18 09:43:53 it'll just work Oct 18 09:44:01 most of the time Oct 18 09:44:16 you're likely to get in a mess later on Oct 18 09:44:16 umm it was a joke :v Oct 18 09:44:17 I don't think he's going to scan several QR codes at once :) Oct 18 09:44:44 it's a continuous scanner Oct 18 09:44:46 kinda sucks you cant send actual objects (like threads or sockets) between activities Oct 18 09:44:48 :BOOM: lol Oct 18 09:45:00 you're likely to get in a mess later on - exactly Oct 18 09:45:16 or you have to serialize into data, but that also sucks for big data like bitmaps, OOM soon Oct 18 09:45:24 Ashiren: actually you can, you just have to pack them on sender side and unpack on receiver... you can write a simple wrapper for that. Oct 18 09:45:42 huh Oct 18 09:45:48 Hi guys, I'm setting up a google play merchant account for the first time. I develop games and sell in app purchases, so do i need to answer the question "What do you sell" with "Electronic goods"? Thanks! Oct 18 09:46:04 zap: tell me how to pack active socket and unpack it on the other side :o Oct 18 09:46:10 Ashiren: you aren't going to scan hundreds of QR codes per second, aint you? Oct 18 09:46:23 ? Oct 18 09:46:27 I'll try a parcelable, seems a good option since I'd also have to send a bitmap to the activity Oct 18 09:46:39 bitmap is already parcelable Oct 18 09:46:52 Ashiren: I mean, the overhead from wrapping/unwrapping the object won't be that noticeable Oct 18 09:46:52 I can send bitmaps just like that? Oct 18 09:47:16 eeyup Oct 18 09:47:27 oh, didn't know Oct 18 09:47:34 this is only my first app Oct 18 09:47:43 let me try a parcelable for the result object tho Oct 18 09:47:51 Areeb: well, you can set up a static syncronized result queue and put the results there... and pull them from the other side. Oct 18 09:48:59 zap: yes that'd work well as well Oct 18 09:49:10 thanks I've got it.. both of these should work great Oct 18 09:49:14 lemme try em Oct 18 09:53:13 Hi guys do any of you translate you apps distributed on google play into chinese ? Oct 18 09:53:29 Or does that attract to little downloads ... ? Oct 18 09:54:27 I translated one of mine, but I might be a special case... Oct 18 09:55:11 hehe Oct 18 09:55:22 and do you get more chinese downloads ? Oct 18 09:56:33 pretty much all my installs are in (greater) China... but... special case :) Oct 18 09:57:10 about 90% are Chinese-language, apparently Oct 18 09:59:54 given that I'm talking about app app for Hong Kong government weather warnings - currently typhoon/strong wind level 3, amber rainstorm, and "special announcement on flooding in the New Territories" Oct 18 10:01:11 NeoFrontier: is there anything Chinese about your app? Oct 18 10:05:40 not particularly why ? Oct 18 10:06:43 at Leeds Oct 18 10:07:34 hmmm, I have an exception come up - java.lang.NoClassDefFoundError, but it's referreing to a class that exists, and is imported at the top of the file. Oct 18 10:09:40 Would it be possible to connect two devices without using a "linking" server, via google play services or something? Oct 18 10:10:16 Hello guys, I want to have a toolbar with bigger height, which doesn't collapse, but moves the top part out off the top screen when scrolling a listview/recyclerview. Scrolling down makes the hidden toolbar appear back from the top. Actually, just like the Youtube toolbar. Oct 18 10:10:21 Like getting google play friend's IP and port so that a socket connection can be stablished between the two devices Oct 18 10:10:54 Can someone give me a hint, or a link? Oct 18 10:11:42 you will have to code that yourself I think Oct 18 10:13:17 I mean, checking when the screen is scrolled with a scroll event, and showing the toolbar/hiding it Oct 18 10:18:03 Thnx, I was hoping for a simpeler solution. This means I have to dig into theory of Material Design how Coordinate Layout handles scroll events and so on... Oct 18 10:27:48 Andybody knows where in Gradle the generateDebugAssets and other tasks like this are defined? Oct 18 10:43:07 zap: android plugin Oct 18 10:43:50 Can't find its source code Oct 18 10:44:14 only prebuilt jars at android.googlesource Oct 18 10:46:07 Is there a way to read an image without asking for storage permission if i use gallery to pick that image? I remember something like this in some android developer patterns YT, but I can't recall it Oct 18 10:48:11 "Scoped Directory Access" found it Oct 18 10:57:58 It looks like Google didn't release source code for gradle android plugin to the public. Damn this "half opensource" approach. Oct 18 11:08:29 Anybody? http://codereview.stackexchange.com/questions/144522/a-baseactivity-to-render-toolbar-and-navigation-drawer Oct 18 11:13:15 Areeb: you should inflate a view first Oct 18 11:13:36 where? Oct 18 11:13:47 1) call super.oncreate 2) inflate view 3) do stuff with that view (ie toolbar stuff) Oct 18 11:13:55 in SomeActivity Oct 18 11:13:56 setContentView? Oct 18 11:14:27 that would be step 2 yes Oct 18 11:14:27 All the inheriting activities call setContentView in their onCreate in my app Oct 18 11:14:33 and then they display toolbar or drawer Oct 18 11:14:55 well i dont see you calling setContentView Oct 18 11:14:55 I can't inflate a view in the base activity.. all activities have different layouts Oct 18 11:15:03 yeah lemme update that .. my bad Oct 18 11:15:19 aww Oct 18 11:15:26 about the navigation from the drawer.. Oct 18 11:15:35 that fine? Oct 18 11:15:36 i sometimes do setContentView(getViewLayout()) in a base activity and have the children implement getViewLayout() Oct 18 11:16:07 Oh wait that could be a better option Oct 18 11:16:13 I'm implementing that. Oct 18 11:16:17 thanks Oct 18 11:16:29 and what about the drawer navigation? Oct 18 11:16:54 idunno Oct 18 11:17:49 :< Oct 18 11:37:48 hey fellas Oct 18 11:38:36 I made a video about my trials and experience with Espresso Test Recorder and google's test lab, the one i was asking about the other day Oct 18 11:38:45 maybe it interests you https://www.youtube.com/watch?v=YUJ4Td74-MM Oct 18 11:49:30 Odaym: are there naked girls? Oct 18 11:49:54 im in an i-shirt if that counts Oct 18 11:52:36 We are only interested in Android development videos with naked girls Oct 18 11:53:18 it's a tough combo I gotta tell you Oct 18 12:25:13 Are you lez Melatonina ? Oct 18 12:26:30 That's off topic Oct 18 12:26:42 Anyway, I'm a lesbian pre-op trans Oct 18 12:27:48 so you have a dick and want it cut off? :E Oct 18 12:29:38 anyway - someone knows why the list of updates in Android studio ( the sdk ones) - differ from the standalone update list? Oct 18 12:29:49 this is kinda annoying as AS thinks there are updates - while there aren't Oct 18 12:32:08 what happens if you try to perform the update? Oct 18 12:32:55 hi Oct 18 12:33:09 AlecTaylor: hi!! Oct 18 12:33:11 hi Oct 18 12:33:11 How do I transparently intercept calls to my server with mock responses? - http://stackoverflow.com/q/40033482 Oct 18 12:35:33 you want to test whether the request gets through to your server?\ Oct 18 12:36:06 or you want to test whether the response will be parsed correctly? Oct 18 12:37:12 Odaym: it worked!!! Thanks for encouraging me! Oct 18 12:37:29 Odaym: sorry. Wrong nick and channel Oct 18 12:37:32 encouraging you to d... Oct 18 12:37:35 ok Oct 18 13:02:43 I managed to connect my Android application to the ASP.NET server and other web clients through SignalR!! ! ! ! ! ! !! ! Oct 18 13:03:37 why are you screaming Oct 18 13:04:02 Because extreme happiness Oct 18 13:07:09 a question about testing. i have some model and some converter. some guy adds a variable to the model but forgets to add it in the converter Oct 18 13:07:22 how/if i can make a test that would fail in this case Oct 18 13:07:55 the idea is to use reflection to see if all variables are used but reflections are root of the evil Oct 18 13:09:31 what's a converter in Android? Oct 18 13:12:17 this is in our project Oct 18 13:12:29 converter json model to database model Oct 18 13:12:46 somewhat were using repository design pattern Oct 18 13:18:42 well what if everytime you pass an instance of the model to the converter you check for the types you're looking for Oct 18 13:19:03 if one doesn't exist in the other.. Oct 18 13:19:11 I dont really know Oct 18 13:19:26 seems interesting though, I use that I think Oct 18 13:28:38 well normally one should write tests before code, but we never d othat Oct 18 13:28:57 so the tests wont scream if variable is missing since it doesnt know about them Oct 18 13:29:18 Anyone here run into CursorWindow problems for large blobs? From what I've read there's a 1MB limit for a cursor. I'm assuming most people end up creating a file and referencing it in a column. Oct 18 13:33:06 Why do a lot of class properties tend to begin with an m? so like private String mPortName; Oct 18 13:33:26 is it just a common way of distinguishing it from method variables? Oct 18 13:33:49 its a kind of hungarian notations Oct 18 13:34:08 and its widely (at least in official google's open source apps) adopted in android world Oct 18 13:39:21 it's terrible don't use it Oct 18 13:39:54 its for "member" Oct 18 13:40:06 for private fields Oct 18 13:40:10 http://jakewharton.com/just-say-no-to-hungarian-notation/ Oct 18 13:40:14 it's fucking terrible, don't use iot Oct 18 13:40:22 thats still better as m_szMember in plain old c -_- Oct 18 13:40:30 -as +than Oct 18 13:41:15 single char m before a member is fine imho, but m_sz takes it too far :D Oct 18 13:41:28 it's meaningless Oct 18 13:41:49 and it doesn't belong to anything that you have anything to do with, it belongs to the AOSP style guide which has nothing to do with what we do Oct 18 13:42:07 read the post above Oct 18 13:45:28 ye, i do neither of "m" nor "m_sz", but single "m" doesnt give me headaches. Oct 18 13:45:34 "mFriends don’t let sFriends use Hungarian notation!" best line :D Oct 18 13:45:59 i've used m when writing c# code ages ago Oct 18 13:46:03 for private things Oct 18 13:46:17 i use it, and i'm happy with it Oct 18 13:46:32 now that c# has auto properties i just use them or use _ as a prefix to denote privates Oct 18 13:47:08 why do people use "m" for private? Oct 18 13:47:21 why not Oct 18 13:47:29 why not "p" for private Oct 18 13:47:35 its m for member Oct 18 13:47:45 because p is know for pointer in C++ ^^ Oct 18 13:47:50 you may use whatever you like Oct 18 13:47:54 sure Oct 18 13:48:02 unless you have to follow some styleguide :p Oct 18 13:48:22 anyway I prefix private members for one reason Oct 18 13:48:33 not to mark that they are private members Oct 18 13:48:42 in portuguese there is an expression that literally translates to "defecating rules" Oct 18 13:49:07 but to avoid using this.name = name in constructors Oct 18 13:49:09 m is not private, its just "member" it doesnt look nice outside a class (Math.mPI ??? lol) Oct 18 13:49:32 i rarely see mFoo though, more like m_foo Oct 18 13:49:34 so it's mName = name Oct 18 13:49:51 that is why i decided to drop the m_ for myself and just use the _ Oct 18 13:50:00 when you already have _foo it is still clear that it is private Oct 18 13:50:02 and I mostly access private members through a getter Oct 18 13:50:14 yeah, _ is ok too Oct 18 13:50:25 everything but this.name = name Oct 18 13:50:28 anyway, that's why easy publishing services exist; for people defecate rules Oct 18 13:51:25 join #css Oct 18 13:51:49 where did that spacebar come from Oct 18 13:52:01 by the way, I wrote to Jake Wharton to say you people miss him but he didn't reply Oct 18 13:52:18 I guess that amounts to a "who cares" Oct 18 13:53:37 dar10s: why should we join #css? who are you to order us to join #css? Oct 18 13:54:20 i think he just mistyped Oct 18 13:56:14 TheSchaf: I got that. I was joking. Oct 18 13:57:30 who cares indeed Oct 18 13:57:44 don't even know him, how can you miss him Oct 18 13:58:18 I don't miss him. Other people does Oct 18 13:58:49 just mention Picasso or something it will highlight his name here Oct 18 13:59:01 or use his name directly i guess Oct 18 13:59:27 lol? he is here. Oct 18 13:59:34 lol? indeed Oct 18 14:00:12 adq: I don't remember who but someone complained he doesn't speak in this channel anymore Oct 18 14:00:31 guy's got a life too Oct 18 14:00:42 how can someone complain Oct 18 14:00:48 i was playing with scene transition, and it started crashing against "sharedElementPairs.add(Pair.create(findViewById(android.R.id.navigationBarBackground), Window.NAVIGATION_BAR_BACKGROUND_TRANSITION_NAME));" with "java.lang.IllegalArgumentException: Shared element must not be null" Oct 18 14:01:01 guess what, a device without nav bar due to physical button, thx. Oct 18 14:02:26 Ashiren: TheSchaf I thought that was the case. Some old "standard" that just lingered. Oct 18 14:02:47 Odaym: that's what I said. But people help me here so I wanted to do something for the channel and I emailed him Oct 18 14:03:02 that's so awkward Oct 18 14:03:06 awkward/cheap/strange Oct 18 14:03:09 it's like a combination Oct 18 14:03:35 but maybe you're a girl so you're overly emotional Oct 18 14:03:50 good thing i'm behind a computer here :D Oct 18 14:53:16 greetings all Oct 18 14:53:37 if i have a notification, what is the best way to determine if the application is running vs not running when the notification is pressed Oct 18 14:53:53 so for example, I have a receiver with priority within the app that is attached only when the user is a certain section Oct 18 14:54:16 when the user is in other areas of the app and a gcm notification comes through an icon is displayed in the status bar Oct 18 14:54:53 the problem that i have is, if they are in the app, i want to keep their existing backstack, but if they are starting it cold i want to provide a place to go back to Oct 18 14:55:11 if that doesnt make sense, i can clarify further. Difficult to conceptualize through typing Oct 18 14:55:21 KISS Oct 18 14:55:28 :D Oct 18 14:56:09 Why is https://developer.android.com/reference/android/app/Activity.html#getCallingActivity() returning null when the calling package uses startActivity but not when using startActivityForResult. It doesn't make any sense, it should return the calling activity & package regardless of the method used to start the activity... Oct 18 14:57:38 yiati: my general philosophy Oct 18 14:57:52 basically i want the pending intent for a notification to be different depending on the app state Oct 18 14:58:02 looking for the most efficient way to track/determine that state Oct 18 14:58:33 Probably not a good idea to have a different pending intent, but rather to intepret the pending intent differently Oct 18 14:59:08 i am not sure i follow Oct 18 14:59:24 actually i think i know what you mean Oct 18 14:59:28 maybe Oct 18 15:12:57 Out of curiosity, is anyone happy with the new CMake support in Gradle? Oct 18 15:13:07 I find it subpar, really and quite bad Oct 18 15:13:54 And there's very little motivation to use it beside building the native component from my app (so 99% of it) the same as on the other platforms Oct 18 15:14:14 But it doesn't show the CMake or compiler output easily, so it's quite disappointing Oct 18 15:27:29 Orphis Mavrik might have an answer to that one Oct 18 15:28:04 g00s: Is Mavrik a dev on the plugin? Oct 18 15:28:24 no, i don't think any google devs hang out here Oct 18 15:31:37 ^^ Oct 18 15:31:49 Orphis, you're right, but the cross-platform thing is huge :) Oct 18 15:32:01 Yes it is Oct 18 15:32:07 Also makes it easy to pull in other C++ libraries that use CMake as their build system. Oct 18 15:32:16 yuuuge Oct 18 15:32:23 But I'd rather find a way to call CMake from Android.mk than use gradle at the moment Oct 18 15:32:26 It's not perfect, report bugs on the bug tracker. Most of mine got fixed on the last iteration. Oct 18 15:32:32 hmm Oct 18 15:32:38 omg, AS is still not able to properly resolve shit like android:entries="@array/array_direction" Oct 18 15:32:49 We still use a separate task that just invokes cmake/ninja Oct 18 15:32:54 adq in preferences xml ? Oct 18 15:33:02 not, in a regular xml view (in a spinner) Oct 18 15:33:02 Since I didn't bother to port it to gradle support yet Oct 18 15:33:05 It tanked AS :) Oct 18 15:33:54 Mavrik: I'd be curious to see some code to know how you do that. I'm not an Android dev actually, just a CMake expert :P Oct 18 15:34:17 It's a gradle "Exec" type task Oct 18 15:34:38 I can't really share it due to license :/ Oct 18 15:34:44 Are you using the toolchain from Google or the horrible taka-no-me one? Oct 18 15:35:07 We had our own based on the takanome, but we just switched to NDK13's toolchain from google. Oct 18 15:35:12 Clang/c++_static Oct 18 15:35:21 Since people love their C++14 toys :P Oct 18 15:35:40 Yes indeed Oct 18 15:36:00 So libc++ is good in r13? It was still an old version in r12 Oct 18 15:36:34 Does r13 include a cmake toolchain or is it the one in the cmake bundle from the SDK? Oct 18 15:37:06 r13 includes a toolchain that's actually sane enough to work Oct 18 15:37:11 android-ndk/build/cmake Oct 18 15:37:23 We used libc++ since r11 or so and it was ok Oct 18 15:37:43 Except for some corners (no unicode/wchar at all( Oct 18 15:37:44 Ohh cool, I didn't know that Oct 18 15:38:41 It's the same as in the cmake bundle in the SDK it seems Oct 18 15:38:45 Makes sense Oct 18 15:39:12 I know they shipped something broken before. Oct 18 15:39:23 BUT since right now you can't install cmake bundle via command-line Oct 18 15:39:36 I didn't even bother to check, since we can't deploy that to CI :) Oct 18 15:39:39 Well, there are hacks for that Oct 18 15:40:06 There was a github page linked into a ticket for that Oct 18 15:40:08 Yeah, but just downloading NDK and installing cmake/ninja from brew/apt is easier Oct 18 15:40:27 https://github.com/Commit451/android-cmake-installer/ Oct 18 15:40:38 True Oct 18 15:41:40 I guess I'll just use the one from $NDK/build/cmake Oct 18 15:41:49 Though I wonder if it supports Windows Oct 18 15:42:14 It probably does... Oct 18 15:43:20 So it's just a matter of calling CMake with an exec task and copying the so file in the right location then Oct 18 15:45:35 Uuumm... should work I think. Oct 18 15:45:57 Yeah, just setup the install dir and install/strip it Oct 18 15:46:03 (Since you want debug symbols out) Oct 18 15:46:08 Indeed Oct 18 15:46:10 And then just set jniDirs in gradle Oct 18 15:46:27 That's going to be an adventure, I have very little Gradle experience Oct 18 15:46:32 As long as you have a /folder//file.so` structure you're fine. Oct 18 15:46:34 :) Oct 18 15:46:50 Yeah, gradle is fun. Oct 18 15:46:52 I can do make, cmake, qmake, autotools, bazel, buck... No gradle Oct 18 15:46:53 Frigging Groovy. Oct 18 15:47:12 how can i change the c++ standard library in the latest android studio? the last android studio used gradle for compiling c++ and there i could edit build.gradle to change it, but the latest android studio uses cmake and the setting doesn't seem to be in CMakeLists.txt. (i want to change it because for some reason is can't find std::to_string) Oct 18 15:47:51 https://cmake.org/cmake/help/v3.6/prop_tgt/CXX_STANDARD.html Oct 18 15:48:16 You need both to specify C++11 and switch to another STL because issues in libstdc++ Oct 18 15:49:28 ok i get the c++11 part but how do i switch to another stl? Oct 18 15:51:54 https://developer.android.com/ndk/guides/cmake.html#variables Oct 18 15:52:19 And this: https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.ExternalNativeCmakeOptions.html#com.android.build.gradle.internal.dsl.ExternalNativeCmakeOptions:arguments Oct 18 15:52:46 You'll want -DANDROID_STL=c++_static I guess Oct 18 15:53:26 cool thanks. so it was in the build.gradle after all. i didn't think to look there because i thought it only used cmake for c++ stuff.. Oct 18 15:55:34 abax: Well, it's passing arguments to CMake from the Gradle file, yes Oct 18 15:55:53 yeah Oct 18 15:56:17 And the toolchain has a bunch of options to tweak, so have a look at them :) Oct 18 15:56:32 When I use the tag, how is that tag reified? For what can I find with findViewById(R.id.theId)? Oct 18 15:56:33 Hello everyone Oct 18 15:57:04 soulisson: is that "Hello" an instance of the class "Hello" or the "Hello" class itself? Oct 18 15:57:15 tag != id Oct 18 15:57:17 fragment != view Oct 18 15:57:36 Melatonina: :), I would say an instance :) Oct 18 15:57:49 adq: ok. How do I get the fragment object? Oct 18 15:58:05 by asking the fragmentmanager or when you create a new instance of it Oct 18 15:58:35 adq: I told I'm using the tag in the layout, I'm not creating it myself Oct 18 15:59:43 I'm trying getSupportFragmentManager().findFragmentById(R.id.logFragment); Oct 18 15:59:48 let's see what happen Oct 18 15:59:49 s Oct 18 16:00:37 adq: yes, that works. Thanks Oct 18 16:00:58 keep in mind xml fragment cannot be removed iirc Oct 18 16:01:15 or something like that, most ppl just end up creating and managing their fragment on the java side Oct 18 16:01:19 it's a test application Oct 18 16:01:25 Melatonina: It's a bad idea to define Fragments in XML. Oct 18 16:01:25 yes, I do that normally Oct 18 16:01:29 They are controllers, not views. Oct 18 16:01:30 this is an exception Oct 18 16:01:53 TacticalJoke: good point Oct 18 16:01:55 fragment sux so much, i wish they would never add them Oct 18 16:10:19 adq you can come up with a replacement any time Oct 18 16:10:46 Conductor looks interesting. I haven't tried it. Oct 18 16:11:02 though^ Oct 18 16:11:28 i tend to shy away from these things that try to sweep platform complexity under the rug Oct 18 16:11:33 I also wish they hadn't created Fragments, because the existence of Fragments enable Google to claim they've solved the Activity problem. Oct 18 16:11:39 enables* Oct 18 16:11:53 looks like a cool thought experiment, will check in next year ;) Oct 18 16:11:55 TacticalJoke: Which activity problem? Oct 18 16:12:03 but there will probably 2-3 newer ones :D Oct 18 16:12:20 loke``: The fact that activities are an overcomplicated mess. Oct 18 16:12:47 google is fragging android kicking and screaming into a multi-windowed world ... Oct 18 16:12:51 *dragging Oct 18 16:13:35 It seems we're supposed to stop videos (or similar) in Activity.onStop now. But Activity.onStop is still asynchronous in N. Seems weird. Oct 18 16:14:10 If you stop a video in Activity.onStop, the audio could, AFAIK, go on playing for a few moments, even after you're away from that app. Oct 18 16:14:22 TacticalJoke: They are indeed, but a lot of the problems with the API's are caused by problems with Java and its limitations Oct 18 16:14:34 TacticalJoke: Conceptually, Activities are decent, IMHO. Oct 18 16:15:22 I don't see how Java limitations are relevant here. Oct 18 16:15:54 It'd be easy to create a simple framework that doesn't repeat Android's mistakes in Java. Oct 18 16:16:03 TacticalJoke: Indeed. Oct 18 16:16:21 TacticalJoke: But, then you'd have to grow this new framework of yours, and you'd get stuck in Javas limitations again. Oct 18 16:16:57 Wouldn't be cool if Android was .NET? Oct 18 16:16:58 In Android 1.0, Activites were simple, straightforward and fairly clean (although limited somewhat by the fact that they had to code around limitations in early Dalvik) Oct 18 16:17:05 Melatonina: .net is just as bad. Oct 18 16:17:13 loke``: why? Oct 18 16:18:12 Melatonina: Because C# has the same problems as java, since they are so similar. Just as an example, none of the languages have support for multimethods. Oct 18 16:18:15 loke``: I'm not seein your point. Java limitations have nothing to do with the Activity life-cycle. Oct 18 16:18:16 seeing* Oct 18 16:18:37 TacticalJoke: they have everything to do with the difficulty in growing an API after its initial design. Oct 18 16:18:58 loke`` is multimethods such a huge thing though O.o Oct 18 16:19:02 loke``: there is plenty of grown APIs in both Java and C# Oct 18 16:19:03 TacticalJoke: As I said, the API was all right in version 1.0. Oct 18 16:19:10 Melatonina: And most of them sucks. Oct 18 16:19:17 loke``: It was bad from the beginning. Oct 18 16:19:19 Hello Oct 18 16:19:23 Android is worse than most. AppCompat, wtf? Oct 18 16:19:26 torak_: hello Oct 18 16:19:35 loke``: because they haven't multimethods? Oct 18 16:19:36 Can i use one scroll listener with multiple recyclerview? Oct 18 16:19:37 I mean the Activity API. Oct 18 16:19:49 i think the bigger problem is too much of android is implemented in managed language / vm Oct 18 16:19:57 loke``: when I wanted multimethods in C# I made them. Oct 18 16:20:06 TacticalJoke: Ah, now I think we see an actual disagreement between us, since I feel the original API was all right. Can you expand on what you dislike about the Android 1.0 Activity concept? Oct 18 16:20:08 I am using it but when i use the scroll listener in one activity it effects the other one too Oct 18 16:20:36 Melatonina: It's impossible to build multimethods in C# or Java. You can approximate it with a lot of code, but it's not the same as having it natively. Oct 18 16:21:02 loke``: it's wasn't much code at all Oct 18 16:21:08 it wasn't Oct 18 16:21:14 loke``: From 1.0, activities could have been simple, persistent things that stay alive until process death, no matter what. This would have made Android development much simpler in many ways. Oct 18 16:21:18 hey .. I have an understanding issue, and I am lost. Oct 18 16:21:20 http://stackoverflow.com/questions/40113340/decouple-the-view-and-logic-in-building-custom-views Oct 18 16:21:44 Note that Android *never* destroys activities to reclaim memory. It's either a full process kill or nothing. So the argument "That wouldn't be memory-efficient" doesn't work. Oct 18 16:21:48 Melatonina: Just so that I understadn your position? Which languages that have native multimethods (and multiple dispatch) have you used for real applications? Oct 18 16:21:55 Though future versions of Android could destroy activities to reclaim memory. Oct 18 16:22:03 loke``: and I needed them very rarely Oct 18 16:23:08 TacticalJoke: Hmm, but acitvities were never about saving memory, were they? I mean it was about being able to record the state of an application when the process gets killed. Remember that you can have several instances of the same activity. Oct 18 16:23:25 loke``: there are many programming language features I miss in C# or Java. Multimethods is just one of them. As I said, I needed it rarely (and lots of years ago). Oct 18 16:24:02 loke``: I'm not really sure how that relates to what I said. Oct 18 16:25:25 loke``: it sounds like your position is "multimethods save the world". Oct 18 16:25:48 Melatonina: Then you never read what I said. It was an example of things that Java lack. Oct 18 16:26:40 Java and C# are enterprise programming languages. They lack lots of things. Admittedly C# lacks a few less. Oct 18 16:26:57 TacticalJoke: You said that actitities should be persistent until process deatch. I mean, the activity should end when then activity is finished, which is what happens today. I'm just having a hard time understanding how your envisioned system would actually differe from what is there today (wrll, in 1.0, since that's what we're talking about) Oct 18 16:27:15 Melatonina: With that I can agree fully. Oct 18 16:27:16 Java is a red herring. The many issues with the Activity life-cycle would exist with other languages. Oct 18 16:27:33 loke``: I honestly can't tell if you're trolling. Oct 18 16:27:41 TacticalJoke: I'm not. Oct 18 16:27:47 Do you really think I'm arguing that Activities should still hang around when the user pressed Back? Oct 18 16:28:11 TacticalJoke: But I agree that disagreement online can sometimes look just like trolling. Oct 18 16:28:23 TacticalJoke: Yes. That's what I thought you were saying. Oct 18 16:28:34 I was referring to configuration changes (and anything else that might destroy an Activity without killing the process -- who knows what Google might have up its sleeve for the future). Oct 18 16:28:54 TacticalJoke: OK, I see what you mean. Oct 18 16:29:45 To be fair, I did say "stay alive until process death, no matter what". I should have qualified that earlier. Oct 18 16:29:49 TacticalJoke: I can somewhat kinda-sorta understand why someone might design such a system (specifically referring to the reconfiguration mess) Oct 18 16:29:53 Activities can be destroyed without killing the process Oct 18 16:30:08 soulisson: They can, but Android never does this to reclaim memory. Oct 18 16:31:17 TacticalJoke: I guess it depends on the device capabilities, I've never paid attention to this Oct 18 16:31:23 TacticalJoke: I don't think there is much memory to be saved by doing that to be frank. You'd need a very different runtime to be able to do that. I could imagine you could have a simple runtime driving multiple applications. Kinda like Lisp Machines of old. Oct 18 16:31:26 If Android is reclaiming memory, it's either a process kill or nothing. It never destroys activities to reclaim memory. Oct 18 16:31:41 I can't help but think that the Android designers had something like that in mind when they designed the API originnnaly. Oct 18 16:36:05 one thing i've noticed, is oems do a lot of weird things to make reclaiming resources more agressive (so their device looks better in some way, like battery life) Oct 18 16:36:10 It's a shame that Google doesn't release something like Conductor. "Okay, guys, we messed up with activities and fragments. We now recommend the use of $FOO." Oct 18 16:36:58 Note that what I say could be wrong (with the definition of 'Android' being a factor) -- there could be devices that destroy activities to reclaim memory. But from what I've read and experienced it's correct. Oct 18 16:37:04 TacticalJoke maybe FOO is Andromeda :D Oct 18 16:37:10 that space is already too divided Oct 18 16:37:23 TacticalJoke: That wouldn't be beyond them. It's not like their current recommended practicies ever lasted more than a year. Oct 18 16:37:26 it’s like when Google released their own version of Rx. Nobody used it Oct 18 16:37:33 If they release Andromeda and officially recommend Fragments, I will cry inside. Oct 18 16:38:12 loke``: Yeah, they seem somewhat all-over-the-place at times. Oct 18 16:38:31 s73v3r: I think this might be different, though. Everyone hates activities and fragments. :D Oct 18 16:38:45 A Google-backed solution that doesn't suck would be trumpeted to the skies. Oct 18 16:39:54 yeah i agree with s73v3r , google doesn't seem to improve upon the abstractions they provide in the platform Oct 18 16:39:55 yeah, but besides being from google, what would such a solution offer over Conductor, Morter & Flow, and the half dozen others? Oct 18 16:40:10 they could have done something like realm a long time ago, if sqlite is too rough - but no Oct 18 16:40:23 with iOS you had core data, love it or hate it Oct 18 16:40:26 and this is ignoring the Android team’s philosophy of “We provide bare metal, it’s up to you to create abstractions" Oct 18 16:41:01 i also think a big problem is the android framework devs don't rotate among app dev Oct 18 16:41:11 i really think they think their abstractions are good Oct 18 16:41:16 but they suck ha Oct 18 16:41:39 TacticalJoke: Do they have a reasonable model to handle dyanmic resizing of activities/fragments yet? I was listening to the Android developers podcast where they explained why the resizing of floating activites doesn't work right (it was too slow, since they have to restart the activity for each pixel change) Oct 18 16:41:49 i don’t quite agree. I think they believe their job is not to provide abstractions Oct 18 16:42:26 On that topic, recreating an activity every time it is resized is beyond ridiculous. Oct 18 16:42:36 I’m also 90% sure that activities were never originally meant to resize beyond rotation Oct 18 16:42:50 they probably assumed a resize would be due to rotation Oct 18 16:42:54 s73v3r the Q is, why ? i honestly think they are smart enough, a few of them could brute force their way through anything. and they don't relate to 'mere mortals' that get stuck in crappy APIs and have hard time plodging through complexity Oct 18 16:43:14 i honestly don’t know Oct 18 16:43:47 i can just imagine dianne being like, wtf you idiots - just do x y and z Oct 18 16:44:41 its so simple :) Oct 18 16:45:00 Maybe they do need to make her do some app dev, at least so she can show what she’s thinking Oct 18 16:45:06 but then there was that video of how reto M does his coding, banhing his head at every turn Oct 18 16:46:04 a few months ago, there was a google+ thread : turns out gapps did not have this particular problem (mentioned in thread) because they always split their UI and service into 2 processes Oct 18 16:46:21 but if you remember way back, that was almost never the advice given Oct 18 16:46:26 so i have to ask 'but why' ? Oct 18 16:46:46 now complexity is x2, splitting across processes using AIDL Oct 18 16:46:50 i never saw that thread about the gapps Oct 18 16:47:06 Google might have a case of feeling of grandeour. All of their engineers feel that they are "special" which, I presume, could lead to some crazy designs. Possibly a desire to constantly "fix" things, as evident by their API evolutions (not just Android) Oct 18 16:47:11 i think it might not be the advice given, because that is kind of a hard way to do things Oct 18 16:47:28 yeah, but Apple must have the same problem with their engineers Oct 18 16:47:44 but they were able to get managers for those engineers to tell them to get real. Why couldn’t Google? Oct 18 16:47:45 s73v3r: Possibly. But there is less insight into what Apple does. Oct 18 16:48:07 s73v3r: Because their engineers are valued way higher than their managers. Oct 18 16:48:37 And, their managers are engineers too. Oct 18 16:51:15 maybe some of that needs to change Oct 18 16:51:26 there needs to be someone to bring them back to reality Oct 18 16:51:32 s73v3r: Possibly. Oct 18 16:51:42 You guys should go to work at Google Oct 18 16:51:47 Things would be better Oct 18 16:52:11 Melatonina: Very likely not. Oct 18 16:52:40 loke``: do you suck worse than then Google engineers? Oct 18 16:52:50 Melatonina: I suck in a different way. Oct 18 16:53:19 I understand. You do drugs. I know, it's a widespread problem. Oct 18 16:53:29 Android 8 : Lisp lives ! Oct 18 16:53:37 Melatonina: No. But sometimes I wish I did. :-) Oct 18 16:54:09 Melatonina: I don't know what is worse illegal drugs or drugs from pharmaceutical companies Oct 18 16:55:12 soulisson: if you don't know it - being you a heavy user of both kind of drugs - I don't know who can know Oct 18 16:55:16 g00s: Android is finally switching to a sane programming language? Oct 18 16:55:19 :D Oct 18 16:55:26 lol hackkitten out of the blue Oct 18 16:55:31 :3 Oct 18 16:55:32 you can use clojure on android ok... Oct 18 16:55:41 Wasn't the old Newton operating system Lisp-based? Oct 18 16:55:41 android doesn't need to switch Oct 18 16:55:47 * g00s was just joking about lisp haha Oct 18 16:56:11 i think the clojure runtime still takes a bit long time to start Oct 18 16:56:14 Melatonina: don't know about the illegal ones :) Oct 18 16:56:19 :) Oct 18 16:56:19 yes, clojure is slow on android, though Oct 18 16:56:44 hackkitten write your stuff in chicken scheme and then FFI into it from java :) Oct 18 16:57:10 You can run ECL on Android though for a full lisp (that is fast and starts quickly). Problem is that it runs with the NDK, so no access to Android API's. Oct 18 16:57:22 g00s: I'm currently working on a fully native C++ dev environment for Android by horribly abusing the JNI :) Oct 18 16:57:24 yes, anything that runs "native" is not acceptable Oct 18 16:58:50 if Android had their bases in C/C++, it’d be so much easier to use other languages Oct 18 16:58:59 that's pretty true Oct 18 16:59:21 android leveraged a large developer base with java, though Oct 18 16:59:25 which was the point at the time Oct 18 16:59:41 that, plus a cpu agnostic runtime Oct 18 16:59:43 it wasn't Google's choice, though Oct 18 16:59:49 it was Oct 18 16:59:52 nope Oct 18 16:59:57 Google just bought Android as-is Oct 18 17:00:02 yes, it was. they chose to continue using Java Oct 18 17:00:14 Google added the native devkit Oct 18 17:00:24 google bought android early enough that they could have easily dropped java Oct 18 17:00:27 then they dropped the JVM Oct 18 17:00:38 modern Android natively compiles the bytecode Oct 18 17:00:58 hackkitten: I think ART do JIT, right? Oct 18 17:01:04 eh, google is just reinventing the jvm/hotspot one step at a time Oct 18 17:01:04 nope Oct 18 17:01:13 ART is native code Oct 18 17:01:20 art does aot compilation Oct 18 17:01:27 then they add dynamic optimization Oct 18 17:01:30 basically hotspot in a nutshell Oct 18 17:01:54 ART doesn't keep an app as bytecode when the app is being installed Oct 18 17:02:08 it permanently compiles it for the target architecture Oct 18 17:02:14 basically what JIT would do, but permanently Oct 18 17:02:36 this is part of why ART is so much faster than Dalvik Oct 18 17:02:40 Did my last message go through? :E Oct 18 17:02:46 that's not entirely correct, art aot compilation is a part of installation Oct 18 17:02:58 but the dex code still exists after installation Oct 18 17:03:10 If not: Are you guys aware of the Android bug related to launching your app from Google Play (e.g., update notifications)? Oct 18 17:03:10 and art compilation occurs when loading un-compiled dex for the first time Oct 18 17:03:43 (otherwise stuff like instant run would not work) Oct 18 17:03:54 If you're not sure what I'm talking about, try this: 1. Open Google Play. 2. Search for your app. 3. (Assuming it's installed, ) click 'OPEN'. 4. Click Home. 5. Launch your app from the icon. 6. Press Back. Oct 18 17:04:05 Your home activity is in the task two times, and it's very confusing for users. Oct 18 17:04:40 Pressing Back shows the main activity once again (instead of the home screen or whatever). Oct 18 17:05:11 There are ways around this; just wasn't sure how well-known this bug was. Oct 18 17:07:12 One not-so-amazing solution is to make the main activity's startMode `singleTop`. This solves the above problem (two MainActivities next to each other) but doesn't fix the issue where the user left the app (via Home) from a secondary activity. Oct 18 17:08:05 Another solution is `if (!isTaskRoot()) { finish(); }` in MainActivity.onCreate. But MainActivity.isTaskRoot looks kinda complicated for something that'll run every time your main activity gets created. :S Oct 18 17:08:23 s/startMode/launchMode/ Oct 18 17:08:53 Setting the main activity's launchMode to `singleTask` fixes the problem but causes more problems, because for whatever reasons `singleTask` cannot be used with an intent filter. Oct 18 17:09:24 And this bug has been filed in the tracker for years without a fix. Good ol' Android. Oct 18 17:09:45 s73v3r any recommendations for hosting static website somehwere, i could try S3 free tier maybe Oct 18 17:09:56 I should say "these bugs", because the `singleTask` one has also been filed for years with nothing. Oct 18 17:10:22 lol Oct 18 17:10:38 anybody have recommendations for hosting static website somewhere Oct 18 17:10:49 github Oct 18 17:10:50 appengine Oct 18 17:10:59 TacticalJoke: I seem to recall that singleTask has been deprecated? Oct 18 17:12:06 The documentation doesn't mention deprecation. Oct 18 17:13:07 TacticalJoke: Then I'm misremembering. Oct 18 17:15:28 I gotta run. Enjoy! Oct 18 17:19:44 java 9 should be available 2017/07/27 Oct 18 17:21:46 g00s: ! Oct 18 17:21:55 hey thepoosh ... Oct 18 17:21:59 sup? Oct 18 17:22:30 lol not much, getting through an 800 page book on R Oct 18 17:22:40 oh reading this oreilly RxJava book too Oct 18 17:22:50 whats up there ? Oct 18 17:23:33 * g00s wonders why they didn't just wait a month or 2 for rxjava 2 to be finished Oct 18 17:23:46 R? Oct 18 17:23:50 even if most concepts are still the same, still some differences Oct 18 17:24:01 bitkiller__ ARR! Oct 18 17:24:27 bitkiller__ https://www.amazon.com/Book-First-Course-Programming-Statistics/dp/1593276516 Oct 18 17:24:34 g00s, i did some introductory mooc (coorsera) Oct 18 17:25:00 bitkiller__ R specifically, or stats, ML, etc ? Oct 18 17:25:07 i have to take the Andrew Ng one Oct 18 17:25:19 there's a data science track i guess Oct 18 17:25:27 it's the first course on the track Oct 18 17:25:30 yeah there are a lot of classes now Oct 18 17:25:40 it was mostly R, but very basic Oct 18 17:25:40 could spend the rest of my life ... Oct 18 17:26:53 interesting subjects (probs, stats, etc) Oct 18 17:27:16 but i doubt i will ever work with any of those Oct 18 17:27:53 bitkiller__ i thought after some prep trying kaggle Oct 18 17:29:08 didn't know it. i'll take a look Oct 18 17:29:34 i think with things like TensorFlow, a lot of these low hanging ML problems become democratized for most developers to use Oct 18 17:29:52 kinda how like cameras became cheap enough everybody started taking pictures, even if you weren't a pro Oct 18 17:29:52 g00s: oreilly RxJava book? Oct 18 17:30:11 http://shop.oreilly.com/product/0636920042228.do Oct 18 17:30:26 just came out a few weeks ago Oct 18 17:30:58 Is a dialog fragment associated with ONE and ONLY ONE dialog at time? Oct 18 17:31:28 Otherwise said, can I store information about the state of the dialog in the dialog fragment object? Oct 18 17:32:34 lol this is awesome https://www.reddit.com/r/aww/comments/57s8n7/hes_all_kitted_out_and_ready_for_halloween/ Oct 18 17:35:11 g00s: what's awesome in that picture? Oct 18 17:35:57 Melatonina: the dog does look like dana carvey Oct 18 17:36:22 and she looks almost as shitty as mike myers Oct 18 17:36:24 today Farage made my day Oct 18 17:36:29 ? Oct 18 17:36:59 thats Miss Delaware (from some year) Oct 18 17:37:01 https://www.youtube.com/watch?v=JZoqhMgStB4 Oct 18 17:37:04 thepoosh: ^ Oct 18 17:37:34 g00s: Ah ok. I missed that. I don't like that actor and those kind of movies. Oct 18 17:37:44 LOL Oct 18 17:37:52 lol WW is a cultural icon Oct 18 17:37:56 *classic* Oct 18 17:39:28 montage - they did it right Oct 18 17:40:19 thepoosh did you do your firebase thing ? Oct 18 17:40:35 conference? Oct 18 17:40:38 Nov 7th Oct 18 17:40:41 g00s: never watched it. Could not even stand the trailer Oct 18 17:40:43 oh Oct 18 17:46:21 can I retrieve the "positive button" instance of a dialog builder in some way? Oct 18 17:46:21 g00s: I’m probably the last person you should ask on this :p Oct 18 17:49:38 Melatonina: yes, https://gist.github.com/yishai-glide/6798ce72a36362c87f1265d1d00b3857 Oct 18 17:50:20 ok, I have to "create" the dialog first. Oct 18 17:50:23 thepoosh: thanks! Oct 18 17:50:29 np Oct 18 17:50:39 you can do that in the onCreateDialog Oct 18 17:53:41 but I have a Dialog not an AlertDialog. It doesn't have getButton() Oct 18 17:54:39 Dialog is an interface Oct 18 17:56:48 cake is a lie Oct 18 17:58:15 thepoosh: thanks Oct 18 17:58:32 anyway this DialogFragment/Dialog thing is another Android mess Oct 18 18:00:30 what isnt Oct 18 18:00:58 hey fellas Oct 18 18:01:52 you ever had the problem of a Seekbar not being able to take up more than like 5dp of width? Oct 18 18:02:04 regardless of how much you match_parent or even set width explicitly, it's insane Oct 18 18:04:37 I'm ashamed of even trying to resolve the bug cause it's so silly Oct 18 18:04:47 a UI element not taking up full width... Oct 18 18:05:56 Odaym: they suck Oct 18 18:06:02 it has something to do with the style Oct 18 18:06:10 look into seekbar styles Oct 18 18:06:13 ok Oct 18 18:06:13 not the VacuumCleanerView Oct 18 18:06:22 the vacuumcleanerview Oct 18 18:06:37 the only thing in android that doesnt suck Oct 18 18:10:59 JSONObject method "optString" should return null if there is no value for a given key, am I understanding that correctly? Oct 18 18:11:24 "one won't be enough unfortunately. But if I had to chose a single one it would would be a Samsung Galaxy... because they suck SO MUCH." Oct 18 18:11:25 lol Oct 18 18:11:27 because im still catching a JSON exception "no value for foo" Oct 18 18:12:43 read the apidoc Oct 18 18:13:35 oh i did. that's why i asked "am i understanding that correctly" Oct 18 18:14:42 I suppose it's a bug if it threw Oct 18 18:15:56 but you're probably not catching what you think you're catching Oct 18 18:16:44 yeah i guess im wondering if it returns null in the event of no key... im my situation, the key is certainly there, but the value is "". I cant rightly use Object.equals because my minSdk is too low (and id prefer to keep it that way) Oct 18 18:16:49 Haven't had any issues with optString, or any of the other opt methods Oct 18 18:17:02 you're not getting the exception you think you're getting Oct 18 18:17:07 Do you have a stacktrace that points to optString? Oct 18 18:17:09 read your stack trace again and try again Oct 18 18:18:03 stacktrace routes to the line just below my if statement involving the optString method. "org.json.JSONException: No value for foo" Oct 18 18:18:16 post your code, i guess Oct 18 18:18:27 wrong Oct 18 18:18:30 Unless it contains optString, then it's not optString casting Oct 18 18:18:30 "right below..." Oct 18 18:18:31 nope Oct 18 18:18:39 Clean, rebuild, etc Oct 18 18:18:48 and what’s your MinSDK that you can’t reliably use object.equals? Oct 18 18:18:53 15 Oct 18 18:18:57 4.0 i think Oct 18 18:19:11 why so low? Oct 18 18:19:28 project a few years old, i think kit kat was released around the time of launch Oct 18 18:19:42 so why not update? Do you have stats on what your users are using? Oct 18 18:20:06 i have some stats but ... its for the job.. and my time is extremely limited to strictly development Oct 18 18:20:16 not my decision. Oct 18 18:20:19 that statement doesn’t make any sense. Oct 18 18:20:51 my time is not authorized to be spent analyzing and making these decisions. Oct 18 18:20:59 frustrating as that is. Oct 18 18:21:08 again, that doesn’t make any sense, as those decisions are part of development Oct 18 18:21:23 just raise that shit man Oct 18 18:21:30 and get on with your life, it's better than code that is not working Oct 18 18:21:40 connotation vs denotation. I might agree that its a part of development. but my bosses do not. Oct 18 18:21:41 but back to your problem, rebuild, and if you’re still getting the error, post the code and the stack trace Oct 18 18:21:48 fuck them man Oct 18 18:21:52 lmao Oct 18 18:21:53 that seems like a crappy place to work Oct 18 18:21:59 you are the master here Oct 18 18:22:06 stack trace or gtfo Oct 18 18:22:10 embrace your power Oct 18 18:22:17 because it's not optString that failed Oct 18 18:22:18 raise your keyboard high Oct 18 18:22:26 it's your MENTALITY that's failing Oct 18 18:22:36 jk bro Oct 18 18:22:39 you're cool Oct 18 18:22:43 im cool Oct 18 18:22:52 im getting some code to share. not ignoring those requests. Oct 18 18:23:08 yea the most i've learned here is that sharing the actual buggy code is the only solution :P Oct 18 18:28:06 http://pastebin.com/n0yWqnqd the stacktrace seems to route to line#2 when I try to actually access the value. Here's what im trying to do: On activity launch, make a call to a server for a bit of JSON containing various data, including private messages for each user. *some* (not all) of these messages have "image attachments" (really just a URL included in the json.. the app then fetches) Oct 18 18:28:21 wtf is your stack trace Oct 18 18:28:24 seriously... Oct 18 18:28:32 settle down Oct 18 18:28:37 it's failing on message.getString("messageID") Oct 18 18:28:42 oh Oct 18 18:28:46 case sensitivity Oct 18 18:28:49 fail Oct 18 18:29:20 pardon? Oct 18 18:29:25 read your code Oct 18 18:29:27 i am Oct 18 18:29:35 again and again until you understand Oct 18 18:29:42 post your stack trace Oct 18 18:29:44 you're real good at this Oct 18 18:29:50 yes, and you're not Oct 18 18:29:53 so practice Oct 18 18:30:04 messageAttachmentImageURL != messageAttachmentImageUrl Oct 18 18:30:17 that'll get ya Oct 18 18:30:17 doops Oct 18 18:30:30 hopefully pfn got a nice ego boost from that Oct 18 18:30:40 practice doesn’t help if you don’t know what the issue is Oct 18 18:30:45 yea that's exactly why he helps Oct 18 18:31:25 your description of the problem wasn't even close to apt Oct 18 18:31:33 "optString threw an exception" -- no it didn't Oct 18 18:32:19 oh ok if you want to keep fighting about this... where did I say optString threw the exception? Oct 18 18:32:45 How do you people solve forgot password links? If a hacker can crack the hash (generating a hash from username and a secret key) he can change the password for a random user and delete their accounts - disaster! How do I prevent this? What is a strong enough hash? Oct 18 18:32:53 JSONObject method "optString" should return null if there is no value for a given key, am I understanding that correctly? because im still catching a JSON exception "no value for foo" Oct 18 18:33:12 And where did i specifically state that it was at the fault of optString Oct 18 18:33:24 that is exactly what you implied Oct 18 18:33:28 anyway, ignore list with you Oct 18 18:33:28 bye Oct 18 18:33:29 that's what i was inspecting, that's what I suspected the issue. I never make it declarative Oct 18 18:33:36 take your ball and go home Oct 18 18:33:43 that escalated quickly Oct 18 18:33:47 ok now I'm on your side Oct 18 18:33:51 * Odaym cheers Oct 18 18:33:55 pfn’s dickery does escalate quickly Oct 18 18:34:34 I'm sorry that I'm the only one that can solve problems in any reasonable amount of time here Oct 18 18:34:44 oooooh! Oct 18 18:34:46 there it is Oct 18 18:34:56 yea he's delusional Oct 18 18:35:13 that doesn’t mean you have to be an ass about it Oct 18 18:35:17 guy's insane Oct 18 18:35:22 this is your achievement ground? haha Oct 18 18:35:25 relax bruh Oct 18 18:37:01 it's nice adding people to ignore filters, too much random noise from these complainers Oct 18 18:37:11 So I get it, you dont hash the username to create a confirmation or forgot password link, you create a UUID and store that link with the user so when the link with that UUID is accessed you look it up in the database? Oct 18 18:37:16 is in android wear possible to combine drawer and keyboard IME ? Oct 18 18:37:49 I mean that drawer and keyboard IME are visible the same time Oct 18 18:42:42 that seekbar issue was not a style issue Oct 18 18:43:13 I was adding the view that contained the seekbar, manually, so it's getting wrap content on width for some reason so I added it to match parent programatically Oct 18 18:48:51 how to prevent startActivity from creating an activity (I dont want onCreate to be called) Oct 18 18:48:54 using singleTask Oct 18 18:49:29 onNewIntent is being fired Oct 18 18:49:54 is this a different activity? Oct 18 18:50:02 than the one you’re calling startActivity from? Oct 18 18:51:23 ok, so i am testing soemthing so this is a bit weird. But I have activity A, from Activity A i raise a notification Oct 18 18:51:38 when the notification is pressed onNewIntent on Activity A is fired Oct 18 18:52:00 Activity B is launched Oct 18 18:52:08 then immediately onCreate for Activity A is fired Oct 18 18:52:16 are activity b and a the same class? Oct 18 18:52:20 no Oct 18 18:52:28 and what activity is the intent launching? Oct 18 18:52:35 B Oct 18 18:52:45 PendingIntent from the notification launches A Oct 18 18:52:51 A has singleTask flag Oct 18 18:53:02 so your notification is launching two intents? Oct 18 18:53:05 add bring to front to the intent flags Oct 18 18:53:13 for the purposes of this test it is s73v3r Oct 18 18:53:20 that makes very little sense Oct 18 18:53:25 why? Oct 18 18:53:36 i need a quick way to launch the notification for the purpose of testing Oct 18 18:54:01 that’s really not going to be anywhere near a real situation Oct 18 18:54:04 based on my understanding, when the PendingIntent comes in, if the activity is running onNewIntent is fired Oct 18 18:54:13 which should then launch Activity B Oct 18 18:54:14 only if you're running in the same task Oct 18 18:54:28 if it is not running, Activity A is launched and the Intent examined to see if B should be started Oct 18 18:54:47 in the final version, the user would either be clicking the notification while the app is running Oct 18 18:54:51 or when it is closed Oct 18 18:55:08 the notification would be coming from a push? Oct 18 18:55:11 yes Oct 18 18:55:16 so why not just do that? Oct 18 18:55:33 there are a few tools out there that will let you easily send a push from your computer Oct 18 18:55:40 for this exact kind of thing Oct 18 18:55:50 do you have a link Oct 18 18:56:06 i was trying to do this quickly and thought this would suffice given the way I understood androids activity lifecycle Oct 18 18:56:18 http://apns-gcm.bryantan.info/ Oct 18 18:56:30 you need the token, which you can simply print out in the log Oct 18 18:58:04 yeah, i am working on getting our api key Oct 18 18:58:07 its buried in azure Oct 18 19:05:28 Is there a way to run my app in debug mode without installing a different version? Oct 18 19:05:51 re-package your apk with a manifest that indicates that it is debuggable Oct 18 19:08:08 It is already debuggable, I just want to begin debugging immediately on app start Oct 18 19:09:04 shouldn’t hitting the debug button do that? Oct 18 19:09:10 It installs a new build Oct 18 19:09:21 I need to debug the app in its current state Oct 18 19:09:33 then attach-to-process Oct 18 19:09:36 it's a command in ide Oct 18 19:10:14 Yes. But the app must already be running. I need to start debugging immediately Oct 18 19:10:32 so Oct 18 19:10:40 s73v3r: very cool, could have used this a few weeks ago Oct 18 19:10:46 problem with recreation is still persistent however Oct 18 19:10:47 Just got NPE for calling getCacheDir() in the constructor of an IntentService, but not sure how that's possible since IntenService is a child class of Context Oct 18 19:10:54 you nered to debug immediately, but it’s already running cause it has current state? Oct 18 19:11:27 xmimjasonxx: if you’re using this tool to create the notification, then you shouldn’t have to launch two intents from your notification Oct 18 19:11:35 yiati: Context subclasses are not set up until onCreate Oct 18 19:11:37 your notification intent can just do what it’s supposed to do Oct 18 19:11:44 i am testing the case where my app is running and i receive the notification Oct 18 19:11:59 i want the user to, when they click the notification, go into a detail page for the notification Oct 18 19:12:02 it does this already Oct 18 19:12:17 It is not currently running. The auth tokens have been expired, or the app thinks it has for some unknown reason. When the app starts, it checks the local tokens. I need to debug this process, but it happens immediately on launch. Oct 18 19:12:25 the problem is, if the user hits back from said page, the onCreate causes them to immediately return to the detail page Oct 18 19:12:33 if they hit back again, at this point, the app works as expected Oct 18 19:12:48 its some combination of the flags, i just need to figure out the right combo Oct 18 19:12:53 that’s because you sent the extra intent to activity a Oct 18 19:12:59 if you stop sending that intent, you should be fine Oct 18 19:13:43 what do you mean by extra intent? Oct 18 19:14:16 you said earlier you sent two intents, one to activity B to start it, and one to activity A Oct 18 19:14:55 right, under the case where the user is already using the app and wishes to tap the notification, the PendingIntent for that will be to HomeActivity Oct 18 19:15:05 i assume, if they are already on HomeActivity (or its in the stack) Oct 18 19:15:09 don’t send that Oct 18 19:15:10 onNewIntent Oct 18 19:15:37 mmm ok, in that case, I would need to differentiate between the PendingIntent coming when the app is running vs when it is not Oct 18 19:15:39 just send the intent launching the activity the notification is supposed to do Oct 18 19:15:45 since HomeActivity also serves as a router Oct 18 19:15:45 i don’t think so Oct 18 19:16:17 how would that work in the case where the app is closed. I would not want the user to go to RequestActivity Oct 18 19:16:39 i would want them to go to HomeActivity which then launches RequestActivity Oct 18 19:17:26 you’re gonna have to work that out Oct 18 19:17:28 s73v3r: thanks for the help btw. Not trying to be difficult Oct 18 19:17:57 but your problem is being caused by sending the intenet to the home activity. when it comes back, it’s just reading the intent and doing what it says to do Oct 18 19:18:33 right. I thought that if the activity was already in the stack and had singletask only onNewINtent would fire Oct 18 19:18:40 that is how Branch.IO seems to work Oct 18 19:21:02 SimonVT: Nice thanks, onCreate() makes sense for the Service too I guess (just like an Activity). Not used to having an actual constructor which IntentService requires child classes implement Oct 18 19:25:22 s73v3r: thanks for your help Oct 18 19:25:28 ill keep working at it Oct 18 19:25:43 might have to resort to a static tracker variable or something Oct 18 19:26:45 Yeah, for some reason it wants you to pass a thread name Oct 18 19:29:19 Do Fragment arguments count against the size limit of Parcels RE: TransactionTooLargeException Oct 18 19:29:30 I would imagine that they do Oct 18 19:31:01 your bundle is too big Oct 18 19:35:58 whats the best post on ConstraintLayout that is up to date Oct 18 19:39:01 adq: Found out how to reproduce it, put a bunch of Fragments on top of each other where each of them have huge saveInstanceStates, open a new activity (with Do Not Keep Activities on to make it parcel the old activity immediately) and BAM Oct 18 19:53:08 explodes, eheh Oct 18 20:11:27 g00s: Mark Allisons? https://blog.stylingandroid.com/constraintlayout-part-1/ Oct 18 20:11:52 It's an 8-parter Oct 18 20:39:56 is someone here using Gson/Resteasy/Jackson? I have found support for Gson, unlike for others, but if there is any - which would you suggest to use to replace Serializable? Oct 18 21:10:48 bolovanos: In my experience both Gson and Jackson are well supported and offer fairly good performance. I'm partial to Gson myself because Google. Never heard of Resteasy, and never used either of these for serializing objects for storage, only for implementing clients for json APIs. Oct 18 21:12:19 Hi, do we have to keep the same key when publishing multiple apps on the google play store? Oct 18 21:13:05 no Oct 18 21:13:19 soulisson: no. You only have to use the same key for signing successive version of the same application in order for the new version to be installed as update Oct 18 21:14:04 s73v3r, Melatonina, ok, thank you Oct 18 21:15:11 I tried to play with openssl to display the signature stored in CERT.RSA but I was unable to, any idea how to do that? Oct 18 21:18:09 Why do I need to use a DialogFragment and a Builder if I apparently it's possible to create and show a Dialog directly? Oct 18 21:18:25 What's the role of DialogFragment? Oct 18 21:19:04 https://developer.android.com/reference/android/app/DialogFragment.html Oct 18 21:19:17 Melatonina: Dialogs get dismissed on configuration changes (e.g., orientation). DialogFragment has structure to keep the dialog visible. Oct 18 21:19:32 TacticalJoke: thanks! Oct 18 21:19:40 it's explained in the doc, among other things: DialogFragment does various things to keep the fragment's lifecycle driving it, instead of the Dialog Oct 18 21:20:03 DialogFragment is recommended, though personally I'm not a huge fan of any Fragments. :s Oct 18 21:20:13 Fragments are eww Oct 18 21:20:34 lol Oct 18 21:20:52 fragments are ok up until you get to a certain point and size Oct 18 21:20:56 at least the name makes sense to me now Oct 18 21:21:03 you fragment an activity into a muddled abstraction Oct 18 21:24:23 Thorbear, hi - thank you. if you are not using these for for object storage - does it mean that you are not storing objects at all? Oct 18 21:30:17 TIL about Log.getStackTraceString: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/util/Log.java#325 Oct 18 21:53:15 http://pastebin.com/XjTjuwyx Oct 18 21:53:15 hey all, given a CoordinatorLayout we would like the downward scroll to fully expand our collapsetoolbarlayout Oct 18 21:53:22 right now when we down scroll it gets to the top and stop Oct 18 21:53:27 and second drag will expand the appbar Oct 18 21:53:56 Given the above linked custom drawable, how would one add a selectableItemDrawable? Oct 18 21:54:03 to get a ripple effect Oct 18 21:55:17 layer-list Oct 18 21:55:25 xximjasonxx: probably not exactly what you want but https://github.com/loopeer/SpringHeader Oct 18 21:55:33 oh, Oct 18 21:55:37 at the bottom Oct 18 21:56:49 pfn: Thats exactly what I tried, doesn't seem to work Oct 18 21:56:53 missingno: not quite, but thanks Oct 18 21:56:54 it works Oct 18 21:57:03 if it doesn't work, you're doing something else that prevents it Oct 18 21:57:08 orbyt_: hi Oct 18 21:57:17 Oh one moment, I was doing ?attr/selectable... Oct 18 21:57:17 orbyt_: http://guides.codepath.com/android/ripple-animation Oct 18 21:57:27 ?attr/ and ? is the same thing Oct 18 21:57:44 doesn't matter, you can use either interchangeably Oct 18 21:57:54 Then wonder whats preventing it Oct 18 21:58:13 its being set as the bg of a FrameLayout Oct 18 21:58:28 the view must be clickable Oct 18 21:58:49 Codepath has a rather large set of simple examples for most basic Android questions you could have Oct 18 21:59:00 including ripple drawable Oct 18 21:59:01 :D Oct 18 21:59:29 pfn: Yea its set to clickable=true Oct 18 22:00:10 yiati: Im already familiar with it, though using it in a layer-list seems to not be working as I thought it would Oct 18 22:00:26 Guys, is web working fine for you? I'm struggling to browse it for two weeks now. Internet seems to be working fine. Only web pages suddenly stop to load Oct 18 22:01:05 Oh, and hi Melatonina o/ Oct 18 22:01:09 orbyt_: As described in http://guides.codepath.com/android/ripple-animation use a selector Oct 18 22:01:19 it doesn't have to be in a selector Oct 18 22:07:44 hmm, Im now getting a red exclamation mark next to where im declaring the background, which leads to a non-project file item_background_material.xml Oct 18 22:08:03 where the namespace is red...how odd Oct 18 22:15:06 sounds like the IDE getting confused, especially if it's showing you something in build/ Oct 18 22:15:37 Yea just did an invalidate/restart, will see what happens Oct 18 22:16:10 it was showing me something in my Android Studio /plugins directory Oct 18 22:18:30 still doing it though lol Oct 18 22:20:33 "Google's take on Android needs more polish" lol that sounds so weird Oct 18 22:21:17 More like it needs to be decimated and rebuilt. Oct 18 22:22:22 thanks for your support guys! Oct 18 22:22:43 Melatonina: You're asking whether the world wide web is working? Oct 18 22:22:52 It's not slow here. Oct 18 22:23:04 TacticalJoke: I restarted the browser and it's working again Oct 18 22:23:41 There must be something wrong but I don't have energies to investigate Oct 18 22:23:58 But it's really strange Oct 18 22:24:16 Fortunately it's not affecting my work on the application development Oct 18 22:24:21 otherwise it would be a nightmare Oct 18 22:32:57 Flappy Golf ... wow Oct 18 22:39:11 man, almost a month and google still hasn't put everything necessary for 2.2.0 on central yet Oct 18 22:39:26 adq http://digg.com/video/floppy-drives-what-is-love Oct 18 22:41:13 pfn at this point i'd like to see a detailed report of the technical difficulties :) Oct 18 22:41:28 there are no difficulties, they just don't give 2 fucks Oct 18 22:41:51 anyone have any advice for how to make a collapsing toolbar expand when scroll reaches the top? Oct 18 22:42:05 xximjasonxx, custom behavior Oct 18 22:42:13 default behavior doesn't support it Oct 18 22:42:33 pfn: got it - any examples? Oct 18 22:42:38 no Oct 18 22:42:48 intercept scroll at top and transfer the velocity Oct 18 22:43:05 Making it expand when you scroll up is default I thought Oct 18 22:43:07 to the behavior Oct 18 22:43:44 Or rather, I know its the default Oct 18 22:43:52 not on a single scroll Oct 18 22:44:00 it will stop and you have to scroll again Oct 18 22:44:25 is the correct way to handle expired links to run a cron job? Oct 18 22:44:26 what alternatives is there? could that be really hard when the database is huge, say 1 million users? Oct 18 22:44:26 loop over all and set change pw links and dates to none Oct 18 22:44:26 delete user if it is an unconfirmed account Oct 18 22:44:26 etc Oct 18 22:44:37 try another channel, schlogg Oct 18 22:44:50 pfn: Oh right, I guess im not sure whats hes after Oct 18 22:44:54 pfn: we do. unfortunately, no dice Oct 18 22:44:56 thanks though Oct 18 22:45:23 orbyt_, imagine you're at the bottom of the list and swipe down hard, it should expand the app bar when you reach the top Oct 18 22:45:49 assuming you have enough velocity to complete the expansion Oct 18 22:46:14 xximjasonxx, you do what? Oct 18 22:46:28 transfer the velocity Oct 18 22:46:39 I've done exactly this in the past, and it works Oct 18 22:47:40 pfn: i mean http://stackoverflow.com/questions/30923889/flinging-with-recyclerview-appbarlayout Oct 18 22:47:45 we have that and it occassionally works Oct 18 22:48:04 dunno, I don't copy/paste from stackoverflow Oct 18 22:48:05 but we are not able to fling once and have it expand Oct 18 22:48:32 that's the general idea, though Oct 18 22:48:40 of course, you have to apply the behavior to the right view Oct 18 22:48:51 any improvemenets you might recommend Oct 18 22:48:55 right view? Oct 18 22:49:14 Bit of a hack, but couldnt you also programmatically expand it the moment you hit the top of the list? Oct 18 22:49:21 that behavior was applied to the collapsetoolbarlayout Oct 18 22:49:23 orbyt_, wrong velocity Oct 18 22:49:29 orbyt_, so it looks like shit Oct 18 22:49:33 sorry appbarlayout Oct 18 22:49:48 It probably would ha Oct 18 22:51:12 pfn: is that the right control at least? Oct 18 22:51:20 xximjasonxx, yes Oct 18 22:51:43 alright. thanks for that pfn Oct 18 22:52:08 we'll keep digging on this bit of code see if we can figure out why its not working for us Oct 18 22:53:29 consumed = childAdapterPosition > TOP_CHILD_FLING_THRESHOLD; Oct 18 22:53:43 oh, nevermind, thought it looked wrong, but it's not Oct 18 22:55:12 For some reason the first item in my nestedscrollview is not clickable Oct 18 22:55:21 while the rest are Oct 18 22:55:29 anyone know why that may be? Oct 18 22:55:45 I should add the views are exactly the same in xml Oct 18 22:56:57 Well, let me rephrase that, the first item is a a LinearLayout, as NestedScrollViews can only have 1 child, but in that LL is a bunch of FrameLayouts, of which the first is not clickable Oct 18 23:04:20 pfn: does not the combination of enterAlwaysCollapsed with a minHeight not support this effect? Oct 18 23:04:35 no Oct 18 23:04:48 you can try it, but it probably doesn't work Oct 18 23:04:52 the documentation seems to indicate that it should Oct 18 23:05:01 * pfn shrugs Oct 18 23:05:20 maybe it's changed in the versions since I've implemented it Oct 18 23:05:21 ill give it a shot, i assumed it was a custom thing Oct 18 23:08:54 pfn: hi! How are you? Am I still in your ignore list? Oct 18 23:14:28 I guess I'm still on his ignore list :) Oct 18 23:21:42 pfn: is there a way to control the speed of the parallex aniamtion Oct 18 23:21:50 you mean the expansion? Oct 18 23:21:53 yes Oct 18 23:22:02 that's what you do by passing the velocity from the scroll Oct 18 23:22:07 Where is /proc/mtd moved to in 5.1.1 Oct 18 23:22:44 Ok. I have an Android chat application based on a ASP.NET server with SignalR Oct 18 23:22:54 i am a little mystified as to how we do that. We opted to use a scroll listener that detects when the recyclerview reaches the top Oct 18 23:22:55 I guess I can go to sleep now Oct 18 23:23:15 Good night people and thanks for the help you gave me Oct 18 23:23:39 xximjasonxx, you have an initial velocity from onNestedFling Oct 18 23:24:10 you detect the time elapsed from when the fling starts, and when the scrolled view hits the end, decay the velocity, and call the behavior's fling method with that velocity Oct 18 23:25:51 of course, it's extremely annoying that google makes everything package-private Oct 18 23:26:17 so just hack everything up into the android.support.design.widget package Oct 18 23:29:03 and I never had any luck calling into super.onNestedFling Oct 18 23:29:04 * pfn shrugs Oct 18 23:29:44 thanks Oct 18 23:29:45 egoista_mobile didn't recent version of android drop mtd ? Oct 18 23:30:47 oh i'm thinking MTP sorry Oct 18 23:30:53 no, it didn't Oct 18 23:31:00 neither mtd nor mtp Oct 18 23:33:36 pfn: we are struggling to find this fling method on the behavior Oct 18 23:33:43 xximjasonxx, it's package-private Oct 18 23:34:44 i see Oct 18 23:39:19 cool https://internals.rust-lang.org/t/introducing-rust-language-server-source-release/4209 Oct 18 23:39:40 soon VS Code will support rust better Oct 19 00:01:33 fml this project, they duplicated layouts across configuration directories instead of using different values across configurations Oct 19 01:07:22 Is anyone else having a WebView problem where `onProgressChanged` regularly doesn't go up to 100%? I'm getting it on lots of websites. Oct 19 01:07:32 I'm guessing it started with a recent WebView update. Oct 19 01:07:47 It'll get to something like 98% and stay there forever. Oct 19 01:08:39 TacticalJoke Chabuduo! Oct 19 01:08:45 Hmm, maybe I need to use onPageFinished too. Oct 19 01:09:16 g00s: "Almost"? :D Oct 19 01:09:41 "good enough" Oct 19 01:11:09 Im new to android and trying to figure out a best practice/how to do something. I have a program that is listening for broadcast intents, some will trigger some additional processing, others will simply update an activity. Should I collect the broadcast inside each activity as they are needed? And then also in another service? Or have a central class(BroadcastReciever) that collects all the broadcasts from outside then distributes requ Oct 19 01:11:09 ired information to the rest of the app? Oct 19 01:11:44 Ahh, I *am* getting onPageFinished even when I'm not getting 100%. I'll hide the progress indicator there. Oct 19 01:12:32 Oh wait. I'm getting onProgressChanged 0..99 then onPageFinished then another 99% onProgressChanged. What the heck. Oct 19 01:14:37 Guess I'll have to set a `pageFinished` flag (and unset this in onPageStarted or something). Oct 19 01:15:40 If I have a Broadcast reciever registered in an activity, I can use that to update the status information. But what if there was a status update right before the activity was opened ? That will be lost correct? Oct 19 01:17:38 Yep Oct 19 01:19:40 If I want to animate an EditText to move upward, and have a ProgressView in its place, how should I go about implementing the ProgressView? Oct 19 01:19:56 Where should its initial position be? Oct 19 01:20:47 So how can I get around that properly? Oct 19 01:21:10 Save a configuration value in a broadcast reciever that updates the activity? Oct 19 01:21:17 Baulde: yep register the receiver in your manifest Oct 19 01:22:08 I have that much, just trying to figure out the best/proper way to update what the activity shows. I have the broadcast receiver getting and processsing the information I want to display Oct 19 01:22:22 Baulde https://guides.codepath.com/android/Starting-Background-Services Oct 19 01:23:35 So I should have a background service running? And not just a BroadcastReciever set to process the broadcasts? Oct 19 01:24:01 I have a reciever that is getting the broadcasts in the background and showing me a toast Oct 19 01:24:11 AllTuna: https://guides.codepath.com/android/Animations Oct 19 01:24:51 Baulde: you don't necessarily need a service no Oct 19 01:25:28 But how do I update an activity that may or may not be open? Oct 19 01:25:41 If its open, then the status will display the latest information Oct 19 01:25:53 Launch the activity with an intent Oct 19 01:25:54 That the BroadcastReciever processed Oct 19 01:26:03 What if the activity is already open? Oct 19 01:26:04 yiati, I'm currently reading through this: https://developer.android.com/guide/topics/graphics/prop-animation.html, my issue isn't with animation though. Oct 19 01:26:17 Looks like they're gonna fix the WebView bug: https://bugs.chromium.org/p/chromium/issues/detail?id=650781 Oct 19 01:26:28 BroadcastReceiver shouldn't do work, that is when you do want a service as well Oct 19 01:26:43 yiati, this is my first project, and I'm just unsure as to where to place the ProgressView in the XML, as initially, it will be covering the EditText Oct 19 01:26:46 Also, what if you don't want the activity to open untill the user does so manually Oct 19 01:27:21 Then don't launch the activity 😀 Oct 19 01:27:37 But how does the activity get the stats information once the user opens it? Oct 19 01:27:46 they have fixed* Oct 19 01:28:15 Baulde: persist it somewhere in a service, and then pull it from there in the activity Oct 19 01:28:43 TacticalJoke: nice Oct 19 01:29:20 I hate when Google can't find something. I had to search their bug tracker. Google has failed me. Oct 19 01:29:43 I shouldn't even have to google. Google should already know what I'm about to search for. Oct 19 01:33:10 yiati, ok, Ill try building a service that will process the incomming broadcasts. Then pull that information to the activity as it needs it. Oct 19 01:34:24 Is that the best way to get information from the service to the activity, if that information could be changing often? What tools are there to have the activity update what it displays whenever that value changes Oct 19 01:45:24 Baulde: you are essentially describing the observer pattern which can be implemented a million ways Oct 19 01:45:30 :D Oct 19 01:46:14 Yea, problem is my vast unfamiliary with android. I get stuck in the details of understanding what can be done, how to do it, and what is the "correct" way to do it Oct 19 02:22:40 divorce the two thoughts... solve the problem any way that works then do it better if you need a pass "n" Oct 19 02:28:36 Hey is there any simple way to have a nav drawer become tabs for high dpi devices? If not, is there a way to create a drawer toggle with just a toolbar? Oct 19 02:35:15 Exerosis you could use bottom nav, and just use the same layout for all dpi devices. just put bs like settings in the left nav drawer, important stuff on the bottom Oct 19 02:37:02 g00s: Oh yea good plan :P thanks Oct 19 02:39:02 you'll want to get bottom nav library though, its not in the support libs Oct 19 02:39:19 there are a few on github. you want one with the behavior that removes the nav on scrolling Oct 19 02:40:16 Exerosis https://medium.com/startup-grind/bye-bye-burger-5bd963806015#.rmzsqbodf Oct 19 02:43:30 I kinda worry about how it would turn out on a tablet xD does it still work well? Oct 19 02:44:33 what is this think you call 'tablet' lol Oct 19 02:44:56 going through gapps, they didn't care enough to make tablet versions of stuff with different bottom nav ... Oct 19 02:45:07 so thats a clue Oct 19 02:45:38 Are we allowed to rate our own apps? Oct 19 02:45:38 i've never really been a big fan of bottom nav. still think its weird how it interacts with bottom sheets Oct 19 02:45:44 TacticalJoke no lol Oct 19 02:47:39 g00s: Do you know whether it's stated anywhere? Oct 19 02:47:53 g00s, yea IDK, it looks kinda pretty... but somewhat out of place. Oct 19 02:48:24 Maybe I should just say screw it all and use good old tabs :P Oct 19 02:51:37 TacticalJoke look at the fake reviews section of Play TOS Oct 19 02:52:12 its against policy to purchase your own app also Oct 19 02:53:27 also the same for iOS Oct 19 02:56:05 TacticalJoke https://www.reddit.com/r/programming/comments/58455y/facebook_is_writing_a_mercurial_server_in_rust/ Oct 19 02:57:00 "Facebook reported significant improvements to developer sentiment towards Mercurial at Facebook. Initially, a lot of developers were skeptical about Mercurial and preferred Git. Now, apparently a number of their developers have forgot how to use Git. " Oct 19 02:57:02 haha Oct 19 02:57:42 g00s: Awesome! Oct 19 02:58:23 I tried Git again recently. Windows support has improved, and a few CLI elements are better (e.g., `--staged`), but it's still way behind Mercurial. Oct 19 02:58:55 Not that Mercurial is perfect. Mercurial is way behind a hypothetical perfect VCS. Oct 19 02:59:39 To be fair, though, I didn't try Git work-trees. They sound cool. Oct 19 02:59:46 I totally forgot. **** ENDING LOGGING AT Wed Oct 19 02:59:58 2016