**** BEGIN LOGGING AT Sat Dec 20 02:59:59 2014 Dec 20 03:11:52 is there a way to punt all activity state across all fragments and activities when my app is destroyed by something like out of memory? Dec 20 03:12:32 when my app gets killed, the session cookie i was using is deleted too, which invalidates anything the user might have been doing Dec 20 03:13:13 so it leaves my app in a weird state trying to restore, because the user needs to login again anyway Dec 20 03:13:29 the app being killed is a pretty 'final' even in my case Dec 20 03:14:04 at some point in the future it may not be, but for now it is Dec 20 03:25:55 regreddit: What exactly are you wanting to persist? Dec 20 03:26:45 I think, ultimately, there are two choices: stuff is saved to disk or stuff is thrown away. Dec 20 03:27:22 that the thing, i cant really persist anything if the app is killed, i just want all state to 'go away' but it seems android wants to 'put it back the way it was' when restarting after being killed Dec 20 03:27:40 i need to do all this my self in onrestoreinstancestate? Dec 20 03:27:58 in each activity, and their child fragments? Dec 20 03:28:12 "but it seems android wants to 'put it back the way it was' when restarting after being killed" Dec 20 03:28:15 What does that mean? Dec 20 03:29:13 that mean that it recreates activities that normally fetch data http in onCreate, but without a valid session cookie, that all falls apart Dec 20 03:29:52 so onCreate after a valid login does the right thing, but onCreate after being killed and restored doesnt behave Dec 20 03:30:28 since the cookie manager properly destroys the session cookies on being killed Dec 20 03:31:14 i think i need to do some more checks in onCreate in my activities to check sanity of the app Dec 20 03:32:43 so my login activity starts my main activity and passes some data along in a Bundle Dec 20 03:32:53 hey TacticalJoke Dec 20 03:32:56 hey peeps Dec 20 03:32:59 Hey, Napalm. Dec 20 03:33:12 Man I have the weirdess sleeping pattern atm Dec 20 03:33:18 regreddit: Sorry, I've not encountered this problem before. Trying to think of a solution. Dec 20 03:33:31 i just need to think about it a bit Dec 20 03:33:39 TacticalJoke: I got an idea for a possible cool reddit view Dec 20 03:33:41 Same here, Napalm. Dec 20 03:33:52 regreddit: Groxx might know the answer. :D Dec 20 03:33:52 It just came to me the other night Dec 20 03:33:58 If you post details again. Dec 20 03:34:04 Napalm: Cool; I'd like to hear. Dec 20 03:34:09 the largest issue is ViewPager and Fragment manager recovery Dec 20 03:34:36 (Sorry, Groxx. I just thought it was worth a punt. lol) Dec 20 03:34:48 when my app is restartedmy 'home activity' and viewpagers and frgements are restored in the wrong order Dec 20 03:34:54 thats the biggest PITA Dec 20 03:35:18 since the fragment needs the activity context Dec 20 03:35:54 but sometimes the fragment that was open when the app was killed gets restored before the activity that launched the fragment starts Dec 20 03:36:02 TacticalJoke & regreddit: haha, np :) I don't have enough chat history to catch up though. wazzup? Dec 20 03:36:21 hopefully my train-bound cell connection won't flake out too hard Dec 20 03:37:34 regreddit: that shouldnt be a problem Dec 20 03:37:38 i'm trying to figure out a way to handle when my app is killed by the OS and fragments, an viewpager, and a parent activity are open Dec 20 03:37:40 hey Napalm Dec 20 03:37:42 I have a banner ad the the top of my ad. How can I make it collapse when there is no ad loaded? (e.g. when there is no network access) Dec 20 03:37:48 regreddit: sounds to me like you have some lifecycle issues Dec 20 03:37:54 hey g00sey Dec 20 03:37:56 when restoring, the fragments are recreated before the activity, which is backwards Dec 20 03:38:07 Napalm, you better believe it Dec 20 03:38:14 regreddit: thats not exactly correct Dec 20 03:38:40 regreddit: i assume then you also have configChanges attribute on your activity for rotation in your manifest? Dec 20 03:38:56 well, my fragments Napalm probably not, let me check Dec 20 03:39:02 regreddit: because it should exhibit the same symtoms Dec 20 03:39:23 rotation is the same as your activity being destroyed and recreated Dec 20 03:39:34 g00s: whats up Dec 20 03:40:11 i have this:android:launchMode="singleTop", could that be giving me grief? Dec 20 03:40:12 hey not much, tring to get a beta into some people's hands by xmas, so i'll have to set up google+ Dec 20 03:40:25 yes, rotation is a PITA for me in parts too Dec 20 03:40:31 regreddit: interesting. I'm not aware of anything that _prevents_ that, but: are you maybe trying to do something which needs a context before onAttach? Dec 20 03:41:04 Groxx, yes, my fragments all rech back to the parent activity to do things Dec 20 03:41:05 singleTop might cause some surprises, but I don't think it's related Dec 20 03:41:25 s/rech/reach/ Dec 20 03:42:43 regreddit: no, that is not causing your problem Dec 20 03:43:14 kinda hard to say without seeing what I assume is a bunch of code :\ out of curiosity, have you logged in e.g. onCreate in both activity and fragments, and seen if the activity is definitely happening later? Dec 20 03:43:26 regreddit: i think I know what your problem is.. your probably early binding in onAttach or onCreate Dec 20 03:43:38 also, could this be causing problems? I'm not sure how valid it is, and haven't checked if it's fixed, but: http://ideaventure.blogspot.com/2014/10/nested-retained-fragment-lost-state.html Dec 20 03:43:56 regreddit: you probably want to bind in onActivityCreated of your fragment Dec 20 03:44:07 ywes, ive added debugs to all possible lifecycle callbacks Dec 20 03:44:37 regreddit: explain your exact problem Dec 20 03:44:38 and they go flying by in the wrong order when rotating or restoring from a crash Dec 20 03:44:54 OK: Dec 20 03:44:59 wrong order? Dec 20 03:45:03 order shouldnt matter Dec 20 03:45:39 they will go in the order they are created as the id's are assigned incrementally.. i dont believe a hashmap is involved that might screw it up Dec 20 03:45:47 well, when a fragment that was launched from an activity is restored before the activity that it calls methods on, bad things happen Dec 20 03:45:55 yeah, specifics could help :) I haven't tried enough weird things with fragment, but Napalm might be right - try watching onActivityCreated. see also the lifecycle chart here: http://corner.squareup.com/2014/10/advocating-against-android-fragments.html (not promoting the article in general, but the lifecycle chart is useful) Dec 20 03:46:25 Groxx: omg.. dont start pushing that around. Dec 20 03:46:51 Napalm: yeah, just realized they probably had a link to the lifecycle diagram itself, and.. yup: https://github.com/xxv/android-lifecycle Dec 20 03:46:55 I'll switch to linking to that Dec 20 03:47:02 Groxx: I do agree with it pretty much 75-80%, but thats as high as I can go.. Dec 20 03:47:20 heh Dec 20 03:47:20 yeah. like I said, not agreeing, but I remember it had the chart and it's in my browser history :) Dec 20 03:47:21 so i have loginActivity -> homeActivity -> documentActivity which has a viewpager that moves fragments around a good bit Dec 20 03:47:22 Groxx: yea, xxv is so much better Dec 20 03:47:33 hi all :) im trying to come up with a way of "favoriting" entries in a grid view, whereby you tap a button, and it add/removes it from an arraylist, but im into the problem of checking to see if its there already. i was thinking this should be done with tags, but i dont really get it :/ any pointers? Dec 20 03:48:11 and if the app is killed an restarted, my fragments are restored, but part of their onCreate needs stuff from the activity Dec 20 03:48:15 regreddit don't call methods on the activity until after onActivityCreated () Dec 20 03:48:23 Groxx: I once thought the same thing and when it came down to it.. i thought my way into the current state of fragments.. so I'm in the mind that really its because Fragments are mis-understood and mis-used Dec 20 03:48:27 like 'what is my document id' Dec 20 03:48:45 g00s: in the fragments? Dec 20 03:49:00 regreddit yeah Dec 20 03:49:04 aaah Dec 20 03:49:12 let me go check that Dec 20 03:49:13 g00s: well during onActivityCreated Dec 20 03:49:24 right Dec 20 03:49:25 yeah Dec 20 03:49:27 Napalm: yeah, definitely. and it's not helped by them ultimately being _yet another_ confusing lifecycle layer on top of another confusing layer (activities). if there's a way to make a _simple_ lifecycle helper, I'd love to use it. Dec 20 03:49:48 i would actually liek to replace fragments and viewpager Dec 20 03:49:50 if such a thing is possible. maybe all the lifecycle events actually make sense. Dec 20 03:50:09 but at the time, the paradigm fit my document model exactly Dec 20 03:50:17 Groxx: but then you end up with callbacks or some other thing.. and you simply end up with what we got.. its really about the use of them that is wrong Dec 20 03:50:19 i don't understand what all the fragment bellyaching is about. i use onCreate, onCreateView, onStart, onStop for 90% of what I do Dec 20 03:50:32 a list of documents -> document (activity) sections of the document (fragments) Dec 20 03:50:38 and maybe onAttach() if you have a listener casted from the activity Dec 20 03:50:41 Groxx: the amount of issues I see because of lifecycle is tremendous Dec 20 03:51:17 but the backstack is a pita Dec 20 03:51:25 Napalm: yup. doesn't help that the android docs are sorta hand-wavey about how things actually behave :\ Dec 20 03:51:49 my app is pretty big, so that has led to me being a bad person Dec 20 03:52:24 and there is a lot of dependence on swapping views around and dependence on the parent activity that should not be there Dec 20 03:52:35 and a static class that holds the main data model Dec 20 03:52:39 (boooo) Dec 20 03:52:45 hehe Dec 20 03:53:43 Groxx: what I've learnt of the many years of working with Android is that.. its a miricle and a curse. the great point is you get the flexibility you get to do what you want.. but then you get the pains from that aswell. personally I think the flexibility is better. Would you really want a locked down system that means you cant do what you want? Dec 20 03:53:57 regreddit: just to attack other possible confusions: since you have singleTop, you're a) using onNewIntent properly? and b) aware that you may have multiple instances (depends on your setup, of course), and you're not relying on static values that may be changed by another instance? Dec 20 03:54:28 Napalm: nah, I love the flexibility. I just wish it had a simple layer too. Dec 20 03:54:42 Oh, gawd, I love JVM unit tests. So freaking fast. Dec 20 03:54:58 Test all the things in a matter of milliseconds. Dec 20 03:55:18 but it takes 7 sec to build :| Dec 20 03:56:12 Very quick to build too. :D Dec 20 03:56:54 i am not aware that multiple instances may exist Dec 20 03:57:05 i dont think they do Dec 20 03:57:48 regreddit: what Groxx was saying is that "they can" exist Dec 20 03:58:01 oh i see Dec 20 03:58:09 regreddit: singleTop just implies that you re-use the top instance (if it exists). e.g. if you have "B" as singleTop and your stack looks like [A, B, C], and you startActivity(B), you'll get [A, B, C, B] Dec 20 03:58:26 that may be impossible in your app but it's worth being aware of Dec 20 03:58:46 yeah my stack is sort of a tree Dec 20 03:59:39 a top activity that starts child activities Dec 20 04:00:10 think gmail app - the inbox is my main activity, then i have a list of docs Dec 20 04:00:23 regreddit: you also can pass the FLAG_ACTIVITY_CLEAR_TOP in your intent to (in Groxx's example) go from [A, B, C] launch B and go to [A, B] Dec 20 04:01:38 each doc is an activity Dec 20 04:01:47 but only one is ever open at a time Dec 20 04:02:23 to open another doc you have to go 'up' to the parent activity and pick another from the list which opens a doc in a new activity Dec 20 04:02:37 and two docs have no interaction with one another Dec 20 04:02:41 regreddit: even if you launch a doc from a widget or notification? :) Dec 20 04:02:58 yeah i dont do that (yet) Dec 20 04:03:14 anyways, back to your problem Dec 20 04:03:15 i'll have to figure that out when i get there Dec 20 04:04:12 in a few spots i was starting the parent activity from the child when i wanted to go back to the parent, now i just call finish in the child Dec 20 04:04:58 i was starting it with intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) Dec 20 04:05:29 but now in the child i just call finish() and thr child goes away and the parent activity is there Dec 20 04:08:07 but then i do things with ViewPager like pager.setSaveEnabled(true); which im not sure is proper Dec 20 04:08:34 regreddit: you dont need to do that Dec 20 04:08:53 a page in my case should NOT be restored when the app is killed Dec 20 04:09:03 fwiw I think 'finish' + start with a reasonable stack is the right way to do it. if you're on a new enough system you can use PendingIntent.getActivities and it's pretty foolproof afaik Dec 20 04:09:29 but in one place is the comment: Dec 20 04:09:32 / we talk to the Activity so it can handle the back stack Dec 20 04:09:43 and: final IncidentActivity act = (IncidentActivity) getActivity(); Dec 20 04:09:54 which may be part of the issue Dec 20 04:10:29 since the activity may not be ready yet when the fragment is restored Dec 20 04:10:31 could be, but I would think that would show up in your stacktraces Dec 20 04:12:29 yeah, unfortunately when it crashes, it always points to the call to FragmentManager.commit() Dec 20 04:13:18 regreddit: sounds like your trying to commit during the wrong part of the lifecycle Dec 20 04:15:31 those crashes do suck :( lifecycle problems are definitely a possibility. have a stacktrace? might be interesting. Dec 20 04:15:33 well, yeah Dec 20 04:15:47 ill make one Dec 20 04:15:58 let me try a few tips yall gave me Dec 20 04:17:14 where i do the Fragment.commit(), when being restarted from being killed, the fragments that is is committing have already been recreated by Android Dec 20 04:17:26 so thats a lifecycle issue certainly Dec 20 04:18:36 TacticalJoke what is this reddit note thing, virtual currency ? Dec 20 04:18:55 I'm not sure. I saw the post but haven't looked into it yet. Dec 20 04:19:01 regreddit: I'm reading that as: you're creating a new fragment and attaching it when restoring, but the fragment already exists in the layout? Dec 20 04:19:39 regreddit: You are checking whether savedInstanceState is null before adding the fragment, right? Dec 20 04:19:56 no, not there im not Dec 20 04:20:09 i check if the intent has extras Dec 20 04:20:22 If savedInstanceState is not null, the fragment manager (and the fragment) already exists, I think. Dec 20 04:20:30 but it has extras whether being started fresh or restarted, doesnt it Dec 20 04:20:38 good point Dec 20 04:20:52 What I say probably also applies to process restarts (though I haven't checked it). Dec 20 04:21:10 it does, yeah Dec 20 04:21:59 process restart will restore your arguments and saved instance state, and view hierarchy (assuming all parent objects are restoring properly) Dec 20 04:24:36 for one, i needed to move some thing s in the fragments from onCraete to onActivityCraeted Dec 20 04:24:40 for sure Dec 20 04:25:46 fwiw you're going past my knowledge of fragments. I haven't built anything that has problems like this, though I probably will eventually :) I'll definitely be curious if you find anything enlightening along the way Dec 20 04:26:20 well, fragments add a pile of lifecycle complexity Dec 20 04:26:35 and THEN we have fragments WITH ViewPagers Dec 20 04:26:37 yup. and a pile of fragmentmanager complexity Dec 20 04:27:11 i wish the developer that did this had asked for more input when building the backbone of the app Dec 20 04:27:37 im sure sure i would have recommended anything different, but maybe Dec 20 04:27:54 it does fit my app's document model though Dec 20 04:28:35 a list of docs -> doc -> sections -> section -> pages -> page Dec 20 04:28:47 and a doc has from 9-13 sections Dec 20 04:28:58 i think it got rushed because apple came out with the iPad, once again android was behind, oems were putting gingerbread on tablets (LOL) and google had to rush some crap out the door so OEMs could do better than GB, which was not match for the 1st rev iPad Dec 20 04:29:00 a section usually one has one page, but CAN have more Dec 20 04:30:04 yeah, they screwed themselves when they tried to make a layout manager that would adapt from phones to tablets in a single layout Dec 20 04:30:15 which almost nobody ended up using Dec 20 04:30:51 'take my app on the phone, put it ont the tablet, the rotate the tablet and get a different layout' Dec 20 04:30:54 ooook Dec 20 04:32:05 in practice that would work well for me, as my document sections 'could' be a list in a fragment on the left side of the tablet, and the section could be a fragment on the right Dec 20 04:32:22 but i bet i would not get that working across a phone and tablet in a million years Dec 20 04:35:47 my #1 issue is that my app's entire UI from the document down is delivered to the app at startup and created dynamically Dec 20 04:36:05 that has been a very complex thing to do - but very powerful Dec 20 04:37:01 that allows my app to serve a different native ui to the user based on who he is Dec 20 04:37:18 i hope they like it Dec 20 04:37:21 vs using something like a webview and html Dec 20 04:37:42 well, it was mostly for us Dec 20 04:37:49 the users dont really know Dec 20 04:38:07 but i have state specific regulatory requirements Dec 20 04:38:20 and wanted to serve them all from a single app Dec 20 04:38:39 so far it has worked well, at a cost of some initial complexity Dec 20 04:38:57 s/some/a shitload/ Dec 20 04:40:00 and im now chasing down the outlier bugs like this one Dec 20 04:40:29 it only happens 20 times a week or so, an no one loses data, but it's a huge PITA Dec 20 04:40:36 and makes me look bad Dec 20 04:40:56 So what was the conclusion? I missed most of the discussion. Dec 20 04:41:36 it has been determined that i am the single best developer that anyone here has ever seen Dec 20 04:41:48 as long as JakeWharton isn't here Dec 20 04:42:03 lol Dec 20 04:42:06 This is weird... Dec 20 04:42:11 and about 300 others Dec 20 04:42:18 If I name my @Before method 'before', the Eclipse JUnit runner crashes. Dec 20 04:42:28 And doesn't recover until I restart Eclipse. Dec 20 04:42:30 regreddit: you are the best Dec 20 04:42:51 Oh, I can just close the JUnit tab. Dec 20 04:42:53 But that's weird. Dec 20 04:43:10 Why can't I name it 'before'? This some kind of dictatorship? Dec 20 04:43:13 ¯\_(ツ)_/¯ Dec 20 04:43:30 Okay, I can. I just have to close the JUnit tab after naming it that. Dec 20 04:43:38 That's a bad name, anyway. Just rebelling against the thing. Dec 20 04:44:04 the 46 StrackOverflow tabs I have open tell me otherwise Dec 20 04:44:49 Actually, the issue seems to be simply renaming the @Before method. Dec 20 04:45:17 If I rename it, I have to close the JUnit tab, change the file, save, and re-open the JUnit tab. Dec 20 04:46:43 Actually, my issue seems all lifecycle related Dec 20 04:47:02 between the Acticity and its fragments, and ViewPager Dec 20 04:47:07 Activity Dec 20 04:53:15 unrelated to lifecycle woes: w00t http://cl.ly/image/1Y3V3Q2K1947 <- got runtime code loading & execution from a random file I pushed to the device. Dec 20 04:54:07 next up: steal from ViewServer, start building helpers for runtime view modification. Dec 20 04:54:08 Groxx, what does that indicate? Dec 20 04:54:57 the toast is coming from a dex file I adb-pushed. so I might get a horrible runtime-inspector/tweaker working over the holidays. Dec 20 04:56:47 * Groxx wants to be able to change view properties without rebuilding the app Dec 20 04:58:53 i think i found my crash Dec 20 04:59:34 and it sucks Dec 20 05:00:50 its a loop: app paused, saves to server, works fine. then app gets killed: cookies deleted. app restarts and restores fragment, and tries to load doc from server Dec 20 05:01:35 sine no session, get a 401, when i use to exit activity and go back to login. part of closing activity is to close fragments, which tries to save to server Dec 20 05:02:01 and it crashes since the document is null Dec 20 05:02:43 i thinki can handle this, just need a few more runtime sanity checks and cleanup Dec 20 05:02:48 sounds like fun :\ Dec 20 05:02:55 yeah Dec 20 05:03:02 i think im done for now :/ Dec 20 05:05:42 \o I must afk for the night. cya all Dec 20 05:08:27 hey guys what would stop a video from playing in portrait mode Dec 20 05:19:36 nicre http://www.bignerdranch.com/blog/recyclerview-part-2-choice-modes/ Dec 20 05:25:23 Collapsing comments requires more thought than I'd expected. Dec 20 05:26:00 Seems the easiest way is to keep hold of two lists and add/remove sub-lists between them. Dec 20 05:27:38 TacticalJoke: nope Dec 20 05:27:49 TacticalJoke: you have a display model used by your view Dec 20 05:27:56 that can contain its state Dec 20 05:28:27 that can then reference the actual comment data Dec 20 05:29:43 What I'm doing is giving the adapter a "visible comments" list only. Behind the scenes, there are two lists: all comments and visible comments. Dec 20 05:30:16 Some object behind the scenes takes care of collapsing/expanding. Dec 20 05:31:51 And that object produces the "visible comments" list. Dec 20 05:32:02 I've made it really generic and I'm currently JVM-unit-testing it. Dec 20 05:32:34 sounds cool Dec 20 05:33:34 im off, bai Dec 20 05:39:49 Tactical, you async load the expanded list set as an indepedent view hierarchy, then add it to the child Dec 20 05:40:15 you just have to keep track in the datastrcuture of your element set if it has been added, so that when getview rolls again you know to add it Dec 20 05:40:31 not sure if that is easier than manipulating two lists Dec 20 06:24:01 Wow. Comments actually collapse. Dec 20 06:24:13 And expand. Dec 20 06:24:18 lasserix: I just kept it really simple. Dec 20 06:24:28 My adapter is clueless about everything, basically. Dec 20 06:25:29 Its data source supports collapse/expand functionality. It know abouts PresentableComment.isCollapsed. That's about it. Dec 20 06:26:21 (And then it returns a normal comment view or a collapsed one.) Dec 20 06:29:20 TacticalJoke when are you planning on releasing your first beta ? Dec 20 06:29:32 or alpha, or whatnot :) Dec 20 06:31:04 I dunno. Hopefully within a few months. Dec 20 06:31:10 It'd be cool if it were like two months. Dec 20 06:31:18 :O Dec 20 06:31:22 Though I'll let you guys try it whenever, pretty much. Dec 20 06:31:27 lasserix has already tried it. lol Dec 20 06:31:48 It sucks right now, though. Dec 20 06:33:51 Do you ever feel like "I can't believe this works"? That's how I feel sometimes. lol Dec 20 06:33:56 All the unit tests pass; everything. Dec 20 06:37:31 TacticalJoke i'm surprised you would say that. you seem like me, thinking things through so thoroughly that of course, it works first time :) Dec 20 06:39:07 I guess the only times I'm surprised are when the problem domain is quite complex, and I expect it to be buggy the first time. Dec 20 06:39:17 And when it's not it's like "Okay, why isn't this way harder?". Dec 20 06:39:39 well, i guess i am surprised when android works as advertised, so there's that :D Dec 20 06:40:30 the only times i've used a debugger is to figure out if an android api is returning what it should be Dec 20 06:40:35 It shocks me when I find some cool Android component that simply works. Dec 20 06:40:59 Yeah, I never debug nowadays. Dec 20 06:41:19 As in "use a debugger". Dec 20 06:41:22 i dont even know how to run the debugger in AS :| Dec 20 06:41:31 Do you use many automated tests? Dec 20 06:42:03 i do for my parsers, but not for UI. Dec 20 06:42:12 also the BT stuff - can't easily be tested Dec 20 06:42:22 Yeah, I'm like that. Dec 20 06:42:30 Parsing is the perfect target for automated testing. Dec 20 06:45:42 The idea of automated UI tests scares me. Dec 20 06:45:54 Because the UI should be free to change. Automates tests lock us into a particular behaviour. Dec 20 06:45:54 the idea of manual UI testing scares me. Dec 20 06:46:08 wat Dec 20 06:46:33 that logic is terrible Dec 20 06:46:44 all code should be free to change Dec 20 06:46:49 any recommended UI testing frameworks you'd suggest? I haven't, but would like to start some time :| Dec 20 06:46:50 tests are for behavior, not implementation Dec 20 06:47:00 if the behavior changes the test *should* change Dec 20 06:47:08 test are code, they are inertia Dec 20 06:47:09 just as a unit test would change if the behavior changed Dec 20 06:47:21 Groxx: Espresso 2.0 Dec 20 06:48:20 it's part of the support repository? Dec 20 06:48:44 yes, kind of Dec 20 06:49:15 Right. But, in my experience, UI behaviour tends to change so much that it's easy to waste loads of time and effort writing and maintaining automated tests for it. Dec 20 06:49:26 then you are writing your tests incorrectly Dec 20 06:49:34 this same thing can happen with unit tests Dec 20 06:50:05 It can happen anywhere, sure. That's why I try to limit my automated tests to stuff that's unlikely to wildly change. Dec 20 06:50:13 I've still gotta get a good feel for writing tests. I figure it's largely "learn by doing"? Dec 20 06:50:18 that's dumb Dec 20 06:50:28 test the things that move Dec 20 06:50:30 otherwise why bother? Dec 20 06:51:04 Groxx: no, there are very clear lessons and best practices for all kinds of testing Dec 20 06:51:06 The point is that we can waste loads of time writing hundreds of tests that just get removed in a month. Dec 20 06:51:18 right. you can. because you'd be writing the tests wrong. Dec 20 06:51:31 if you are writing tests for things that don't move you are wasting even more time Dec 20 06:52:06 JakeWharton: I think I've only read ~1 good source, not enough for it to really sink in and benefit from enough :\ any suggestions there? Dec 20 06:52:27 my UI tests are liberating because it means I can refactor as light or heavy as I want knowing that something is validating the UI behavior remains what's expected Dec 20 06:52:36 I guess the ideal tests are those that target code whose interfaces rarely changes but whose implementation changes a lot. Dec 20 06:53:00 right. so abstract high-level interfaces on your UI Dec 20 06:54:01 login("user", "pass"); showReddit("androiddev"); openPost(0); pressBack(); assertThat(currentScreen()).isInstanceOf(SingleRedditView.class)); Dec 20 06:56:02 True. That looks like a nice, stable test. Dec 20 06:56:45 (And of course, by 'stable', I'm talking about the API being tested.) Dec 20 06:57:01 yeah. you don't want to do things like use Espresso directly in each test method Dec 20 06:57:08 that's where you end up in the hell you described earlier Dec 20 06:57:12 and that is truly hell Dec 20 06:58:00 Yeah. Guess I was thinking of stuff like that and extrapolating it to UI testing in general (since I've shied away UI testing a lot). Dec 20 06:58:29 but with espresso, your high-level abstractions like 'login' just become three lines of code onView(withText(R.string.username)).perform(typeText(user)); onView(withText(R.string.password)).perform(typeText(password)); onView(withText(R.string.submit)).perform(click()); Dec 20 06:58:45 That's nice. I should give Espresso a try. Dec 20 06:59:22 now you can change languages, orientations, the layout of the controls on the screen, etc. without changing the test or test abstraction Dec 20 06:59:41 you can even change the text which makes up R.string.username from "username" to "login" and because it uses an R value it will just work Dec 20 07:00:10 only when you, say, add a field or remove the submit button and use the keyboard "done" key do you change ONLY the login() method Dec 20 07:00:22 When using JNI, what are the are the overheads? I would like to use Java for the ui, and c++ for rendering one rectangle, it won't need much input. Will it be memory overhead and overhead for communicating across the divide? Dec 20 07:00:23 the tests which test behavior never change Dec 20 07:00:33 Right. Dec 20 07:01:28 start small. get one test working with nice abstractions. it'll take you an hour or three but you'll be better off for it. then you NEVER have to manually test that section again (login, for example) Dec 20 07:01:38 it might take you a whole day Dec 20 07:02:01 the upfront cost is high, but the long-term benefit pays off exponentially by eliminating hours and HOURS of manual testing. Dec 20 07:02:14 espresso topic! Dec 20 07:02:15 nice Dec 20 07:02:28 Yeah. Dec 20 07:02:35 Sounds powerful. Dec 20 07:02:42 will try Dec 20 07:02:50 when I complete my job task ;) Dec 20 07:02:54 anyway Dec 20 07:03:03 I've seen android watches yesterday Dec 20 07:03:12 and still dont get it, why would I want one Dec 20 07:03:16 it's pretty useless Dec 20 07:03:17 Is it slow testing with Espresso, though? (I'm guessing it can't run on the JVM.) Dec 20 07:03:23 so you don't have to pull your your 6" phone Dec 20 07:03:35 TacticalJoke: it's surprisingly fast Dec 20 07:03:43 Okay. Dec 20 07:03:49 you won't be running them all the time which helps Dec 20 07:03:51 they are still largely a solution in search of a problem... not a *bad* solution, as such, just nobody's quite sure what for Dec 20 07:03:55 whereas I'm running unit tests 100s of times a day Dec 20 07:03:59 Yeah. Dec 20 07:06:39 Is there a way to catch all the intent that were called? Dec 20 07:14:19 ive been trying to get a "favorites" thing working where you tap a button in a gridview and it adds the content of the view into an arraylist of favorites, but im having trouble getting it to track which items are there already so it wont add duplicates Dec 20 07:14:29 whats the best way to do this? tagging? Dec 20 07:15:38 you could use a sparsearray or set Dec 20 07:16:46 android 5.0.2 ?! Dec 20 07:18:01 would it matter that im passing that arraylist back to another gridview? Dec 20 07:24:38 b.android.com is having a fun day Dec 20 07:25:33 um Dec 20 07:25:42 trolls? Dec 20 07:25:44 JakeWharton they make more sense than most of the crap on there :) Dec 20 07:26:23 "Astrologer Specialist All Love Marriages " Dec 20 07:26:29 lol, this should be starred Dec 20 07:32:01 loooool Dec 20 07:39:41 anyone know a good framework to learn how to make android video games? Dec 20 07:51:16 How would one manage sessions/state to keep a user essentially 'logged in' ? Dec 20 07:53:13 arcanine69 you could do it like iosched; have a base activity that all your other activities extend, which check to make sure you are logged in Dec 20 07:53:20 in their case, google+ Dec 20 08:03:44 hey g00s sorry im back. Dec 20 08:04:09 i don't want to use google+ or google to manage my logins Dec 20 08:05:31 thats ok, i was just using that as an example Dec 20 08:05:39 right. Dec 20 08:05:48 so essentially.. what im trying to do here is.. Dec 20 08:06:31 i have a server setup that has a web server for website and db's that hold user data such as logins and etc Dec 20 08:06:47 so..i can manage logins via websites no problem with sessions Dec 20 08:06:57 but idk how sessions work on andriod.. Dec 20 08:07:04 like how do you keep a person logged in? Dec 20 08:07:13 keeping security in mind Dec 20 08:09:01 g00s, u there pal Dec 20 08:09:02 ?? Dec 20 08:09:46 arcanine69 yeah, not sure. i thought you were asking how to keep that session state in all your activities Dec 20 08:10:14 well... have you ever made an app before Dec 20 08:10:17 that logs people in? Dec 20 08:10:28 and pulls their data off server? than displays it nicely onto the app. Dec 20 08:10:37 yeah, but not http. using mqtt Dec 20 08:11:25 you see, what is that? Dec 20 08:11:49 mqtt is pub/sub protocol Dec 20 08:12:02 mosquitto was the broker Dec 20 08:12:28 thats about as close as i got to your same problem, so i'm probably not the right person to give advice Dec 20 08:12:54 i appreciate ur thoughtfulness on not giving unsure advice. Dec 20 08:13:32 before i do research on this mqtt thing Dec 20 08:13:42 here was my approach of doing it over http Dec 20 08:14:14 i would use android to send a post request to my remote server and the remote server would parse that post request and create a token for the android device Dec 20 08:14:21 it would than store that token on the android device Dec 20 08:14:48 and for any future calls the android device would use that token to make authorized requests on that acc such as pull specific user data and etc. Dec 20 08:15:12 is my argument sound? or are there holes in it? Dec 20 08:15:59 arcanine69 sorry, not sure. if you are new to this i did see 2 chapters in http://www.amazon.com/Bulletproof-Android-Practical-Building-Developers/dp/0133993329 that might help, with ssl and preventing mitm attacks Dec 20 08:18:09 okay Dec 20 08:18:22 well let me do some r&d on mqtt first. brb thanks. Dec 20 08:19:09 ahh g00s Dec 20 08:19:17 you there? mqtt is for push notifications. Dec 20 08:19:24 arcanine69 i don't think you need to look at mqtt. yeah Dec 20 08:19:32 hehe. Dec 20 08:20:04 hi, anyone around here? Dec 20 08:20:09 hey docd Dec 20 08:20:10 whatsup Dec 20 08:20:28 hi arcanine69 Dec 20 08:20:38 playing with android Dec 20 08:20:52 yeah man, it's mega fun. Dec 20 08:21:01 you think you could help me with a really dumb question? Dec 20 08:21:08 sure pal, ill give it a shot Dec 20 08:21:29 I'm trying to send an SMS with hangouts to a number from my service provider Dec 20 08:21:34 *150# Dec 20 08:21:50 but when I type it in, it doesn't show me the menu tu send an SMS Dec 20 08:22:19 is this ok? Dec 20 08:22:50 your using the google hangouts app? Dec 20 08:22:54 yep Dec 20 08:23:32 umm. let me get my phone rq. Dec 20 08:24:30 it doesn't let me send sms Dec 20 08:24:50 it lets me send messages to people i have on my gmail Dec 20 08:25:11 wait, i see it. Dec 20 08:25:14 its disabled on my phon Dec 20 08:26:02 it takes control Dec 20 08:26:05 of my normal sms Dec 20 08:26:07 thats about it Dec 20 08:26:24 wait, nevermind Dec 20 08:26:35 it seems I have to call to that number Dec 20 08:26:37 not send an SMS Dec 20 08:26:45 the tech support guy was wrong Dec 20 08:26:48 lol Dec 20 08:26:54 do u know how to log ppl in Dec 20 08:26:56 through android Dec 20 08:27:04 mmm no Dec 20 08:27:13 u nvr made an app Dec 20 08:27:17 thats logs ppl in? Dec 20 08:27:30 * capella doesn't understand Dec 20 08:27:31 why Dec 20 08:27:34 so many people Dec 20 08:27:36 type Dec 20 08:27:39 such short Dec 20 08:27:42 messages Dec 20 08:27:51 because we are used to instant messaging not email Dec 20 08:27:59 lol Dec 20 08:28:13 too much online gaming imo Dec 20 08:28:25 Yah, most technically apt individuals can maintain a decent train of thought Dec 20 08:29:09 maybe with everone's short attention span, writing anything longer than 140 characters is just not worth reading Dec 20 08:29:37 yup Dec 20 08:29:38 tl;dr Dec 20 08:29:45 you mean, with short attention spans, people can't comprehend compex thoughts Dec 20 08:29:56 *complex Dec 20 08:30:04 i message like this Dec 20 08:30:05 because Dec 20 08:30:09 it makes me feel Dec 20 08:30:10 sure Dec 20 08:30:12 that the other person is there Dec 20 08:30:20 instead of responding on 5m intervals Dec 20 08:30:22 i get 10s intervals Dec 20 08:30:26 I don't know if they can't comprehend them, they won't even try reading them to try to comprehend them Dec 20 08:30:31 makes it feel more immersive to me Dec 20 08:30:32 tbh Dec 20 08:30:44 yeah, that's a good point Dec 20 08:31:19 idiocracy has come and past us Dec 20 08:31:26 ++ Dec 20 08:31:53 I guess twitter users can't be Java devs :) Dec 20 08:32:02 * capella too Dec 20 08:32:03 much Dec 20 08:32:08 verbosity Dec 20 08:32:31 lol, jeez, i didn't know it bothers you that much Dec 20 08:32:32 I write simple activities, that are like 20k lines of code Dec 20 08:32:51 capella holy shit ! Dec 20 08:32:53 hahha Dec 20 08:33:07 g00s: well, they're one work per line ;) Dec 20 08:33:12 *word Dec 20 08:33:24 we'z be on the programzing tip with da F-- talkuage Dec 20 08:33:34 capella: can you tell me how i can log people in an android app and pull their data off a remote server Dec 20 08:33:57 Off the top of my head? I'm afraid not :/ Dec 20 08:34:06 god dammit Dec 20 08:34:12 no soap/restful? Dec 20 08:34:20 u ever made an android app that logs people in? Dec 20 08:34:48 oh, he forgot to mention soap ... heh Dec 20 08:34:53 No, I spent a lot of time on small personal apps more exploratory in nature, larger projects mostly involve mozilla specific codebase Dec 20 08:35:23 g00s: why do u say soap Dec 20 08:35:38 firefox has got too bloated Dec 20 08:35:39 but im sure there are others here that can talk to that for you arcanine69 Dec 20 08:35:42 capella: why mozilla specific? Dec 20 08:36:03 and they just broke things badly and never fixed them Dec 20 08:36:18 mmm? I'm a long time contributor ... I like the projects and am familiar with the env and the other devs Dec 20 08:36:25 i was just on the other android channel Dec 20 08:36:35 shmooz: blargh Dec 20 08:36:40 capella wth is going on with tab groups, are they nixing those or not, because they are fucked up Dec 20 08:36:43 and some fucking kid was saying to log people in through ftp Dec 20 08:36:55 capella: yeah I remember complaining to you about how they changed the way the downloads now delete your half file if it fails half way Dec 20 08:37:09 Ah, right! Dec 20 08:37:13 and there's still no resume on downloads Dec 20 08:37:39 shmooz needs a doanload manager Dec 20 08:37:39 Mobile FF is currently changing / enhancing our download process ... I can't help with the desktop side too much Dec 20 08:37:55 g00s: I have them, I use FDM and wget mainly Dec 20 08:38:23 but recently Firefox made it worse by deleting half files that I could resume using wget Dec 20 08:38:56 why are you using firefox to download things on android Dec 20 08:39:25 I'm not, I'm on windoze Dec 20 08:40:08 how is firefox going to help mobile Dec 20 08:40:15 Doh! s Dec 20 08:40:44 capella: what is that Dec 20 08:41:00 * capella was para-phrasing shmooz Dec 20 08:41:19 oh Dec 20 08:41:27 well shit Dec 20 08:41:42 g00s Dec 20 08:41:47 g00s: what about soap Dec 20 08:41:53 dont use it :D Dec 20 08:41:56 why Dec 20 08:42:08 its gonna be harder from android :) Dec 20 08:42:09 because its easy to hijax? Dec 20 08:42:13 idc how hard it is Dec 20 08:42:13 fuck Dec 20 08:42:18 i just need it to work Dec 20 08:42:25 use rest O.o Dec 20 08:42:32 * capella . o O ( too ... many ... newlines ... brain ... full ) Dec 20 08:42:33 well why didnt u say that in beginning Dec 20 08:42:46 alright just fro capella im gona making longer lien Dec 20 08:42:59 heh :) Dec 20 08:43:00 g00s why didnt you just tell me to use rest in the beginning. instead of saying mqtt. you noob. Dec 20 08:43:02 longer liens are good Dec 20 08:43:10 noob Dec 20 08:43:26 arcanine69 i was just saying, my experience was with mqtt and NOT http lol Dec 20 08:43:39 better a noob than a boob Dec 20 08:45:57 okay, now, check out my setup! load balancers with nginx for static served files -> images and what not... redis for caching stuff into memory... nodejs for heavy i/o conccurent stuff.. probably handling e-mail queues....than make a rest based api using IMEI/android id's mixed with user login/pass to generate unique ID tokens for a user. Dec 20 08:47:18 also, using long polling both on web and android side to create this whole *push* kind of thing to android device...im going to use sliding tabs and horizontal page viewer all hacked and ready to go. 1 activity with fragments. fragment -> fragment interaction is much easier and modular. Dec 20 08:47:32 * capella write that app ! Dec 20 08:47:50 i was hoping to get some more feedback...yanno.. Dec 20 08:48:57 nodejs is for hipsters Dec 20 08:49:01 Reality checking your entire approach? I usually get something working agile style, they iterate through revisions Dec 20 08:49:03 * g00s provides feedback Dec 20 08:49:23 arcanine69: looks like you've been following all the tech bandwagons Dec 20 08:50:04 capella: i am using piece by piece. im going to expand on this platform. starting with e-mail .. than doing messaging .. than doing news.. than doing file storage. so its kind agile. but i broke it down onto getting my email service ready first. Dec 20 08:50:55 shmooz: no, i use node because its decent, well documented, and good community support. great for concurrency. only disadvantage is that it runs on one thread but im going to use a hack on the core using a library called jxcore to allow me to run it on multiple threads via isolation Dec 20 08:51:23 g00s: what do u suppose i use Dec 20 08:51:34 arcanine69: what are you building ? Dec 20 08:52:02 arcanine69 you can try netty Dec 20 08:53:02 shmooz: a new email service where people can -------- check email, store files, social network, SEARCH -> im going to data mine like mad hell for this, and read personalized news Dec 20 08:53:09 gonna make the ui simple with Dec 20 08:53:30 just a horizontal page viewer and sliding tab strip (kinda like facebooks) Dec 20 08:53:52 maybe vert.x Dec 20 08:57:32 thanks g00s Dec 20 08:57:35 seems interesting Dec 20 08:57:53 the reason i hopped on irc today was to look for alt solutions than tow rite it myself from scratch Dec 20 08:57:58 arcanine69 and you can use rxjava with vert.x, so check that out too Dec 20 08:58:06 someone lock him up Dec 20 08:59:26 shmooz who me :) Dec 20 08:59:40 no Dec 20 08:59:55 heh Dec 20 09:00:19 arcanine69 http://architects.dzone.com/articles/inside-vertx-comparison-nodejs Dec 20 09:00:36 well ok you can join him too Dec 20 09:01:16 ha Dec 20 09:04:31 I think "rite it myself from scratch" elicited the "lock him up" comment :p Dec 20 09:23:37 i think im just going write it myself Dec 20 09:27:11 hi anyone tried qt mobility? Dec 20 09:27:20 Hi, since widgets are too limited for my use-case id like to ask what would be the most flexible layouting option. is there a way to have a big canvas and dynamically draw on it setting clickable zones etc Dec 20 09:27:40 main issue i have is that RemoteView has only very few methods available Dec 20 09:28:27 hmm Dec 20 09:28:47 what are you trying to make? Dec 20 09:29:04 "big canvas dynamically draw on it setting clickable zones" Dec 20 09:30:01 if you can re phrase that Dec 20 09:30:07 well like an image where i can set something like the coordinate of a clickable zone Dec 20 09:30:42 i mean, i would use buttons, but you cant even set the background color in a reasonable way Dec 20 09:31:26 why don't you just use a button and add a drawable backgound image to it Dec 20 09:31:39 or do you want a specific clickable zone on that image and dont want it to act like a button Dec 20 09:32:13 yea also there is a 2nd issue, with buttons i have to declare them in XML as they cant be added in runtime Dec 20 09:32:22 sure they can Dec 20 09:32:29 not for widgets Dec 20 09:32:32 yes Dec 20 09:32:37 so, how? Dec 20 09:32:38 the XML is just a shorthand for runtime Java code Dec 20 09:32:48 ultimately everything is set in code Dec 20 09:32:51 did you ever develop a widget? Dec 20 09:32:56 of course Dec 20 09:33:02 you can use java code Dec 20 09:33:06 just do something like Dec 20 09:33:07 so, how do i call addChildren to a View Dec 20 09:33:12 Here is a link on how to add one in code. Dec 20 09:33:13 http://stackoverflow.com/questions/1851633/how-to-add-button-dynamically-in-android Dec 20 09:33:16 View cannot have children Dec 20 09:33:22 you need a ViewGroup Dec 20 09:33:29 i think he means the other kind of widget Dec 20 09:33:41 ImageView myimg = null Dec 20 09:33:53 please please.. its not possible im not a total newb, an android home widget can not be programmed like regular activity stuff, it has to be done with goddamned RemoteView Dec 20 09:33:58 than do... myimg.setResourceId(R.id.drawable); Dec 20 09:34:14 than add myimg to ur view Dec 20 09:34:47 the best solution would be to have something like a linearlayout defined in xml and then add buttons dynamically to it Dec 20 09:34:59 ah, remote view. that's completely out-of-process Dec 20 09:35:12 the whole point is that your app doesn't have to be run in order for it to work Dec 20 09:35:36 oh, home widgets, out of my scope. Dec 20 09:36:04 yea, its really the most cumbersome api i have ever seen Dec 20 09:36:26 my impression of it last i looked was they gave up somewhere before it was done Dec 20 09:36:54 considering you've given nothing to back that up that statement is completely useless Dec 20 09:37:02 i mean, who comes up with something like this: views.setInt(id, "setBackgroundColor", color); Dec 20 09:37:16 i hate android framework Dec 20 09:37:18 too many abstractions Dec 20 09:37:21 i hate iOS too Dec 20 09:37:24 too many abstractions Dec 20 09:37:27 it is kinda like having to call methods via reflection Dec 20 09:37:32 of course it is Dec 20 09:37:39 it's in a completely different process Dec 20 09:38:21 it has to marshall and unmarshall that as a command to be applied somewhere else Dec 20 09:38:49 ktwo: if you are not a noob, can you tell me how you would log people in for android. than pull their data from remote database ?? Dec 20 09:39:19 log people in? Dec 20 09:39:48 he means authenticate Dec 20 09:39:51 yeah Dec 20 09:39:54 or she Dec 20 09:40:04 and create a session to get coressponding user data Dec 20 09:40:15 do u guys know how to do that? Dec 20 09:40:19 well, many ways to do it, depends on use-case Dec 20 09:40:27 worst question ever Dec 20 09:40:31 well my app is like facebook/gmail Dec 20 09:40:50 and i want to pull emails/user data from a remote mongodb/msyql Dec 20 09:40:58 POST credentials Dec 20 09:41:04 read header or body for session token Dec 20 09:41:04 yeah. Dec 20 09:41:05 read body for user info Dec 20 09:41:18 how do you prev from sess hijacking than Dec 20 09:41:21 how to do it securely. Dec 20 09:41:34 use TLS so no one can MITM Dec 20 09:42:09 this has nothing to do with Android Dec 20 09:42:32 really? because i want to log ppl in through android app Dec 20 09:42:43 JakeWharton: TLS + custom certificate prevent MITM? Dec 20 09:42:44 maybe you can also use google app engine, so user can just use google email address seamlessly Dec 20 09:43:14 xgearx: i don't know what you mean by custom cert, but you should pin the cert on the client as well Dec 20 09:43:27 arcanine69: authentication is not an Android problem Dec 20 09:43:34 that fact that you want to do it on Android is surprising to no one Dec 20 09:44:03 i dont want to use google app engine at all Dec 20 09:44:16 i'm not going to join #asphalt and ask them how to play dodge ball, just because I want to play on asphault Dec 20 09:44:27 asphalt Dec 20 09:44:32 what a word Dec 20 09:44:46 so did i ask the wrong question Dec 20 09:45:28 no. just in the wrong place. just about everyone here is not qualified to tell you how to securely authenticate a user on a mobile client. Dec 20 09:45:42 and ultimately the answer is, you can't do it 100% securely Dec 20 09:46:43 ahh sorry, i just joined today Dec 20 09:47:23 there's no short or easy answer Dec 20 09:49:33 arcanine69 you can start by reading these 2 papers, for examples of what not to do http://android-ssl.org/ Dec 20 09:50:09 I was thinking of taking POST credentials than also IMEI/Device ID to based on those information, I would identify the user. However, I don't understand how to incorporate TSL. I know how SSL works where you have a public key/private key but not sure how that would help. If a hacker breaks into phone anyways wouldn't they be able to grab the certs off the device anyways and put the certs on his/her phone after rooting it and Dec 20 09:50:41 if someone has physical access to the phone or the phone is rooted you are screwed Dec 20 09:51:00 Right...that's what is going through my mind and I'm just like .... Dec 20 09:51:04 why the eff... Dec 20 09:51:17 ok thanks. Dec 20 09:51:25 i just needed someone to confirm my thoughts. Dec 20 09:52:36 arcanine69 https://developer.mozilla.org/en-US/docs/Introduction_to_SSL Dec 20 09:52:56 arcanine69 http://docs.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html Dec 20 09:53:18 g00s: it's okay goos, i know what to do from here. i really appreciate your guys help and stuff. I have the UI to my app all setup. Im tryin to work on servers now and stuff. Dec 20 09:53:31 so i can display my ui while being able to scale to many users Dec 20 09:53:39 i promise, those links will be enlightening ;) Dec 20 09:53:46 okay, ill read them :D Dec 20 09:54:04 read the android-ssl one first, moz, then oracle Dec 20 09:54:23 this stuff gets pretty nitpicky. i forgot it shortly thereafter D Dec 20 09:56:23 arcanine69 last link, https://www.feistyduck.com/books/bulletproof-ssl-and-tls/ Dec 20 09:57:19 thats a few days reading XD Dec 20 09:59:06 Hmm. How comes System.arraycopy is uber-fast even though it uses JNI? Isn't JNI said to have significant overhead? Dec 20 09:59:29 I should say "the JNI". Dec 20 09:59:31 I guess. Dec 20 09:59:54 because it's just moving 5 ints across the bridge which is cheap Dec 20 10:00:00 and it's in the framework so it's already linked in the zygote Dec 20 10:00:08 Okay. Dec 20 10:01:30 it's also annotated with @GoFast Dec 20 10:01:36 @VroomVroom Dec 20 10:04:52 Searching 111955 files for "VroomVroom" (case sensitive) ... 0 matches across 0 files XD Dec 20 10:04:58 the immediate jump to JNI is smart because ultimately the operation applies to memory Dec 20 10:05:04 I don't like how Reddit News collapses only the children of a tapped comment. I'd like to collapse the tapped comment *and* its children. Dec 20 10:05:16 As a way of signifying "I've read this comment". Dec 20 10:05:33 capella: Lol. I looked at System.java just in case. Dec 20 10:05:44 let me send an AOSP CL real quick... Dec 20 10:05:56 heheh Dec 20 10:08:02 i could not find vroomvroom Dec 20 10:08:05 -_- Dec 20 10:08:08 It's weird how I hadn't heard of Espresso until tonight. Or at least I don't recall ever having heard of it. Dec 20 10:08:19 I see that 2.0 has been released today. Dec 20 10:09:20 been out for a year or more Dec 20 10:09:44 you can only use espresso for tests? Dec 20 10:09:52 can you use it for production because it's beautiful.. Dec 20 10:10:21 you can use it for whatever you want Dec 20 10:10:36 if you want to embed espresso in your app you are free to Dec 20 10:10:44 The name sounds good. Dec 20 10:10:54 haha Dec 20 10:11:02 have you guys implemented sliding tab strip? Dec 20 10:11:15 with pager viewer Dec 20 10:11:19 meh ... bundys on tv ... must be morning ... now I want to make some espresso Dec 20 10:11:29 if by implemented you mean used some library that did all the work for me, then yes Dec 20 10:11:38 :o what lib? Dec 20 10:11:54 I should go out and buy presents. Dec 20 10:12:14 maybe this one? https://github.com/astuetz/PagerSlidingTabStrip Dec 20 10:12:18 ahh Dec 20 10:12:23 Hard to pull away from app development, sometimes. Dec 20 10:12:31 year old... maybe not Dec 20 10:12:44 I see. Did you make an app out of it? Or just messed aroudn. Dec 20 10:12:47 around** Dec 20 10:12:50 * capella managed to get two patches pushed to prod yesterday... needs to finish shopping Dec 20 10:13:04 capella: Are you working on (I think they call it) Fennec? Dec 20 10:13:09 capella: good job, keep it up Dec 20 10:13:28 Yah, Fennec is FF / Mobile (Android) Dec 20 10:13:33 Nice. Dec 20 10:13:40 Not sure what we're calling the new iOS version Dec 20 10:13:53 fennec fox my fav animal. Dec 20 10:14:08 When's that out? Last I heard, they were refusing to develop an iOS version. Dec 20 10:14:32 New project just started, playing by Apple rules as have others to get published :/ Dec 20 10:14:44 capella does it have to use webkit ? Dec 20 10:14:44 Does Apple still get a faster browser than everyone else? Dec 20 10:14:49 Yep Dec 20 10:14:54 lol Dec 20 10:15:12 I wonder why they changed their minds. Money? Dec 20 10:15:49 It's cool that iOS will be getting Mozilla goodness, though. Dec 20 10:15:49 JakeWharton: did u release an app using that lib or just messed aroudn with it ?? did u get it to any productional state? Dec 20 10:16:00 i don't remember if we shipped it or not Dec 20 10:16:01 ios doesnt have moz? Dec 20 10:16:03 what. Dec 20 10:16:06 Have you folks ever seen a firefox in real life? They are the cutest things ever. Dec 20 10:16:28 TOTALLY MAN Dec 20 10:16:38 it was all psychedelic and shit Dec 20 10:16:47 arcanine69: They were refusing to create an iOS version because (I think) Apple doesn't allow their parties to use their own browser engines. Dec 20 10:16:49 It's really weird. Dec 20 10:16:56 third* Dec 20 10:17:15 i thought they required you used their browser engine Dec 20 10:17:18 apple at it's finest man. Dec 20 10:17:24 wasn't chrome on iOS basically webkit ? Dec 20 10:17:26 its or it's? Dec 20 10:17:30 Right ... I wonder if there's a tie-in to moz switching to Yahoo search ... heard something re: Apple in that direction Dec 20 10:17:30 i think its. Dec 20 10:17:49 "its" = "belonging to it" Dec 20 10:17:55 it's vs its Dec 20 10:17:59 Like "yours", "hers", "his", etc. Dec 20 10:18:03 it's = it is Dec 20 10:18:12 what g00s left. noo. Dec 20 10:18:36 pretty late for him ... he's usually gone before now Dec 20 10:18:46 aww ok Dec 20 10:20:05 it it's what it its Dec 20 10:20:14 I'm trying to convert my app from using several activities to using several fragments. I have my main UI displaying with a fragment now, but it is entirely unresponsive. I cannot scroll or select or choose any of the menu options. I don't see any errors in the logs either. What have I missed? Dec 20 10:20:16 Sure, arcanine69. Dec 20 10:20:23 arcanine69: I have no idea what you're asking :P Dec 20 10:20:42 Do I have to go to meetings? Dec 20 10:21:44 arcanine69: I have no idea. Dec 20 10:22:01 I think adding an IRC buddy is basically appending a text file. Dec 20 10:22:10 ;o Dec 20 10:22:12 Plus reading from it at some point, I guess. Dec 20 10:22:13 wait I'm not his only PM buddy? Dec 20 10:22:21 that's it, we're through Dec 20 10:22:26 nooooooooooooooooo Dec 20 10:22:54 I've never added anyone to a buddy list on IRC. Dec 20 10:23:11 spuz: To be honest, it sounds like you did something wrong. lol Dec 20 10:23:17 well ever since i got back from palo alto Dec 20 10:23:18 I'm not sure how much else I can say with such little info. Dec 20 10:23:23 my hacker lyfe has been pretty non social Dec 20 10:23:40 #joins irc Dec 20 10:23:52 spuz: Why do you want to use all fragments, BTW? Just curious. Dec 20 10:24:18 fragment communication is easier and modular Dec 20 10:24:51 when you switch from fragment to activities Dec 20 10:25:14 TacticalJoke, I want to display the same info on a List and also a map. I want to allow you to easily switch between the two views while maintaining their respective states Dec 20 10:25:20 you should make sure you are importing all the packages correctly and are extending sub classes properly Dec 20 10:25:23 I think fragments are my best bet Dec 20 10:25:52 spuz: for example, you want to use MyActivity extends FragmentList -> if ur usin a list instead of ActivityList or Activity w/e Dec 20 10:25:58 or instead of plain old fragment Dec 20 10:26:54 spuz: do you get what im saying? Dec 20 10:27:02 arcanine69, when the main activity is a list... but I couldn't figure out to use FragmentList so I'm extending Fragment instead Dec 20 10:27:14 spuz: You make it sound like you converted a bunch of activites to fragments and then ran your project. Surely you did it step by step, noticing at which exact point problems began, right? Dec 20 10:27:23 when I tried to use FragmentList, I couldn't figure out how to create a ListView to return in onCreateView Dec 20 10:27:31 TacticalJoke, yes Dec 20 10:27:40 At which point did problems begin? Dec 20 10:27:55 TacticalJoke, when I converted my main activity to a fragment Dec 20 10:28:15 Keep your main activity an activity Dec 20 10:28:20 you need alteast 1 activity Dec 20 10:28:22 spuz: So you have no launcher activity anymore? Dec 20 10:28:58 than put containers/framelayout or w/e inside your main actvity than add views to it accordingly Dec 20 10:29:04 I have a new main layout and main activity. The layout contains a single fragment within and the new activity loads that layout onCreate Dec 20 10:29:43 for the onCreate for your mainactivity ... make it launch your activity layout Dec 20 10:30:08 when you say launch what do you mean? Dec 20 10:30:17 setContentView(); Dec 20 10:30:23 or w/e it is Dec 20 10:30:25 let me see rq Dec 20 10:30:51 https://gist.github.com/anonymous/c6f42f67f557f8842f5d Dec 20 10:30:57 that is my main activity now Dec 20 10:31:25 ok Dec 20 10:31:50 one thing I was confused about is having to import android.support.v4.app.FragmentActivity Dec 20 10:31:50 so now in your main activity xml file Dec 20 10:31:54 not sure if that's right Dec 20 10:32:17 uh brb sorry Dec 20 10:32:19 yeah make sure ur importing everything correctly. Dec 20 10:32:39 did it fix it? Dec 20 10:32:58 does it wurk \( ^_^ )/ Dec 20 10:33:17 duz it wurk \( O_O )/ Dec 20 10:39:53 arcanine69, should I be using FragmentActivity? Dec 20 10:40:21 yeah that's find Dec 20 10:40:24 fine* Dec 20 10:40:38 ok Dec 20 10:40:44 I am gonna have to come back to this later Dec 20 10:40:49 need to go xmas shopping Dec 20 10:41:25 DOO IT!! Dec 20 10:41:30 :):) Dec 20 10:41:32 I have a fragment that is set as NavigationDrawer and this fragment contains a listview. I'm able to see the list items when the drawer is open, but I'm unable to click any item.... Dec 20 10:41:34 ill be here. Dec 20 10:42:04 bhargavg Dec 20 10:42:14 you have to add setOnItemClick Listener Dec 20 10:42:17 Hi arcanine69 Dec 20 10:42:22 yes, thats done Dec 20 10:42:27 just like you would have to for a button click listener Dec 20 10:42:38 well its not working Dec 20 10:42:43 you didnt do it right Dec 20 10:42:53 actually, I'm not even getting the highlight that should come when touched on any event Dec 20 10:43:00 item** Dec 20 10:43:47 i dont think its suppose to highlihgt Dec 20 10:43:58 you have to write code to make it highlight Dec 20 10:44:19 normally list items, when touched, will should a selected color right? by default? Dec 20 10:44:30 no Dec 20 10:44:57 wait Dec 20 10:45:18 i actually Dec 20 10:45:19 ur right Dec 20 10:45:22 it should have a highlight Dec 20 10:45:34 hmm Dec 20 10:45:35 yes, the hightlight itself is not visible when touched Dec 20 10:46:02 well ofc its not going to highlight Dec 20 10:46:08 its not detecting the touch happening at all Dec 20 10:46:19 i think you should look into setting up the onclick listener again Dec 20 10:46:23 delete your code Dec 20 10:46:25 adn try again Dec 20 10:46:32 and** Dec 20 10:46:33 refactor Dec 20 10:46:38 refactor Dec 20 10:46:45 or make a seperate proj Dec 20 10:46:50 and try make a simple list view Dec 20 10:47:00 dont make navigation drawers until you can make simple list views Dec 20 10:47:08 is it like, if a listview is inside a drawer fragement and when the drawer opened, it will take a snapshot of listview and show it? Dec 20 10:47:20 i mean with out any interactions enabled Dec 20 10:47:20 not sure. Dec 20 10:47:22 ? Dec 20 10:47:25 i dont deal with drawers. Dec 20 10:47:27 i dont like them. Dec 20 10:47:34 hmm Dec 20 10:47:35 i pref horizontal swipe views/paging Dec 20 10:48:04 are you using eclipse Dec 20 10:48:07 or android studio Dec 20 10:48:11 no, AS 1.0.2 Dec 20 10:48:15 i'm kind of fighting with GCM, server side. I'm in python, I use gcmclient, and I got a "gcmclient.gcm.GCMAuthenticationError: Authentication Error". But I got the right Api_key, and all IP are whitelisted on google's devlopper interface Dec 20 10:48:21 import a sample project Dec 20 10:48:50 ya, will do that. Thanks :) Dec 20 10:49:24 blusky: i dont use GCM for push i write my own server for it Dec 20 10:49:36 Oo why ? Dec 20 10:50:18 because google is this entity that is like a big cuddly bear with open arms gently whsiepering in ur ear Dec 20 10:50:28 store ur data on my servers Dec 20 10:50:49 id rather pass data through my own servers. Dec 20 10:51:49 so if someone have 50 apps, 50 permanant /polling connexions with 50 servers ? Dec 20 10:52:13 i just implement... Dec 20 10:52:16 long polling Dec 20 10:52:28 I can't have long polling, it's for a chat Dec 20 10:52:38 chats use long polling... Dec 20 10:55:02 blusky: why dont you do long polling Dec 20 10:56:28 anyone using google analytics? how long does it take to refresh real-time ? Dec 20 10:56:47 what do you mean gordon Dec 20 10:56:48 for now, i'm deving my apps :D Dec 20 10:56:59 and i would like to use GCM and it's not working :( Dec 20 10:57:11 doesnt gcm use soap? Dec 20 10:58:35 analytics v4 Dec 20 10:58:47 just hit refresh page Dec 20 10:58:50 ... Dec 20 10:58:53 real-time isnt real-time Dec 20 10:59:02 what do u mean Dec 20 10:59:03 it doesnt work like that ;) Dec 20 10:59:12 it takes some time after google gets it Dec 20 10:59:14 to give it to you? Dec 20 10:59:20 yes Dec 20 10:59:26 ahh Dec 20 10:59:34 its probably a queue based system man Dec 20 10:59:45 they load stuff into a buffer than handle each req Dec 20 10:59:53 u just gotta wait Dec 20 11:00:43 whenever their servers get around to it Dec 20 11:00:45 do I need to send event in oncreate ? Dec 20 11:01:02 ok Dec 20 11:01:05 idk what ur talkin about Dec 20 11:01:16 wait I will post code on pastebin Dec 20 11:01:50 http://pastebin.com/yTjVuaAp Dec 20 11:02:01 do I need sendAnalyticsEvent(); Dec 20 11:02:04 method ? Dec 20 11:02:14 or just stuff in onStart and onStop Dec 20 11:02:30 not sure. Dec 20 11:03:13 well endAnalyticsEvent doesnt make much sense Dec 20 11:03:26 since you still need to have that global.xml file Dec 20 11:10:13 got this problem: http://stackoverflow.com/questions/22813411/intermittent-401-unauthorized-from-google-gcm Dec 20 11:10:45 havent seen that Dec 20 11:11:04 but it's strange Dec 20 11:11:08 because if I retry Dec 20 11:11:13 sometime it's sorking Dec 20 11:11:26 sometime's I got this "Unauthorized" error Dec 20 11:11:45 well I dont get analytics ;) Dec 20 11:11:58 it used to be juts EasyTracker..... Dec 20 11:12:02 now it has changed Dec 20 11:17:12 http://arstechnica.com/science/2014/12/nasa-just-e-mailed-a-wrench-to-space/ Dec 20 11:17:45 it's not a 3d printer, it's a teleporter Dec 20 11:18:24 arcanine69: ok, that stuff is needed Dec 20 11:47:22 hmm bhardavg had the same problem as me and I missed him :( Dec 20 12:47:56 is there a way to get notified on every intent that was called on android? Dec 20 13:12:13 in how much time a GCM push notification is supposed to go to the device ? Dec 20 13:12:23 i(m experiencing 30s, but it's kind of slow i think Dec 20 13:12:30 is there some adjustmnet to make Dec 20 13:15:15 nm: libs/armeabi-v7a/androidvncserver: no symbols Dec 20 13:15:24 this is debug build =,=' Dec 20 13:15:26 any idea? :D Dec 20 13:26:33 does each process in android have a UI thread? Dec 20 13:26:37 UI/main Dec 20 13:30:19 okay, got it Dec 20 13:30:47 ? Dec 20 13:31:08 blusky: gcm is like that only, timing not guaranteed to be instant. can have delays Dec 20 13:31:27 I guess you'll have to write a custom client-server architecture for instant push Dec 20 13:32:44 shmoon: how whatsapp is handling instant chat so ? Dec 20 13:32:59 cause i see everywhere that whatsapp is using GCM Dec 20 13:35:38 ooooh Dec 20 13:35:55 my delay was because of android devloper's website crappy exemple Dec 20 13:36:05 it makes the app wait for 25s for nothing ... Dec 20 13:37:17 blusky: I've heard whatsapp had moved to its own implementation long time back Dec 20 13:37:40 I've tried implementing GCM myself and it hasn't been instant at times, you should google the problem lots of people have faced it and I think it is documented too (the reaosns) Dec 20 13:38:10 i just found it ... Dec 20 13:38:19 http://developer.android.com/google/gcm/client.html Dec 20 13:38:35 there is a Thread.sleep(5000); in a loop Dec 20 13:38:37 dunno why ... Dec 20 13:38:43 just removed it, and now it's instant Dec 20 13:38:53 alright Dec 20 13:40:46 You can use gcm when the app is in the background, then open up your own connection when the user launches the app Dec 20 13:59:18 Hello! I have view and container(full screen). For example i rotate view(coordinates system of this view now is rotated relative to container) and then want resize it using coordinates of container. Is there any lib for translation of resize vector to coordinate system of view. I understand that it is combination of projections. But maybe is there any good lib or code for it? Dec 20 14:16:14 hi all Dec 20 14:16:17 i have an issue Dec 20 14:16:27 i m trying to start the watchface sample Dec 20 14:16:43 but main activity crash in my phone :/ Someone have the same issue ? Dec 20 14:25:58 check logcat for npe? Dec 20 14:27:23 capella have you try the sample Dec 20 14:27:42 it have 2 projects: 1 application and 1 wearable but i dont find how to try them :/ Dec 20 15:07:38 I'm making progress with converting my activities to fragments... Dec 20 15:07:49 however I'm not sure how to set up the layout for a fragment Dec 20 15:12:32 Previously I had this code in onCreate(): mListView = (ListView) activity.findViewById(R.id.list); mListView.setOnScrollListener(this); Dec 20 15:12:38 where should I put it now? onStart? Dec 20 15:12:59 Put it in the onCreateView Dec 20 15:14:24 Radther, that no longer works as findViewById does not return anything for that component before onCreateView is finished... Dec 20 15:15:02 Wait, maybe I'm not understanding this. Is this being called in a fragment or inside the activity? Dec 20 15:15:26 in a fragment Dec 20 15:16:22 Ok, so the list is in the fragments XML? Dec 20 15:16:25 yeah Dec 20 15:16:45 What does your onCreateView Look like? Dec 20 15:17:16 right now I have only one line: return inflater.inflate(R.layout.listfragment, container, false); Dec 20 15:17:32 but I'd like to be able to set the listview's scroll listener Dec 20 15:17:39 I'm not sure how or where to do that now Dec 20 15:17:47 Ok. Change that to View view = inflater.inflate(R.layout.listfragment, container, false); Dec 20 15:17:55 Then return view; Dec 20 15:18:24 And between that do the find view by id stuff as well as set the onClickListener. Dec 20 15:18:30 ok Dec 20 15:18:59 why does the findViewById have to happen after the inflate? Dec 20 15:20:00 so it exists Dec 20 15:20:17 The view is inflated so when you are doing findViewByID do mListView = (ListView) view.findViewById(R.id.list); Dec 20 15:20:43 Where the inflated View "view" is where you are finding the id. Dec 20 15:20:59 Radther, ok thanks Dec 20 15:21:21 Such a process to identify nowdays! Been so long since I've been on the IRC =\ Anyone up for a few minor noob questions on android devl? Dec 20 15:21:56 sceadwian: I'm quite new as well but I will try and help if possible Dec 20 15:21:57 * capella-s3 immediately runs Dec 20 15:24:29 Just one major question on backups. Exactly what does adb backup save? I want to do a bit perfect backup of my phone before I root it. will adb restore cover the rooting? Dec 20 15:25:19 sceadwian: It's been a while since I rooted. Not sure what the best way to back up is. Dec 20 15:25:23 I'm probably never going to go back to the stock OS after I get fastboot on it, but I want to make sure I get a clean factor copy of the OS before I root and the flash after I root before I start tweaking Dec 20 15:25:46 I'll go check the root channel just realized there was one. Dec 20 15:26:25 those questions belong on #android-root Dec 20 15:26:35 Yep, sorry thanks anyways. Dec 20 15:27:01 sure :) Dec 20 15:35:52 Hi Dec 20 15:36:41 Where to put files that I want to exclude from build? but also I will use it in gradle tasks Dec 20 15:38:07 MalekAlrwily: what do you mean with "use in gradle tasks" Dec 20 15:39:39 i think you can just put them wherever you want, exluding the directories that are used for building (res, java, etc) Dec 20 15:40:50 danijoo: I want to access these files in my gradle tasks Dec 20 15:41:29 e.g: read it Dec 20 15:42:00 MalekAlrwily, you can put them in a new directory Dec 20 15:42:18 your gradle task can access every file on the hdd if you give it a path... ^^ Dec 20 15:42:36 so just put them anywhere in the project but not in a folder that is a sourcefolder for building Dec 20 15:43:15 danijoo, spuz: Thank you for that helpful info Dec 20 15:44:04 I use a "rawassets" folder where I put all those files from psd etc Dec 20 15:44:10 that would be a good place for example Dec 20 15:45:42 Hmm. I've implemented click-to-collapse-comments in my app, and I'm returning a new view type for collapsed comments. I've noticed that convertView is null every single time for that view type. Dec 20 15:45:50 I'm not making any mistakes regarding using the recycled view. Dec 20 15:46:22 TacticalJoke: are all other comments not collapsed? Dec 20 15:46:27 danijoo: nice Dec 20 15:46:43 danijoo: Generally, yeah. Dec 20 15:46:50 They have a different view type. Dec 20 15:46:57 why do you expect a recycled view then? Dec 20 15:47:11 if theres not something it could use to recycle from Dec 20 15:47:43 The same happens if other comments are collapsed. Dec 20 15:47:49 It happens no matter what. Dec 20 15:48:13 well generally a view only gets recycled if it is present and then move out of screen Dec 20 15:48:27 so it should work if you collapse another one and then scroll down until its off screen Dec 20 15:49:00 is this for your reddit app? (: Dec 20 15:49:05 yEAH. Dec 20 15:49:06 Yeah* Dec 20 15:49:36 This issue seems bad: if I collapse 10 comments and then uncollapse one, I get *loads* of getViews with a null recycled view. Dec 20 15:49:44 I can't seem to get it to go away by scrolling off-screen. Dec 20 15:49:49 wait, you wat to recycle a collapsed view? Does it exist after collapsing to be able to recycle? Dec 20 15:49:54 *want Dec 20 15:50:14 Oh, a collapsed view is just what I'm calling it. It's really just a simple TextView. Dec 20 15:50:16 capella: I think collapsed in his case doesnt mean its not there Dec 20 15:50:23 oic Dec 20 15:50:43 its two types of views one for full shown comments and one for collapsed ones Dec 20 15:50:45 I'm thinking expandableListviews Dec 20 15:51:59 TacticalJoke: what are you doing in code for that? setting a "this is collapsed" flag for the comment on click and then notifydatasetchanged? Dec 20 15:52:51 Yeah. Dec 20 15:53:03 i think thats the problem Dec 20 15:53:09 I'm also removing child items from the adapter's list. Dec 20 15:53:40 afaik on notiydatasetchanged the stack of kept views for recycled is cleared and gc;ed Dec 20 15:54:03 Oh. Dec 20 15:54:43 Hmm, though it's restoring the non-collapsed ones. Dec 20 15:54:46 When I un-collapse. Dec 20 15:54:49 At least some of the time. Dec 20 15:54:57 It seems to be biased against these collapsed comments. lol Dec 20 15:55:12 toss some log messages in and test that ... s/b easy to confirm, and fun ! Dec 20 15:55:52 TacticalJoke: I wouldnt consider that behaviour to be that baad Dec 20 15:56:16 as long as you recycle whule scrollling, it should be fine to have stuff redraw on click Dec 20 15:56:45 True. Dec 20 15:56:59 i dont think there is another good solution anyways . Dec 20 15:57:02 Yeah. Dec 20 15:57:38 btw did you hear that reddit just hired a new android developer? :/ Dec 20 15:57:55 Yeah. Dec 20 15:57:57 He comes in here. lol Dec 20 15:58:05 oh :D Dec 20 15:58:15 well wasnt here for a while because i got a new pc Dec 20 15:58:21 Ahh. How is it? Dec 20 15:58:24 and took me ages to configure everything Dec 20 15:58:39 I need to get a new laptop. Stuck pixels on this screen. Dec 20 15:58:56 its awesome.. but hat to find replacements for a lot of programms and now had to get into windows 8.. Dec 20 15:59:09 didnt touch a windows computer for 4 years. Dec 20 15:59:20 What did you use before? Dec 20 16:00:04 the thing with the bitten fruit as logo :p Dec 20 16:00:22 I am on one of those at the moment... Dec 20 16:00:32 its great for developing to be honest Dec 20 16:00:49 It really is, I have saved so much time since getting one. Dec 20 16:00:50 i already miss my unix shell Dec 20 16:01:18 but windows 8 isnt that bad too.. Dec 20 16:01:22 Hmm, it's not inflating every time in all cases. Dec 20 16:01:30 It depends on what's going on, it seems. Dec 20 16:01:46 I use windows 8 for my gaming needs. Dec 20 16:01:55 i only switched because I wanted a machine where i can easily change hardware Dec 20 16:02:24 That makes sense. I wish that were an option on mac. Dec 20 16:02:28 I'm glad that Android Studio states that it supports Windows 8 now. Dec 20 16:02:32 I think it didn't state this before 1.0. Dec 20 16:02:50 TacticalJoke: Really, never noticed that. Bit of an oversight. Dec 20 16:03:59 << intellij ! Dec 20 16:04:05 (let the ide war begin) Dec 20 16:04:39 danijoo: Might not be perfect but there is a Linux like terminal for windows. https://www.cygwin.com/ Dec 20 16:05:11 yeah I already tried it Dec 20 16:05:20 Any good? Dec 20 16:05:24 yeah its nice Dec 20 16:05:42 gives you nearly every bash tool you could desire Dec 20 16:06:08 but I think on a long term its more productive to learn the native os capabilities Dec 20 16:06:14 so im trying to use powershell Dec 20 16:06:15 I am getting the error: Content has view with id attribute 'android.R.id.list' that is not a ListView class from a Sample application, but there I cannot find anything with the id "list" Dec 20 16:06:20 Powershell seems quite good. I don't use it, though. Dec 20 16:07:04 PowerShell* Dec 20 16:07:19 its not that different from bash for basic usage Dec 20 16:07:37 but i cant do much more then cd in directories yet :D Dec 20 16:08:41 spuz: Which sample application? Dec 20 16:08:56 The FragmentBasics application Dec 20 16:09:11 actually this only happens after I override the onCreateView method so I must be doing something wrong Dec 20 16:09:53 I think it is because I'm overriding it on a ListFragment which is expecting I return a ListView back to it, but what I don't understand is where the 'android.R.id.list' from the error message comes from Dec 20 16:10:16 I can't seem to find this sample. Dec 20 16:10:52 Do you mean FragmentTransition? Dec 20 16:10:57 The code is here: https://github.com/Udinic/Playground/blob/master/FragmentBasics/src/com/example/android/fragments/HeadlinesFragment.java Dec 20 16:11:32 In the class, I have added an override for onCreateView and I'm trying to figure out what to put in it Dec 20 16:12:46 It's a ListFragment not a regular Fragment. Dec 20 16:12:50 right Dec 20 16:12:56 I'm not sure what that means though Dec 20 16:13:07 So it does Lists and not much else. Might explain the problems. Dec 20 16:13:29 I want to try to add a footer to the list that's why I'm trying to make these changes Dec 20 16:13:36 not getting very far though Dec 20 16:15:43 In that case I would make it a normal fragment and create a resource file that contains the list view and the footer in it. Dec 20 16:16:24 Hey all. So I have an android app that needs to sync live sensor data with other android pads, via a server. The network availability will be very shaky at times (data gathered on mountains, etc) Dec 20 16:16:47 So what's the robust way to sync a few devices? I have some webservice rpc now, but it's too fragile. Dec 20 16:17:08 I also don't like syncadapters that much and jobscheduler is 5.0 only. Any robust libs out there for this usecase? Dec 20 16:19:11 arbited: Don't know much about what you are trying to do but there is a backport of JobScheduler for API 10+ https://github.com/evant/JobSchedulerCompat Dec 20 16:19:26 Radther: alas, that library fails on 4.4.4 Dec 20 16:20:26 which is a shame, since a jobsched' backport would be perfect Dec 20 16:20:29 arbited: That's a shame. Dec 20 16:21:00 Radther, I got the sample app to work with a footer, now I have no idea why it is crashing in my actual real app :p Dec 20 16:21:21 Radther: but then again, the github page does say "However, this library has not been well-tested, so I would advise not using in production at this time.", which turned out to be good advice :) Dec 20 16:21:39 i guess Google will provide a support library soon though Dec 20 16:21:42 spuz: Always fun when something breaks for seemingly no reason. Dec 20 16:21:49 but what to do while waiting for that... Dec 20 16:22:17 I would hope so but from the looks of it I wouldn't expect it any time soon. Dec 20 16:22:21 I'm a long long way from understanding what the hell I'm doing in Android right now Dec 20 16:22:27 and I have to get this app done before xmas! :p Dec 20 16:23:29 I recommend the Big Nerd Ranch android guide for understanding the basics. It's a little out of date but covers stuff like fragments pretty well. Dec 20 16:23:34 Why the rush? Dec 20 16:25:30 because it's an xmas present :p Dec 20 16:25:50 i guess i could try JeroMQ for reliably sync'ing Dec 20 16:26:49 spuz: Can I ask for a bit more information about the app that you are trying to create? Dec 20 16:27:40 sure, I wrote an app two years ago that pulled data from the viamichelin.com website, parsed it and displayed a list of nearby restaurants in a list Dec 20 16:28:11 now I need to update it firstly because their web api changed and the app stopped working, but also I want to add a map view to the app Dec 20 16:28:16 hence the fragments Dec 20 16:28:55 How do I get the lockscreen background? Dec 20 16:29:31 Ahh ok. Don't think I'm of much help but it sounds like a pretty fun project. Dec 20 16:30:01 yoavst: How do you mean? Dec 20 16:30:26 I know that there is a way to set the activity to have the launcher's background as its background Dec 20 16:30:52 but is there a way to make the activity have the lock screen background? Dec 20 16:33:40 yoavst: I can't seem to find anything that allows you to get the lockscreen wallpaper, just the launcher one. Dec 20 16:33:57 how do you get the launcher one? Dec 20 16:34:02 set a transparent theme? Dec 20 16:34:12 http://developer.android.com/reference/android/app/WallpaperManager.html Dec 20 16:34:47 Looks like from that you can get a drawable of the wallpaper. Dec 20 16:34:57 As well as info about it. Dec 20 16:35:00 yes Dec 20 16:35:31 I'm creating a lock screen like for LG Quick Circle case, and I thought it would be nice if it will have the same image as regular lockscreen Dec 20 16:36:09 hey guys is there another program beside android file transfer for mac Dec 20 16:36:41 If you are creating a custom lockscreen then you could potentially have users set a wallpaper for your lockscreen themselves. Not perfect but yeah. Dec 20 16:37:04 hert: I have looked and can't seem to find anything. Dec 20 16:37:40 it seem android file transfer can't read from two connected phone at once Dec 20 16:37:44 gtg, thanks Dec 20 16:38:23 I recently started using BitTorrent Sync instead. Not as fast as USB but far more conveniant. Dec 20 16:39:57 http://www.getsync.com/ Dec 20 16:43:17 Radther, if I want to share data between my main activity, and my three fragments, should I store that data as fields of my activity and access them from my fragments using ((MainActivity)getActivity()).data ? Dec 20 16:44:23 Is the data available before the the fragment starts? Dec 20 16:44:36 If so then you should add an extra to the intent. Dec 20 16:44:41 Radther, it might be or it might not be Dec 20 16:45:00 Where is the data coming from? Dec 20 16:45:16 It will come it when I make a call to the remote api Dec 20 16:46:29 Maybe I should follow the example for using Loaders Dec 20 16:46:44 Was just about to suggest that. Dec 20 16:50:00 spuz: Another idea might be AsyncTask. I found this that might help. http://www.vogella.com/tutorials/AndroidBackgroundProcessing/article.html Dec 20 16:50:21 Looks like a lot of code though. Dec 20 16:53:52 spuz your activity can get destroyed while the fragment remains alive Dec 20 16:54:08 spuz, you could try a contentprovider or sql db.. quite a few options Dec 20 16:54:46 just make sure you access your activity between onAttach and onDetach and you're safe Dec 20 16:54:51 osxorgate, I thought a fragment always had to have an activity Dec 20 16:55:18 content provider and sql db are the worse options for simple data sharing Dec 20 16:55:32 worst Dec 20 16:55:41 pfn, what is a better option? Dec 20 16:56:15 singletons, accessing the activity directly, intents, etc. Dec 20 16:57:55 Anyone used the TabHost widget? How does it compare with ViewPager? Dec 20 16:58:08 I want to display tabs inside of a fragment Dec 20 17:01:50 spuz: assuming getActivity() to return not null is a very common error Dec 20 17:02:16 osxorgate, when will that happen? Dec 20 17:02:45 spuz: before onViewCreated is called Dec 20 17:03:11 I have had some crashes because of that myself Dec 20 17:03:14 spuz: https://plus.google.com/+StevePomeroy/posts/HsthxN21Yp1 see how complex it all is Dec 20 17:04:21 vedu: I can't imagine Fragment.getActivity returning null between Fragment.onAttach and Fragment.onDetach. Dec 20 17:07:57 complex? Dec 20 17:08:03 it never returns null between onAttach and onDetach Dec 20 17:08:38 vedu, tabhost sucks Dec 20 17:08:47 vedu, if you want tabs and a pager, use PagerTabStrip Dec 20 17:09:44 or Fragments Dec 20 17:09:59 pagertabstrip kinda sucks, too, but oh well Dec 20 17:10:22 viewpagerindicator kinda sucks the least, but if you need to call notifyDataSetChanged on it often, it dies hard Dec 20 17:13:18 I have duplicate icons in actionBar, any idea ? I use Fragments Dec 20 17:14:19 don't add duplicates Dec 20 17:17:48 tabhost is deprecated, isnt it ? Dec 20 17:19:03 pfn: I don't understand why are duplicated Dec 20 17:19:13 because you added them duplicately, why not Dec 20 17:20:12 I add only time Dec 20 17:20:18 konarr: Are you adding in code? Dec 20 17:21:02 konarr: Are they being added to the Action bar through a fragment or from the activity. Dec 20 17:21:23 The next question is "Are you adding if and only if savedInstanceState is null?" If the answer is "no" then the case is solved. Dec 20 17:21:25 through the fragment Dec 20 17:21:55 konarr: so probably method is invoked two times ? :) Dec 20 17:23:25 mmm I check again. thx Dec 20 17:25:37 Maybe calling menu.clear() in the onCreateOptionsMenu would help. Dec 20 17:25:57 Radther: Wouldn't that just hide the problem? Dec 20 17:27:47 TacticalJoke: Good point. Dec 20 17:29:08 TacticalJoke: how goes the reddit app? Dec 20 17:29:14 do you have a MVP? Dec 20 17:29:44 It's going well. :) Dec 20 17:30:29 It hasn't achieved MVP status yet. I'm also not sure how to define MVP status in this case. Dec 20 17:33:36 show front page and navigate to comments Dec 20 17:37:39 I don't wanna release too early, but I don't wanna release too late. Dec 20 17:37:43 It's a tricky one. :D Dec 20 17:37:59 thepoosh: At which point would you release a reddit client? Dec 20 17:38:19 hmmmmm Dec 20 17:38:50 good navigation, decent image showing good results on beta testers from r/Android Dec 20 17:39:11 Yeah Dec 20 17:42:22 I think I'll also need to polish the UI significantly. Dec 20 17:42:27 People are obsessive about how reddit apps look. Dec 20 17:45:32 Though I can kinda understand it. Dec 20 17:46:15 well, all that is hipster must have an emphasis on UI Dec 20 17:49:27 :\ so I'm setting up espresso tests for the first time, and it tells me I have a duplicate license.txt file. does that mean I set things up incorrectly, or is this "normal"? Dec 20 17:49:46 TacticalJoke: When you need testers for it I am always up for trying more reddit apps. Dec 20 17:50:23 Thanks. :) Dec 20 17:50:52 I'll definitely release it to people here long before actual release. Dec 20 17:55:30 yep yep Dec 20 18:01:03 Oh! I'm debating trying irccloud as a semi-permanent IRC host I can connect to sporadically. does anyone know of any better options? all I have is a laptop, can't leave a session running 24/7 (or even remotely), so I'm looking for a hosted option. Dec 20 18:07:00 I'm using irc cloud now Dec 20 18:07:40 happy/not with it? I have no idea what other options I have :| attempting to research now, but it's hard to find something + know if it's trustworthy Dec 20 18:22:37 hm. anyone use firrre.com ? it covers the two networks I'm interested in... Dec 20 18:27:27 The number of Christmas movies on TV is too damn high. Dec 20 18:27:37 Not enough Christmas Story Dec 20 18:30:11 mikedg_, no more skype??? :p Dec 20 18:30:34 Haha Dec 20 18:30:40 Yeah fuck Skype Dec 20 18:30:43 TacticalJoke, https://imgflip.com/i/fjh9z Dec 20 18:30:52 Did I tell you I bought an iPhone Dec 20 18:31:15 mikedg_, yeah, fuck android Dec 20 18:32:17 Fuck everything Dec 20 18:32:17 holy shit, I just hacked up this code so bad... and imma just check it in anyway Dec 20 18:32:41 git push -ftw Dec 20 18:34:40 Is there a best way to add an onclicklistener to a Recyclerview? I have looked online but there are so many different ways and I can't get any of them to work properly. Dec 20 18:35:14 setOnClickListener(mOnClickListener) ? Dec 20 18:37:19 Wouldn't that set an on click listener of the whole view and not the individual items? Dec 20 18:37:31 then set it on the individual item? Dec 20 18:37:43 ^ Dec 20 18:38:42 or use an OnItemTouchListener Dec 20 18:41:04 I'll look into those, thanks. Dec 20 18:56:30 hmm, how do I build a spreadsheet grid with recyclerview... Dec 20 19:06:52 pfn bignerd ranch put out a nice blog yesterday on RV, maybe it will help with selection stuff http://www.bignerdranch.com/blog/recyclerview-part-2-choice-modes/ Dec 20 19:07:17 g00s, it's not selection that I care about so much as the grid headers Dec 20 19:07:23 which don't seem possible with recyclerview itself Dec 20 19:07:41 need to synchronize scroll with outside header views, it seems Dec 20 19:08:12 that seems to be how headers are done in most scrollable things I see. is there a better way for e.g. listview? Dec 20 19:10:12 pfn, GridLayoutManager supports items that span multiple columns Dec 20 19:11:04 Groxx, there isn't Dec 20 19:11:12 SimonVT, that doesn't help with headers still Dec 20 19:12:09 Not sure what you mean then Dec 20 19:12:33 this is confusing me - what actually happens if i press back button in the application main activity (and im not handling the back button in the code) Dec 20 19:13:20 the application is not closed but mapFragment (from google maps) does loose its' state (as opposed to when i switch to different activity/app). Dec 20 19:13:41 any explanation/links to docs/hints at what am i missing greatly appreciated Dec 20 19:14:07 luv: it's sorta complicated. but for that purpose, it basically calls .finish() on the activity, removing it and its views from your task stack. Dec 20 19:14:34 the activity is destroyed but the application is not? Dec 20 19:14:37 yep Dec 20 19:15:03 your process stays alive, services keep running, threads keep going, etc. until the system decides to kill it. Dec 20 19:15:08 but when i switch to different app neither the activity nor the application is not destroyed? I thought the activity gets destroyed too Dec 20 19:15:24 it's not destroyed, just stopped Dec 20 19:16:16 makes sense. thanks :) Dec 20 19:16:17 your activity, views, etc will all be the exact same instance when you go back, unless your process died while it was in the background. then your application will be started back up, and Android will re-create your activity and views, and give you the savedInstanceState bundle you saved earlier so you can resume sanely Dec 20 19:17:55 and when i switch between landscape and portrait? I suppose it's the same - the activity is not killed but onStop and on onCreate is called (and bunch of other callbacks)? Dec 20 19:18:36 actually that'll (usually) kill your activity, then make a new one and give you savedInstanceState there too. that's done in case you need to load different resources / a different layout. Dec 20 19:19:00 same kind of thing happens when e.g. the system language is changed Dec 20 19:19:42 strange, because in the case (changing orientation) the GoogleMap doesn't loose its' state Dec 20 19:20:05 and i dont implement onSaveInstanceState and onRestoreInstanceState Dec 20 19:20:26 Google maps might save some state for you Dec 20 19:21:10 the parent activity class does though, and it'll save some info about the views. including (probably) the map fragment's state. when the activity is recreated, it can restore that info. depends on a few details, but I suspect the map fragment calls setRetainInstance(true). Dec 20 19:22:21 that would make sense - so when I hit the back button (and it seems to the userthe application is closed) onSaveInstanceState is not called? Dec 20 19:22:49 yep. "back" basically implies "I don't want this", so it's dropped Dec 20 19:22:51 Hey Guys! Are there any good open source video players available? Dec 20 19:23:04 astroduck: vlc ? Dec 20 19:23:45 Groxx: Ummm, something that's not very complex to understand? :P Dec 20 19:24:09 astroduck: haha - are you trying to get a player you can put in an app? Dec 20 19:24:24 Groxx: yes :D Dec 20 19:25:56 right so when changing orientation (or eg system language) it's handling the activity destruction/creation the same as when the activity is killed due to release of system resources (ie onSaveInstanceState is called) but when the back button is pressed it's just killed. Correct? Dec 20 19:26:51 astroduck: you can get a long way with stuff in Android. https://stackoverflow.com/questions/6568054/how-to-write-a-simple-video-player-on-android seems like it might work (never tried). if you're trying for something that handles more formats than the device does by default, I dunno what to do, unfortunately. Dec 20 19:26:57 luv: I guess it goes to onPause then onDestroy and then stopped gracefully Dec 20 19:27:15 luv: yep. only difference is that your process stays alive during rotation/language/etc Dec 20 19:28:01 luv: well, I guess other differences too :) other activities in your stack still exist on orientation change, but on process change they won't be started until you "back" into them. and other smallish details. but you can probably guess most of them. Dec 20 19:29:35 Groxx: I do have a working video player, I was looking for a player that supports more formats and has a good mediacontroller UI :D ... Dec 20 19:29:42 Groxx: I found this, https://code.google.com/p/dolphin-player/ Dec 20 19:29:44 luv: the first, conceptual section of https://developer.android.com/guide/components/tasks-and-back-stack.html is probably worth reading if you haven't, though it doesn't cover all of this. the alternate launch modes / etc are more likely to cause you problems than not though. Dec 20 19:30:15 thanks Dec 20 19:30:30 astroduck: yeah, ffmpeg is likely the way to go Dec 20 19:31:28 luv: also https://developer.android.com/reference/android/app/Activity.html - rotation is a "Configuration Change", there's a section for that. it's a lot, but it's pretty fundamental, worth reading. Dec 20 19:33:09 Groxx: Is there a how-to if I want to make my own player using FFMpeg? Dec 20 19:33:22 I am feeling wild tonight :P Dec 20 19:33:26 astroduck: ffmpeg has some licensing restrictions that might be desirable / cause problems though, fwiw. especially if it's used as a player, thus "integrated" into the app. a lot of the useful parts of ffmpeg are GPL licensed Dec 20 19:34:11 astroduck: no clue, sorry :) compiling it isn't too hard, and there are examples out there, but I've never hooked it up to an output surface. probably read the source for dolphin-player? Dec 20 19:35:01 Yeah,thats what i was thinking. Thanks Groxx, see you around :D Dec 20 19:35:02 maybe someone else knows? for playback I've only done pretty basic uses of the built-in MediaPlayer and VideoView Dec 20 19:35:28 good luck :) Dec 20 19:35:40 thanks, bye :D Dec 20 19:36:27 Groxx: i really prefer hands on experience - easier (and more fun) to learn for me this way - but i see this stuff is pretty fundamental so i'll try to go through it (not sure i'll be able to understand it though as at this point my android dev knowledge is really basic:) ) Dec 20 19:37:20 luv: yeah, there's plenty of room for both in android :) Activity's intro / conceptual docs are pretty important and pretty easy to misunderstand though. if there's only one thing you read, that's probably the one I'd suggest. Dec 20 19:45:29 all the snackbar examples in the material spec look different than real life Dec 20 19:46:07 gapps snacks are little rectangles that seem floating over the screen, material spec just has the whole bottom part of the screen taken Dec 20 19:51:21 Maybe it's not a snackbar Dec 20 20:01:55 hi guys Dec 20 20:04:37 hi Valduare Dec 20 20:04:51 I have an mk808 android tv stick Dec 20 20:05:06 I edited it so it would go into portrait mode so the tv can be vertical Dec 20 20:05:17 * Valduare works great - but no videos will play when in portrait mode... Dec 20 20:09:19 Try #android Dec 20 20:28:16 so I have a map and a list fragment in my application and I switch between them with some menu buttons Dec 20 20:28:33 but when I switch back, the original state of the map/list is reset Dec 20 20:28:47 how can I switch between fragments without destroying their state? Dec 20 20:29:40 spuz: does it lose the state if you just detach the fragment? I'm guessing you're replacing them at the moment Dec 20 20:29:51 I'm replacing them yeah Dec 20 20:30:07 I'm creating a new fragment instance each time Dec 20 20:30:38 you could either not do that (and swap the instantiated fragment back in) Dec 20 20:31:05 or figure out how to store the fragment state in its ondestroy and pass it as arguments to the fragment creation Dec 20 20:31:34 I think I prefer the first option Dec 20 20:33:53 Hello! Dec 20 20:34:40 hi Dec 20 20:43:37 Does anybody need help? Dec 20 20:54:35 hm, my logcat keeps going stale in AS using adb/wifi Dec 20 20:59:07 Argh Dec 20 20:59:30 I was trying to get rid of the move in from bottom and move out to bottom Animations after pressing on back until I realised that is actually also the default. Dec 20 21:01:54 guys I have a JSONArray structure with multilevel, i want all values with key "imgurl" please help Dec 20 21:03:08 has anyone made an annotation processor and uses Android Studio? I'm trying to figure out why my Messager messages aren't doing something nicer, like showing errors in the IDE. (they log as an error, I can click to go to the right place, but no error lines / messages in the code causing the error) Dec 20 21:03:13 they are the only hyper links on the structure in JSONArray how do I extract all the links Dec 20 21:13:07 oh Dec 20 21:13:09 hai g00s Dec 20 21:17:55 when should you override the window transition for a new activity? Dec 20 21:19:43 When you don't want the default transition? Dec 20 21:20:17 Exactly Dec 20 21:20:36 Maybe before or after startActivity? And startActivityForResult? Dec 20 21:21:01 after Dec 20 21:21:21 http://developer.android.com/reference/android/app/Activity.html#overridePendingTransition(int,%20int) Dec 20 21:35:04 It always feels so wrong to do that. Dec 20 21:35:14 Like correcting something that has already started. Dec 20 21:35:50 SimonVT: since you've done annotation processing: is there any trick to getting error messages to appear in Android Studio? it's logging, and double-clicking it takes me to the right location, but there's no in-source indication of any errors Dec 20 21:36:48 Like, error indicators in the editor? Dec 20 21:37:10 So if I want the same animation everywhere I have to override all flavours and the versions and aritys of startActivity* that I might use int he future? Dec 20 21:37:23 SimonVT: yeah, exactly Dec 20 21:37:41 I think you'd need an AS plugin for that Dec 20 21:38:02 ugh, really? Eclipse does that for ya :( Dec 20 21:38:49 Eclipse does incremental compilation, it probably uses the output from that to mark lines in the editor Dec 20 21:39:54 AS seems to have something similar. if the file is open, it moves my cursor to the right location (and if I change the element being reported, it moves to that location). double-clicking the error log does the same thing. there's _some_ kind of integration going, but it's pretty crappy Dec 20 21:43:33 Groxx: That's actually a nice feature. Have you checked if there is a plugin for it? Dec 20 21:44:06 marrrk: nope. iirc you can search from within AS? or is there a better repository of plugins somewhere? Dec 20 21:44:50 I mean all the problematic lines in your code are hyperlinks in the output, right? Dec 20 21:49:21 marrrk: not quite what I'd call hyperlinks…. but I must hop offline :( I'll be back in a bit. Dec 20 21:49:56 Hyper Hyper Dec 20 21:50:00 marrrk: all I get is this: http://cl.ly/image/1G222J0J3x1k Dec 20 21:50:35 the rest of that line just shows the class name, no line. double clicking always takes me to the right line though. Dec 20 21:50:46 /afk Dec 20 21:57:12 That looks weird. Dec 20 21:57:26 But I wouldn't know how to build with Gradle. Dec 20 22:05:07 I thought I could use this: @android:color/transparent in "values-21" but I can't! Dec 20 22:12:31 Damn, it's v21 Dec 20 22:40:12 i have some data I'd like to share accross all parts of my application Dec 20 22:40:50 So I have a json file which I will parse when the application starts, and store these objects in an arraylist Dec 20 22:41:10 Singleton? or subclass Application perhaps? Dec 20 22:42:02 Makes no difference Dec 20 22:43:43 and also, I really have no idea how to design user interfaces Dec 20 22:44:37 This app will have three or so "views". I'm not sure if I make a slider, use the menu drawer, or something else Dec 20 22:46:15 RustyShackleford only 3 views with no hierarchy, may as well use viewpager & lateral navigation Dec 20 22:47:16 yeah i can't find a way to put them in a hierarchy Dec 20 22:48:27 this could change later of course. Sometimes I can't plan out how all the pieces fit together until I've written something that *doesn't* do what I want Dec 20 22:49:47 RustyShackleford from today on HN http://www.chicagotribune.com/news/watchdog/redlight/ct-red-light-camera-safety-met-20141219-story.html#page=1 Dec 20 22:52:00 g00s: cool thanks for the link Dec 20 22:53:22 oh no Dec 20 22:53:28 im in chicago >.> Dec 20 22:53:42 arcanine69: hiya neighbor Dec 20 22:53:48 hey man whatsup Dec 20 22:54:03 staying warm? Dec 20 22:54:07 :3 Dec 20 22:54:16 trying xD Dec 20 22:54:19 i'm huddled next to the space heater Dec 20 22:54:24 ive got 2 Dec 20 22:54:25 arcanine69 fun with mitmproxy http://www.shubhro.com/2014/12/18/reverse-engineering-kayak-mitmproxy/ Dec 20 22:54:39 there's no limit to the fun you can have with mitmproxy Dec 20 22:56:04 g00s: im just going to write my own mail server Dec 20 22:56:14 O.o Dec 20 22:56:23 g00s: i was on the haraka irc channel since last night and no one is bothering to answer questions Dec 20 22:56:35 g00s: also, their page has very poor documentation Dec 20 22:57:32 g00s: dw, im gona figure out how to make a secure authorization. Dec 20 22:58:12 What's the proper way of updating an apps build tools version after and SDK update? Dec 20 23:16:08 my phone seems to charge super slowly recently Dec 20 23:17:00 even using the charger included with my phone Dec 20 23:17:13 RustyShackleford: always a joy, that. I pretty much exclusively use tablet chargers, waaaay faster :| Dec 20 23:18:32 Groxx: the S5 uses a usb3 charging cord. It used to be extremely fast to charge Dec 20 23:18:50 i'm not sure what happened Dec 20 23:19:14 mine has slowed as well Dec 20 23:19:23 s5 active Dec 20 23:19:32 possibly a crack in the cable? cables never seem to last more than a year or two with me Dec 20 23:20:00 didn't think of that. I've never had a cable fail on me Dec 20 23:20:13 isnt it more likley the battery Dec 20 23:20:43 only time mine have failed is when the dogs got to them heheh Dec 20 23:21:18 heh - it's entirely possible I'm brutal to cables and/or I buy dirt cheap ones and I deserve what I get Dec 20 23:21:40 iv nevr heard of cables becoming slow Dec 20 23:22:00 no he's saying a break in the cable could be contributing to recharge slowdown Dec 20 23:22:14 i know Dec 20 23:22:22 typically the more-than-0.5-amp chargers use resistance on some of the cables to indicate that it can take more power. same thing that iPhones did. if that's toast, it might be falling back to the slow mode. Dec 20 23:22:39 or using a usb2 vs usb3 which the OS could be recognizing and slowing its draw on the cable thus slowing the recharge Dec 20 23:22:47 do cables charge using multiple wirse? Dec 20 23:22:50 wires* Dec 20 23:22:58 i thought if it braks it doesnt work at all Dec 20 23:23:04 yes. something like 8 iirc Dec 20 23:23:22 i see Dec 20 23:23:41 afaik there are two that are typically for power (or, one power, one ground for all), and normal USB has two more wires for data. resistance across those two is what iPhones used to do, and a bunch of things copied it. Dec 20 23:23:53 dunno what usb3 does Dec 20 23:24:34 not sure either Dec 20 23:24:57 Groxx: more data transfer bandwith Dec 20 23:25:03 got too many updates coming in wacking my inet (and kids watching netflix at the same time) so not going to google :) Dec 20 23:25:10 and also you can charge faster Dec 20 23:25:48 anyway, Android Studio is complaining "Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly." Dec 20 23:26:05 this is a freshly generated project Dec 20 23:26:24 oh frabjous day Dec 20 23:27:00 should I delete everything and try generating the project again? Dec 20 23:27:02 any other messages? maybe more details in the output? Dec 20 23:27:40 i read the log and I was unable to interpret the problem Dec 20 23:27:47 oh jeez. my damned s5 is faster than my kid's laptop. starting to get aggravated here Dec 20 23:28:06 if i build, I get: Dec 20 23:28:07 Error:FAILURE: Build failed with an exception. Dec 20 23:28:07 * What went wrong: Dec 20 23:28:07 Task '' not found in root project 'fuzz-buster'. Dec 20 23:28:07 * Try: Dec 20 23:28:10 Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Dec 20 23:28:25 uh, sorry. I thought it would stay on one line Dec 20 23:28:51 task empty-string? that's a new one to me… not that I've encountered a lot though Dec 20 23:29:32 lets see if regenerating the project will fix it Dec 20 23:38:28 well this is frustrating haha. I can't even generate a project sucessfully Dec 20 23:38:36 i hit a roadblock at step 1 Dec 20 23:40:57 RustyShackleford: is gradle up to date? (though I think that creates a different error) Dec 20 23:41:14 also: try invalidate caches Dec 20 23:41:47 I dunno what that's supposed to fix either, but I've seen it slung around as a magical cure-all (for narrow cases which may or may not be related to this) :) Dec 20 23:44:03 any good android dev platforms Dec 20 23:44:08 Groxx: i checked the sdk manager and there was an update for the support library. I doubt that will fix anything Dec 20 23:45:25 shovel_boss there are two you might be interested in, to continue our discussion from the user channel Dec 20 23:46:26 deryl, yes continuing the works Dec 20 23:46:29 https://www.udemy.com/introduction-to-android-development/ and https://www.udemy.com/learn-android-programming-from-scratch-beta Dec 20 23:46:44 might also want to consider https://www.udemy.com/java-essentials-for-android/ Dec 20 23:46:53 (for the udemy courses I was mentioning) Dec 20 23:47:00 RustyShackleford: gradle has been a bit more separate from AS than other parts of the android sdk. maybe that has been resolved in 1.0 though. if you go to the command line and type `gradle —version` is it something recent? Dec 20 23:48:52 shovel_boss i'm a bit slow responding, I'm updating eclipse with the android SDKs and stuff. (I'm trying out Android Studio which I've already configured, and Eclipse for Android related programming.) I'm evaluating Eclipse for more than just android stuff at the same time Dec 20 23:49:05 so forgive me if i take a bit to reply Dec 20 23:49:30 1 more questions, eclipse or android studio? Dec 20 23:49:38 can't answer that yet Dec 20 23:49:49 for android *only* AS should suffice Dec 20 23:50:08 probably Android Studio - it's officially released and Eclipse is officially deprecated. Dec 20 23:50:29 I'm also targeting straight java, and JavaScript (though both languages can be used on Android as well) Dec 20 23:50:33 there are some things Eclipse does that AS does not, but if you're starting you're unlikely to hit them any time soon Dec 20 23:50:41 will consider that, thank you for your support fellow robot developers Dec 20 23:50:48 err? Eclipse is not deprecated. Or do you mean specifically for android programming its deprecated? Dec 20 23:51:23 yeah. the android plugin for eclipse (and the android eclipse bundle, which has always been meh anyway) Dec 20 23:51:24 because eclipse as a modular programming platform is definitely not deprecated. its alive and thriving Dec 20 23:51:28 ah ok Dec 20 23:51:46 android studio Dec 20 23:51:52 its still supported and being updated (the android plugin) Dec 20 23:52:02 seems like i have a mismatch between gradle and the gradle plugin Dec 20 23:52:44 they just released an updated version which is what eclipse just picked up which is why i'm so slow (LOTS to download when it updates the android SDK version) Dec 20 23:52:57 heh, yeah Dec 20 23:53:07 its killin me here hehe Dec 20 23:53:42 the system images are pretty big themselves as well Dec 20 23:53:43 at least they separated the individual build tools, so you can e.g. use a different tools version in AS, and not be instantly forced to use the new one in Eclipse (which especially sucks when they break something) Dec 20 23:54:11 yeah, separation of concerns is *usually* an improvement in that arena Dec 20 23:55:23 not having coded for this platform before I didn't realize *just* how big initial setup was. started all this last night (though I had my farm to take care of during the day so couldn't work on it for long during daytime) Dec 20 23:55:44 u liv ona farm?? Dec 20 23:56:13 yeah. I lay chicken wire and mend fences during the day, and I write code at night. Dec 20 23:56:37 welcome to meeting someone from rural Kentucky Dec 20 23:56:43 fwiw you don't need any system images except for emulating. dev on a device "just" needs the build tools and your target sdk version Dec 20 23:57:07 Groxx oh now that would have been nice to know earlier hehe. Dec 20 23:57:31 oh well. doesn't hurt to spend a bit more time to get it all set up i guess Dec 20 23:57:33 I was wondering if that was the case :) Dec 20 23:57:56 TIL kentucky has internet :) Dec 20 23:58:26 yeah, i have my s5 but i thought i needed the images still (wasn't sure if the whole build process needed them for certain aspects of builds or something) Dec 20 23:58:29 so yeah. newest version(s) of the Tools category, the target "SDK Platform", and maybe support / haxm / other supporting things that are only necessary if you use them Dec 20 23:58:31 nice to know i don't Dec 20 23:58:59 they're not very clear on this, sadly Dec 20 23:59:16 well this s5 runs 4.4.2 and both AS and eclipse seem to only install lollipop (5.0?) so i'm backfilling SDK versions Dec 20 23:59:45 plus seems like i need 2.2.x (froyo) if i want to write something that should run on just about any android out there Dec 20 23:59:48 so adding that as well Dec 21 00:00:10 should be fine - you'll probably want the lollipop sdk platform, and then set the minVersion to whatever 4.4.2 is (19?) Dec 21 00:00:10 everything is up to date Dec 21 00:00:26 is there a mismatch between the newest gradle and the newest Android Studio? Dec 21 00:00:26 i'm sure i'm doing some level of over adding, but shouldn't hurt that bad Dec 21 00:00:29 yeah its 19 Dec 21 00:00:37 rev 4 now. was rev 3 yesterday lol Dec 21 00:01:11 I am having trouble playing HTML5 video in a WebView on KitKat. The video plays very well on Jelly Bean devices, but has failed on every KitKat device I have tried. The video is being played remotely over a server, so the VideoView cannot be used. Dec 21 00:01:32 brb. grabbing a plate of food. Dec 21 00:01:40 Is there a new method I should be using for KitKat+ devices? Dec 21 00:01:50 starving and this is going to take a bit. don't need to play hawk over downloads hehe Dec 21 00:01:57 Jonathan_Eyre: afaik the webview video playing has the same codecs as everything else on the device, and aside from some basics (like baseline h264) there are almost no guarantees Dec 21 00:02:42 Jonathan_Eyre: what a/v codecs and container is the video? Dec 21 00:02:56 I'm getting MediaPlayer error -261, if that helps anything. Dec 21 00:03:07 It is a h264 MP4 file. Dec 21 00:03:24 I'm not certain what the audio stream is. Dec 21 00:03:45 _usually_ those are fine. in my experience Android doesn't have the fancier features of the codec though Dec 21 00:04:25 I assume that my WebView code is at fault, since that file appears to play natively if I use the browser, not my app. Dec 21 00:04:43 and then yeah, you get cryptic error codes that even Google can't help you with :) (unless you're using it wrong, most of the error codes are implementation-specific, so they vary by device, and are basically never documented) Dec 21 00:05:18 hm. small possibility Chrome is bundling its own decoder for consistency… but that would seem odd Dec 21 00:06:02 do u guys dev on windows or linux Dec 21 00:06:47 osx here Dec 21 00:07:19 OS X and FreeBSD here :) Dec 21 00:07:29 so either "that awful bastard-child we do not speak of" or "linux with a decent UI", depending on your *nix/BSD leanings Dec 21 00:07:36 Windows 8 Dec 21 00:08:16 bankai do u watch bleach Dec 21 00:08:28 i used t dev on osx til my mbp puked. then went to linux Dec 21 00:08:35 i dev on linux Dec 21 00:08:37 linux everything Dec 21 00:08:38 on win right now tho Dec 21 00:08:39 bcuz its free Dec 21 00:08:43 after i get rich Dec 21 00:08:47 im gona switch to free bsd Dec 21 00:08:54 for now im poor, linux will suffice Dec 21 00:09:01 dude enter is not a spacebar Dec 21 00:09:17 ?? Dec 21 00:09:22 Windows + Cygwin pretty much does everything. Dec 21 00:09:57 arcanine69: It's like you are that black kid from Malcolm in the Middle that takes a breath between every word. Dec 21 00:10:05 lol Dec 21 00:10:07 ohhh shit okay i get it Dec 21 00:10:21 i will try to speak in long sentences for you guise :) Dec 21 00:10:38 just irc etiquette Dec 21 00:10:50 i am learning little by little ;) Dec 21 00:11:14 Jonathan_Eyre: so basically… windows does everything when you run linux inside it :P Dec 21 00:11:41 you can put up to 400 characters per line on freenode servers Dec 21 00:12:19 newlines are a non-renewable resource. mustn't waste them! Dec 21 00:12:30 hahaha Dec 21 00:12:38 too funny Dec 21 00:13:16 GRoxx: I only use Cygwin for rare native C compiling, then tether a zillion Android devices to test each screen size/format/OS version that I'm likely to see in the field. The emulator blows. Dec 21 00:14:52 heh. yeah, and the emulators don't account for carriers / manufacturers screwing with things Dec 21 00:14:58 is it bad that I'm eating, updating my installs in one room, walking to the other to watch The Grinch with my kids, and round robining the whole process? hahaha Dec 21 00:16:49 deryl: That's fine until one of your kids round robins behind you and hits a ridiculously shiny power button. source: personal experience in the field Dec 21 00:17:36 lol true that Dec 21 00:17:57 heh. seems like you could sell that as a feature for computers - "LED decoy power button!" Dec 21 00:18:15 Groxx: I would buy the heck out of that! Dec 21 00:18:31 couple in that my kid's laptop is slow and his battery is screwed and its making for a fun filled night Dec 21 00:19:01 the things we deal with to do what we love. i feel like a 3rd world coding reject! hahaha Dec 21 00:19:11 then have the real button safely hidden away where adults can have fun with it. like in one of these: http://cl.ly/image/3t031R0d073t Dec 21 00:19:19 Jonathan_Eyre so would i Dec 21 00:30:24 seems like i have a mismatch between gradle and the gradle plugin Dec 21 00:30:25 everything is up to date Dec 21 00:30:28 is there a mismatch between the newest gradle and the newest Android Studio? Dec 21 00:32:34 gradle plugin 1.0.0, gradle 2.2.1, AS 1.0.2 is fine Dec 21 00:32:59 RustyShackleford make sure you have the latest build-tools i guess Dec 21 00:33:44 if you are using gradlew, make sure thats pointing to the right thing Dec 21 00:37:02 i'm so confused Dec 21 00:37:30 i should confirm the gradle plugin version Dec 21 00:38:25 i do have gradle 2.2.1 and AS 1.0.2 Dec 21 00:39:09 RustyShackleford sdk manager shows latest stuff installed ? Dec 21 00:40:47 yep everything is updated in sdk manager also Dec 21 00:40:58 does this error tell you anything? Dec 21 00:41:04 Error:(1, 0) Plugin with id 'com.android.application' not found. Dec 21 00:41:31 yeah, maybe your build.gradle is messed up - wrong dependencies, etc Dec 21 00:42:30 RustyShackleford you have "classpath 'com.android.tools.build:gradle:1.0.+'" in your buildscript { } section ? Dec 21 00:43:28 we're looking at build.gradle? Dec 21 00:43:33 ya Dec 21 00:43:37 i don't see any buildscrip section Dec 21 00:43:41 root one Dec 21 00:44:09 root/build.gradle is empty except for an auto generated comment Dec 21 00:44:45 hmm, then look one level down into your android project, is it there ? Dec 21 00:45:07 you can have multiple build.gradle files Dec 21 00:46:02 root/app/build.gradle also has no buildscript {} section Dec 21 00:47:27 RustyShackleford get http://tools.android.com/tech-docs/new-build-system/gradle-samples-0.14.4.zip Dec 21 00:47:47 and look over http://tools.android.com/tech-docs/new-build-system/user-guide Dec 21 00:48:12 the first example on the page shows you buildscript { } Dec 21 00:48:19 okay i'll read that stuff Dec 21 00:48:36 i noticed that buildToolsVersion is 21.1.2 Dec 21 00:49:02 er, nevermind. That isn't the gradle version Dec 21 00:50:56 damn and I'm running the SDK Manager so I can't launch a terminal in eclipse to see the version for you Dec 21 00:55:49 g00s: i still think it's strange that an autogenerated project won't build Dec 21 00:59:16 with all the updating this thing is doing i hope i don't run into that. Dec 21 00:59:47 i planned on generating one of each project type supported and grousing what was made, then attempting a build on each to see whats different with each build type Dec 21 01:00:24 g00s: so I created a new project but used the Blank Activity instead of the Navigation Drawer Dec 21 01:00:27 and it builds just fine Dec 21 01:00:35 and runs on my phone Dec 21 01:00:52 compare the build files Dec 21 01:01:22 so build.gradle is the endallbeall of the differences in a project? Dec 21 01:01:30 well of what can and is built? Dec 21 01:02:54 let me put it this way. Is build.gradle more akin to configure on linux, or a Makefile? Dec 21 01:03:46 probably makefile Dec 21 01:03:54 g00s: yeah the working project has a nonempty root/build.gradle Dec 21 01:04:01 with a buildscript {} entry Dec 21 01:04:02 well I should say more akin to the Makefile that configure generates at the end. (is it the creation script for gradle or the end result like Makefile is) Dec 21 01:04:08 g00s ok. thanks Dec 21 01:04:28 deryl there is no creation script in our case though Dec 21 01:04:42 ok Dec 21 01:04:44 unless you go into AS and make a new project, it will create build.gradle and stuff Dec 21 01:04:59 build.gradle is the alpha and omega :) Dec 21 01:05:44 deryl if you blow away your .idea files/dir, .gradle files/dir, *.iml files you are OK as long as you have your build.gradle Dec 21 01:05:58 gotcha. so you'd run a: gradle build.gradle to build the project (or is it a 755'd file you run rather than gradle directly) Dec 21 01:06:16 gradle Dec 21 01:06:23 so gradle assembleDebug Dec 21 01:07:02 ahh. so is build.gradle == .gradle Dec 21 01:07:20 .gradle just being the extension on the file Dec 21 01:07:37 why are so many filenames highlighted in red? Dec 21 01:07:41 does that have to do with git? Dec 21 01:08:10 or does it contain the directives for each possible ? I'm still setting up over here so I haven't gotten into any of this stuff as of yet Dec 21 01:08:45 you can feel free to tell me to stfu and wait until i'm done setting up and see for myself :) Dec 21 01:09:52 well, you did say earlier it was more akin to Makefile so that would mean containing the directives. didn't catch that obviously Dec 21 01:09:53 well it looks like I fixed the whole gradle snafu Dec 21 01:10:26 RustyShackleford score :) Dec 21 01:11:17 deryl no, all files are build.gradle Dec 21 01:11:28 time for you guys to read some docs :D Dec 21 01:12:26 yeah, you weren't live earlier when it was said. I'm absolutely new to android and its toolset. I'm installing the stuff now. I'll end up covering it when I finish setting up the toolset and start digging Dec 21 01:12:47 i was doing a driveby info-grab was all. forgive me Dec 21 01:27:32 I rather like the navigation drawer. Now I'm on the fence between that and lateral navigation Dec 21 01:29:47 if you can fit all the tabs on the screen, tabs are probably better. then you don't have to pull out the drawer Dec 21 01:30:11 when nav drawer came out, they did some devbytes on when to use it Dec 21 01:30:31 for example, alarm clock is better served with tabs Dec 21 01:31:09 of course, only you know the information architecture of your app ;) Dec 21 01:31:18 the guideline says a nav drawer is appropriate when there are three or more components Dec 21 01:31:49 I'm just gonna break the rules a little and roll with it Dec 21 01:32:03 I can always rewrite it later Dec 21 01:32:15 the nav drawer makes me look like a pro with minimal effort haha Dec 21 01:33:45 minimal effort until you see the template :D Dec 21 01:34:00 yeah its a frightening amount of boilerplate Dec 21 02:16:46 wow, the atlassian bug tracking system is pretty nice. i'm surprised google doesn't have something more along those lines for external use instead of the 'free form' thing they have now, which lets anyone put any shit on there. the atlassian one had a rigid schema, fields with strict validation, i bet the data quality is much higher Dec 21 02:23:14 ok thats it. back to android studio. eclipse android sdk module kept blowing up. removing Dec 21 02:25:18 buncha wasted time. should have stuck with android studio and called it even. (well actually knowing that its going to be a nightmare with eclipse wasn't a waste if it keeps me from using that module in the future) Dec 21 02:35:34 hi, I read on Wikipedia that Dalvik uses "an alternative instruction set", so this means that Dalvik isn't compatible with Java after all> Dec 21 02:35:35 ? Dec 21 02:43:06 VladolfPutler: instead of converting to standard java bytecode, it converts to dalvik Dec 21 02:44:27 the code is still java, the executable is not Dec 21 02:46:25 Is it possible to create an Animation drawable without using a frame-by-frame animation? Creating multiple drawables is very inefficient IMHO Dec 21 02:54:12 g00s: are you referring to JIRA? why didn't you just say JIRA? **** ENDING LOGGING AT Sun Dec 21 03:00:00 2014