**** BEGIN LOGGING AT Tue Dec 16 02:59:58 2014 Dec 16 03:02:51 why Spinner has some padding and extra line bellow? Dec 16 03:04:09 TacticalJoke: haha, I keep BARELY catching myself with some people Dec 16 03:04:15 :) Dec 16 03:04:35 kamol: ¯\_(ツ)_/¯ Dec 16 03:04:53 Groxx: ? Dec 16 03:05:26 kamol: who knows. horizontal spinner or round/indeterminate? Dec 16 03:05:50 or wait. I keep forgetting Spinner is a selectable list thing in Android. Dec 16 03:06:07 worst. name. ever. Dec 16 03:06:14 yeh... odd to me Dec 16 03:06:15 Groxx: similar issue http://stackoverflow.com/questions/10196223/extra-line-in-android-spinner Dec 16 03:06:48 spinner == beachball to me :p Dec 16 03:07:05 kamol: interesting. I haven't heard of that one before, sorry Dec 16 03:07:33 Groxx: it is ok :) Dec 16 03:08:15 kamol: can you set your own background image? I wonder if that would fix it... Dec 16 03:08:42 kamol: I'm just guessing randomly though, no idea what might actually fix it Dec 16 03:09:11 Groxx: I just want to use Spinner without extra paddings and line… I dont’ know why, but it looks like android bug? Dec 16 03:10:05 Why is a double-ended queue called a "Deque" and not a "DeQueue" (or "DEQueue")? Dec 16 03:11:17 * g00s sighs Dec 16 03:11:18 TacticalJoke: I would guess because "DeQueue" is a verb Dec 16 03:11:19 kamol: Can you fix it by messing with your row? Dec 16 03:11:27 True, Groxx. lol Dec 16 03:11:53 TacticalJoke: because Americans are not posh OCD snobs like the Brits ;) Dec 16 03:12:06 TacticalJoke: I tried already but still not so nice Dec 16 03:12:27 TacticalJoke: alternate theory: "stack" is kinda like those stacks of plates at buffets, where you can only get / push on the top. "deque" could be pronounced "deck", and like a deck of cards it's only really useful to pull from the top or bottom. Dec 16 03:12:41 so you get some rhyming fun out of the class names Dec 16 03:12:42 That might be it. :) Dec 16 03:14:13 it's a good idea to shorten queue to que Dec 16 03:14:21 Que? Dec 16 03:14:28 No comprendo. Dec 16 03:14:37 or better yet, just Q Dec 16 03:14:46 it all sounds the same Dec 16 03:15:44 DQ Dec 16 03:16:03 Hmm, Java's documentation tells me to use Deque instead of Stack. Android's doesn't tell me this. Dec 16 03:16:18 I love how some of Java's documentation is essentially "This class sucks". Dec 16 03:16:23 best not to read oracle's docs and expect android to follow suit Dec 16 03:17:08 On the basis that Stack doesn't implement an interface, I'm thinking it might be best to use Deque. Dec 16 03:17:28 And because Stack subclasses Vector (lolwut). Dec 16 03:23:27 I know they tell you to use 48 x 48 launcher icons in android:icon in the mainfest but mine looks horrible at that few pixels. Why can't I make it more? Dec 16 03:24:13 oh wait thats dp not px Dec 16 03:29:13 hmm Dec 16 03:29:18 my AVD doesn't seem to be rooted Dec 16 03:29:23 that's a pain.. Dec 16 03:57:45 hey guys - anyone know how to root a 4.3 avd? Dec 16 03:58:59 MJCD, a) you dont need it rooted Dec 16 03:59:04 b) once again this is the wrong channel Dec 16 03:59:10 lol Dec 16 03:59:13 if you've got the danged avd as an image Dec 16 03:59:18 I asked in *-root Dec 16 03:59:19 edit the build.prop directly as i keep telling you Dec 16 03:59:29 neat, did you try asking in ##javascript as well? Dec 16 03:59:33 lol Dec 16 03:59:52 mockery for asking in the channel you asked me to ask in, which as you probably know, is long term idle Dec 16 04:00:00 you're the best. Dec 16 04:00:17 i'm not mocking you Dec 16 04:00:18 if you can help me manually set it - which appears to be a setting in the /data/data/com.android.providers.settings/databases/settings.db Dec 16 04:00:19 i told you what to do Dec 16 04:00:27 not in the build.prop file at all Dec 16 04:00:46 but I also want to set the country id and telecom provider, etc Dec 16 04:00:54 all of which is provided convieniently by market helper Dec 16 04:01:12 thus, root is, for me, a nice and easy solution that will allow me to quickly manipulate all these settings in one go Dec 16 04:01:51 on an ongoing basis without manually changing everything in hex values every time Dec 16 04:08:40 TacticalJoke ron jeffries is coming out with another book. https://pragprog.com/book/rjnsd/the-nature-of-software-development Dec 16 04:08:53 i didn't really liek xp, but i'll check it out Dec 16 04:09:51 I have GLES20 issue, can someone help my understand why this 4 sided triangular pyramid? http://pastebin.com/cpsZ8uwr Dec 16 04:10:16 Sorry..let me try that again. Dec 16 04:11:25 Looks quite interesting. Thanks. Dec 16 04:11:40 That publisher lokos familiar to me. Must've read a few things from them. Dec 16 04:11:47 looks* Dec 16 04:14:09 lame http://www.androidpolice.com/2014/12/15/after-scuffles-apple-google-others-holder-defunct-patent/ Dec 16 04:24:07 g00s: I always wonder how such a guy could try going after someone not in usa... Dec 16 04:24:48 hey p_l haven't seen you in a while, how's it going? Dec 16 04:25:11 suddenly a network admin ;) Dec 16 04:26:26 :O Dec 16 04:26:27 so I've been up to my ears in all kinds of IOS (including the intelligible cow called CatOS), few other things, and a wtf!CTO at a $secret client of the company I work for Dec 16 04:26:36 pay is good, though Dec 16 04:26:46 CatOS ;) Dec 16 04:27:22 g00s: https://pbs.twimg.com/media/B3-o0FlCQAA0xXi.png Dec 16 04:27:30 it sums it really, really well ;) Dec 16 04:28:26 heh Dec 16 04:28:58 CatOS seems like .. not so good Dec 16 04:32:00 heh "penguin w a cow attached"... mirth achieved :D Dec 16 04:32:26 capella-s3: it also chews grass REALLY fast ;) Dec 16 04:32:44 (unless it's 1000v, but well....) Dec 16 04:34:52 probably going to visit california in few months Dec 16 04:36:55 thought I sae an article recently re Ford switching to qnx in their cars Dec 16 04:37:14 * capella-s3 goes looking Dec 16 04:37:19 it's a good decision Dec 16 04:37:23 yeah saw that too Dec 16 04:37:24 iirc QNX was quite big in automotive (and not only) for a long time Dec 16 04:37:44 who knows if BB has fucked it up by now though Dec 16 04:37:55 I would choose an RTOS for a car as well Dec 16 04:38:17 but I heard that there's been a trend to move *out* from QNX, because "someone" fucked up the relationship with QNX licensees Dec 16 04:38:28 i'd guess there are dozens if microcontrollers, the qnx part would be for movies Dec 16 04:38:59 yeah, imagine android controlling the engine timing? LOOL Dec 16 04:39:06 its so .. janky Dec 16 04:39:06 g00s: or for that one beefier SoC that does main board management Dec 16 04:39:13 i'm on nexus5 once i've updated to lolipop i can't debug my app on eclipse.. what ahppened? Dec 16 04:39:34 engine timing would be probably dedicated micro, but who knows Dec 16 04:39:34 if it's android or IOS you'd get an indefinite spinning progress bar when you hit your brakes Dec 16 04:40:04 abs, engine timing, air bags, tend to be different controllers Dec 16 04:40:30 Imagine if Android controlled your life-support machine. Dec 16 04:40:56 Person Not Responding Dec 16 04:40:57 TacticalJoke: it would be probably better secured than actual stuff Dec 16 04:41:03 (wish it was a joke) Dec 16 04:41:04 PNR, ANR :) Dec 16 04:41:06 ;o Dec 16 04:41:25 omt fir sure Dec 16 04:41:32 some guy did an internet-wide check for unsecure VNCs Dec 16 04:41:41 at one point he connected to a medical bed Dec 16 04:42:39 a lot of non-network-hw "embedded" is "we're boned if someone connects" Dec 16 04:42:46 and raised it really fast and tossed a patient across the room? Dec 16 04:43:17 worst he could do is fold the bed in half at overclocked speeds Dec 16 04:43:51 * capella-s3 bed eats human Dec 16 04:43:57 https://twitter.com/diodesign/status/499675932580249601 Dec 16 04:52:08 Has anyone here used SwipeRefreshLayout? Dec 16 04:52:24 I'm having a problem where it is enabled and refreshing, but the indicator is not visible. Dec 16 04:53:28 p_l how much time do you think we have left? http://arxiv.org/abs/1412.3489 Dec 16 04:53:36 It is visible when first set refreshing, but when I rotate the screen (or go to another fragment and then come back) and the indicator is programmatically set to be refreshing (because it still is in the background), the indicator is not visible and can't be pulled (as it if was disabled, even though it is) Dec 16 04:53:40 before AI kills us all :) Dec 16 04:54:11 Once the background refresh finishes, the SRL becomes pullable again. Dec 16 04:54:26 I for one welcome our overlord robots Dec 16 04:55:53 capella-s3 if they are written in js, probably have nothing to worry about :) Dec 16 04:56:03 g00s: still lots :P Dec 16 04:57:24 hahaha... native beats dynamic Dec 16 04:59:01 s/dynamic/js/ Dec 16 04:59:10 ("dynamic" is too damn unspecified! xD) Dec 16 04:59:22 interpreted? Dec 16 05:00:12 let's just leave it at "JS", because there's more nuance to its failure that gets exposed this way ;) Dec 16 05:00:29 ok, I'm in Dec 16 05:01:26 i think mozilla has too much affection for js; like their pdf.js thing Dec 16 05:01:40 btw, someone (in silicon valley, of course) proposed node.js on microcontrollers... Dec 16 05:01:53 g00s: JS is Mozilla's answer to any form of plugins Dec 16 05:03:28 with "just compile to asm.js" if you want to use something other than js Dec 16 05:05:05 * g00s worried about moz's future Dec 16 05:06:50 Power + Volume Down is the worst key combination ever. Dec 16 05:07:53 Volume Up + Volume Down would be the worst, actually Dec 16 05:08:35 Don't give them ideas. :D Dec 16 05:08:59 * capella adds ctypes.jsm to hist list 'o things he really needs to get to Dec 16 05:11:34 Sigh. I converted my LinearLayout with two child TextViews (with their own sizes and so on) into one TextView (that uses spans), and I can't see a performance difference. :/ Dec 16 05:11:50 With large Reddit comments, my tablet lags a little when scrolling. Dec 16 05:15:29 I don't really notice this on my phone. My tablet shows so many views at once, I guess. Dec 16 05:16:06 <_genuser_> oh the joys of an app working differently on different phones. Dec 16 05:16:32 And I get a merge conflict while updating with changes. Awesome. Dec 16 05:16:44 A merge conflict is exactly what I would like right now. Dec 16 05:16:54 <_genuser_> merge conflict in codebase? Dec 16 05:17:12 Oh, I was doing weird stuff, updating with local changes. Dec 16 05:17:19 Because I was timing getView and so on. Dec 16 05:17:29 But I changed something that led to a conflict when updating/checking-out. lol Dec 16 05:18:41 <_genuser_> oh that's always fun. most merges are straight forward. but now and then you get to a point where you have keep one of the changes and you'lre left thinking. Dec 16 05:18:43 With those conflicts, though, you can just take any side. Dec 16 05:18:48 Yeah. Dec 16 05:18:51 I hate *real* conflicts. Dec 16 05:19:00 Ones where you could lose data. Dec 16 05:19:02 <_genuser_> hrh Dec 16 05:19:41 I wish my revision-control system knew Java/Android. Dec 16 05:20:18 <_genuser_> what are you using? Dec 16 05:20:27 Mercurial. Dec 16 05:20:42 <_genuser_> me too. :) Dec 16 05:21:53 :D Dec 16 05:22:10 * TacticalJoke does the special Mercurial handshake. Dec 16 05:23:08 So I lost the LinearLayout with two TextViews. Dec 16 05:23:10 <_genuser_> and the wave Dec 16 05:23:13 But I gained a whole load of spans. Dec 16 05:23:17 Not sure if better or worse. Dec 16 05:23:29 The span code actually scares me. Dec 16 05:23:42 ok, time to get ready for visa appointment, yay Dec 16 05:24:56 This is the span code: http://pastebin.com/pfgz7VLh Dec 16 05:25:14 Am I wrong for being afraid of that happening maybe 20 times every time the ListView is scrolled? Dec 16 05:25:41 I'd like some opinions about my game flow. about 35% of users never make it to the first jigsaw puzzle screen Dec 16 05:25:48 I am trying to understand why Dec 16 05:25:56 <_genuser_> p_l: if visa rejects you, go for mastercard Dec 16 05:26:08 The game link is: https://play.google.com/store/apps/details?id=com.flyingsoft.safari.jigsaw.free Dec 16 05:26:20 _genuser_: well, except mastercard does not sell US Visas ;) Dec 16 05:26:28 (you know, the kind that goes into passport) Dec 16 05:26:33 <_genuser_> p_l: planning on visiting our shores? Dec 16 05:26:34 Can I optimize that code I just posted? Dec 16 05:26:52 _genuser_: sent by employer Dec 16 05:27:04 I'm guessing not, because I don't think any of it is the bottleneck by any means. Dec 16 05:27:08 <_genuser_> p_l: where you now? interesting stuff!! Dec 16 05:27:26 Poland, we work with a client in Palo Alto though Dec 16 05:27:45 <_genuser_> nice, if you have single polish chicks.... bring them. Dec 16 05:27:58 <_genuser_> local chicks are little crazy Dec 16 05:28:08 <_genuser_> we could do a chick-swap. Dec 16 05:28:15 <_genuser_> between our countries. :) Dec 16 05:28:16 heh Dec 16 05:28:20 anyway, time to go, cya Dec 16 05:28:24 <_genuser_> good luck Dec 16 05:28:24 lol Dec 16 05:28:42 i'm thinking p_l is keeping his over there Dec 16 05:28:49 i visited Warsaw once... women there were beautiful Dec 16 05:29:02 _genuser_: Only local ones? ;D Dec 16 05:29:20 <_genuser_> well not his. free ones. hey the US could use some non-career types who wear VP style haircuts and are generally men with boobs. Dec 16 05:29:34 all model thin Dec 16 05:29:38 <_genuser_> non-career types vs those who.... Dec 16 05:30:07 <_genuser_> TacticalJoke: american girls seem high on drama. european ones seem less keen on it. just observation. Dec 16 05:31:08 americans are sheeple Dec 16 05:31:30 My phone has basically zero lag, even with huge Reddit comments. Dec 16 05:31:34 My tablet is annoying me. Dec 16 05:32:01 <_genuser_> g00s: oh you're not from america - the greatest country? Dec 16 05:32:12 _genuser_ oh, i am Dec 16 05:32:18 <_genuser_> TacticalJoke: you need the surface pro 3, i7. Dec 16 05:32:22 TacticalJoke different GPUs ? Dec 16 05:32:28 <_genuser_> g00s: well, son, don't be unpatriotic!! :p Dec 16 05:32:41 I think a big factor is that the tablet has a big screen. Dec 16 05:32:51 It's showing like 14 ListView children at once. Dec 16 05:32:59 My phone is showing around seven. Dec 16 05:33:31 <_genuser_> TacticalJoke: is this your own app? Dec 16 05:33:33 Yeah. Dec 16 05:33:41 Though the same applies to other Reddit clients. Dec 16 05:33:47 In fact, the others I've tried are *way* worse. Dec 16 05:34:06 <_genuser_> TacticalJoke: one suggestion would be to provide a different UI for tablets and make row height big enough to only show about 7 and see if that changes anything. Dec 16 05:34:22 Yeah, true. Though it defeats my purpose: to make loads of comments readable at once. :D Dec 16 05:34:24 <_genuser_> TacticalJoke: to rule out your list item UI generation cost. Dec 16 05:34:31 _genuser_ you mean, make it material ? Dec 16 05:34:35 haha Dec 16 05:34:46 I'm not sure about something... Dec 16 05:34:52 <_genuser_> TacticalJoke: yeah, that would only be to determine if it's the listview UI generation that's affecting speed. Dec 16 05:35:06 I have a CommentView which is a LinearLayout subclass that has a CommentIndentView and a CommentTextView. Dec 16 05:35:16 <_genuser_> g00s: I just like to support mah countray! Dec 16 05:35:29 The indent thing has a width of 0 for top-level comments and >0 for sub-comments. Dec 16 05:35:42 <_genuser_> I have a lot of bit manipulating to do in a file and I"m trying to hash out the code for it. Dec 16 05:35:44 Should I create two view types? Could that help performance? Dec 16 05:35:53 <_genuser_> seemed so simple, ended up being little convoluted. Dec 16 05:36:14 TacticalJoke are your listview items of uneven height ? Dec 16 05:36:17 Yeah. Dec 16 05:36:27 It's the high comments that are the worst. Dec 16 05:36:29 hm, that could be part of it Dec 16 05:36:41 Yeah, I think that's 90%+ of it. Dec 16 05:36:46 But a Reddit client has no choice. :[ Dec 16 05:37:25 <_genuser_> only if you didn't use reddit, huh? Dec 16 05:40:01 g00s: lasserix_ and others were talking about custom drawing. Maybe that could give me a huge speed boost. Dec 16 05:40:05 Where I figure out dimensions myself. Dec 16 05:40:57 TacticalJoke whats the reason ? Dec 16 05:41:17 Well, right now, I'm having to use layout_weight in a LinearLayout Dec 16 05:41:18 . Dec 16 05:41:35 Two child views. Custom drawing would get rid of that. Dec 16 05:41:42 thats not slow Dec 16 05:42:26 Also, people were talking about variable-height TextViews being slow inside a ListView. Dec 16 05:42:36 And I think they were implying that custom drawing could avoid this slowness. Dec 16 05:42:52 No crazy wild measuring; just one measure. Dec 16 05:43:06 not sure on that one Dec 16 05:43:07 -ment Dec 16 05:43:29 I use 15+ views, complex alignments, variable textView heights Dec 16 05:43:47 and I can rip though 100's of items Dec 16 05:44:22 What's the secret? Dec 16 05:44:27 probably better to find out what the holdup is rather than attempting fixes based of guesses Dec 16 05:44:53 It's only with TextViews whose heights are very large. Dec 16 05:45:25 then have a max lines and an expand Dec 16 05:45:29 TacticalJoke what if you made each textview 1-2 lines , and then if the user touches it, it expands Dec 16 05:45:47 wow, thats a good idea :) Dec 16 05:45:48 Yeah, I was thinking about that, g00s. Hmm. Dec 16 05:46:21 though as a designer not a fan of..."implied" functions Dec 16 05:47:27 I'm trying it now. Not sure whether it's gonna be tedious or awesome. Dec 16 05:50:20 Has anyone here used SwipeRefreshLayout and had problems with the refresh indicator disappearing on screen rotation? Dec 16 05:51:24 does anyone knows if a system app is notified in its lifecycle if the app is disabled? Dec 16 05:51:28 TacticalJoke there is a devbytes for expanding LV items, somewhere Dec 16 05:52:49 Be right back; my computer's gone crazy. Dec 16 05:53:13 Typesafe survey: Java 8 Adoption Strong, Users Anxious for Java 9 Dec 16 05:53:20 yeah, me too :/ Dec 16 05:53:56 google man, get your shizzle together Dec 16 06:00:36 Hmm, still getting some lag with just two lines showing. Dec 16 06:01:41 weren't you profiling that stuff? Dec 16 06:02:14 I was just doing stuff with System.currentTimeMillis. Dec 16 06:02:27 The traceview thing seemed like a pain. Dec 16 06:02:40 ah.. Dec 16 06:05:30 are you scrolling through a static list? or rebuilding / reloading the input dynamically? Dec 16 06:06:15 Scrolling through a static list. Dec 16 06:06:29 and recycling views ofc Dec 16 06:06:49 Yeah. Dec 16 06:07:13 My tablet creates 14 views the first time (big screen). It then creates another two views sometime later. There are 200 items in this list. Dec 16 06:07:18 <_genuser_> man, I hate having to reboot. Dec 16 06:07:29 I've noticed that 5.0 doesn't create those extra two views. Dec 16 06:07:33 This is 4.4. Dec 16 06:08:47 Ithe two extra views are like the top/bottom edge cases Dec 16 06:09:11 Yah, that makes sense. Dec 16 06:09:14 being recycled / swapped in/out Dec 16 06:09:41 (based on prev testing but not actual examination of class code) Dec 16 06:10:14 never done android profiling ... might be a good reason to tinker in that direction :) Dec 16 06:10:24 s/reason/opportunity/ Dec 16 06:10:32 I think part of the issue is that my tablet's screen is big, and the tiniest stutter is highly noticeable. Dec 16 06:10:58 :) Observational bias Dec 16 06:11:06 Picky picky author Dec 16 06:11:14 Yeah, that's probably a big part of it. Dec 16 06:11:20 I bet most users wouldn't even notice what I'm talking about. Dec 16 06:11:45 Oh, gawd, it looks so cute when I make the text tiny. Dec 16 06:11:56 Kinda like when you put packets of stuff in the microwave. Dec 16 06:15:51 Does this look like it performs well: http://pastebin.com/pfgz7VLh Dec 16 06:15:55 The use of ArrayDeque. Dec 16 06:16:16 I should probably call that SpanBuilder. :D Dec 16 06:16:25 Wait, SpannableBuilder. Dec 16 06:16:32 No, SpannedBuilder. Dec 16 06:16:40 I dunno. Dec 16 06:16:42 lol Dec 16 06:18:44 I guess I could give a size hint to the ArrayDeque. Dec 16 06:19:10 Hmm, it starts with 16 elements if you don't. Dec 16 06:29:53 Okay, that ArrayDeque seems fast. Can add three items and remove three items 1,000 times in about 8 milliseconds. Dec 16 06:39:52 I think the issue is that I'm obsessing over the tiniest thing. Dec 16 06:40:19 I want stuff to be perfect and hate when it's not. :/ Dec 16 06:58:52 pfn looks like cree came out with a new led, MT-G2 Dec 16 06:59:01 lol, 2000 lumen :O Dec 16 06:59:13 hot Dec 16 06:59:18 I want Dec 16 06:59:58 i was looking at this new nitecore, 2x18650 http://www.nitecore.com/productDetail.aspx?id=147 Dec 16 07:00:41 * g00s hasn't been keeping up with the industry Dec 16 07:01:31 I haven't Dec 16 07:01:42 I've been happy with my single cell Fenix Dec 16 07:01:57 suits my purposes for daily carry Dec 16 07:03:06 only thinh i have now is a zebralight h51, sc51 Dec 16 07:03:21 AA, eneloops Dec 16 07:03:56 headlamp is insanely useful and small Dec 16 07:04:51 I have like a hundred cr123 in my cabinet Dec 16 07:05:03 no reason to ever go aa Dec 16 07:05:12 I would like a nice headlamp Dec 16 07:06:06 pfn http://www.zebralight.com/H302w-CR123-Flood-Headlamp-Neutral-White_p_156.html Dec 16 07:06:54 i like fenix, but their headlamps are goofy Dec 16 07:07:34 holy crap, that thing is 400+ lumen :O Dec 16 07:09:57 <_genuser_> is it a pretty limited idea to only support AES 256 in an android app? Dec 16 07:10:14 <_genuser_> are there really devices out there api level 14+ that wouldn't support AES256? Dec 16 07:10:49 _genuser_ is that in bouncycastle? if so, probably good to just supply your own Dec 16 07:11:09 <_genuser_> sorry, not sure what bouncycastle is. Dec 16 07:11:12 http://rtyley.github.io/spongycastle/ Dec 16 07:12:50 <_genuser_> interesting, I see that it's a crypto library that's third party. Dec 16 07:13:21 <_genuser_> I wonder if stock java Cipher class uses BouncyCastle in the back or if Java's implementation is theirs Dec 16 07:13:36 android comes with some version of BC Dec 16 07:13:45 which is kinda the problem Dec 16 07:14:13 <_genuser_> so with spongycastle, you're package the spongecastle.jar with your .apk? just like the many other .jar files? Dec 16 07:14:22 <_genuser_> s/you're/you'd/ Dec 16 07:14:37 yeah, they rename the package so it doesn't conflict with android's Dec 16 07:15:31 <_genuser_> so when I start my data encryption module I suppose I can pull in spongycaslte and go with that. Dec 16 07:15:40 _genuser_ what app is it ? Dec 16 07:15:46 <_genuser_> haven't finish one app, have tons more ideas for other stuff. Dec 16 07:16:00 yeah I mean your question is missing context Dec 16 07:16:17 the context is what app is it and what are you encrypting ? Dec 16 07:16:22 <_genuser_> StingRay_: just thinking of storing encrypted notes/passwords. I know there's tons of app in playstore. I'm just catalog'ing app ideas that I can write from scratch to be a better android dev. Dec 16 07:17:11 <_genuser_> StingRay_: ultimately, I might store work related binary files (.ppt, .docx, .pdfs) as encrypted on my device. Dec 16 07:17:20 _genuser_ you may also want to check out http://www.informit.com/store/bulletproof-android-practical-advice-for-building-secure-9780133993325 Dec 16 07:17:30 <_genuser_> encrypted because they're work related and the device is personal. so if it's lost, work stuff isn't leaked. Dec 16 07:18:20 <_genuser_> g00s: lol, copyright 2015. Which means while it's still 2014, you can plagiarize and bootleg all you want. Dec 16 07:18:40 _genuser_ so secure password and full device encryption Dec 16 07:19:06 I would expect that of employees using personal devices to store work related materials Dec 16 07:19:40 <_genuser_> StingRay_: well, full device encryption has two things I don't like: 1) I didn't code it, so I didn't learn anything. 2) the entire device being encrypted would be slow. Dec 16 07:20:03 well by device i mean user data Dec 16 07:20:40 <_genuser_> right, it would be interesting to build an locker app for my team so we can take work files on the road. Even tho, we all have company issued second devices also. Dec 16 07:21:09 <_genuser_> g00s: I'm gonna have to read thru that book. sounds like it should have some good ideas. Dec 16 07:22:04 <_genuser_> StingRay_: my main goal is to be a little more than part-time android dev. So storing ideas to use to have some experience with fully working polished apps. Dec 16 07:22:18 <_genuser_> StingRay_: so you can whip out your phone and demo for prospective employers, etc. Dec 16 07:24:11 <_genuser_> g00s: so you recommend against using stock Cipher and going with SpongyCastle to always be sure that app has the algorithm it needs? Dec 16 07:24:44 _genuser_ this isn't my area, but different versions of android come with diffeerent versions of bouncycastles ... Dec 16 07:24:58 yeah, best to include exactly what you want Dec 16 07:25:23 <_genuser_> g00s: I see. I guess, I'll verify with documentation that spongycastle is standalone and if so, I'll use that. Dec 16 07:25:42 <_genuser_> besides, nothing like knowing more frameworks/libraries to get employers happy. Dec 16 07:26:59 <_genuser_> I had done one basic app that which static salt, pseudo randomly generated IV, password to encrypt and store salt/iv/encrypted-text in a file. I'll have to read thru my notes. Dec 16 07:27:04 hey, got a wierd error, when I am writing the watchface, I have the java file AnalogWatchFaceService with no errors, but the wear manifest does not recognise this in the android:name Dec 16 07:27:10 does anyone have any ideas Dec 16 07:28:33 bouncy castle always reminds me of http://img9.uploadhouse.com/fileuploads/19030/1903046934fd47adf612fa05b6b262a82d24649f.jpg Dec 16 07:30:10 <_genuser_> alright, back to my camera app and why it doesn't work on galaxy s4/5 but does on Note II. debugging time!! Dec 16 07:32:16 capella-s3 what is that O.o Dec 16 07:32:33 <_genuser_> you didn't click on it by any chance.... Dec 16 07:32:38 old School arcade game :) Dec 16 07:33:04 crystal castle? Dec 16 07:33:08 yep Dec 16 07:35:01 g00s: waaaay off topic but funny haha http://www.theguardian.com/fashion/fashion-blog/2014/dec/15/why-dyed-armpit-hair-is-2015s-most-subversive-trend-taylor-swift Dec 16 07:35:11 does anyone know how to re-index a project in android studio Dec 16 07:35:19 <_genuser_> hmmm java guarantees only 128-bit key. so spongycastle is looking even cooler. Dec 16 07:35:50 <_genuser_> capella-s3: somehow, taylor swift looks a bit classy/older but not so much fashionable. Dec 16 07:35:53 <_genuser_> she's tryhing to break the image tho. Dec 16 07:36:54 purple pubes are next :-/ Dec 16 07:37:34 like a silly easter egg hunt XD Dec 16 07:39:02 capella-s3 sounds like a topic for vogon poetry Dec 16 07:40:27 i'd also like to unsee those armpits Dec 16 07:40:38 * g00s vows not not click capella-s3 links again Dec 16 07:41:07 http://hitchhikers.wikia.com/wiki/Paula_Nancy_Millstone_Jennings Dec 16 07:41:35 Leeds: she had the worst poetry ever! Dec 16 07:41:41 just started reading it again Dec 16 07:41:43 she did! Dec 16 07:41:52 thank gos earth was destroyed Dec 16 07:41:58 that reference was largely airbrushed out of later versions Dec 16 07:42:00 now we just need to worry about vogons Dec 16 07:42:03 capella-s3 10 years from now "scientists warn dying armpit hair increases risk of breast cancer" Dec 16 07:42:19 Leeds: the Hebrew traslation has it Dec 16 07:42:26 <_genuser_> g00s: lol, that's why I didn't clikc on his first link either. Dec 16 07:42:41 hmm... I should try to read the Hebrew translation some day Dec 16 07:42:48 <_genuser_> g00s: unless somebody's helping with code, they're either rick-rolling you or showing really bad nekkid chicks Dec 16 07:42:49 how's your hebrew? Dec 16 07:42:55 not that my Hebrew would be good enough, but it would be practice Dec 16 07:43:15 thepoosh: very rusty, mostly... doesn't get used enough Dec 16 07:43:23 הממממ Dec 16 07:43:42 Leeds: http://he.wikiquote.org/wiki/%D7%9E%D7%93%D7%A8%D7%99%D7%9A_%D7%94%D7%98%D7%A8%D7%9E%D7%A4%D7%99%D7%A1%D7%98_%D7%9C%D7%92%D7%9C%D7%A7%D7%A1%D7%99%D7%94#.D7.95.D7.95.D7.92.D7.95.D7.A0.D7.99.D7.9D Dec 16 07:43:46 there you go Dec 16 07:43:57 wikiqoute Dec 16 07:44:04 holy encoded URL, Batman! :) Dec 16 07:44:11 Leeds: השירה רעה מכולן נכחדה על יוצרתה פאולה ננסי מילסטון ג'נינגס מגרינסברידג' אסקס, אנגליה, כשהושמד כדוה"א." מדריך הטרמפיסט לגלקסיה עמוד 45 Dec 16 07:44:24 this is the actual sentance from the book Dec 16 07:44:26 about her Dec 16 07:44:59 what did you guys think of the film ? Dec 16 07:45:06 i've been trying to understand how fragments work, does someone know some articles that explain it more clearly than the Android docs? Dec 16 07:45:11 it was interesting when detached from the books Dec 16 07:45:16 well, more important the effects :) Dec 16 07:45:33 ReScO: The best explanation I found was in a YouTube video, strangely enough. Dec 16 07:45:36 ReScO: http://www.vogella.com/tutorials/Android/article.html#components_fragments Dec 16 07:45:38 Yeah, the official documentation sucks here. Dec 16 07:45:53 vogella is pretty good at times Dec 16 07:46:12 Like much of the Android guides, it's "Here's an overly complex example. Don't worry -- we'll give you only a tiny code snippet so that you couldn't understand the example anyway". Dec 16 07:46:15 many* Dec 16 07:46:15 thepoosh, that still explains nothing... Dec 16 07:46:33 what explanation are you looking for? Dec 16 07:46:58 How they work and why would i need them Dec 16 07:48:57 ReScO: http://vinsol.com/blog/2014/09/15/advocating-fragment-oriented-applications-in-android/?utm_source=Android+Weekly&utm_campaign=59f1f4bf4d-Android_Weekly_125&utm_medium=email&utm_term=0_4eb677ad19-59f1f4bf4d-337295881 Dec 16 07:49:06 I'm a programmer who's used to click and drag UI building Dec 16 07:49:14 how can you force a re-index in android studio ? Dec 16 07:49:16 And just adding another screen Dec 16 07:49:19 (C#) Dec 16 07:49:38 yellowper: file > Invalidate Caches / Restart Dec 16 07:49:57 thanks Dec 16 07:50:02 ReScO: You know when apps allow you to swipe between screens? Fragments are designed for things like that. Dec 16 07:50:09 Also for displaying two panes rather than one on tablets. Dec 16 07:50:14 Hm Dec 16 07:50:21 So what should i use? Dec 16 07:50:37 Because i thought activities were deprecated and everything is fragments now Dec 16 07:50:41 No. Dec 16 07:50:43 That's nonsense. Dec 16 07:50:55 +1 Dec 16 07:50:57 Some experts don't ever use Fragments. Dec 16 07:51:03 Some people hate them. Dec 16 07:51:14 some use them lots Dec 16 07:51:18 I seem to remember Jake hates them Dec 16 07:51:28 All i'm trying to do is have the first screen that's a barcode scanner, and another screen showing all the information about a product Dec 16 07:51:33 in any case, they are very good for some stuff, and suck for others Dec 16 07:51:37 Hatas gon' hate. Dec 16 07:51:42 ReScO tbats Dec 16 07:51:44 I semi-hate them. :D Dec 16 07:51:47 TacticalJoke: lol Dec 16 07:51:51 And that's only the first screen if you're not logged in Dec 16 07:51:52 I agree, thepoosh. Dec 16 07:51:54 ReScO thats just 2 activites then Dec 16 07:52:15 I hate them at times, such as lifecycle weirdness Dec 16 07:52:17 ReScO: Activities are simpler than Fragments, IMO. Dec 16 07:52:26 Fragments are like activities within activities. Dec 16 07:52:33 TacticalJoke: i agree, i also have no idea where or how to start.. Dec 16 07:52:46 I don't want to show a full screen barcode scanner Dec 16 07:52:58 just the top half of the screen Dec 16 07:53:04 With instructions below Dec 16 07:53:21 And log in with facebook or google+ stuff Dec 16 07:53:31 That sounds like a single activity. Dec 16 07:53:32 SurfaceView is your best friend Dec 16 07:55:16 ReScO: Have you done "Hello, world!" yet? Dec 16 07:55:28 do I use android:name="com.test.face.AnalogWatchFaceService" or android:name=".AnalogWatchFaceService" Dec 16 07:55:33 Yeah, even built an app ages ago Dec 16 07:55:36 in the manifest file ? Dec 16 07:55:56 Did the app use multiple activities? Dec 16 07:56:01 https://play.google.com/store/apps/details?id=nl.deadpixel.recoverystick @ TacticalJoke Dec 16 07:56:04 Nope. Dec 16 07:56:18 But look at the date Dec 16 07:56:18 Have you ever started a secondary activity? Dec 16 07:56:23 Nope Dec 16 07:56:34 but i'll brb, gotta go to the supermarket Dec 16 07:56:50 You should create a multiple-activity "Hello, world". Dec 16 07:57:03 why would a manifest file fail to see a java file ? Dec 16 07:57:24 yellowper: the manifest only knows services, receivers and activities Dec 16 07:57:30 yes Dec 16 07:57:37 I have defined it as a service Dec 16 07:57:42 ok Dec 16 07:57:50 are you sure the packagename is correct? Dec 16 07:57:55 yes Dec 16 07:58:04 its was all working until I copied the directory Dec 16 07:58:09 can you control click it? Dec 16 07:58:16 now it wont recognise the java Dec 16 07:58:19 from the manifest Dec 16 07:58:36 you probably didn't copy some hidden files Dec 16 07:58:42 like .classpath maybe Dec 16 07:58:50 android:name=".AnalogWatchFaceService" Dec 16 07:59:06 it just red underlines the .A Dec 16 07:59:17 what is the hint? Dec 16 07:59:25 if a stylus is used in Android 4.4 to tap on a button instead of a finger, does the software need to be changed to take note of it? Dec 16 07:59:30 when you mouse hover on top? Dec 16 07:59:30 ; or newline expected Dec 16 07:59:43 weird Dec 16 07:59:48 Nivag: Is it even possible to detect that? Dec 16 07:59:51 is there a way to get it to rebuild everything from scracth Dec 16 08:00:11 yellowper: If you're in Eclipse, Project > Clean. Dec 16 08:00:17 android studio Dec 16 08:00:33 in eclipse I wouldnt have had the issue of copying the damn directory to backup Dec 16 08:00:43 android studio sucks in some ways Dec 16 08:00:52 Nivag unless something other than capacitive it's no different to your finger Dec 16 08:01:13 I don't know, but my user is thinking of using s stylus, I had assumed only a finger would be used. I don't need to know if is a finger or a stylus. Dec 16 08:01:20 Can you try Build > Rebuild Project? Dec 16 08:01:31 over and over Dec 16 08:01:48 its as if it cannot see any of the java files anymore Dec 16 08:02:13 StingRay_: thanks, that was what I suspected Dec 16 08:02:56 can I reference it with com.yella.watchfacey2.AnalogWatchFaceService Dec 16 08:03:13 instead of .AnalogWatchFaceService Dec 16 08:03:23 I think they should be identical. Dec 16 08:04:01 unnessescary qualified reference Dec 16 08:04:06 if I do that and hover Dec 16 08:07:08 Was this an Eclipse project you imported into Android Studio? Dec 16 08:07:14 nope Dec 16 08:07:34 it was written in android studio and was working Dec 16 08:08:28 When did it stop working? Dec 16 08:08:34 last nite Dec 16 08:08:36 'lo... Dec 16 08:08:48 I copied the dir and imported into another project Dec 16 08:08:56 then both stopped working Dec 16 08:09:04 then this mornign Dec 16 08:09:12 I created a brand new project Dec 16 08:09:21 and started manually copying the code into this Dec 16 08:09:28 hi, where i can find android sepolicy configuration files in Android 4.4 or Android 5.0? Dec 16 08:09:28 and get the exact same error Dec 16 08:09:58 TacticalJoke: you are here since me logging out 9 hours ago Dec 16 08:10:06 there doesnt actually seem to be any error in the code, just the wear manifest doesnt see the java code Dec 16 08:10:14 hehe Dec 16 08:10:50 Probably. lol Dec 16 08:11:04 yellowper: There's some gradle command for cleaning/rebuilding. Dec 16 08:11:09 Invoking gradlew, I think. Dec 16 08:11:50 trying it now Dec 16 08:14:58 gradlew check = Execution failed for task ':mobile:compileDebugJava'. Dec 16 08:14:58 > Cannot find System Java Compiler. Ensure that you have installed a JDK (not just a JRE) and configured your Dec 16 08:14:58 JAVA_HOME system variable to point to the according directory. Dec 16 08:15:06 ehhhh ? Dec 16 08:15:40 ok delete everything start afresh Dec 16 08:15:53 obviously something messed up behind the scenes Dec 16 08:15:59 thanks for the assiatance Dec 16 08:16:08 i need to understand google play services, have anyone had a fight with it? Dec 16 08:16:52 No worries. Good luck. Dec 16 08:17:30 Hi. Anyone know if it's normal for AdView to keep spamming webcore/webview messages to console even after calling pause() on it (from the Activity's onPause()) ? Dec 16 08:17:54 isn't that its job? Dec 16 08:18:19 I kind of expected it to stop doing work when I call pause() on it. :) Dec 16 08:19:40 I mean, my Activity's in the background, no point for AdView to do stuff and waste power.. Dec 16 08:21:50 I'm trying not to be sarcastic here, but "ads" and caring about wasting power in the same sentences?! :D Dec 16 08:21:56 sentence* Dec 16 08:22:25 heh Dec 16 08:38:14 is there a way to subscribe to location changes without specifying a minimum interval? Dec 16 08:38:17 TacticalJoke: back :) Dec 16 08:44:23 * capella-s3 wonders what it is in time warners internets that cycles my connection off/on at 3:30a each day Dec 16 08:58:04 too bad this play is not active in these hours Dec 16 08:58:37 TacticalJoke: what do you know about login screens and such? Dec 16 09:00:33 Probably very little. Dec 16 09:00:37 Why do you ask? Dec 16 09:02:10 they're long and white with a big red stripe, Dec 16 09:02:37 heh... getting tired :) Dec 16 09:03:09 TacticalJoke: I'm wondering what the right way is to log in with either facebook or google+ Dec 16 09:04:33 And seeing if the session is stil active Dec 16 09:08:54 so i have a question maybe not the best here. Any ideas why on a pored rom the bandwidth usage meter is broken? Dec 16 09:09:05 meaning it will show wifi data only but not cell data usage Dec 16 09:15:07 hello guys I am trying to create something like that Dec 16 09:15:07 https://play.google.com/store/apps/details?id=pipegame.pipegame Dec 16 09:15:29 what should I use a custom view, surface view, gridview, table layout ? Dec 16 09:15:51 I have a fixed number of rows and columns Dec 16 09:21:17 does every app has its own account? Dec 16 09:23:00 like every app is a unique use Dec 16 09:23:03 user* Dec 16 09:38:32 Morning All Dec 16 09:39:29 Nick-S: you can define a location delta amount instead Dec 16 09:40:14 Nick-S: or you could set up a geofence, depending on your needs Dec 16 09:41:01 Ankhwatcher: 10x, i am reading the sources now to understand how it works Dec 16 09:41:58 Ankhwatcher: because there is the provider/timeout way and the condition way Dec 16 09:42:12 so i am trying to understand if under the hoold it is checking the location anyway Dec 16 09:42:30 so if i use passive maybe i get updatges anyway Dec 16 09:42:52 Ankhwatcher: if i define location delta, how does it know without re-checking? Dec 16 09:44:33 Nick-S: https://developer.android.com/reference/com/google/android/gms/location/LocationRequest.html Dec 16 09:44:59 but thats the play services thing isnt it? Dec 16 09:45:11 yeah Dec 16 09:45:20 are you avoiding using that? Dec 16 09:45:37 sort of Dec 16 09:45:48 but my reason isn't good enough Dec 16 09:46:09 its because i'm developing an sdk and i don't know how to bundle it nicely without using gradle Dec 16 09:47:29 pp[s Dec 16 09:47:31 oops Dec 16 09:47:50 got it? Dec 16 09:49:00 Nick-S: hmm yeah, that's a valid reason to avoid it Dec 16 09:49:14 really? Dec 16 09:49:32 its real easy to add that lib proj Dec 16 09:49:38 well if you import the support library and rely on play services your users have to do the same Dec 16 09:49:44 but my bposs sais its a problem Dec 16 09:49:59 but its on the phone anyway no? Dec 16 09:50:05 i can do a fallback... Dec 16 09:50:08 Nick-S: not every phone Dec 16 09:50:13 if notinstalled.... Dec 16 09:50:37 Has anyone here used SwipeRefreshLayout and had problems with the refresh indicator disappearing on screen rotation? Dec 16 09:51:00 Nick-S: eg: http://www.amazon.com/Fire_Phone_13MP-Camera_32GB/dp/B00EOE0WKQ Dec 16 09:51:08 hey Dec 16 09:51:16 Ankhwatcher: say i'm using the normal services... if i am subscribed to the passive provider, how do i gurantee that i ever get an update? Dec 16 09:51:33 how can i set an "inversed portrait" orientation? Dec 16 09:52:08 i.e. i want to set a portrati oriantaion bt flipped bei 180 degrees Dec 16 09:53:12 umm, mirror horizontal and vertical will do the same thing Dec 16 09:53:25 thana: http://stackoverflow.com/questions/7686512/activity-in-portrait-or-reverse-portrait-only Dec 16 09:54:04 Nick-S: with location services there aren't really any guarantees Dec 16 09:54:44 Ankhwatcher: yeah i saw that -- but i cant depend on the sensor unfortunately :/ Dec 16 09:54:55 Nick-S: the user can disable everything, and if they have no network they generally have no location either. Dec 16 09:55:32 well i can detect that, Dec 16 09:55:36 thana: well the second answer points to a "reversePortrait" setting being available in the manifest Dec 16 09:56:14 thana: remember that you have to set it on every activity Dec 16 09:57:04 i am looking at LocationRequest Dec 16 09:57:28 Ankhwatcher: argh stupid me. completly ignored it. thank you :) Dec 16 09:59:20 Nick-S: yeah you should probably be looking at https://developer.android.com/reference/android/location/LocationProvider.html Dec 16 09:59:31 https://github.com/android/platform_frameworks_base/blob/kitkat-release/location/java/android/location/LocationRequest.java Dec 16 10:00:16 Nick-S: https://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener) Dec 16 10:00:50 yes i know but i really want to undestand what he does with my parameters Dec 16 10:02:29 FUSED_PROVIDER seems to be there Dec 16 10:04:50 Nick-S: http://stackoverflow.com/questions/17726728/get-location-without-google-play-services-android Dec 16 10:05:07 fused location is not available without Google Play Services Dec 16 10:05:34 what is your sdk for? Dec 16 10:05:53 hey guys, quick question, i have multiple apks on the google play store, do i need to use the specific app's public rsa key to do IAP's per app? or can i just pick one and stick to that one? Dec 16 10:06:12 Ankhwatcher: its not 100 percent true if you look at the sources Dec 16 10:06:19 Ankhwatcher: its reading wifi/location Dec 16 10:07:37 Nick-S: okay, put it to the test. Build an app using the Fused Location provider and then spin it up on an Emulator without Google Apis Dec 16 10:08:00 how do i know it worked/didnt? Dec 16 10:08:30 if it can get a location, it worked Dec 16 10:08:47 if it just moans about not being able to connect to Google Services it did not Dec 16 10:10:44 look at this: https://github.com/android/platform_frameworks_base/blob/3bdbf644d61f46b531838558fabbd5b990fc4913/packages/FusedLocation/src/com/android/location/fused/FusionEngine.java Dec 16 10:13:14 good morning :) Dec 16 10:17:50 good morning :D Dec 16 10:21:07 anyone happen to know? Dec 16 10:23:37 anybody here see this error: BasicNetwork.performRequest: Unexpected response code 401 Dec 16 10:23:42 with volley ? Dec 16 10:28:03 fernandopaiva: seems like server has responded with an error, same as yesterday, Dec 16 10:28:27 hehe, you left retrofit? Dec 16 10:29:01 kkk... Nick-S I'm using volley in my project Dec 16 10:29:10 in next project I want use retrofit Dec 16 10:29:35 yesterday I did try retrofit but does not work Dec 16 10:29:52 but your problem is the server my friend Dec 16 10:29:58 fire the same request with postman Dec 16 10:31:00 Nick-S, yep, but I fix the problem on the server Dec 16 10:31:20 and the Postman works Dec 16 10:31:47 401 is reported by volley Dec 16 10:31:52 but not created by volley Dec 16 10:32:10 let me see how I'm trying now. Dec 16 10:35:39 Nick-S, http://pastebin.com/LECdkpsC Dec 16 10:36:26 with postman of chrome works fine Dec 16 10:36:35 sorry i can't look at it now Dec 16 10:36:42 Nick-S, :( Dec 16 10:36:59 but try to compare the requests using some sniffer like charles Dec 16 10:37:55 Nick-S, sorry, but I can't understand. How I do it ? Dec 16 10:43:58 Nick-S, I think the problem is with header Dec 16 10:44:31 install charles Dec 16 10:44:41 make request from postman, then your app and see the difference in the header Dec 16 10:45:13 Nick-S, alright Dec 16 10:45:26 thats the fastest way i know to debug those things Dec 16 10:45:35 apt-get install charles ? Dec 16 10:50:39 Hello friend Dec 16 10:50:44 hello :) Dec 16 10:51:13 is it possible to get relative/absolute path of html file in assets folder??? Dec 16 10:53:18 How do you mean? Dec 16 10:53:34 do you want to write relative paths in the html files stored in the asset file? Dec 16 10:53:38 asset folder Dec 16 10:53:39 * Dec 16 10:56:01 arkaros: yes Dec 16 10:56:35 Yes, i want to get relative paths in the html files stored in assets folder Dec 16 10:57:02 Hello guys, what's the recommended way to jump from one Fragment to another fragment? Dec 16 10:57:15 Ankhwatcher: i am reading the code, and it seems like it allows access to the fused provider under the hood, but hides that detail from the user Dec 16 10:57:55 I have an activity, where I go from FragA -> FragB by replacing fragments in the host Activity. Dec 16 10:58:04 Number5: use LayoutInflation inflate Dec 16 10:58:04 try if the relative paths work. Otherwise "file:///android_asset/" will refer you to the asset folder it self. Not sure how it will work with relative paths but give it a try Dec 16 10:58:57 arkaros: that's is absolute path but what i need is relative... Dec 16 10:59:52 i have html files store in asset folder, i want to load it dynamically getting the relative path Dec 16 11:00:14 hackable, what I mean is, I can do a fragment transaction in the host Activity or in the Fragment itself. When I studied Android dev documents, I do fragment transaction in the host Activity. But I like the idea to jump from FragA to FragB by performing the transaction in FragB itself, rather than in host Activity. Dec 16 11:00:57 the last FragB -> I meant FragA Dec 16 11:00:58 Probably asked already plenty of times, how can I timeout a Retrofit based AsyncTask? Dec 16 11:01:09 With .get() I can specify a t/o, but I need to execute it concurrently Dec 16 11:02:05 Number5, now i understand but is that possible? Dec 16 11:02:32 Yes, it's possible to start another fragment from a Fragment. Dec 16 11:02:35 host is needed for every fragment Dec 16 11:03:03 I think, because as a Fragment you also have access to fragment manager. Dec 16 11:03:38 hackable: from what i see the native webview doesnt play nice with relative paths. :/ Dec 16 11:04:22 hackable: It might work in some other web views like the cordova webview Dec 16 11:05:22 So I was thinking whether the design pattern is good if you do a fragment transaction from a Fragment itself. Dec 16 11:06:10 Also no .join() possibility for AsyncTask, crap Dec 16 11:06:31 Number5: Do you want to have a fragment inside a fragment or do you want to call the parent activity to replace the fragment itself? Dec 16 11:07:18 platzhirsch, make callback null and ignore the asynctask. And if it's in a loop, check a isCanceled value to exit or not. Dec 16 11:08:37 arkaros, actually the latter one. Because I literally replace a fragment. But I thought it would be cleaner to perform the transaction from a fragment rather than from a host Activity. Dec 16 11:10:15 In that case I can create a Fragment instance, pass an object and than perform a transaction. Without adding Activity with a callback for transaction. Dec 16 11:10:55 Hi!:) How to get a proper formatted day and a month without a year? One solution I've find is to use DateFormat to and regexp to get read of the year. It cound be "yyyy/mm/dd" or "mm.dd.yyyy" or whatever. Is there there a way without involving regexp skills?) Dec 16 11:11:24 s//to get rid of/ Dec 16 11:11:52 Why not just use date format if you found that to be a solution Dec 16 11:11:53 Number5: Im guessing you have a button or some other event inside the starting fragment that you want to click to replace the fragment? In that case i would create a set listener method for that button and then whe ni instantiate the fragment in the host iactivity i would also add a listener that replaces the fragment and bind the listener to the button. Dec 16 11:12:23 If you have like FragA -> FragB -> FragC -> FragD, the host Activity should implement like 3 callbacks. Dec 16 11:12:24 You don't need regex to ditch the year Dec 16 11:12:31 Just request a format without a year Dec 16 11:13:08 arkaros, that's a solution too, but than again, it's a little bit hawkish. Dec 16 11:13:15 The android studio wizard for activity with a fragment gives a good skeleton for callbacks for fragments Dec 16 11:13:15 hackish Dec 16 11:13:32 It's the expected way. Or I guess spew an event in an eventbus Dec 16 11:13:41 Number5: Yeah maybe a bit extreme in that case. The problem i see with replacing the fragment from the fragment it self is that doent that make the fargment dependant on what kind of host activity it is in? Dec 16 11:14:43 arkaros, no not at all. Dec 16 11:16:13 Number5: Dont you have to specify what viewgroup the fragment is in to replace it and doesnt that depend on the host activity? Dec 16 11:16:55 oh weird ... i had a bit of a typo/oddness in a sqlite select statement and i'd never had a problem with it across multiple devices/OS version until lollipop Dec 16 11:18:43 mikedg_: how do I request a localized format without a year? Dec 16 11:19:51 Hello! Sometimes i see that people register/unregister BroadcastRecievers before super.onResume(onPause) method calls. Is it good practice or mistake? Dec 16 11:20:17 or before super.onStart/super.onStop Dec 16 11:20:22 Missed the bit about localized. Yeah that's a problem Dec 16 11:20:49 i'm reading all the location services sources !! whew!! Dec 16 11:21:05 http://stackoverflow.com/questions/3790918/format-date-without-year. Seems to possibly have an android solution Dec 16 11:21:21 there is a fusion provider bundled there, without play services Dec 16 11:21:25 Haven't tried it and I'm on an iPhone right now with no computer Dec 16 11:24:43 xgearx: I've never seen that. I can imagine rare circumstances where it would make a difference though Dec 16 11:26:01 Has anyone here used SwipeRefreshLayout and had problems with the refresh indicator disappearing on screen rotation? Dec 16 11:26:14 echo! Dec 16 11:26:17 mikedg_: I don't understand in which situations i should call methods before super calls. Dec 16 11:28:54 arkaros, you can use FrameLayout in stead of Fragment in your xml layout. With FrameLayout you can put any fragment you want. Dec 16 11:32:17 Number5: Ofc it works. But you are still dependant on the fact that you are using a FrameLayuout. The solution isnt that ugly but from a design pattern that i the only issue i have. You increase dependancy on the parent activity from the child view Dec 16 11:32:36 is the only* Dec 16 11:33:37 well, ok, colloquy doesn’t like me at all. :( Dec 16 11:33:59 Nick-S, works :D Dec 16 11:34:19 but I need create with HttpClient Dec 16 11:34:53 with Volley and Retrofit I can't do it work :( Dec 16 11:37:07 xgearx: Look at the source code of super calls. I've looked and I think that it doesn't matter when you call register/unregister. But for instance, if you want to view with the view onResume() you probably should call after super call Dec 16 11:47:38 does anyone know a good script to sort the strings.xml file alphabetically? The only one I've found breaks all my String Arrays Dec 16 11:48:47 is there a more comprehensive documentation about dumpsys then https://source.android.com/devices/input/dumpsys.html ? Dec 16 11:49:40 Hello, I have this layout https://gist.github.com/tagrudev/0d9ce7ac1f712d0fdbb0 the grid view should calculate it's rows by the elements that I give to the adapter right ? Dec 16 11:49:47 but it only shows one row Dec 16 11:53:18 Ankhwatcher: why can't i used the requestupdates with criteria and locationListener together? Dec 16 11:56:55 Nick-S: which LocationListener? Dec 16 11:57:28 http://developer.android.com/reference/com/google/android/gms/location/LocationListener.html or http://developer.android.com/reference/android/location/LocationListener.html Dec 16 12:00:01 hello! Dec 16 12:00:20 is there possibility to have two separate builds ? one for android 2.x and other for >= 4.0.4 ? Dec 16 12:01:19 Ankhwatcher: aosp Dec 16 12:02:08 Nick-S: which requestUpdates? Dec 16 12:02:55 Ankhwatcher: subscribing to the updates as i see it has a few options, you could specify a provider, or criteria Dec 16 12:03:13 gordon_: define separate builds Dec 16 12:03:37 Ankhwatcher: requestLocationUpdates Dec 16 12:03:55 from LocationManager? Dec 16 12:03:58 Ankhwatcher: requestLocationUpdates(long minTime, float minDistance, Criteria criteria, LocationListener listener, Looper looper) Dec 16 12:04:02 Ankhwatcher: whats the looper here? Dec 16 12:04:07 Ankhwatcher: could you explain it more ? Dec 16 12:04:25 as product flavours or just separate projects ? Dec 16 12:04:29 Ankhwatcher: i am thinking to use that one with minTime = 0, minDistance = 0 Dec 16 12:04:31 how will it be visible in google play Dec 16 12:07:32 gordon_: you can't upload different apks for different platform versions as far as I can tell/see Dec 16 12:07:50 but you could create two entries with different min/max platform versions Dec 16 12:11:33 if you made a version for min 8 max 11 and then the other min 14 target 21 then users should only see one Dec 16 12:11:37 Ankhwatcher: the answer was yes... Dec 16 12:20:59 Nick-S: what? What yes or no question did you ask? Dec 16 12:21:22 Ankhwatcher: i am thinking to use the requestLocationUpdates without sepcifying provider but criteria Dec 16 12:22:20 Nick-S: yeah you can do that, but you'll just end up with the Network Provider anyway Dec 16 12:22:38 uless i ask for fine no? Dec 16 12:22:46 exactly Dec 16 12:22:50 then you'll get GPS Dec 16 12:23:00 what if i ask for it and its not available? Dec 16 12:23:15 but as the Android team explained when they launched the Fused, neither one is always better Dec 16 12:25:02 Ankhwatcher: depends on my usage ofcoruse Dec 16 12:25:39 but that gives me access to the built in fusion provider Dec 16 12:27:29 Ankhwatcher: whats the meaning of the minTime/minDistance if i set them to 0? Dec 16 12:32:47 Ankhwatcher: i am using mLocationManager.requestLocationUpdates(0L, 0f, criteria, mNetworkLocationListener, null); with Criteria.ACCURACY_FINE and nothing happens Dec 16 12:43:23 oops i got disconnected agian... Dec 16 13:05:47 what are the design patterns available for creating an android library Dec 16 13:07:47 question about rxjava. would rxjava be something i would use in a scenario like i have an asynctask that pulls json and inserts objects into a DB then i want notifyondatasetchanged to be called on my listview's adapter? Dec 16 13:21:00 Nick-S: the min time min distance are filtering updates, so if they are both zero it means "update as much as possible" Dec 16 13:28:32 Ankhwatcher: how come i didn't get an update? Dec 16 13:28:44 Ankhwatcher: my claim is that no request was done... Dec 16 13:29:17 Nick-S: permissions? Dec 16 13:29:31 its al there Dec 16 13:29:40 i have permission and enabled everything Dec 16 13:30:07 pastebin? Dec 16 13:34:25 http://pastebin.com/mPKGJ6U5 Dec 16 13:37:05 if this worked it would also save me from all that commented code... Dec 16 13:37:46 hi guys, rather confused trying to build a really basic app Dec 16 13:38:12 im following the basic info here: http://stackoverflow.com/questions/15030099/move-existing-web-app-into-a-native-phone-app-using-a-browser-wrapper Dec 16 13:38:34 this is done using the android studio 1.0.1 Dec 16 13:38:57 i have 3 files, my androidmanifest, ApplicationTest.java which includes my activity Dec 16 13:39:03 and main.xml which is the layout Dec 16 13:39:49 when editing my manifest, it is complaining "cannot resolve symbol ApplicationTest" I'll pastebin the source Dec 16 13:42:35 https://gist.github.com/anonymous/2547fe40b22defd2a9ba Dec 16 13:42:41 all 3 files are there Dec 16 13:43:14 considering android studio autocompletes "com.desktasker.dt2.ApplicationTest" i dont understand how it then cant find the symbol Dec 16 13:43:22 maybe cause of the naming? Dec 16 13:43:32 try renaming to MainActivity Dec 16 13:43:36 how should it be named? Dec 16 13:43:47 there may be something funky going on because of the Test in the name Dec 16 13:43:51 I doubt it, but it's a possibility Dec 16 13:44:26 I know on the test side of things, they get special cased for some funcitonality if a class ends in Test Dec 16 13:45:39 ive renamed all instances of "ApplicationTest" to "MainActivity" including moving the code to MainActivity.java, but now it just says Dec 16 13:45:47 cannot resolve symbol "MainActivity" Dec 16 13:47:24 try with android:name=".MainActivity" in manifest, although I suspect there is something else going on here Dec 16 13:47:29 https://gist.github.com/anonymous/bfb732bd3dab67d48301 is the result of trying to run the app in emulator Dec 16 13:47:35 hmm try changing to dont think thatll fix it eithe rthough, but worth a shot Dec 16 13:48:33 nope no change Dec 16 13:48:59 Unable to instantiate activity ComponentInfo{com.desktasker.dt2/com.desktasker.dt2.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.desktasker.dt2.MainActivity" on path Dec 16 13:49:12 You are using Android Studio 1.0? Dec 16 13:49:18 1.0.1 Dec 16 13:49:24 and you started the project with that? Dec 16 13:49:28 yeah only just downloaded it Dec 16 13:49:36 yup created an empty project Dec 16 13:49:44 basically what i want might be easier... Dec 16 13:49:49 http://mob.desktasker.com Dec 16 13:50:03 i want an app, whcih shows that page natively on the device Dec 16 13:50:16 not (obviously) in a web browser Dec 16 13:50:33 have you previously had an android SDK instealled on your machine? Dec 16 13:50:36 tbh im surprised theres not a wizard for that :P Dec 16 13:50:45 no this machine was reinstalled recently Dec 16 13:51:00 might still be worth checking that you have the most up to date SDK tools in the SDK manager Dec 16 13:51:11 how does file management work w/ apps ou make Dec 16 13:51:17 can i have a folder in my app folder? Dec 16 13:51:22 well ive got whatever the studio installer downloaded about half an hour ago Dec 16 13:51:25 like \media and \data Dec 16 13:51:40 directory i mean Dec 16 13:52:32 where do i find "SDK Manager"? Dec 16 13:52:44 nvm just found it Dec 16 13:53:02 Bitgod: you can in the assets folder and then you need to use http://developer.android.com/reference/android/content/res/AssetManager.html Dec 16 13:53:16 sounds fun, il lgive it a shot Dec 16 13:53:21 also android studio is pretty good Dec 16 13:53:25 just got it heh Dec 16 13:53:38 so I have a weird issue Dec 16 13:54:01 I run this Dec 16 13:54:02 https://gist.github.com/yishai-glide/5e18758e336cd448bf95 Dec 16 13:54:32 and after navigating back into the activity when I try this again, I get "java.lang.IllegalStateException: Fragment already active" Dec 16 13:54:50 even though I try to find it with the findFragmentByTag Dec 16 13:54:54 any thoughts? Dec 16 13:58:23 how do i use android studio to test on a usb connected tabklet (with dubgger turned on) rather than a virtual device? Dec 16 13:58:49 just have it attached Dec 16 13:58:58 just put it in Dec 16 13:59:01 and it should prompt you which device next time you run the app through AS Dec 16 13:59:38 hmm well it prompts me, but only give me the virtual nexus as an option Dec 16 14:00:10 besides enabling dev mode, do i need to do anything on the tablet? Dec 16 14:01:56 what OS? Dec 16 14:02:17 you'll need to trust the computer it's connecting to, but that is an obvious popup on the tablet Dec 16 14:02:25 pc is win7 x64, tablet is 4.4.2 Dec 16 14:02:38 i havent seen _any_ popup on the tablet Dec 16 14:02:44 driver nightmare probably Dec 16 14:02:44 sup Dec 16 14:02:52 TandyUK: in windows you need to install drivers Dec 16 14:02:54 drivers drive me mad Dec 16 14:03:05 do some googling or maybe someone else here can help Dec 16 14:03:05 yep Dec 16 14:03:08 ah, not included with android studio then? Dec 16 14:03:15 can anyone tell me why in every onPreDrawListener example ive seen so far the first line is removeOnPreDrawListener(this) <- Dec 16 14:03:15 haha Dec 16 14:03:16 I'm happy I have a mac for this Dec 16 14:03:23 it is, but not automatically set up and some devices are bitches still Dec 16 14:03:30 do i need to disable MTP mode on the tablet? Dec 16 14:03:41 atm it shows up as a disk drive in winblows Dec 16 14:03:48 TandyUK: is the developer options enabled? Dec 16 14:03:53 *are Dec 16 14:03:55 thepoosh: yes Dec 16 14:04:02 and usb debugging? Dec 16 14:04:15 is the udev file configured properly? Dec 16 14:04:17 did the computer auto mount anything (it happens sometimes) Dec 16 14:04:56 dev options and usb debugging on Dec 16 14:05:15 windows auto mounts the tablet Dec 16 14:05:30 does it auto mount the sdcard? Dec 16 14:05:38 if so, try unmounting Dec 16 14:05:39 seems to yeah Dec 16 14:05:48 unmount how? Dec 16 14:05:59 do i disable MTP mode o nthe tablet? Dec 16 14:06:03 right click it in explorer and eject Dec 16 14:06:26 not giving me that option Dec 16 14:06:45 safely remove hardware Dec 16 14:06:51 I know win 7 Dec 16 14:07:03 and it should be there Dec 16 14:07:06 on the side Dec 16 14:07:15 i have _NO_ option to remove it, there isnt even a safely remove option in systray Dec 16 14:07:30 the problem is that yoru device is probably not connected as a media device but as something else, surelly specific hardware Dec 16 14:07:36 Ankhwatcher: thank you for the answer Dec 16 14:07:38 i have "Syd - Tablet" under "Portable devices" Dec 16 14:07:40 usb options in your device, connect as media Dec 16 14:07:44 but I think id will be different Dec 16 14:07:51 thepoosh you have the if/else on your find by tag, yet even if found you still add after the if/else Dec 16 14:08:11 tablet says "Connected as a media device" Dec 16 14:08:21 whatitis-: fixed it with adding to the if/else !mProfileViewFragment.isAdded() Dec 16 14:08:26 thanks Dec 16 14:08:29 plus you fragment class has a typo, Fragmet Dec 16 14:08:34 :) Dec 16 14:08:36 lol Dec 16 14:09:29 ok, forget the tablet lol Dec 16 14:09:35 ? Dec 16 14:09:38 why cant my app see its app lol Dec 16 14:09:39 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.desktasker.dt2/com.desktasker.dt2.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.desktasker.dt2.MainActivity" on path: DexPathList[[zip file "/data/app/com.desktasker.dt2-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] Dec 16 14:09:52 sux for you Dec 16 14:10:36 whatitis-: NO TYPOS! Dec 16 14:12:03 TandyUK, that usually means your main activity class is excluded from the compile Dec 16 14:13:22 if you dont have a MainActivity class check your manifest, remove it from there and set the intent filter with action Main and category launcher to whatever activity you want to launch Dec 16 14:13:22 Hello, I have an activity where I override onTouchEvent to receive the events, and it works, but then I add a fullscreen ViewPager to that activity's layout, I no longer receive the touch events, I think that the ViewPager eats them all, could someone please point me in the right way of how show I solve that? Dec 16 14:14:48 Nohus, extend ViewPager and override onTouch there. Dec 16 14:15:32 jvrodrigues: not sure i understand you mate.. day 1 of android dev btw lol.. here is full code: https://gist.github.com/anonymous/0387d9d186233dc6afdf Dec 16 14:15:46 jvrodrigues: Ah, ok, thanks. : ) Dec 16 14:17:21 Nick-S: did you do a step through debug to make sure it gets to the make requestcode? Dec 16 14:17:44 s/requestcode/request code Dec 16 14:17:57 ya i did Dec 16 14:18:10 wait Dec 16 14:19:30 TandyUK, i dont see nothing wrong with your code. Probably gradle plugin missconfigured? Dec 16 14:20:11 jvrodrigues: no clue mate, like i said i just downloaded android studio and off i went Dec 16 14:20:25 perhaps this pc needs a reboot Dec 16 14:20:34 hum Dec 16 14:20:41 cause its still not 'seeing' the tablet connected via usb Dec 16 14:21:12 i'll brb :) Dec 16 14:21:26 ugh windows debug drivers Dec 16 14:21:39 thank god I don't have that in my life anymore Dec 16 14:22:00 lol unfortunately i dont have a choice lol Dec 16 14:22:14 TandyUK: did it ever work? Dec 16 14:22:16 unless someone can recommend a livecd distro with all the android tools i need :P Dec 16 14:22:38 by ever you mean "in the hour since i first installed anything android"? Dec 16 14:23:03 once again to reiterate, clean install of windows, plus latest android studio Dec 16 14:23:07 TandyUK: you could probably set up a usb stick to do the job if you were really dedicated Dec 16 14:23:20 TandyUK, are you connected to an USB 3.0 port? Dec 16 14:23:21 TandyUK: so you don't have debug drivers for your tablet installed? Dec 16 14:23:43 and you expect adb to work? Dec 16 14:24:02 in sdk manager, i have installed everything for 4.4.2 and 3.2 as well as the google usb and web drivers Dec 16 14:24:28 so i need another seperate driver for the tablet? Dec 16 14:24:45 i wasnt aware that there were people programming under windows environment Dec 16 14:24:47 and none of this should affect my app running in the android studio virtual device right? Dec 16 14:25:13 Tandy nope Dec 16 14:25:34 TandyUK: what tablet do you have? Dec 16 14:26:04 jvrodrigues: there are people suffering under opression all around the world Dec 16 14:26:10 customer has samsung sm-t530 Dec 16 14:26:29 yeah me one of them lol. im at a customers doing this Dec 16 14:26:37 id rather be using ubuntu :P Dec 16 14:27:12 are you sure the tablet is in debug mode? Dec 16 14:27:26 TandyUK: http://www.samsung.com/us/support/owners/product/SM-T530NZWAXAR Dec 16 14:27:28 the dialog to give permission Dec 16 14:27:40 when you run the command adb devices what do you get? Dec 16 14:27:52 yes tablet is definitely in debug mode, dev options are on, debugging mode is on, tablet is connected as MTP device, Dec 16 14:28:11 "run the command" on the tablet.. how? or on the pc? Dec 16 14:28:50 TandyUK: he means running adb from the command line on the pc Dec 16 14:29:04 ok, now to find where android studio put it... Dec 16 14:29:04 you'll find it in your sdk install Dec 16 14:29:23 does genymotion work for you ? Dec 16 14:29:25 under platform-tools, I think Dec 16 14:29:34 (can you log in) Dec 16 14:29:42 its not in my path thats for sure Dec 16 14:30:24 gordon_: nope Dec 16 14:30:30 TandyUK: that would be a good idea Dec 16 14:30:55 adb devices shows absoultely nothing (not even the virtual device) Dec 16 14:30:59 save yourself a lot of hassle by setting ANDROID_SDK and adding the tools folder to path Dec 16 14:31:13 TandyUK: of course it doesn't you don't have the drivers installed Dec 16 14:31:25 ok, thats something the android studio installer needs to do then imho Dec 16 14:31:36 TandyUK: nope Dec 16 14:31:44 Ankhwatcher: then what was the "Google USB Driver" i installed? Dec 16 14:31:59 TandyUK: it gives you the drivers for the nexus devices but all the other ones are someone elses problem Dec 16 14:32:22 ^^ Dec 16 14:32:27 lol drivers not installed? really? really? really? thats like item number 1 in the android-studio guide Dec 16 14:33:19 ok and like ive said about 5 time, "I DONT CARE ABOUT THE TABLET" Dec 16 14:33:22 jvrodrigues: windows => drivers => ascii-art-for-hanging-yourself Dec 16 14:33:29 what i want is my app to run anywhere Dec 16 14:33:41 like in the virtual device Dec 16 14:33:42 TandyUK: program in java! Dec 16 14:33:56 i have, it crashes saying it cant find my app lol Dec 16 14:34:08 what crashes? Dec 16 14:34:13 i uplouaded the code which you say looks fine Dec 16 14:34:17 Ankhwatcher, to be perfectly honest, in windows you go to a random website download a .exe file, double click it and the drivers are ready Dec 16 14:34:22 maybe a few viruses Dec 16 14:34:25 and trojans Dec 16 14:34:28 are also there Dec 16 14:34:28 but Dec 16 14:34:31 so why cant i display the worlds most simple app (a webpage in a window) lol Dec 16 14:34:54 its usable... in Linux however you need to run very cryptic commands and add some very criptic lines to a very cryptic file in a very cryptic folder Dec 16 14:34:57 its all very cryptic Dec 16 14:35:04 Anyone know an alternative to HTTPResponseCache that can also cache POST requests? Dec 16 14:35:10 code: https://gist.github.com/anonymous/0387d9d186233dc6afdf Dec 16 14:35:23 running in the virtual device (NOT TABLET) gives: Dec 16 14:35:44 jvrodrigues: on linux you solve it once, on windows it's a new hell for every device Dec 16 14:36:04 Dec 16 14:36:17 TandyUK, change this line on your manifest Dec 16 14:37:48 change it to what? Dec 16 14:38:00 To what i wrote there Dec 16 14:38:09 atm its "name=".MainActivity" as i was advised earlier Dec 16 14:38:14 hum Dec 16 14:38:33 did you change the folder of MainActivity? Dec 16 14:39:04 in any case go to Build -> Clean then Build -> Rebuild Dec 16 14:39:12 then try running the project again Dec 16 14:39:18 i dont know why that class isnt being added Dec 16 14:39:55 same thign still Dec 16 14:39:56 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.desktasker.dt2/com.desktasker.dt2.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.desktasker.dt2.MainActivity" on path: DexPathList[[zip file "/data/app/com.desktasker.dt2-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] Dec 16 14:40:56 has anyone ever tried running Android on a VPS and did remote adb? Dec 16 14:41:08 *VPS or a remote system . Dec 16 14:41:19 Know about adb connect thing, but doesn't seem to work in this case Dec 16 14:41:22 ok genymotion up and runnig Dec 16 14:41:28 solved with copy/paste Dec 16 14:41:39 does genymotion support android 5 already? Dec 16 14:41:55 android studio put my "MainActivity.java" in "app/java/com.desktasker.dt2 (androidTest)" Dec 16 14:42:08 TandyUK, show your project directory structure Dec 16 14:42:20 i moved it to "app/java/com.desktasker.dt2" Dec 16 14:42:31 there you go then Dec 16 14:42:47 stupid bugs with android studio lol Dec 16 14:42:51 not really bugs Dec 16 14:42:54 i expect googles dev tools to create stuff right lol Dec 16 14:43:00 its right lol Dec 16 14:43:05 youll learn with time Dec 16 14:43:10 well if its not a bug, why did it create the 'main' file in the wrong folder? Dec 16 14:43:21 that reeks of bug to me Dec 16 14:44:07 android-studio has a hidden features that plays pranks on newcomers such as yourself Dec 16 14:44:27 next it will put your stapler inside jelly Dec 16 14:44:46 after a couple of weeks it will eventually accept you as a new android developer and stop doing that sort of thing Dec 16 14:44:48 lol Dec 16 14:48:31 ok, so now i have the app showing my web page Dec 16 14:48:38 howw do i make it open links properly lol Dec 16 14:48:51 atm click any link, and it asks you if you want web browser or chrome Dec 16 14:48:59 i dont, i want links to topen i nthe app Dec 16 14:49:44 WebView Dec 16 14:50:16 afaik it is using WebView Dec 16 14:50:33 WebView browser = (WebView)findViewById(R.id.browser); Dec 16 14:52:52 Hey .. I was playing around with window managers, I acquired one via activity.getApplication().getSystemService. I noticed if you inflated a view then attach it to the activities window manager, the attached view will be drawn on the screen even if the app is minimized. This seems odd to me, I would expect the view should not be able to draw over the homescreen of my phone, and would close with the application. Dec 16 14:53:07 similar to how a window manager aquired from an activity is "sandboxed" to that activity Dec 16 14:53:11 anyone know what is going on here? Dec 16 14:53:37 well... an activity is basically a big view glued to your homescreen, so i dont really get why you're so surprised Dec 16 14:54:16 Because I am drawing outside of the application context Dec 16 14:54:22 nope Dec 16 14:54:25 and i don't have any permissions allowing me to do this Dec 16 14:54:29 you're drawing outside of your activity context Dec 16 14:54:32 not your application Dec 16 14:54:44 any idea what might cause this and how to fix it? Dec 16 14:54:45 Could not find class 'android.transition.Transition', referenced from method android.support.v4.app.FragmentTransitionCompat21.addTargets Dec 16 14:54:51 your application as permission to draw whatever it wants on the screen. Dec 16 14:55:12 even penises, but dont tell that to 12 year old programmers out there, they're so immature Dec 16 14:56:04 jvrodrigues: just to be clear, I add a view to this window manager, close the app, open chrome, and my view will draw on top of chrome Dec 16 14:57:27 thats unlikely unless you're using system alert permission Dec 16 14:57:30 i Dec 16 14:57:34 i am not* Dec 16 14:59:14 afaik the system alert window is only needed for a service's window manager Dec 16 14:59:21 I am using an application's Dec 16 15:00:03 ok so wait Dec 16 15:00:06 if you click the home button Dec 16 15:00:10 does the view dissapear? Dec 16 15:00:11 no Dec 16 15:00:28 thepoosh, android.transition.Transition was added in api 19, are you targeting lower, if so does the v4 support have an alt method to use? just guessing cause I dunno :) Dec 16 15:00:34 it will draw over pretty much anything on the phone .. except the notification drawer Dec 16 15:00:43 including other apps Dec 16 15:00:49 whatitis-: that targetSdk is 21 but the minSdk is 10 Dec 16 15:01:08 and it happens when I run FragmentTransaction.popBackstack() Dec 16 15:01:13 alright Dec 16 15:01:20 my extremelly tight deadline has to wait Dec 16 15:01:23 while i try this shit out. Dec 16 15:01:28 kinda baffled Dec 16 15:02:38 activity.getApplication().getSystemService(Context.WINDOW_SERVICE) .. and I am inflating the view with the activities layout inflater Dec 16 15:02:41 whatitis-: https://gist.github.com/yishai-glide/f63d5e0926f7c2d383e7 Dec 16 15:03:45 anyone got a link t oa doc about fixing the following error... i googled the error message and just get loads of results about facebook apps Dec 16 15:03:48 Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.", source: https://www.facebook.com/connect/ping?client_id=147152023 Dec 16 15:04:09 whatitis-: could it be caused by the out animation I set to the Fragment on add? Dec 16 15:04:17 my web app, which is now being displayed on a tablet, has a few facebook buttons in it Dec 16 15:04:38 fyi, you can see it exactly at http://mob.desktasker.com Dec 16 15:06:34 http://stackoverflow.com/questions/12648099/making-facebook-login-work-with-an-android-webview is that relevant, or am i going off in the wrong direction? Dec 16 15:07:12 thepoosh: did some googling, could be a bug with v4support trying to access v21 api Dec 16 15:07:18 https://code.google.com/p/android/issues/detail?id=77670 Dec 16 15:07:55 thanks Dec 16 15:07:57 reading Dec 16 15:08:31 check out #10 that maybe relevant Dec 16 15:09:17 MOTHERFUCKERS!!!! Dec 16 15:09:34 hmmmm Dec 16 15:09:41 that seem like whats happening? Dec 16 15:09:42 I might have lost my cool just there Dec 16 15:09:46 yep Dec 16 15:09:50 wait Dec 16 15:11:59 whatitis-: reverse engineered the v4 jar Dec 16 15:12:02 found this - https://gist.github.com/yishai-glide/da3a1b4221bd4f939047 Dec 16 15:17:03 ok, with the last url i posted, ive changed my code. Dec 16 15:17:28 the line " mWebviewPop.setVisibility(View.GONE);" is giving me connot resolve smbol View Dec 16 15:17:36 what do i need to import for that? Dec 16 15:18:50 TandyUK, android.view.View Dec 16 15:19:19 TandyUK: organize your imports Dec 16 15:19:33 ty Dec 16 15:24:38 thepoosh: so is your v4 better than that bug code? have you tried running your app on a v21 emulator or device? Dec 16 15:27:03 just a sec, getting a 21 device Dec 16 15:27:47 we got the Nexus 6 in on Monday Dec 16 15:27:52 it's big Dec 16 15:28:04 I want it :( Dec 16 15:28:09 it's huge Dec 16 15:28:22 seen iphone 6 plus Dec 16 15:28:24 it's fine Dec 16 15:28:32 "We are out of inventory. Please check back soon" Dec 16 15:28:34 this one is a bit bigger] Dec 16 15:28:35 thanks for nothin Dec 16 15:28:36 g Dec 16 15:28:39 we have both Dec 16 15:29:16 http://www.gizmag.com/iphone-6-plus-vs-nexus-6/34407/ Dec 16 15:29:30 not that much Dec 16 15:29:36 whatitis-: I think it's happening because there is more than one fragment in the stack the registered a listener to the back press Dec 16 15:29:43 no Dec 16 15:29:44 i can deal with those 2 mm Dec 16 15:29:53 gordon_: just a sec, I'll upload an image Dec 16 15:29:55 and 5mm width Dec 16 15:30:04 oh, thanks! Dec 16 15:30:31 thepoosh: good old debugging, hope ya figure it out Dec 16 15:34:35 gordon_: http://imgur.com/ZrP8cwe Dec 16 15:34:45 <_genuser_> ugh, hate making new icons for the app. but it's nice to be able to make them yourself so they're uniform as opposed to downloading random icons. Dec 16 15:35:15 android-dev552, how do you inflate the view? Dec 16 15:35:36 inflater.inflate(R.layout.something, null); Dec 16 15:35:52 hi? Dec 16 15:35:52 i want to retrieve the result code passed to pendingIntent.getActivity from the activity being launched via the pending intent.. Dec 16 15:35:52 how do i go about that? Dec 16 15:36:01 Showing a date picker dialog in a dialog a bad idea? Dec 16 15:36:36 dialogception? Dec 16 15:36:41 heh Dec 16 15:36:52 all the material date pickers are all dialog based Dec 16 15:37:43 gordon_: ? Dec 16 15:37:46 <_genuser_> lasserix: you're always around, eh? Dec 16 15:37:46 i lost you Dec 16 15:38:39 Where did you last see him? Dec 16 15:39:29 jvrodrigues: something like Dec 16 15:39:36 mAgentContainer = (LinearLayout) activity.getLayoutInflater().inflate(R.layout.my_view, (ViewGroup) activity.getWindow().getDecorView(), false); Dec 16 15:39:41 _genuser_: coding more or less is all i do. sleep read code run sleep read code run Dec 16 15:39:44 <_genuser_> VnM: lol. Dec 16 15:39:53 my window params look like ... Dec 16 15:39:55 <_genuser_> lasserix: ah, a young buck, then. Dec 16 15:40:02 not so young Dec 16 15:40:13 <_genuser_> under 25? Dec 16 15:40:16 nah Dec 16 15:40:23 <_genuser_> 29? Dec 16 15:40:25 mLayoutParams = new WindowManager.LayoutParams(300, 300, 20, 20, 0, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, PixelFormat.RGBA_8888); Dec 16 15:40:29 30 i think? Dec 16 15:40:57 <_genuser_> lasserix: cool kids never count over 29. after the first 29, each year is still 29. Dec 16 15:41:09 hehe never counted, secret of the centinnials Dec 16 15:41:16 tho hope i look as good as harrison ford Dec 16 15:41:20 when im his age Dec 16 15:41:25 hard to believe he is like 75 Dec 16 15:41:30 android-dev552, confirmed for working Dec 16 15:41:32 ahahaha Dec 16 15:42:36 <_genuser_> lasserix: or even clint eastwood. 93 and married to some new 29yo hotsie totsie. Dec 16 15:42:42 seriousily Dec 16 15:42:53 jvrodrigues: yeah .. it's kind of odd Dec 16 15:42:53 <_genuser_> lasserix: or patrick stewart, 87 and marrying some 37 year old. Dec 16 15:42:56 what about my schedule makes you think i am under 25? Dec 16 15:43:22 <_genuser_> lasserix: you said eat, sleep, read code, sounded like a student. But you said not too young, so I guessed graduate student Dec 16 15:43:41 sherlock holmes at your service Dec 16 15:43:55 ahh yeah does sound like life of a student Dec 16 15:44:09 android-dev552, the possibilities of this little thing are endless Dec 16 15:44:31 lasserix: so nu, is it true? Dec 16 15:44:38 ? Dec 16 15:45:03 are you a grad student? Dec 16 15:45:09 no Dec 16 15:45:11 ;) Dec 16 15:45:30 i was about to finish a degree in Viticulure Enology but ran out of money, switched over to coding after relocating Dec 16 15:45:52 sounds good enough Dec 16 15:46:06 I started college when I was 25 Dec 16 15:46:11 if i ever get tired of coding or make enough, i'll go back--that was a fun industry, great life style, beautiful women et all Dec 16 15:46:41 <_genuser_> lasserix: if you can code some web apps.... you could do the web interface for my project. :) Dec 16 15:46:48 actually think there is some major scratch to be made in the iot of enological sciences Dec 16 15:47:08 Viticulture enology? wines and stuff? Dec 16 15:47:10 nah no web, may pick up dart later Dec 16 15:47:12 yeah Dec 16 15:47:12 anyone know how to integrate with the facebook app? Dec 16 15:47:30 TandyUK, developers.facebook.com they have everything you need to know Dec 16 15:47:58 more interesting in wear, glass etc.. since we can't engineer our genes in vitro yet might as well do the next best thing towards improving ourselves Dec 16 15:48:26 can't wait till biofeed takes off Dec 16 15:50:13 lasserix: is that only about wine? Dec 16 15:50:18 ? Dec 16 15:50:30 Viticulture Dec 16 15:50:41 enology: science of fermentation . viticulture: science of grape agriculture Dec 16 15:50:52 so it's winemaking? Dec 16 15:50:57 yeah Dec 16 15:51:00 cool! Dec 16 15:51:15 we have some good wineries in Israel Dec 16 15:51:19 wish ihad gotten in with those guys who did the drone photography for watering analysis Dec 16 15:51:19 <_genuser_> lasserix: yeah, I was thinking of having a web portal for my app where the user could configure his data, settings, and view his/her "wall". Dec 16 15:51:35 _genuser_: oh boy, another fb clone? Dec 16 15:52:11 <_genuser_> lasserix: no, it was teh other idea I told you about. another social group tool. Dec 16 15:52:14 _genuser_: i believe between bootstraps and pyhton/django should be pretty easy to put a web portal Dec 16 15:52:18 ahh yeah Dec 16 15:52:42 <_genuser_> lasserix: gossip basically. just in a new app. because myspace -> facebook -> intragram -> twitter... kids just jump from one thing to another. Dec 16 15:53:57 <_genuser_> lasserix: yeah, once I finish with the current camera project, hopefully I'll have picked up some sense of dialogs, fragments, activity lifecycle in a better way. Dec 16 15:54:09 <_genuser_> lasserix: to start the other project. Dec 16 15:54:21 avoid the fragments, much easier just to use custom views/groups Dec 16 15:54:37 <_genuser_> honestly, tho, I have read about the activity lifecycle tons of times, just that if you don't use this stuff enough, you forget. Dec 16 15:54:49 nah Dec 16 15:54:54 very fast you remember Dec 16 15:55:07 <_genuser_> yeah, fragments were sort of the new big thing for a while. now they seem to be taking a backseat to "cards" and "paper" Dec 16 15:55:21 whatever Dec 16 15:55:30 they are just foobar, like i said much easier to add/removeView and use custom views/groups Dec 16 15:55:41 use whatever makes you comfortable Dec 16 15:55:46 <_genuser_> thepoosh: I think once you'd done enough to wherever you have a really good understanding then it's easy to pick back up if you forget due to lack of use. Dec 16 15:56:03 sure Dec 16 15:56:30 is there some migration guide from analytics v3 to v4 ? Dec 16 15:56:39 <_genuser_> lasserix: I used fragment in my only published app. in this camera toy proj, just using dialogfragment and PreferenceFragment. otherwise, just full on activity for all views. Dec 16 15:58:05 when I zoom in my applications webview, it works fine, but when I click a link, the zoom is reset after following the link. Is this a known supposed behaviour? Can I change it to keep the zoom level from the previous page? Dec 16 16:00:33 we have a work clock called timr Dec 16 16:00:44 when I'm still at work it sends me an email Dec 16 16:00:52 thepoosh, still hard working? Dec 16 16:00:58 eat shit and die timr! Dec 16 16:01:37 <_genuser_> lol, I remember one of my co-workers had a program running: 5pm, logoff and shutdown. regardless of what he was doing. Dec 16 16:02:14 <_genuser_> since our company was using login/logout times for timesheets, they considered it tampering with timekeeping, which is a federal offense. Dec 16 16:02:39 <_genuser_> they kept sending out warning emails. but he was just waiting to be fired to he could collect unemployment. and learn dutch and move to ... amsterdam Dec 16 16:03:06 hmmmm Dec 16 16:03:14 passive aggressive people are the best Dec 16 16:03:17 to not work with Dec 16 16:03:24 but hear about from internet people Dec 16 16:03:43 <_genuser_> this guy was super cool. taught me bunch of coding stuff. motivated me great bit. Dec 16 16:04:11 <_genuser_> he was super nice as sr. dev since I used to ask him some super n00b question. And he wasn't in my team or in my higher ups. Dec 16 16:04:36 <_genuser_> He was just upset because all the mgmt jobs were going to people with the same last name. it was a family thing. Dec 16 16:04:49 that's messed up Dec 16 16:04:52 woo nepotism in the workplace Dec 16 16:05:19 <_genuser_> nepotism in a way. it was a wholly owned intuit subsidiary. Dec 16 16:05:24 we have a product associate who got his job because he was a reddit pal of one of the founders Dec 16 16:05:33 heh Dec 16 16:05:36 <_genuser_> a few people with last name X got in at higher positions and started hiring their own in the rest of mgmt positions. Dec 16 16:05:38 actually good guy Dec 16 16:05:42 that's how the world works: network connections Dec 16 16:05:54 that's how you get the best jobs Dec 16 16:06:17 in many companies in Israel if they are public, they won't hire family members Dec 16 16:06:25 <_genuser_> my boss' boss, used to be his own boss' secretary. Dec 16 16:06:37 hmmmm Dec 16 16:06:49 <_genuser_> so when a position opened up, the super higher up guy hired his own secretary for the director level position under him. Dec 16 16:07:00 is he any good? Dec 16 16:07:10 <_genuser_> sounds like a bean counter. Dec 16 16:07:35 <_genuser_> I don't think these MBA types have a clue what we even do. they just keep re-orging 6 mo. and sending monthly revenue targets. Dec 16 16:07:39 is there anywhere to read more about aar other than this - http://tools.android.com/tech-docs/new-build-system/aar-format Dec 16 16:07:41 ? Dec 16 16:08:06 _genuser_: that's why I'm working in a small startup Dec 16 16:08:08 for now Dec 16 16:08:13 i wish selector states were explicity part of the xml attributes Dec 16 16:08:19 we just doubled and got to 50 employees Dec 16 16:08:28 thepoosh: what do you want to know? Dec 16 16:08:30 lasserix++ Dec 16 16:08:37 <_genuser_> thepoosh: my current job has benefits too. they match dollar for dollar your 401k contributions upto 6% of your paycheck. Dec 16 16:08:40 what they are, how to integrate them into my app Dec 16 16:08:48 aar = jar + resources Dec 16 16:08:59 no more project libraries? Dec 16 16:09:00 as in /res they allow also to merge manifest Dec 16 16:09:07 cool! Dec 16 16:09:12 yeah Dec 16 16:09:17 surprise permissions Dec 16 16:09:20 you can generate them with maven or gradle Dec 16 16:09:33 I should write a malicious library Dec 16 16:09:38 i thinkt hey are how maven dependencies rely on Dec 16 16:09:44 maybe I'll export ActionBarSherlock Dec 16 16:10:00 they are awesome Dec 16 16:10:00 when I use mavenlocal? Dec 16 16:10:05 yeah Dec 16 16:10:10 oh.... Dec 16 16:10:17 i believe so, you can do it that way too Dec 16 16:10:20 so they should be the new output from gradle assemble? Dec 16 16:10:25 if it's a library? Dec 16 16:10:33 umm dunno if they do it by default Dec 16 16:10:37 there is a specific command to run Dec 16 16:10:40 hmmmm Dec 16 16:10:42 i was using maven to build them Dec 16 16:10:52 think gradle can do it too Dec 16 16:10:57 we moved to gradle about 6 months ago Dec 16 16:11:05 I started learning how to use gradle last week Dec 16 16:11:10 it was about time Dec 16 16:11:18 yeah gradle is pretty cool Dec 16 16:11:21 and we had issues upgrading an analytics client Dec 16 16:11:28 groovy is kinda weird Dec 16 16:11:32 wish people would stop b-t-ing about load times for it Dec 16 16:11:47 that is BS Dec 16 16:12:10 I have a macbook i7 with 8GB RAM and an SSD, i don;t care about load times Dec 16 16:12:20 woo ssd Dec 16 16:12:23 plus we have a jenkins machine on s3 Dec 16 16:12:28 that does all the builds Dec 16 16:12:30 yeah Dec 16 16:12:33 it's sweat Dec 16 16:12:38 if you can. get one! Dec 16 16:12:43 2 second boot time or something Dec 16 16:12:58 I clocked my Win machine at home Dec 16 16:13:07 <_genuser_> surface pro3!! !! !! Dec 16 16:13:07 12 sec boot, 5 sec shutdown Dec 16 16:15:06 <_genuser_> lol surface pro3 induced a silence in the room. Dec 16 16:18:30 <_genuser_> hmm, linearlayout three items total. two on teh side are 80dp wide. the middle one should take the entire space. any idea on the best approach? Dec 16 16:19:01 <_genuser_> using weights, it works but the width of outer items is based on weights assigned and not 80dp. Dec 16 16:20:44 Hello, anyone using gradle with the NDK successfully? Dec 16 16:21:08 genuser dont use weights on left and right and set middle width to 0dp and weight to 1 Dec 16 16:21:23 it will make middle take up remaining space Dec 16 16:21:47 <_genuser_> lasserix: I see. thanks, let me try that. Dec 16 16:23:04 <_genuser_> lasserix: ah, that works. thanks. Dec 16 16:24:36 I'm trying to use jni.srcDirs to point Gradle to my source directory...but there are CPP files in there that i do not want compiled...but they need to exist for other platforms. Does anyone know how to tell gradle to skip those? Dec 16 16:25:29 google gradle exclude source files.. Dec 16 16:27:27 can't you just exclude them via your Android.mk? Dec 16 16:27:34 gradle doesn't use ndk-build/Android.mk anymore? Dec 16 16:29:26 lasserix: That always points to "exclude" but it doesn't seem to be excluding anything. I've tried specific files and i've tried the whole path. Dec 16 16:29:44 why would gradle exclude anything? Dec 16 16:29:48 it doesn't perform the ndk build Dec 16 16:29:55 pfn: You can still use Android.mk but i'm trying to let gradle do it's thing because the project is quite large and i don't need to be typing hundreds of source file paths by hand. Dec 16 16:30:11 how can gradle do its thing? it doesn't perform the ndk build Dec 16 16:30:28 pfn: It does. If you give it a path, it autogenerates an Android.mk for you. Dec 16 16:30:46 interesting Dec 16 16:30:51 I'll have to look at adding that feature... Dec 16 16:30:58 is there any way to access something likes chromes dev tools, but from the Chrome Webview client running on my phone? Dec 16 16:35:56 cjserio, I imagine you're still better off writing the android.mk yourself Dec 16 16:36:01 and setting the appropriate rules there Dec 16 16:36:20 pfn: You're probably right but....kill me now. :) Dec 16 16:36:52 well, considering the names probably follow some sort of rule, the way you'd do it in gradle would be similar to how you'd do it in .mk Dec 16 16:37:20 I'm getting pretty tired of the NDK always being an afterthought Dec 16 17:01:07 Anyone know a good example of a dialog for picking a date, basically trying to style the titles (eg "Date:" ... ) and good placement Dec 16 17:01:50 i live in a country where professional android developers make less than 1000 dollars a month Dec 16 17:02:15 which probably means i can code 15-20 hours a week for you for 500 dollars a month Dec 16 17:02:22 oh wait this is not allowed Dec 16 17:02:23 but ye Dec 16 17:02:30 on the subject of the macpro Dec 16 17:02:33 :( Dec 16 17:02:36 my dream lapto Dec 16 17:03:54 lasserix, caldroid library is fairly good, i used it in one of my projects Dec 16 17:04:25 heavily customizable as oposed to the sdk picker Dec 16 17:10:47 Is there a simple way to change the color of tab indicator? Dec 16 17:30:19 how do i get the tabhost of my application Dec 16 17:36:35 lollipop voodoo Dec 16 17:42:12 Hey, why would an action bar not be showing an icon in the top left after calling setIcon? Dec 16 17:42:46 unless you are calling it from prepareOptionMenu you gota call invalidateOptionsMenu Dec 16 17:45:08 that doesn’t work. We’ve also tried setting it in XML Dec 16 17:45:17 Is there something with the image? Dec 16 17:49:15 set it the menu declaration xml and see Dec 16 17:57:31 This is the logo image. does it have anything to do with menu? Dec 16 18:01:16 Am I just imagining that Eclipse showed way more detailed documentation on hover than Android Studio does? Dec 16 18:03:10 what's the callback to override to get dialog on showing? Dec 16 18:04:21 What is the “Proper” design protocol for fragments? Should I update content or create a new fragment for each case? Dec 16 18:04:58 tricknology, "depends" Dec 16 18:04:59 whatever is easier Dec 16 18:05:16 tricknology, but it seems that google prefers to create new fragment instances with new data if that's not prohibitively expensive Dec 16 18:06:15 hmm.. it just seems like you could end up wiht a lot of fragments that way Dec 16 18:06:25 tricknology: by creating a new fragment you can always pass in bundle so that if has to be created it can do so automatically (just make sure to have a no args constructor) Dec 16 18:06:41 Hey guys, I'm trying to load an SVG from the web, and display it inside an ImageView. I'm using volley. Do you guys know the best way to do this? Dec 16 18:06:42 but inreality why use fragments with a custom viewgroup will do? Dec 16 18:06:52 fmontano: there's an svg library Dec 16 18:07:05 tricknology, well, that depends :) Dec 16 18:07:09 are you replacing them or adding them Dec 16 18:07:13 lasserix: I'm looking at android-svg, but they don't mention anything about remote images. Dec 16 18:07:28 you have to download it first, then use the library to display it Dec 16 18:07:38 well for now I have one activity and one fragment, the nav drawer does different things to the main fragment Dec 16 18:07:47 I was thinking getting the raw file, save it locally, and then display it Dec 16 18:07:53 just updates a viewgrou[ Dec 16 18:08:06 never really more than a butotn textedit and a few edittexts Dec 16 18:08:45 yeah why don;t you just use a viewgroup and ditch the fragment? Dec 16 18:10:29 I have a class that extends fragment and the fragment just updates the viewgroup depending on what is pressed in the nav drawer Dec 16 18:11:05 a few days ago i mentioned i was having issues with a runtime crash when a fragment is open and my activity is killed by the OS Dec 16 18:11:24 i mentiosn that I was using crashlytics but wasnt getting enough app state in the reports Dec 16 18:11:50 and someone mentioned something that may work better than crashlytics, but i dont remember what it was/ Dec 16 18:12:10 ? Dec 16 18:14:37 Anyone have the problem where they get "ActivityNotFoundException" but the Activity *IS* already declared in their manifest? Dec 16 18:15:51 prove it Dec 16 18:16:32 probably you failed during declaring activity in manifest' Dec 16 18:17:12 Doesn't seem to be it. Dec 16 18:17:30 gman23, is this an intermittent issue? Dec 16 18:17:49 pastebin it then Dec 16 18:17:52 Well, I made a release build and that apparently couldn't find an activity Dec 16 18:18:01 but I'm in dev now and it can find it Dec 16 18:18:22 weird stuff. Dec 16 18:18:23 clean before build and try Dec 16 18:18:32 maybe proguard config fail Dec 16 18:18:40 proguard has been working Dec 16 18:18:41 and renaming classes selectively Dec 16 18:18:57 One of my coworkers might've not merged properly Dec 16 18:19:18 overwrote the manifest on release branch or something Dec 16 18:19:24 Sorry folks! Dec 16 18:19:33 aww Dec 16 18:20:05 wah wah Dec 16 18:25:46 ugh why do people force use of dialogs for the custom views so nulling annoying Dec 16 18:28:50 huh Dec 16 18:29:51 i was just using a date time picker library, and they force use of dialog by making package private the controller for the view, so even though i can access the view, i can't load one of the arguements for the constructor Dec 16 18:30:04 so now i got live with dialogception Dec 16 18:30:52 whats the name of a "preference/settings" that when checked, open a list of choices ? (and can be checked / unchecked) Dec 16 18:31:14 preferencesfragment / activity? Dec 16 18:31:21 oh spinner Dec 16 18:32:27 I'm having a strange issue when I replace fragment A with fragment B, adding it to back stack. However, when hitting back on fragment B, my ViewFlipper on fragment A likes to reset itself to the first displayed child - at the same time, the ListView / Adapter in fragment A remains intact. Dec 16 18:42:01 I notice that onSaveInstanceState is not called in fragment A when fragment B replaces it. Dec 16 18:42:28 Why oh why is my ViewFlipper resetting it's display child? Dec 16 18:43:11 does it ever get called ? like if you press home ? Dec 16 18:43:56 StingRay - yes it's working fine on orientation change Dec 16 18:44:27 Support lib - so when a fragment gets replaced, saveInstanceState is not called.... Dec 16 18:46:33 leslie: in fact, it's kind of more complicated, i'm on a preferenceframgent, and I want this: http://i.stack.imgur.com/URgt3.png (So a ListPreference I guess), but I want it presented on the menu with a checkbox, allowing the user to disable it from main view Dec 16 18:46:34 thats right i think Dec 16 18:48:16 i just added the appcompatv7 as a maven dependency (apklib) to my project. my project builds, but when my SplashActivity switches to my MainActivity (and this one extends ActionBarActivity), the app crashes and states that it couldn't find MainActivity... any ideas? MapActivity is definitely in the .apk Dec 16 18:48:17 just looks like a dialog with checkbox group Dec 16 18:49:00 fancy map main? Dec 16 18:49:16 if map is the manifest and main is not then there is your problem Dec 16 18:49:56 lasserix, no they are both called MapActivity... Dec 16 18:50:44 sounds like you should clean the project and double check spelling is correct, also use fully qualifed class path of activities in manifest Dec 16 18:53:05 hm.. but the app worked before and "all" i did was switch to the newer android sdks Dec 16 18:53:52 i'll see if this might be an eclipse error by building it in the terminal... Dec 16 18:55:41 in fact, I would like to add a checkbox left of a preference field Dec 16 18:55:47 to enable / disable that preference Dec 16 18:55:50 is it possible ? Dec 16 18:59:18 fancy42 post your manifest, man Dec 16 18:59:47 bluesky yes, look into layouts Dec 16 18:59:57 there are many that will do that.. such a broad question Dec 16 19:00:36 GbaRequest: Constructor Called 222 userAgent null Dec 16 19:00:37 ? Dec 16 19:00:45 NafRequest: NafRequest constructor===useragent null Dec 16 19:02:37 man this library is nulled. you can register datechangedlistener but then datechangedlistener is package private wtf Dec 16 19:05:15 <_Auron_> lul Dec 16 19:06:16 http://recode.net/2014/12/16/samsung-in-talks-to-launch-apple-pay-competitor/ Dec 16 19:07:28 tricknology, thanks, but I think I found another error.. let me figure that one out before i waste your time :) Dec 16 19:08:07 i know g00s Dec 16 19:08:10 so stupid.. Dec 16 19:09:50 when I read "walk mossbergs" name, milk comes out my nose Dec 16 19:10:00 They totally botched this article too Dec 16 19:10:12 “A fob, as well as a LoopPay digital payment card that can be used on its own or while secured in a special LoopPay smartphone case. To complete a purchase, LoopPay users tap any of these devices near the spot on a store’s credit card terminal where a card is usually swiped." Dec 16 19:10:15 why not use NFC? Dec 16 19:11:04 “Since the technology mimics a card swipe, it works in far more locations than Apple Pay or Google Wallet, which require a store to upgrade to equipment that includes a technology called near field communication, or NFC." Dec 16 19:11:07 Then how? waht? Dec 16 19:11:43 hi, (not that experienced with android development) i'm trying to create an account manager for my app. but when i go to accounts > add account > MyApp an invisible layer appears (i can't click anything in the ui) but when i tap the back button everything works just fine Dec 16 19:12:00 BTW JakeWharton. What is Square doing about the EMV requirement in 2015? Dec 16 19:12:11 this is what i found in logcat https://dpaste.de/hZdA Dec 16 19:12:16 tricknology: square.com/emv Dec 16 19:12:28 and i used this tutorial: http://www.finalconcept.com.au/article/view/android-account-manager-step-by-step-2 Dec 16 19:12:32 nice Dec 16 19:13:11 Why not use NFC in Android phones? Dec 16 19:14:57 any idea how i can get my account manager working? Dec 16 19:18:33 if I start a START_STICKY service, its onDestroy() is, as far as i know, is never called on OOM kill. is it possible for this method to be called at all if i don't explicitly stop the service? Dec 16 19:25:27 creepy that my phone is always listening. It’s on my desk and it thought someone said “ok google” Dec 16 19:25:38 started a search and recording what they were saying Dec 16 19:32:58 squirrel: if OOM its being kill why call on destroy process is going to the big bit bucket in the sky Dec 16 19:33:02 squirrel: think there is onLowMemory? Dec 16 19:33:25 ...what language was that Dec 16 19:33:36 can't anyone help me with the android authenticator Dec 16 19:33:38 ? Dec 16 19:33:55 the language of too much espresso Dec 16 19:34:31 wtf this datepicker dialog months are - 1 Dec 16 19:34:35 when isjaunary 0? Dec 16 19:34:38 ever? Dec 16 19:35:08 "Called by the system to notify a Service that it is no longer used and is being removed." Dec 16 19:35:11 seriosly Dec 16 19:35:23 why not go even more vague Dec 16 19:36:22 squirrel, yes it is possible, but it all depends on system memory pressure Dec 16 19:37:18 note that even holds true for activities Dec 16 19:37:27 also, onLowMemory is called when overall system memory is low Dec 16 19:37:37 (a slight distinction as the intuitive your heap memory is low) Dec 16 19:38:18 oh good to know Dec 16 19:38:44 squirrel: OOM crash is a crash is not a kill? Dec 16 19:38:45 Is it wise to create new classes for asynctasks? Dec 16 19:39:04 Mavrik: my god, the way android docs are misleading! thanks Dec 16 19:39:07 did you mean when the os reclaims memory by killing your app, or when a memory leak springs forth and your app crashes (which isOOM) Dec 16 19:39:10 I mean theyre nto long but there are a lot of them in one fragment… and a lot of viewgroups Dec 16 19:39:25 lasserix: i haven't heard of OOM crashes Dec 16 19:39:34 out of memory crash? Dec 16 19:39:36 I’ve seen them Dec 16 19:39:40 you get OOM crash if you reach your apps heap limit Dec 16 19:39:52 images will do it quick Dec 16 19:39:56 the system kills your app because system memory is low, an oom crash is because you create bitmaps in an infinite loop Dec 16 19:39:58 your process (which includes all activities and services) gets killed when system itself starts running out of memory Dec 16 19:40:02 0-100 real quick Dec 16 19:40:18 doesnt have to be infinite loop Dec 16 19:40:22 yeah i imagine something like that should happen Dec 16 19:40:35 OS starts killing stuff by priority, where calls/etc have the highest, processes with displayed activities slightly lower, then it goes foreground servivces > background services Dec 16 19:41:07 and the thing is, it doesn't really give apps time to do onDestroy, just kills the process :) Dec 16 19:41:12 anyways, what i'm doing is, i want to catch explicit service stopping event in the service, and i'm using onDestroy() for that Dec 16 19:41:20 apparently it's not a very good way Dec 16 19:41:22 onPause() is the last guaranteed thing you get calle don an Activity, on the service it's... fuckall :P Dec 16 19:41:38 Mavrik actually we just leanred last week, onStop is the last thing Dec 16 19:41:54 also in a service, you can watch the trim level Dec 16 19:42:12 g00s, I've just seen the doc where it says on pause, might be out of date or I'm reading something else :P Dec 16 19:42:18 onstop is last thing ina service guarenteed tobe called? Dec 16 19:42:26 or does that apply to activity nowadays too? Dec 16 19:43:40 there's no onstop in service. Dec 16 19:43:56 lol Dec 16 19:44:36 squirrel, hmm, maybe you can structure it differently, why do you need that callback? Dec 16 19:45:45 while (True) { Log.d("Alive", "I'm not dead yet!"); } Dec 16 19:45:51 when it stops printing, you know it's dead. Dec 16 19:45:52 ;) Dec 16 19:45:59 <_Auron_> true story Dec 16 19:46:27 Mavrik: to erase data that is only relevant in "the current session" Dec 16 19:46:33 (in case it isn't obvious... please please please don't do that :p) Dec 16 19:46:58 hmm Dec 16 19:47:49 squirrel, usually we just leave that lying around in cache until next startup :/ Dec 16 19:48:42 Mavrik: it's much harder to catch the next startup tho Dec 16 19:48:53 not sure if it's possible at all Dec 16 19:49:19 what do you mean? onCreate is called :) Dec 16 19:49:30 (until next startup of service / app I meant :) ) Dec 16 19:50:04 on create is called when system restarts your service after oom kill, too :p Dec 16 19:50:29 yeah, so you cleanup your crap there and continue :) Dec 16 19:51:01 but it's considered the same "session" Dec 16 19:51:17 only intentional kills break "sessions " Dec 16 19:53:29 anyone agree wit this statement? http://www.jameselsey.co.uk/blogs/techblog/extracting-out-your-asynctasks-into-separate-classes-makes-your-code-cleaner/ Dec 16 19:55:47 can PagerTabStrip be used without a viewpager? Dec 16 19:55:57 tricknology, nope, purging AsyncTasks with prejudice from your codebase makes code cleaner Dec 16 19:56:24 as in not using them at all? Dec 16 19:56:30 then what do you sugest? threads? Dec 16 19:56:52 threadpool Dec 16 19:56:54 handler Dec 16 19:57:02 a handler thread Dec 16 19:57:12 yep Dec 16 19:57:18 or Rx Dec 16 19:57:19 hm Dec 16 19:57:22 hey, I have an app , that has package name as com.example.app_name , I need to change it to com.app_name , so that it doesn't hinder future development . Using android studio Dec 16 19:57:23 you can set async thread pool count Dec 16 19:57:31 I usually do ThreadPoolExecutor that sends results back over EventBus Dec 16 19:57:33 instead of doing that, dpending on what you are doing Dec 16 19:57:39 https://developer.android.com/training/multiple-threads/create-threadpool.html Dec 16 19:57:46 that? Dec 16 19:57:59 just adding Retrofit to codebase pretty much throws out 80% of asynctasks anyway Dec 16 19:58:17 mafiaboy, it’s to keep track of your packages.. you’ll probably want something unique to you Dec 16 19:59:37 app_name has example in it and google doesn't allow example on playstore Dec 16 19:59:47 tricknology: you prob dont want to use non-static async inner classes because you can lose them on say config change, and if do in background is a long process you've just leaked your activity Dec 16 20:00:11 and if it static inner class, since that's equiv to top level class, essentially it is seperate anyways Dec 16 20:01:35 JakeWharton: would it be possible to add attrs to be able to explicitly set selector states in xml? Dec 16 20:06:53 so, how can i rename com.example.app_name to com.app_name Dec 16 20:07:21 make it com.mafiaboy.app_name Dec 16 20:07:33 do it in the manifest Dec 16 20:07:40 problem is example folder Dec 16 20:07:47 also might have to change your package name Dec 16 20:07:52 AS or Eclipse? Dec 16 20:08:02 0 exp with AS here Dec 16 20:08:03 AS Dec 16 20:08:58 what the problem with the example folder? Dec 16 20:09:55 Problem is google play store doesn't allow an app starting with com.example...... Dec 16 20:10:04 package name Dec 16 20:12:18 yeah Dec 16 20:12:24 duh, it’s too common Dec 16 20:12:36 everyone starts examples with that.. Dec 16 20:12:39 make something unique Dec 16 20:12:59 com.mafiaboy4lyfe.myappdoesomthing Dec 16 20:13:42 Hello everybody first of all sorry for my bad english. Dec 16 20:14:12 I'm currently developping an Android app , and even if I put AlignParentLeft paramater , I have an extra space on the Left of the screen. Dec 16 20:14:16 n’est pas problemme Dec 16 20:14:29 tricknology: merci :) Dec 16 20:14:31 do you have any padding? Dec 16 20:14:37 tricknology: Nothing. Dec 16 20:14:44 can we see code? Dec 16 20:15:08 tricknology: Unfortunally no :/ its a private code :/ Dec 16 20:15:33 hmm, I understand. Dec 16 20:15:43 tricknology: But even if I create an app , I put only one view with AlignParentLeft Dec 16 20:15:56 tricknology: It seems like android take some space on the left. Dec 16 20:16:02 tricknology: By default. Dec 16 20:16:21 is it a textview? Dec 16 20:16:49 no margins? Dec 16 20:16:50 tricknology: ImageView Dec 16 20:17:08 do you have like.. a dumbed down smaple code? Dec 16 20:17:10 tricknology: No margin , I think that Android take some space on the left , I just want to be sure. Dec 16 20:17:27 I haven’t experienced this, I create views programmatically. Dec 16 20:17:42 I have a textview that is all the way to the left Dec 16 20:18:01 maybe 1 pixel away from the left Dec 16 20:18:08 tricknology: , only 1 pixel ? Dec 16 20:18:15 yes Dec 16 20:18:30 i looked closer, it’s 1 Dec 16 20:18:34 tricknology: Ok so I have to check the code again. Dec 16 20:18:56 try LayoutParams.MATCH_PARENT Dec 16 20:18:59 lepourquoi, your main layout most likely has padding if default project Dec 16 20:19:00 for your left Dec 16 20:19:14 whatitis-: , Oooh ! Dec 16 20:19:19 erll, I gues that is width.. I jsut have a textview in this instance Dec 16 20:19:26 whatitis-: Its must be that ! Dec 16 20:19:34 lepourqui, didn’t I ask that? Dec 16 20:19:51 that was my first q lol Dec 16 20:20:00 tricknology: Yes but I was thinking you were talking about padding/margin within the views Dec 16 20:20:08 tricknology: Not the entire project Dec 16 20:20:18 ooo Dec 16 20:20:19 just check your xml for padding, if you created a default project the padding size is most likely set from @dimen/.... Dec 16 20:21:13 Mavrik: i'm sitting here triggering OOM kills, and onDestroy() just gets never called D: Dec 16 20:21:25 are you sure it's possible for it to get called? Dec 16 20:21:34 tricknology: whatitis- , Thank you very much ! Dec 16 20:22:14 np, happy coding lepourquoi :) Dec 16 20:22:14 whatitis-: tricknology , I was only looking at the added Views , not the container layout :p Dec 16 20:22:34 yeah you had padding on the parent view, right? Dec 16 20:22:39 squirrel: again, OOM you mean your heap goes out of bounds or system memory is low? Dec 16 20:22:41 tricknology: Yes :p Dec 16 20:22:51 heh :P Dec 16 20:23:12 lasserix: system memory getting low. since it's a kill Dec 16 20:23:18 that's not OOM Dec 16 20:23:30 huh Dec 16 20:23:36 squirrel you will get an OOM error in LogCat if its OOM Dec 16 20:23:48 and a FC Dec 16 20:23:59 IIRC Dec 16 20:24:01 OOM is when you go over your max app heap size, not when the system memory is low Dec 16 20:24:10 "int yPos = webView.getScrollY();" This always returns 0 even when the page is scrolled... Dec 16 20:24:31 tricknology: i never get OOM errors in logcat when system kills my app because it's low on memory Dec 16 20:24:45 can you view your heap? Dec 16 20:24:46 that's because its not OOM Dec 16 20:25:01 well i don't know how to call it Dec 16 20:25:19 oom means out of memory, and the system is out of memory Dec 16 20:25:32 no it's not its low on memory Dec 16 20:25:37 What is the best way on a rooted android to disable Navigation bar ? Dec 16 20:25:50 ok, low on memory, whatever Dec 16 20:25:51 you can call is low memory force kill Dec 16 20:25:52 (I saw may solutions) Dec 16 20:25:58 many* Dec 16 20:26:07 low memory force kill, okay Dec 16 20:26:14 the reason being is it obsfucates what you are trying to do / makes it difficult to help whatever it is you are trying to do Dec 16 20:26:45 well, everyone seemed fine with 'oom' before :p Dec 16 20:26:49 squirrel what are you doing thats giving this error in the first place? Dec 16 20:27:03 tricknology: which error? Dec 16 20:27:03 somethign hella memory intensive oviously, but is it images or what? Dec 16 20:27:32 oom is an actual error, I thought you were talkign abou that error Dec 16 20:27:38 jesperj, getScrollY is part of View, it isnt a method of Webview, it just tells you top edge of webview positioned in layout, which if getting 0 would be top left view in container Dec 16 20:27:40 whatever problem you’re having, what is causing it? Dec 16 20:27:49 i guess i wasn't talking about OOM after all Dec 16 20:27:49 your use case Dec 16 20:28:02 squirral what tricknology said is why i say use right names for this Dec 16 20:28:03 I'm making a ListAdapter. It wraps a repository of data. But my data is organized with its primary key being a String (because it's backened by SharedPreferences). Adapter requires a getItem(int position) so I need to convert position into primary key. Any suggestion how to solve this? Dec 16 20:28:04 ;p Dec 16 20:28:24 squirrel: Are you talking about an ANR ? Dec 16 20:28:26 Or should I read all keys into a List and use the list index as the position? And when is it a good time to refresh this list? Dec 16 20:28:28 my problem is that i don't know if onDestroy() is called when apps are killed because system is low on memory Dec 16 20:28:39 no Dec 16 20:28:41 its not called Dec 16 20:28:44 the process is going away Dec 16 20:28:49 and is this a device or an emulator? Dec 16 20:28:49 no reason to call onDestroy Dec 16 20:29:02 or it probably won't be called, usually is not Dec 16 20:29:08 Ah wait, I'll just make my own refresh() method. Dec 16 20:29:09 definatly NOT guaranteed Dec 16 20:29:13 your app is pretty much dead when that happens Dec 16 20:29:17 whatitis-: oh :(. Know of a way to get the current scroll position in a webview? Dec 16 20:29:56 yeah, it's definitely NOT guarateed, but is there any way that it can get called at all? except cases when i EXPLICITLY stop the service Dec 16 20:30:25 im looking at the webview class right now on docs, nothing yet, but see if you have a mScrollY variable for webview Dec 16 20:30:31 stop your memory leak? Dec 16 20:30:32 Zta just one way, mvstore uses counted b-tree so you can say get(5) i think O(log(n)) Dec 16 20:30:52 figure out what conditions are leading to your problem and alert yourself that it’s about to happen Dec 16 20:30:54 then clean up Dec 16 20:31:10 I changed apk destination in build.gradle. I know I need to run zipalign manualy, but is there something else I missed? I get Parse error after downloading apk Dec 16 20:31:15 it's not related to high memory usage anyway. Dec 16 20:31:22 g00s: the approach I just thought of is more brain-dead-straight-forward ;) But thanks. Dec 16 20:31:24 * tricknology is confused Dec 16 20:31:37 i just need to know if onDestroy() is guaranteed not to be called. that's it Dec 16 20:31:41 Zta sure; the mvstore would be better for large sets Dec 16 20:31:42 nope Dec 16 20:32:01 only if you call finish() Dec 16 20:32:01 ok you say nope, and lasserix says yes Dec 16 20:32:16 but still not guaranteed in some cases Dec 16 20:32:21 like if your app kills itself Dec 16 20:32:38 or is killed by androdi Dec 16 20:32:41 no i said no Dec 16 20:32:57 'usually' is a yes :p Dec 16 20:33:00 onDestroy IS NOT called (mostly likey not called) when low memory force kills your app Dec 16 20:33:07 or it probably won't be called, usually is not Dec 16 20:33:17 'usually is not' Dec 16 20:33:26 i have a rare bug. it happens once a month Dec 16 20:33:41 if your app is killable then it can be killed at any time without another line being executed Dec 16 20:33:47 I dont think its gaurenteed to NOT be called, the docs just say its not gaurenteed to be called Dec 16 20:33:53 if onDestroy() is called when there's no explicit stopping service, it'd explain the bug Dec 16 20:34:10 not onPause, not onDestroy, not onStop Dec 16 20:34:14 but if it's guaranteed not to be called, then i have to look elsewhere Dec 16 20:34:40 squirrel. if Android is killing your app there isnt much you can do (i think) Dec 16 20:35:35 eh maybe onPause Dec 16 20:35:40 but not if its killed Dec 16 20:36:02 squirrel if the app is killing your app then the process is going to die therefore unless you need to save something any thing alive in memory is also going away Dec 16 20:36:09 yeah, well, i'm destroying some data in onDestroy. so i don't care if it's NOT get called, but i care if it IS called when it's NOT supposed to be called Dec 16 20:36:31 tricknology: the only place you can guarentee stopping something or saving something is onPause, but you don't really need to stop anything since whatever is in heap is going away anyways Dec 16 20:36:48 it won’t be called when it’s not supposed to, no Dec 16 20:37:03 should be called with finish() only. Dec 16 20:37:13 oh thanks for the clarification lasserix Dec 16 20:38:05 onDestroy is not going to be called arbitrarily, usually happens when user hits the back button Dec 16 20:38:19 well. you two don't agree between yourselves :p Dec 16 20:38:30 dont think so Dec 16 20:38:33 I would trust lasserix over me Dec 16 20:38:49 i had some very painful development debugging issues over this... Dec 16 20:38:58 lasserix leaves me some hopes Dec 16 20:39:04 i like his 'usually' better Dec 16 20:39:54 :P Dec 16 20:39:56 i take it back there is no usually Dec 16 20:40:07 D: Dec 16 20:40:08 i have never ever seen it get called on force kill by low memory condition Dec 16 20:40:38 sigh. /me cries Dec 16 20:40:56 why u cry? Dec 16 20:41:00 so I want a threadpool and handler instead of asynctask just incase my app closes/pauses and some background thread doesnt get stuck in limbo? Dec 16 20:41:06 this stupid bug happens once a month, how am i supposed to debug it now Dec 16 20:41:08 explain your bug? Dec 16 20:41:32 i'd have to write a wall of text Dec 16 20:41:36 tricknology: probably over kill just make sure your async thread halts Dec 16 20:41:54 all it does it post to a server and get some results Dec 16 20:42:02 *parse results Dec 16 20:42:16 never more than like.. 500 characters at a time Dec 16 20:42:20 yeah so add a flag that returns if stop() is called Dec 16 20:42:24 well, in fact i might be able to explain Dec 16 20:42:30 (add stop() to your async class) Dec 16 20:42:41 override stop? Dec 16 20:42:45 no Dec 16 20:42:47 add a method Dec 16 20:42:55 like onActivityStopped Dec 16 20:43:01 call it from onStop Dec 16 20:43:05 err onDestroy Dec 16 20:43:12 hehe :) Dec 16 20:43:20 so that I can expicitely stop it? Dec 16 20:43:30 confused on why Dec 16 20:43:36 so in your doInBackground put some if(isActivityStopped) and return if true Dec 16 20:43:46 oh Dec 16 20:43:50 usually it's like if you have a while (isRunning) { } Dec 16 20:43:59 if you're parsing results, if you do it in a loop do it there Dec 16 20:44:14 or if you are posting back to the UI thread just return null or whatever Dec 16 20:44:21 my doInBackground has jsut a couple methods.. make httprequest, parse httprequest, return Dec 16 20:44:37 oh yeah no loops whatsover Dec 16 20:44:40 well that article you linked? Dec 16 20:44:42 I can't find a way to get the scroll position of a webview. Surely there must be a way? Dec 16 20:44:57 you can just do if(activityCancelled) { dont send to observer } Dec 16 20:45:33 ok thanks lasserix. very useful Dec 16 20:46:30 jesperj, http://stackoverflow.com/a/2294635/656927 Dec 16 20:47:14 my app is something like an irc client, and it's a service + activity with viewpager & fragments. viewpager's adapter automatically saves a list of open fragments (channels), and so does the service. ther is "quit" menu item in the application, it stops the service and finish()es the activity. the service destroys the open channels in onDestroy(). since viewpager loses saved data when activity is Dec 16 20:47:16 finished, it all results in consistent state. BUT about once a month viewpager gets fragments restored, but the service has 0 open channels Dec 16 20:47:20 and i have no idea why Dec 16 20:47:41 Oh, hey, came across a post by SimonVT lol Dec 16 20:47:41 low memory force kills calling onDestroy() in the service might have explained it, but alas. Dec 16 20:48:59 squirrel like i said, docs say onDestroy is not gaurenteed to be called Dec 16 20:49:09 to check it, just make a test case where you have low memory kill it Dec 16 20:49:24 runa monte carlo simulation and see how many times it is called Dec 16 20:49:24 again't, i don't care if it's NOT called Dec 16 20:49:30 again* Dec 16 20:49:31 that's what i am saying Dec 16 20:49:53 it MAY be called, the docs just say its not gaurenteed to be called,i've never seen it called on low memory situation, but who knows? maybe once in a month it is Dec 16 20:50:09 run a monte carlo test simulation and see if you ever see it getting called on low memory condition Dec 16 20:50:56 if only there was a way to simulate low memory kill Dec 16 20:51:15 there is Dec 16 20:51:28 kill -9! Dec 16 20:51:28 start an app that loads some big images, recycles it and does it again Dec 16 20:51:34 eumlator Dec 16 20:51:41 yeah, i'm doing just that Dec 16 20:52:02 JesusFreke: kill -9 surely won't call onDestroy() D: Dec 16 20:52:11 exactly :) Dec 16 20:52:26 i feel stupid for tryign it Dec 16 20:52:42 JesusFreke: that won't work he needs to test if low memory ever does get onDestroy invoked Dec 16 20:52:42 maybe I forgot the exclamation point.. Dec 16 20:52:51 ah Dec 16 20:53:13 tricknology: http://stackoverflow.com/questions/3656594/simulate-low-battery-low-memory-in-android Dec 16 20:53:44 http://stackoverflow.com/questions/1483047/how-do-you-simulate-low-memory-in-the-android-emulator Dec 16 20:53:48 fairly simpl Dec 16 20:54:33 oh nice Dec 16 20:54:40 hum Dec 16 20:54:48 This is probably a stupid question but I have downloaded the latest version of Google Play Services (21), does that mean I have to run an emulator that targets Android 5 (21) in order to test it? Dec 16 20:55:23 Should I always update to the latest SDK even if I want to ultimately target lower versioned devices? Dec 16 20:56:48 is a handler or interface more expensive? Dec 16 20:58:11 'interface'? Dec 16 20:58:37 callback? Dec 16 20:59:25 http://stackoverflow.com/questions/11577695/what-is-a-call-back-interface-in-java Dec 16 20:59:40 example http://www.javaworld.com/article/2077462/learn-java/java-tip-10--implement-callback-routines-in-java.html Dec 16 21:00:05 Then there is this.. which is not an interface.. http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ Dec 16 21:00:48 handler Dec 16 21:01:18 tho expensive is relative cause like when i am broke my phone bill can be expensive but if i just got a paycheck... Dec 16 21:01:28 why are you worried about expense? Dec 16 21:02:05 tricknology: i posted up a async task class (not using async class) want me to dig it out? Dec 16 21:03:09 just trying to figure out what best practices to use in different cases Dec 16 21:03:21 right before payday,.. after payday.. Dec 16 21:03:30 if I expect to be unemployed.. Dec 16 21:03:42 you have to provide a case to get an answer, handler vs interface is apples vs oranges Dec 16 21:04:07 yeah I don’t really have one at the moment, just one of my random theoreticals Dec 16 21:04:25 no that’s ok lasserix. I would probably bookmark it in my long list of things to read Dec 16 21:04:30 then you skipped a step in your question Dec 16 21:04:59 heh sorry, I thought it was a mor esimple answer Dec 16 21:05:15 * squirrel stays away from asynctasks Dec 16 21:05:28 squirrel they are nuts :) Dec 16 21:06:00 you won't trick me into using them g00s not even with your nuts Dec 16 21:06:17 :) Dec 16 21:09:40 when using asset studio to gen launcher icons what should raw image size be? 128 or is that too small for xx /xxx? Dec 16 21:12:08 just started testing on lollipop -- new version of sqlite doesn't like my app :( didn't have to change much, but i was a little surprised Dec 16 21:12:53 is lollipop sqlite 3.8 ? Dec 16 21:12:59 yeah Dec 16 21:13:17 3.8.4.3 yeah Dec 16 21:13:24 lo. i have a horizontal scroll view H and inside that, a linear layout L. the width of H is set to match the width of its parent view. i now want to place a horizontal progress bar B inside L... what's the correct way to get the width of B to match H? Dec 16 21:13:29 i've heard of some people having crashes between 3.7 3.8 differences Dec 16 21:14:07 i didn't have crashes, just a few queries returning zero... took a while to figure out coz i thought "shit shit what did i change??" haha Dec 16 21:15:03 although oems do bundle different versions of sqlite on occasion ;) Dec 16 21:15:11 i'm still not sure about lollipop. there's a lot of glitter and i'm not usually fond of that Dec 16 21:15:39 oh and the clock looks like a pie-chart :/ haha Dec 16 21:15:59 anyone have a good pattern for restoring dialogs on config changes? Dec 16 21:16:09 particularly if i can't sub the dialog Dec 16 21:16:13 it would be nice if we could include our own sqlite easily and still use the java bindings Dec 16 21:16:22 in our apps Dec 16 21:18:51 is it possible? Dec 16 21:20:12 hmm Dec 16 21:20:29 Is it possible to remove the invisible "back" button from the actionbar so that I can place the home/up button in the actual corner of the screen? Dec 16 21:20:56 similar to how the menu/back buttons look in gmail, etc Dec 16 21:21:53 bitkiller: for some reason getScrollY always returns 0 for me Dec 16 21:22:28 bitkiller: jesperj, getScrollY is part of View, it isnt a method of Webview, it just tells you top edge of webview positioned in layout, which if getting 0 would be top left view in container Dec 16 21:22:54 I read that returning multiple view types from Adapter.getView is more efficient than returning one ViewGroup and hiding/showing children depending on the "view type". This makes sense, but what is the exact reason? Dec 16 21:23:02 I'm guessing it relates to measuring. Is that right? Dec 16 21:23:24 i'm amazed you finish any feature of your app :P Dec 16 21:23:38 bankai_au: I don't get that. I'm trying to actually *understand*. Why is that bad? Dec 16 21:24:45 Hey all Dec 16 21:24:53 how can I get an ActionBar similar to the new gmail app? Dec 16 21:25:04 They seem to have the menu button on the exact upper left corner Dec 16 21:26:13 is it possible that it isn't actually an ActionBar, but a custom control? Dec 16 21:26:28 It's Toolbar Dec 16 21:26:33 It's in appcompat Dec 16 21:26:43 hmmm Dec 16 21:27:24 hmmmmmmmmmmmmmmmmmm Dec 16 21:27:40 interesting Dec 16 21:27:50 I'm guessing the idea of returning multiple view types to improve performance assumes that items of a particular type all have the size. So if items vary in size then it might be a waste of time returning multiple view types. Does that sound right? Dec 16 21:28:09 on the SimonVT thanks! Dec 16 21:28:12 err Dec 16 21:28:14 TacticalJoke: nah Dec 16 21:28:14 SimonVT: thanks! Dec 16 21:28:28 on the plus side, that's awesome, thanks for your help. On the minus side there's no time to implement this on the current codebase Dec 16 21:28:29 "JakeWharton: hmmmmmmmmmmmmmmmmmm" - and thus a new library is born Dec 16 21:28:52 TacticalJoke: anytime you change visibility on some subset of a viewgroup, you're going to cause its layout procedure to run Dec 16 21:28:57 TacticalJoke: potentially. you can also pool the contents of the outer container which are fixed size. Dec 16 21:29:11 e.g., header, summary, footer, whatever Dec 16 21:30:33 Somebody has already developped a kiosk mode app ? Dec 16 21:30:51 It is possible to change the package name in gradle build script? Dec 16 21:30:58 lasserix: Is there a difference between changing visibility (from 'gone' to 'visible') and changing size ('visible' 5px to 'visible' 10px)? Dec 16 21:31:02 JakeWharton: Okay, that makes sense. Dec 16 21:31:33 lasserix: you can set applicationId for the entire module or on a per-variant basis Dec 16 21:31:33 The Action Bar is dead. Long Live the ToolBar! Dec 16 21:31:37 lasserix: (With regard to the layout thing.) I'm guessing not. Dec 16 21:32:08 depends on the container Dec 16 21:32:18 both cause re-layout Dec 16 21:33:13 Okay. The container in this case is LinearLayout. The thing that varies in width between 0 and N is the first child (on the left) where the second child (on the right) has a layout_weight of 1. Dec 16 21:33:59 It's for a Reddit comment. The child on the left is the indent; the child on the right is the comment text-view. The indent has a 0 width (i.e., is invisible) for top-level comments. Dec 16 21:34:14 Reason I ask all this is that I don't know whether to return two view types: one for top-level comments and another for reply comments. Dec 16 21:34:18 Right now, I'm returning one view type for both. Dec 16 21:34:48 And just resizing the indent (between 0 {for top-level comments} and N {for replies}). Dec 16 21:35:14 the height also changes, right? so you're forced a relayout anyway Dec 16 21:35:17 Yeah. Dec 16 21:35:19 Okay. Dec 16 21:36:19 I guess "re-layout all the things" is unavoidable. :D Dec 16 21:37:17 I think I'll use a separate view type for collapsed comments, since they will almost always be the same size. Dec 16 21:38:32 Another thing that's driving me crazy is that I recently converted a LinearLayout with two child TextViews into a TextView subclass. I thought this would improve performance but it seems to have degraded performance. Dec 16 21:38:46 I suspect the reason is that I'm now having to use two extra spans (for text colour and size). Dec 16 21:39:38 I was thinking of reusing these two spans (for each TextView) to help performance, but when I look at the span classes I see that they're really simply anyway, so I doubt it'll help (but I'll try anyway). Dec 16 21:39:58 (The alternative is to create the spans every time I call setText.) Dec 16 21:42:35 Hi there!, I'm a newbie with Java and I'm trying to implement Facebook SDK with this example: http://javatechig.com/android/using-facebook-sdk-in-android-example It works but don't know why Facebook login sometimes works and some times not. Even when it works it doesn't return user data like first name. Dec 16 21:42:36 how many entries do you have that it starts affecting performance ? Dec 16 21:43:03 bankai_au: I notice a little stutter with only a few entries (maybe 40) if the comment heights are varying a lot. Dec 16 21:43:14 I see this in every Reddit client I've tried, but it still sucks. Dec 16 21:44:30 i have a few hundred in my listview and i can't see any performance issues... what device are you using ? Dec 16 21:44:43 I've tried on a Sony Xperia M and a Tesco Hudl 2. Dec 16 21:44:47 bankai_au: Are they variable-height? Dec 16 21:45:07 yeah and i'm using HTML to highlight text (which i thought would slow things down quite a lot, but doesn't seem to) Dec 16 21:45:15 On the Sony Xperia M (the phone), it's really slight. It's way more noticeable on the tablet (I guess because that shows more views at once). Dec 16 21:45:25 Interesting. Dec 16 21:45:57 are you sure it's not caused by your data fetching ? Dec 16 21:46:04 Yeah. Dec 16 21:46:12 I profiled; it's being caused by TextView.setText causing the layout stuff. Dec 16 21:46:27 Though with my latest changes there's also a little lag relating to applying spans (but not a huge amount). Dec 16 21:47:34 I'm considering custom-drawing the text (avoiding TextView entirely), but it feels kinda daunting. Dec 16 21:49:17 I did read about StaticLayout, which it seems would make custom-drawing the text easier (it takes care of wrapping and stuff), but I don't know whether that'll be slow or not. Dec 16 22:10:57 TacticalJoke: I do some extensive listview work with an app ive kinda paused on. but I dont receive too much lag, get a bit of GC with spannables, but otherwise smooth. and I have like 5 view types :) so something is wrong with just adding indents, or the lag is just something silly Dec 16 22:11:29 Anyone have an example of a build.gradle file where in two flavors change the launcher icon? Dec 16 22:11:31 but ive only test on galaxy nexus and samsung tab 3 Dec 16 22:11:39 lag ina listview? what? Dec 16 22:11:47 so profile... Dec 16 22:11:57 Since this applies to every Reddit client I've tried, the only conclusion I can come to is that TextView.setText varying the height inside ListView is just slow. Dec 16 22:12:31 pfn: Yeah. It's TextView.setText making the layout stuff happening. That's where 90%+ of the CPU time is. Dec 16 22:12:35 In some cases 99%. Dec 16 22:12:57 I have all sorts of shit going on in my listview items, spannables images multiple views in each view type etc, and I dont get lag Dec 16 22:12:58 hmm, qicr isn't slow, and there's a ton of variable height cells and spannable strings Dec 16 22:14:18 i just fired up my froyo droid-1, stuff lags so bad you don't even know if the thing is working or not Dec 16 22:14:30 The weird thing is that I recently replaced a LinearLayout feature two TextViews (one with colour c1 and text-size s1; the other with colour c2 and text-size s2) with a single TextView (using colour c1 and text-size s1 along with spans for c2 and s2) -- and it's slower! Dec 16 22:14:39 g00s: Lol. Sounds like my old Sony Xperia U. Dec 16 22:16:48 |= operator ftw Dec 16 22:16:56 I haven't noticed any slowness with bacon reader either Dec 16 22:17:06 how would you implement the web call of a chat app ? A webservice for sending text + calling the webservice for incoming message, or would only use google "push" mecanism to receive messages ? Dec 16 22:17:11 I'll try BaconReader. Dec 16 22:17:46 Wow, the permissions. ;o Dec 16 22:17:47 TacticalJoke: set text takes long? Dec 16 22:17:51 Even run at startup. Dec 16 22:17:53 Yeah, lasserix. Dec 16 22:18:00 I did some profiling (which was extremely painful). Dec 16 22:18:17 they need to add permission='TRANSFER_OWNERSHIP_OF_FIRST_BORN" Dec 16 22:18:41 lol Dec 16 22:19:02 sounds reasonable to me Dec 16 22:19:25 accounts (for logging in to reddit), (files: for uploading crap), network, obvious, etc. only thing that's weird is BOOT Dec 16 22:19:34 and NFC, I suppose Dec 16 22:19:59 Why would logging into Reddit need an Android-account permission? Dec 16 22:20:08 to save credentials Dec 16 22:20:09 because it would create a sync adapter Dec 16 22:20:10 duh Dec 16 22:20:32 looks like it doesn't currently, though Dec 16 22:20:53 Hello! Dec 16 22:21:08 I was in #android and wondering about the weird conversations... Dec 16 22:21:52 marrrk did you hear the whispers ? Dec 16 22:21:53 So now what's the excuse for this being a .java class? https://github.com/pfn/android-sdk-plugin/blob/master/sbt-test/android-sdk-plugin/robo-junit-test/src/test/java/RoboTest.java ? Dec 16 22:22:17 g00s: I saw this: "You need to coat the phone in silly putty. It will pretect the case, and also help insulate the phone... the more heat you can keep from escaping, the longer your battery will last" Dec 16 22:22:18 marrrk, probably because I copied it from somewhere Dec 16 22:22:25 marrrk, and just changed the test name Dec 16 22:22:46 good I am very relieved in that case Dec 16 22:24:49 it's a test case, who cares what language it's in :p Dec 16 22:24:51 not really relevant Dec 16 22:25:02 lol baconreader is crap though Dec 16 22:25:06 reddit sync ftw! Dec 16 22:25:10 so for each build flavor src tree, we have to duplicate all the java? Dec 16 22:25:16 lasserix, no Dec 16 22:25:21 or will flavors automatically share the same java src from main? Dec 16 22:25:21 I think they're all crap, to be honest. Dec 16 22:25:22 lasserix, only the differences go into flavors Dec 16 22:25:30 I generally like bacon reader Dec 16 22:25:47 pfn have you tried reddit news and reddit sync? Dec 16 22:25:53 so.. apparently some people are still on gingerbread Dec 16 22:25:54 don't remember Dec 16 22:25:55 Reddit News wastes tons of space. Dec 16 22:26:08 It kinda defeats the purpose of being a Reddit app. Dec 16 22:26:17 heh, cool http://www.androidpolice.com/2014/12/16/sony-now-supports-aosp-android-builds-on-all-2014-qualcomm-based-phones/ Dec 16 22:26:17 pfn: It is a matter of principle! Dec 16 22:26:30 "I'm gonna download an app that helps me view Reddit on a small screen. Hmm, let's try this one that makes it hard to view Reddit on a small screen." Dec 16 22:26:52 marrrk, meh, further demonstrates that the plugin can be used for anything Dec 16 22:26:55 the solution is to simply use 2sp text Dec 16 22:27:01 marrrk, and tests all cases, not just the scala case Dec 16 22:27:03 lol @ goos Dec 16 22:27:39 g00s, on their page, it says: "As usual, you should be aware of that this software is not intended for daily use as there are important limitations. For example, the camera is not working and the modem is not enabled, which means you cannot take photos or make phone calls." Dec 16 22:27:46 AP just sensationalizing this one Dec 16 22:27:48 lasserix: Do you know whether StaticLayout is fast? It seemsthat StaticLayout takes care of text wrapping for us. Dec 16 22:27:51 seems that* Dec 16 22:28:01 Afzal bah, that sucks Dec 16 22:28:02 pfn: Alright, okay, I'll let that pass. Dec 16 22:28:07 yeah think that what you are doing is what it was designed for Dec 16 22:28:11 hmm, notifications persist even if your app dies, right... meh, need to persist my notification IDs to disk Dec 16 22:28:12 K. Dec 16 22:28:18 I'll probably go crazy and end up doing that. lol Dec 16 22:28:32 just do custom view Dec 16 22:28:33 Because lag is so freaking awful. Dec 16 22:28:34 already Dec 16 22:28:37 What custom view? Dec 16 22:28:40 you been at this for like 4 days Dec 16 22:28:48 just what i said Dec 16 22:28:49 custom view Dec 16 22:28:54 draw it yourself Dec 16 22:29:01 use can even use a sttic layout Dec 16 22:29:02 Yeah, that's what I mean: StaticLayout seems to help there. :) Dec 16 22:29:14 what lag? Dec 16 22:29:23 his setText lag Dec 16 22:29:25 something else has got to be wrong if you're getting lag just setting text on textviews Dec 16 22:29:31 Lag cause by TextView.setText causing a layout. Dec 16 22:29:31 TacticalJoke: heres examples of my listview, its demo pics but I get no lag doing all this http://m.imgur.com/r2mbFzj,Bj7gzyU,7YRh5cL,T9VA3p0,iJi8D8Q,l05PcNv,Tc8q4At,44xDjGZ,xCWaJHQ,0UlTGw6,dPSwCG6 Dec 16 22:29:42 is there a way to force the fused location provider to use gps? i am trying to get updates every second but instead i am getting updates every 5 seconds. I read a stackoverflow that suggests that the network provider is slower (5 seconds) than the gps provider. Dec 16 22:29:47 TacticalJoke: if you are not afraid of me you could send me the apk and i can try it on my devices Dec 16 22:30:20 Interesting, whatitis-. Dec 16 22:30:44 There are two possibilities: (1) I'm getting more lag. (2) I'm way less tolerant of lag and my definition of 'lag' is different from others'. Dec 16 22:31:01 is the listview visibly stuttering? Dec 16 22:31:05 lasserix: Sure, if you want. :) Dec 16 22:31:07 did you set drawcingchanceenabled false Dec 16 22:31:08 It sucks right now, though. Dec 16 22:31:17 I tried; no detectable difference. Dec 16 22:31:23 and set that other scroll parameter (i think it is on by default tho) Dec 16 22:31:31 Yeah. Dec 16 22:34:13 pfn so if i just want two diferent icons for two different flavors all i need to do is create off the src folder is, src/flav1/drawable/launcher1 and src/flav2/drawable/launcher2? Dec 16 22:34:23 "You may be wondering why all devices aren’t being upgraded to Android 4.0 (Ice Cream Sandwich). Here’s the deal. We work very closely with Google and cell phone carriers for every software update. And, obviously we want the new release to improve our devices. If we determine that can’t be done—well then, we’re not able to upgrade that particular device."-Motorola Dec 16 22:34:29 BS Motorola.. Dec 16 22:34:31 lasserix, that's the idea Dec 16 22:34:37 TacticalJoke: sure if you dont mind ill give it a whorl and see Dec 16 22:34:45 Just trying Reddit News. Exactly the same lag. Dec 16 22:35:02 I’ll do a whirleybird too Tactical Dec 16 22:35:21 Trying to think of where to host it. lol Dec 16 22:35:41 your backend? Dec 16 22:35:45 I have space.. Dec 16 22:36:12 f-k amazing how many downloads all the reddit clients have Dec 16 22:36:21 people love the reddit, it seems Dec 16 22:36:26 * pfn doesn't understand Dec 16 22:36:37 tactical is going to make bank if he pulls it off Dec 16 22:37:02 I have an editext with android:imeOptions="actionSend", but I don't have the "send" button on my virtual keyboard (only "new line"), any idea why ? Dec 16 22:37:11 It'll be free. :D Dec 16 22:37:22 Actually, Reddit News doesn't lag as much, but it still lags a lot. Dec 16 22:37:33 Not sure what they're doing different. Is RecyclerView less laggy at this kinda thing? Dec 16 22:37:37 argh ScalaTest hijacks the test command, I think Dec 16 22:38:11 nope Dec 16 22:38:38 blusky: what other attributes did you set on the EditText ? Dec 16 22:39:08 TacticalJoke: no ads? Dec 16 22:39:11 sharkbutcher: http://pastebin.com/PVNrJtUz Dec 16 22:39:12 TacticalJoke might be better off on iOS Dec 16 22:39:15 * g00s runs Dec 16 22:39:33 TacticalJoke are you can help the windows phone guys and get them a good client :D Dec 16 22:39:55 blusky: try adding android:singleLine="true" Dec 16 22:39:59 let windows phone die Dec 16 22:40:02 Actually, I think the difference might simply be that Reddit News shows fewer comments on one screen (since it uses a larger font and more padding). Dec 16 22:40:14 lasserix: Yeah, no ads. Dec 16 22:40:17 lasserix its not good for us. the more competition android has, the better Dec 16 22:40:20 Ads on a Reddit client are stupid. Dec 16 22:40:22 oh true Dec 16 22:40:38 sharkbutcher: amazing :) Dec 16 22:40:42 TacticalJoke: you should introducing marking iny our reddit client Dec 16 22:40:55 Ah, to hell with it. Reddit News is, by my definition, extremely laggy. And everyone loves that. So it's probably me worrying about nothing. Dec 16 22:41:10 blusky: ¯\_(ツ)_/¯ Dec 16 22:41:18 lasserix: What kind of marking? Dec 16 22:42:57 pfn: when i am making the folder off of src/flav1 how do i make a new res folder? from context menu i have create new android resource folder or directory or ? Dec 16 22:43:09 marking is this gift/karma via bitcoins thing Dec 16 22:43:12 I dunno, I do it from commandline Dec 16 22:43:19 and I don't use gradle Dec 16 22:43:23 you mark someone which means send them some percent of bitcoin Dec 16 22:43:24 ahh Dec 16 22:43:36 pfn: does test or android:test run the robolectric tests? Dec 16 22:43:42 marrrk, test Dec 16 22:44:05 Hmm, I want to keep scalatest as a dependency but not have it run the tests. Dec 16 22:44:15 TacticalJoke: If you’re not doing ads, are you charging for your app? Dec 16 22:44:22 all test runners run when you use test Dec 16 22:44:23 iirc Dec 16 22:44:29 you didn't setup junit-interface then Dec 16 22:45:14 If I set the comment-body-text size to the same as that of Reddit News I can't really see a performance difference. Dec 16 22:45:17 s73v3r: No. Dec 16 22:45:49 The only goal is for Android to have a Reddit client that doesn't suck. If I fail in that goal, I won't even bother releasing. Dec 16 22:45:57 then what are you gonna do for money? Or do you have a day job? Dec 16 22:46:00 I probably need this maven thing Dec 16 22:46:01 I work from home. Dec 16 22:46:10 TacticalJoke: while you're at it, go for a GitHub client as well. Dec 16 22:46:22 I stupidly assumed I didn't need it although it was in the test case for an sbt tool... Dec 16 22:46:44 sharkbutcher, there already is a github client, and it's open source--fix it Dec 16 22:46:49 If you succeed at making a Reddit client that doesn’t suck, then that’s something you should be able to be rewarded for Dec 16 22:47:28 pfn: I was thinking about doing that, it sucks in so many levels, and currently has 182 open issues and 36 pending PRs - so no. Dec 16 22:47:40 * pfn shrugs Dec 16 22:47:43 my PR got merged pretty quickly Dec 16 22:47:48 I just enjoy programming, to be honest. I also enjoy Reddit. If it ends up being good, that'll be a huge reward in itself. Dec 16 22:48:03 mostly, it needs to get off maven for building Dec 16 22:48:08 Enjoying programming and getting paid for it are not exclusive Dec 16 22:48:15 and updated to latest appcompat/support Dec 16 22:48:44 and you know once you release it you’re going to be hounded for updates Dec 16 22:49:09 I think that's a good thing; shows that people like something. Dec 16 22:49:22 carrier has arrived Dec 16 22:50:00 * pfn has gotten several thousand in donations for his OSS work Dec 16 22:50:01 * pfn shrugs Dec 16 22:50:07 not enough to live off of, but somewhat supported for it Dec 16 22:50:28 Nice. Dec 16 22:50:30 I’m guessing that was a larger project, though Dec 16 22:50:35 I would consider uploading a donation version, I think. Dec 16 22:50:42 Yeah, okay putting it in the right folder helps. Dec 16 22:50:44 But it'd probably be identical to the free one. Dec 16 22:50:54 oss? Dec 16 22:51:07 dude more people than you think are willing to donate Dec 16 22:51:14 especially if you set the ammount semi-low Dec 16 22:51:20 I don’t think they are Dec 16 22:51:20 with option to change Dec 16 22:51:35 idk, I have donated Dec 16 22:51:47 if you don’t have the button then you cant get donations Dec 16 22:51:47 pfn: for the sbt plugin thing? Dec 16 22:51:53 I don't want it to be all about making money, though. That's when apps can start to suck. Dec 16 22:51:59 sharkbutcher, no, one one's given me shit for that :p Dec 16 22:52:01 In fact, I don't want it to be about money at all. Dec 16 22:52:09 Still it seems only ScalaTest attempts at running it. Dec 16 22:52:12 I think plenty of people will say they’d be willing to donate, but few will follow through. Especially for something like a Reddit client Dec 16 22:52:13 mostly for passifox/chromeipass/keepasshttp Dec 16 22:52:14 And fails, obviously. Dec 16 22:52:52 i dunno, a lot of apps start to suck when their creator really doesn’t have any reason to keep working on them Dec 16 22:53:12 which can happen a lot sooner with a free app than one that the creator is getting an income stream from Dec 16 22:53:22 TacticalJoke: you are putting work into this, you shouldbe able to accept money for your labor. If you don't then you are ... Dec 16 22:53:38 not respecting yourself ;p Dec 16 22:55:02 no runnable methods. I think that's a good sign Dec 16 22:56:14 is there a way i can test android 5 without an android 5 device Dec 16 22:56:31 emulator Dec 16 22:56:36 there should be a system image in your sdk Dec 16 22:56:38 which one? Dec 16 22:57:01 Do you guys know whether RecyclerView is faster than ListView with variable-height TextView children? Dec 16 22:57:06 open the sdk manager. look at the options. Dec 16 22:57:21 Napalm was saying this the other day, but I didn't quite understand why or how or when. Dec 16 22:57:52 ok thanks Dec 16 22:58:14 TacticalJoke: Is there any reason to use ListView over RecyclerView? Dec 16 22:58:22 It's simpler, I guess. Dec 16 22:58:23 It's familiar. Dec 16 22:58:32 So now it works. Dec 16 22:58:35 And this: Robolectric does not support API level 21, sorry! Dec 16 22:58:55 TacticalJoke: I find RecyclerView to be much cleaner. Dec 16 22:59:03 TacticalJoke: you should a) move on b) do a custom view Dec 16 22:59:11 marrrk: It seems to lack stuff, though. How do you get dividers? Dec 16 22:59:17 Drawing them manually? Dec 16 22:59:20 lasserix: I know. lol Dec 16 23:01:12 Can anyone recomend which google cardboard manufacturer to go through? Dec 16 23:01:21 TacticalJoke: The dividers bit is silly. Could just add it to the bottom of the list item though if you can live with the last one also having one. Dec 16 23:01:35 lasserix, http://www.tinydeal.com/diy-google-cardboard-vr-3d-glasses-for-iphone-samsung-cellphone-p-135220.html Dec 16 23:01:37 I ordered that Dec 16 23:01:38 Finally! TestFailedException: 12 was not equal to 13 Dec 16 23:01:57 wow Dec 16 23:01:57 I was wondering about that this whole time. But they're not the same! Dec 16 23:02:01 3 dollars Dec 16 23:02:08 marrrk, there's an @Config something in robolectric that you can force to emulate an older sdk Dec 16 23:02:14 so it ignores your manifest Dec 16 23:02:17 no head strap tho Dec 16 23:02:18 Yeah, I did that Dec 16 23:02:24 @Config(manifest="src/main/AndroidManifest.xml", emulateSdk = 18) Dec 16 23:02:32 18 seems to be the latest they support Dec 16 23:02:35 good enough or me Dec 16 23:03:54 Can anyone please give me a hand with Facebook SDK integration? I'm having some issues. Thanks in advance. Dec 16 23:04:00 It only took 32 seconds to find out that 12 != 13 by the way. Dec 16 23:04:01 I really dislike the animations in Reddit News. Dec 16 23:04:03 hmm.. my textview is not centering.. Dec 16 23:04:10 tvStatus.setGravity(Gravity.CENTER); Dec 16 23:04:17 still on the left.. Dec 16 23:04:28 pfn thanks Dec 16 23:04:30 tricknology, obviously, if your textview is only wrap_content wide, and your layout aligns you to the left Dec 16 23:04:37 tricknology, your text won't be centered Dec 16 23:04:37 tricknology: Maybe setLayoutGravity? Dec 16 23:04:48 boom, thanks :) Dec 16 23:05:20 Still easier to get something in the middle than CSS. Dec 16 23:06:09 lasserix, we'll see if I ever get mine, I ordered mine on the 11th Dec 16 23:06:29 It was the layoutParams, with wrap_content Dec 16 23:06:48 what do you mean if you ever get, tinydeal not reputable? Dec 16 23:09:06 really cool that robolectric works now, pfn, thank you Dec 16 23:10:28 I need some help! Would anyone be nice enough to help me repack my custom kernel using the mktoolimg? Pretty certain it just comes down to setting the offsets, but for whatever reason it escapes me despite recompiling the mktoolimg to fix it. Dec 16 23:10:34 lasserix, dunno, they're out of country Dec 16 23:10:46 ahh Dec 16 23:10:50 I don't trust them furriners Dec 16 23:10:53 prolly not in time for xmas Dec 16 23:14:00 man there is a lot of junk out there Dec 16 23:14:13 no wonder there is 3x texas floating plastic island in the pacific ocean Dec 16 23:17:33 why is there no fukn proper keyboard api in Android, i.e. callback that informs you whenever the virtual keyboard is shown / hidden / in the process of one of these states, what's the height of the keyboard in pixels, etc. Dec 16 23:17:40 I honestly don't get it Dec 16 23:18:02 you are supposed to let the os handle it Dec 16 23:18:17 there are methods to do each of those things tho Dec 16 23:18:21 just not a standard Dec 16 23:18:31 I'm faimiliar with those of course Dec 16 23:18:34 seriousily a pan in the bit Dec 16 23:18:49 familiar* Dec 16 23:19:33 wonder if amazon prime will still ship free 50 lbs Dec 16 23:22:01 lol Dec 16 23:22:18 Is there some intellij integration for robolectric? Dec 16 23:24:14 robolectric is a junit test runner Dec 16 23:24:18 intellij supports junit Dec 16 23:31:43 Any experts on monetization? I'm looking for advice and strategies. Dec 16 23:32:33 Same with marketing. Dec 16 23:53:01 <_genuser_> JakeWharton: yo man, how's it going? Dec 16 23:53:55 good Dec 16 23:54:10 robolectric doesn't like my appcompat based Theme, though Dec 16 23:55:18 <_genuser_> will have to check out this appcompat someday Dec 16 23:55:29 sharkbutcher, I don't get it either Dec 16 23:55:43 anyone with with mktoolimg experience?? I am having difficulties setting my offsets successfully. When I re-run unmktoolimg it’s clear that my repacking does not match Samsungs. Dec 16 23:56:33 sharkbutcher, https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/MainActivity.scala#L672 Dec 16 23:57:40 sharkbutcher, can use the delta to detect keyboard height Dec 16 23:58:15 lasserix: With custom text drawing, is it hard to detect that a link has been clicked? Dec 17 00:06:44 Hrmpf Dec 17 00:06:52 Word.. Dec 17 00:14:48 Hi all, I have a question about xml files. Basically, I want to have a checkbox in one activity that edits a textview from a different XML file. Is there an easy way to do this and would I need to be using Shared prefs? Dec 17 00:15:13 For example, if I click the checkbox in activity 1, it will change a textview in activity 2 Dec 17 00:17:08 liuwenhao: Can't you just pass a parameter to Activity2? Dec 17 00:18:20 no, go to the data as the source of truth Dec 17 00:19:40 <_genuser_> oh so he talks to people who don't say whatup to him!! Dec 17 00:19:59 TacticalJoke: you'd probably have to add a list of rects that are bounded by the link text, then on touch see if contain Dec 17 00:20:21 Okay. Thanks. Is that hard? (I've never done anything like that on Android before. :) Dec 17 00:20:23 _genuser_: oh, hi. not paying close attention to this room Dec 17 00:20:38 <_genuser_> JakeWharton: I'm just hassling you man. :) Dec 17 00:20:41 lasserix: Just getting a feel for the complexity Dec 17 00:20:42 . Dec 17 00:21:16 <_genuser_> JakeWharton: I been doing some android coding again so I've been hanging out here quite a bit. working on importing spongycastle in my android app. Dec 17 00:26:12 How can I define Test activities in my androidTest project? Dec 17 00:26:26 give it an AndroidManifest.xml Dec 17 00:26:30 What's the downside of putting all of the stuff in appcompat-7 into my project instead of using the aar? Dec 17 00:26:37 hard to update Dec 17 00:26:45 But Robolectic should work Dec 17 00:27:00 And the interface preview guy could also work Dec 17 00:27:37 Maybe I can deal with hard to update. Dec 17 00:29:10 Probably better to just get the resources but not the classes. Dec 17 00:33:09 No way, that's just crazy. Dec 17 00:36:29 lasserix: I've started drawing my own text. :D I must be crazy. Dec 17 00:36:36 lasserix: This'll probably be a failed experiment, however. Dec 17 00:39:00 collapsing titlebar from chris banes https://plus.google.com/+ChrisBanes/posts/J9Fwbc15BHN Dec 17 00:39:59 not my cup of tea ;) Dec 17 00:42:20 JakeWharton: Assume I fork Robolectric and add appcompat-v7 as a dependency. Could that fix issues with it not finding resources from appcompat? Dec 17 00:43:45 i have no idea Dec 17 00:44:15 how about you just fix robolectric and send a PR Dec 17 00:44:23 help everyone instead of just yourself Dec 17 00:44:31 I am Dec 17 00:44:48 talking about this: https://github.com/robolectric/robolectric/issues/1332#issuecomment-61736248 Dec 17 00:45:14 God, StaticLayout's constructor has the most parameters of all time. Dec 17 00:45:16 i don't see why that would be needed Dec 17 00:45:23 appcompat isn't anything magical Dec 17 00:45:29 it's just some java, some styles, and a manifest Dec 17 00:45:53 a magical manifest Dec 17 00:46:17 why does it evenhave a manifest? Dec 17 00:46:29 because all aars have a manifest Dec 17 00:46:33 cool tactical, you'll make it happen Dec 17 00:46:44 how else do you propogate permissions, activities, etc. which are present in the library? Dec 17 00:47:24 hmm i guess i want to take a look at it, what permissions would app compat need? Dec 17 00:47:25 lasserix: I'm praying to the universe. Dec 17 00:47:40 I just concluded that Robolectric can't deal with aars that have something in their res folder. Dec 17 00:47:55 lasserix: none Dec 17 00:48:19 But of course it is not a solution to add all the aars as Robolectric dependencies. Dec 17 00:49:56 right. in fact it's explicitly the wrong one and i've been fighting to get the support-v4 dependency out of the robolectric core Dec 17 00:51:13 So the idea would be to put that in a separate project something like robolectric-support-v4? Dec 17 00:52:48 yes Dec 17 00:52:53 i'd prefer to not have one at all Dec 17 00:54:57 Hmm. That's more or less independend of the problem with resources from aars not being picked up, though, isn't it? I would assume the problem with support-v4 is that it is probably entangled with the rest. There couldn't really be a robolectric module for any aar library. Dec 17 00:55:59 it's not at all entangled. the shadows are more-or-less self-contained per class. Dec 17 00:57:07 JakeWharton: So to add a TestApplication to my project I add an AndroidManifest.xml to src/andoridTest/ ? Dec 17 00:58:06 Lame, should have read http://tools.android.com/tech-docs/new-build-system Dec 17 00:58:06 I have no idea what I'm talking about. I don't even know what the shadows are. Dec 17 01:00:12 lasserix: I've got the absolute basics working. It's *fast*. Dec 17 01:00:17 Like zero lag regardless of comment height. Dec 17 01:00:25 This would be amazing if it worked. Dec 17 01:03:33 that is the power of the custom view Dec 17 01:04:38 with great power comes great responsibility... :D Dec 17 01:17:23 lasserix: Hmm. Can I still reuse views (the convertThing thing) if I do this? Or do I have to forget about that? Dec 17 01:17:32 Because I'm getting comments jumping all over the place on first attempt. lol Dec 17 01:17:38 convertView* Dec 17 01:18:07 always re-use views Dec 17 01:18:19 Ya. What I'm asking makes no sense. Dec 17 01:18:20 inflation is 100x more expensive than relayout Dec 17 01:18:24 Must have some weird bug somewhere. Dec 17 01:18:24 TacticalJoke: your customview needs a present() function that takes your model datastructure Dec 17 01:18:40 which you call after you reassign the convertview Dec 17 01:21:26 Oh. The issue was that I was creating the StaticLayout in onMeasure, and that of course isn't being called every time the list is scrolled. Guess I need to use a DynamicLayout and set the text in the present() thing. Dec 17 01:21:49 the nice thing about that viewholder harmful article is that you can bypass using the viewholder and just hold the reference to the class itself--in which case, at the top of getView do like () { CustomView view = null; if (convertView == null) { construct view; } else { view = (CustomView) convertView; } view.present(dataStructure); convertView = view; return convertView; = Dec 17 01:21:54 hey, i was curious if someone could lend me some advice of where i could look. sound isn't playing from my app's main activity class, but it plays from a callback of a button, for which the method is in the main activity class. Dec 17 01:22:02 Yeah, the old ViewHolder is horrible. Dec 17 01:22:09 wtf no it isn't Dec 17 01:22:15 it's the same damn thing Dec 17 01:22:29 JakeWharton: The old ViewHolder? Dec 17 01:22:31 yes Dec 17 01:22:33 sort of except your creating an extra class, which is a pain if you have multiple view types Dec 17 01:23:00 Yeah, multiple view types with the old ViewHolder creates bloated code. I don't see how it's desirable. Dec 17 01:23:09 i didn't say it was desireable Dec 17 01:23:09 sound doesn't initiate when i use any of the 3 api's available, or when i use an asynctask. but the button callback works fine. Dec 17 01:23:14 it's not horrible though Dec 17 01:23:16 that article is dumb Dec 17 01:23:28 custom views are great but what a stupid claim Dec 17 01:23:35 the title is dumb, agreed Dec 17 01:23:47 the article is a nice introduction to compound views and how to use them in getview Dec 17 01:23:58 By 'horrible' I meant 'leading to ugly code'. Dec 17 01:24:02 yes. presented in the absolute worst way. Dec 17 01:24:09 TacticalJoke: you just described all of Android Dec 17 01:24:31 but not all of us can be prolofic coding genuises and have to hype up our minor contributions to the android world of development ;p Dec 17 01:24:39 *prolific Dec 17 01:25:28 if any coding genius wrote that article i'd bash them the same for stupid, click-baity, misleading title and content Dec 17 01:25:39 Android has ugly code, but still it's nice to try to keep our code clean/maintainable/etc. Not sure I understand your objection to my 'horrible' comment. :) Dec 17 01:27:16 because i can write perfectly clear and maintainable code with a ViewHolder that looks exactly the same as anything you'd do with a custom view Dec 17 01:27:42 that article should have read: "View holders and custom views, both have use cases and can even be used together for more awesomeness" Dec 17 01:36:39 pragmatism ftw :) Dec 17 01:41:03 lol Dec 17 01:41:51 so i'm guessing the crux of my question is, why might sound only work for buttons, and not players defined in the same class, if they are both constructed the same? Dec 17 01:42:10 Do you folks know how StaticLayout/DynamicLayout work? Not sure how they deal with mutable text. Dec 17 01:42:19 Like, if I want to mutate the text, do I just have to create a new one? Dec 17 01:42:45 why dont you not use that first, do it after once you have it working? Dec 17 01:42:51 isn't that optimization stuff anyways? Dec 17 01:42:57 Not use what? Dec 17 01:43:09 those classes Dec 17 01:43:15 they aren't necessary right? Dec 17 01:43:17 They're for wrapping the text. Dec 17 01:43:22 ahh Dec 17 01:43:29 i just built my own line tokenizer Dec 17 01:44:37 The only solution I can see is to create the Layout in onDraw, but that doesn't sound good. Dec 17 01:44:51 why not onMeasure? Dec 17 01:45:02 and/or onLayout Dec 17 01:46:05 I'm creating it in onMeasure right now. The issue is that, when the ListView recycles views, the text of the Layout for that view is not being updated. So of course I need to do this (but I'm not sure how). Dec 17 01:46:24 There's no way to say Layout.setText or whatever. Dec 17 01:48:18 DynamicLayout describes itself as "a text layout that updates itself as the text is edited". Maybe I need to give it a mutable CharSequence and mutate that. Hmm. Dec 17 01:49:40 mutating -> I'm guessing maybe, due to row reuse? Dec 17 01:50:05 Groxx: I don't suppose you know about StaticLayout/DynamicLayout? :) Dec 17 01:50:15 Trying to figure out how to mutate one. Dec 17 01:50:26 dunno. I've read some of the source for those (and BoringLayout, hah), trying to figure out how to do really careful text rendering a while ago, but I don't remember enough Dec 17 01:51:52 Can test AndroidManifest.xml's provide a test application? Seems like no matter what Android tries to start applications with the applicationid instead of the testApplicationid Dec 17 01:52:36 I wish there were an example of how to do this stuff. I guess the TextView source is my only example. ;| Dec 17 01:54:02 those feels Dec 17 01:54:18 when huge layout that looks like a listview instead of a listview Dec 17 01:55:41 Imagine if we could just download knowledge into our brains. Dec 17 01:55:52 It takes days/months to learn some stuff. It's so inefficient. Dec 17 01:56:15 People could sell units of knowledge for $5.99 each. Dec 17 01:56:52 buy buys a $5.99 unit of knowledge and beats TacticalJoke over the head with it Dec 17 01:56:58 slash me Dec 17 01:57:00 * matt_j does that Dec 17 01:57:12 you've come a long way since your days of being a single celled zygote Dec 17 01:57:24 TacticalJoke the problem is , somebody will be selling units of stupidity for free Dec 17 01:58:04 exhibit a : faux news Dec 17 01:58:07 * g00s runs Dec 17 01:58:36 I guess you could trojan-horse your enemies with shady stuff. Dec 17 02:00:02 heh. yeah, read textview, that's where I started :) watching what happens as it runs is useful too. Dec 17 02:03:51 ok I thought I could access the MainActivity global variables from an inner Asynctask, and it seems to assign them, but they only stay assigned within the inner asynctask, outside of it they are at their default initialized assigned value Dec 17 02:04:14 so I gotta pass stuff to the inner asynctask with some callback interface to get a result back so I can assign stuff outside it ?? Dec 17 02:04:23 damn android! Dec 17 02:05:20 how much code should go into Activities that isn't directly related to getting or setting something on a view? Is there a need to seperate out this logic at all? Dec 17 02:05:31 idealy none Dec 17 02:05:35 besides not blocking the UI thread of course Dec 17 02:05:58 where would the other code go though, should it all be in a service? Dec 17 02:06:09 services, or controller objects Dec 17 02:06:14 oddalot model code can also go in a worker fragment Dec 17 02:06:16 can someone confirm if my observation is right ? Dec 17 02:06:37 (wf = no view, retaininstance=true) Dec 17 02:07:00 hmmm, sounds interesting, i better look these things up Dec 17 02:07:16 the smaller you keep your activities, the easier they are to maintain Dec 17 02:07:45 yeah, i'm just having to write a TON of boiler plate code it seems. But this doesn't seem out of the ordinary from what i've been reading Dec 17 02:08:10 dang, gotta catch the train, peace out Dec 17 02:08:27 sometimes splitting off into other objects means you can reuse the boilerplate Dec 17 02:09:49 shmooz: that's a little bit of a fuzzy observation. in general: are you sure you understand the threading? could there be multiple setting / clearing the value? is it even the same Activity instance? Dec 17 02:10:06 shmooz: Are you writing to those variables from twp threads? Dec 17 02:10:30 TacticalJoke: no, just one asynctask Dec 17 02:10:30 Oops, just saw Groxx's response. :) Dec 17 02:11:13 TacticalJoke: the stuff I assign those vars inside the inner asynctask does not get set outside , even though they are global vars Dec 17 02:11:22 shmooz: it should be working fine, have a code sample I can check? Dec 17 02:11:50 It might be that the writes are not being seen by the other thread. Are those variables declared 'volatile'? Dec 17 02:11:53 or maybe not "should be working", but "it does work, you're probably doing something wrong" :) Dec 17 02:12:24 Groxx: it's kindof a lot to paste Dec 17 02:13:00 I'll see if I can take parts out Dec 17 02:13:12 mkay. well, a) global variables? do you mean static, or on an instance? b) is this from doInBackground, and where are you trying to use it, and when does that happen? Dec 17 02:14:02 ok I have a boolean scanComplete = false; above onCreate in the beginning of MainActivity Dec 17 02:14:25 and in doInBackground I scanComplete = true; at some point Dec 17 02:15:45 and in my spinner.setOnItemSelectedListener I check to see if scanComplete == true, and it's always false Dec 17 02:16:15 but within the inner asynctask I confirmed that it is true , but only inside there Dec 17 02:16:38 shmooz: And scanComplete is not declared 'volatile'? Dec 17 02:16:52 no Dec 17 02:17:13 volatile just mean the value is not cached, prolly not relevant here Dec 17 02:17:32 its just boolean scanComplete = false; Dec 17 02:17:32 I think the problem is that one thread is caching the value and not seeing updates. Dec 17 02:17:58 there is only one background thread Dec 17 02:18:06 that is the inner asynctask Dec 17 02:18:56 I _think_ asynctask guarantees that changes made in doInBackground are visible in onPostExecute (and on the main thread after that point) because it synchronizes on the same object on both threads. before that point though anything is fair game. Dec 17 02:19:19 if volatile fixes it, then it might not be true :) Dec 17 02:19:42 otherwise I'd probably recommend just setting it to true in onPostExecute, as that way it's all on the main thread. Dec 17 02:20:21 Yeah, keeping all access to fields on one thread is easiest. But if the background thread *has* to write to that field then at the very least it needs to be declared volatile. Dec 17 02:20:32 In some cases locking might be needed to avoid race conditions too. Dec 17 02:20:42 ok let me try volatile Dec 17 02:20:48 shmooz: do you _ever_ set it back to false, btw? Dec 17 02:21:00 shmooz: But if you can do it in onPostExecute that's by far the best. Dec 17 02:21:21 TacticalJoke: atomic is fine for one thread Dec 17 02:21:21 Multiple threads writing to memory can get complicated. Dec 17 02:21:23 volatile is fairly limited in what you can do safely. so it can just hide other problems. Dec 17 02:21:30 Volatile is more useful when you have many threads Dec 17 02:22:27 well, Atomic is essentially useless for a single thread :) as is volatile. Dec 17 02:22:33 Groxx: no I don't , I make sure of that Dec 17 02:22:37 nfi what's going on here, but i read threads and i think whatever you're doing could be done better with Rx :) Dec 17 02:23:09 shmooz: The worst-case scenario is that you need locks. The best-case scenario is that you can set that field in onPostExecute. The second-base-case scenario is that you need only 'volatile'. IMO, anyway. Dec 17 02:23:10 g00s: this commission system is awesome! Dec 17 02:23:42 bankai_au: well, you can shoot yourself in the foot with any framework. there are multiple easy ways in Android to push things back to the main thread safely - none are being used, apparently. Dec 17 02:23:57 shmooz: Also, read this!!! http://www.yoda.arachsys.com/csharp/threads/volatility.shtml Dec 17 02:23:59 Absolutely essential. Dec 17 02:24:16 Groxx: i'm just trolling :) Dec 17 02:24:21 That is C#/.NET specific, but I think the concepts apply in general (e.g., to Java). Dec 17 02:24:27 volatile had no effect Dec 17 02:24:29 I don't know of a good Java guide. Dec 17 02:24:35 shmooz: Oh, weird. Dec 17 02:24:52 yeah volatile won't work here :p Dec 17 02:25:12 it is probably a matter of how shmooz is referencing it Dec 17 02:25:33 Would it be possible to have a rectagle in my drawable with a specified width? Dec 17 02:25:35 shmooz why can't you use onpostexecute? Dec 17 02:25:44 matt_j: no. not at all. Dec 17 02:25:55 lasserix: if it's a one-way boolean flag, volatile is pretty much the perfect choice. it's one of the few ways you can safely use it, really. but yeah, I suspect the problem lies elsewhere. Dec 17 02:26:37 lasserix: boo Dec 17 02:26:39 thanks :) Dec 17 02:27:37 ok, I'll try passing it through onPostExecute, but it's actually finishing half way through doInBackground Dec 17 02:27:37 I mean the scan completes half way through and then I start another scan for other things Dec 17 02:27:37 within the same asynctask doInBackground... Dec 17 02:27:42 9 patch it is... Dec 17 02:28:40 lasserix: it's giving odd behaviour in onPostExecute, right now it's not even showing a ListView when I move scanComplete to postExecute, it flashes and then disappears wtf Dec 17 02:28:45 anyway I'll figure this out, I was reading an article about using a callback interface listener to the asynctask and get the message that way and set it there Dec 17 02:30:36 shmooz: since you have a multi-stage doInBackground, have you considered publishProgress() ? Dec 17 02:30:56 ohh, no , how do I use that ? Dec 17 02:31:15 I think I did use that once for a progress bar loading Dec 17 02:31:29 asynctask docs :) but tl;dr you call publishProgress(value), it calls onProgressUpdated(your value) on the main thread for you. Dec 17 02:32:31 ok then that's what I need, thanks Groxx Dec 17 02:32:57 bankai_au rx 1.0.3 bugfix Dec 17 02:33:15 yeah because I can't wait for doInBackground to finish before updating the first scan as complete Dec 17 02:33:25 Is there no way to see the package name of an installed app? Dec 17 02:33:26 shmooz: also, you mentioned starting other tasks after the first one was part way through? If they're asynctasks, you shouldn't be doing that from doInBackground. "Threading rules" says that creating and calling .execute must happen on the main thread. Dec 17 02:33:46 lasserix: yeah there is... is it your package or another ? Dec 17 02:33:53 how? Dec 17 02:34:10 Groxx: no I never start other stuff from within Dec 17 02:34:28 i need to explain to my client how an app with a different name (label) is the same/not the same depending on the appid Dec 17 02:34:39 so i wanted to show them to like settings where they can see the application id Dec 17 02:36:54 oh you're not talking programmatically :/ Dec 17 02:36:58 :\ I dunno if there's a way to do that normally Dec 17 02:37:10 `adb shell pm list packages`? Dec 17 02:37:33 https://pastebin.mozilla.org/8040467 ?? Oh, c#/.net Dec 17 02:38:09 Somebody know the ROM where the splashscreen is : @9 ? Dec 17 02:38:14 Okay, I solved my problem. It was just a case of calling requestLayout() in my produce() method thingy. Dec 17 02:38:20 Nah this is a non-tech client Dec 17 02:38:23 I'm new to custom drawing. lol Dec 17 02:38:24 yeah :) volatiles do follow the same rules in java though. also iirc there's something around ensuring that objects assigned to volatile variables will always have their constructor finished. Dec 17 02:38:27 Does that sound right, though? Dec 17 02:38:59 TacticalJoke: after changing the text? Dec 17 02:39:02 Yeah. Dec 17 02:39:05 yup. Dec 17 02:39:16 I'm creating a new StaticLayout in onMeasure. I'm not sure how I can avoid that. Dec 17 02:39:21 It warns me about creating stuff. Dec 17 02:39:24 However, it's crazily fast. Dec 17 02:39:36 yeah, that's a bit yucky. Dec 17 02:39:47 never tried though. Dec 17 02:39:50 DynamicLayout says that it's mutable, but I'll have to figure out how, somehow. Dec 17 02:39:51 K. Dec 17 02:40:13 I'm guessing staticlayout is used to measure the size? Dec 17 02:40:45 I'm using it to measure the size, yeah, and also to do the drawing (from my onDraw, I'm delegating to its draw() thing). Dec 17 02:41:23 If I get this working, I might give lasserix an official knighthood. Dec 17 02:41:55 well… I suppose it kinda makes sense. since each onMeasure could mean a different width. (you can probably cache that pretty easily though) Dec 17 02:42:27 maybe dynamiclayout would work better there :\ I wonder if it caches each word/character's dimensions? re-laying-out would be relatively quick then Dec 17 02:42:28 Oh no. I just realised something. :/ Dec 17 02:42:36 It's slow just like TextView on huge Reddit comments. Dec 17 02:42:45 Yeah, I'll try DynamicLayout. Dec 17 02:42:48 oooh. like tens of thousands of characters? Dec 17 02:42:57 I guess thousands. Dec 17 02:43:06 It might be less laggy, though. Hmm. Dec 17 02:43:11 I'll have to properly measure. Dec 17 02:43:17 you couldn't display tens of thousands of characters on the screen at any one time ;p Dec 17 02:43:19 fwiw I suspect that's largely due to the native call to lay out the text Dec 17 02:43:49 since it needs to calculate the full size needed, it has to run through everything, even though it's not all displayed Dec 17 02:44:15 TacticalJoke maybe you should just pre-render the discussion to a huge bitmap Dec 17 02:44:19 lo Dec 17 02:44:20 l Dec 17 02:44:21 haha Dec 17 02:44:38 i'd imagine android OS does view culling Dec 17 02:44:44 on the viewport since it is opengl Dec 17 02:44:54 Would it be fast if I measured and wrapped the text myself? Dec 17 02:44:59 I'm using StaticLayout to measure and wrap it right now. Dec 17 02:45:18 fwiw huge bitmaps have their issues too :) if they're bigger than the OpenGL texture size, they break in fun ways. Dec 17 02:45:23 God, this is never-ending. lol Dec 17 02:45:24 depends on how clever you are Dec 17 02:45:28 I'll be coding in ASM soon. Dec 17 02:45:31 If that's possible. Dec 17 02:45:40 Groxx yeah that's why i'd imagine it would be smart enough to discard it early on Dec 17 02:45:58 Hmm. On first thoughts, I'm thinking I'm unlikely to perform better than Layout. Dec 17 02:46:09 That stuff simply wraps text, as far as I can see. Nothing more than that. Dec 17 02:46:20 TacticalJoke: I tried to figure some of it out a while ago. the last thing I thought of that might actually work was: split on "\n", render each to a new textview row. wasteful in some ways, but it lets you lay out only part of the text, unlike almost every other approach. Dec 17 02:46:21 the layout classes designed specifically for text? Dec 17 02:46:43 Groxx he is using a paint Dec 17 02:46:56 not even a textview Dec 17 02:47:00 er. so? Dec 17 02:47:31 split by line, make a new instance of , and don't put them all on screen at once (e.g. listview) Dec 17 02:47:48 s/on screen/in the view hierarchy/ Dec 17 02:47:55 TacticalJoke: you can make a pretty fast wrapper by just looping over a stringbuilder char sequence adding a character a time, finding when it breaks, using that to approximate where to break your lines Dec 17 02:48:10 lasserix: Okay. Do you think it'll be faster than Layout, though? Dec 17 02:48:18 dunno never used it Dec 17 02:48:27 eh. you can get individual character metrics and do your own layout, if you're going to go that route Dec 17 02:48:37 Man, this should be fast. Dec 17 02:48:43 I'm going close to the metal here. Dec 17 02:48:50 Groxx you can just use getWidth on a paint with some text Dec 17 02:49:05 Does Android Studio not have the same style XML editor that Eclipse does? For example, making preferences in Android Studio is the plain code editor, where as in Eclipse is a full wizard. Am I doing something wrong? Dec 17 02:49:11 Right now, I'm creating a Layout and giving it a TextPaint. Then I'm saying Layout.getHeight/Width. Dec 17 02:49:12 yeah, but you'll be recalculating a lot of things, when you can get the raw data easily enough Dec 17 02:49:20 liuwenhao: at the bottom there is a tab Design / Text Dec 17 02:49:44 I see it for layout xml but there isn't anything for preferences Dec 17 02:49:57 oh dunno Dec 17 02:50:05 Groxx huh? Dec 17 02:50:09 I don't see anything for values either Dec 17 02:50:11 Groxx: Are you saying that it'd be faster for me to measure and draw the text myself than to use Layout? Dec 17 02:50:41 rather than incrementally trying to lay out each row: probably, since you can do it in one shot. Dec 17 02:50:53 may not be worth the work though Dec 17 02:51:01 do what in one shot? and how? Dec 17 02:51:21 TacticalJoke: Naplam mentioned you can use BreakIterator class Dec 17 02:51:23 You mean displaying multiple ListView rows once? Dec 17 02:51:51 hang on, I'm searching. been over a year since I read the textview stuff Dec 17 02:52:01 I hope I don't end up writing my own ListView. lol Dec 17 02:52:07 RedditCommentOptimizedListView. Dec 17 02:57:08 sounds like post-1.0 problems Dec 17 02:57:30 :) **** ENDING LOGGING AT Wed Dec 17 02:59:59 2014