**** BEGIN LOGGING AT Thu Jan 01 02:59:59 2015 Jan 01 03:00:54 pfn: mh? where? AS? Using UTF-8 Jan 01 03:01:08 compiler encoding, I don't know Jan 01 03:01:35 misconfiguration is misconfiguration Jan 01 03:05:40 Would disabling inspections reduce lag in Android Studio? Jan 01 03:07:47 did you try it? Jan 01 03:08:28 TacticalJoke, it does in virtually every other IDE out there, so I'd imagine so Jan 01 03:09:15 To be honest, I haven't tried it. Every time I try Android Studio again I waste about three days trying to get something working. I'll just wait till unit testing is supported. Jan 01 03:11:15 (I can't just not waste those three days. A new IDE becomes an obsession for me.) Jan 01 03:14:53 JakeWharton: Totally off-topic, but did you like the look of that new programming language Nim? Jan 01 03:15:11 didn't see it Jan 01 03:22:12 TacticalJoke, if you need to do unit testing, you could probably just take whatever you are working on and test it using NetBeans and a dalvik vm Jan 01 03:23:48 Right now, I'm running them on the JVM using Eclipse. I know that Android Studio will support this soon(ish). I guess I could, in theory, use Eclipse just for running these tests, but I'm tempted just to wait. Jan 01 03:24:26 In fact, it'd be pretty tedious trying to use Eclipse and AS in this way. Jan 01 03:25:52 bleh. Call me old fashioned, but Eclipse just disgusts me Jan 01 03:26:29 Why? Jan 01 03:27:11 I'm not a huge Eclipse fan, but I'm also not a huge IntelliJ fan. Jan 01 03:27:36 TacticalJoke nimrod really isn't new Jan 01 03:28:35 The only thing good about eclipse is its memory analyzer Jan 01 03:28:48 doesn't seem like its going anywhere fast though ;) Jan 01 03:29:35 Imagine if we could, in Java, decide which memory shall be manually managed and which memory shall be managed by the GC. That would be awesome. Jan 01 03:29:55 JNI tiem Jan 01 03:29:59 jk Jan 01 03:30:02 That would be retarded Jan 01 03:30:24 Too much memory management and horrible memory leaks. Jan 01 03:30:57 That doesn't follow at all from what I just said. Jan 01 03:33:22 TacticalJoke if you are smart about things, you can get to 0 allocations per event like lmax disruptor. gotta use sun.musc.unsafe but Jan 01 03:33:40 sun.misc.unsafe Jan 01 03:33:54 not sure i'd call that smart Jan 01 03:34:26 TacticalJoke: google "non-consing code" Jan 01 03:34:35 or whatever they call that stuff now Jan 01 03:34:55 for their design goals it was smart. openhft-chronicle-queue does that too Jan 01 03:35:00 object reuse, object caches, resouring, ec. Jan 01 03:35:06 peter lawrey is pretty sharp Jan 01 03:35:06 *resourcing Jan 01 03:35:33 using it to reach your design goals is actually the opposite of smart Jan 01 03:35:37 it's easy and obvious Jan 01 03:35:46 Part of the reason I mention all this is that I'm hating how my app is processing some heavy JSON in a background thread and so many allocations are being made that I'm getting a stop-the-world GC_FOR_ALLOC thing. Jan 01 03:35:46 also dangerous and soon to be removed Jan 01 03:35:56 I'd love to be able to manually manage that. Jan 01 03:36:25 manage what? Jan 01 03:36:32 "allocations" is ridiculously ambiguous Jan 01 03:36:33 TacticalJoke also nothing to stop you from just grabbing a nio bytebuffer and managing that Jan 01 03:36:48 depending on the data structure, its pretty easy Jan 01 03:36:54 *can be Jan 01 03:37:11 p_l happy new year ;) Jan 01 03:37:24 its 2015 over there right ? Jan 01 03:37:32 yep Jan 01 03:37:46 TacticalJoke: you can, its called nio buffers-> outside heap Jan 01 03:37:52 also, got my dates for staying in Bay Area decided Jan 01 03:38:27 Hmm, looking into that. Jan 01 03:38:53 i'm excited to try your app in 2017 Jan 01 03:38:58 lol Jan 01 03:39:27 Lately, I do this stuff only during periods of "down time" (time when I'm too tired/whatever to actually do anything productive). Jan 01 03:40:35 I will almost certainly release 1.0 in 2015. Jan 01 03:41:15 well if you're not eager to I have a bunch of rabbit holes I can send you down Jan 01 03:41:44 TacticalJoke you might like this http://java-performance.info/use-case-optimizing-memory-footprint-of-read-only-csv-file-trove-unsafe-bytebuffer-data-compression/ Jan 01 03:41:49 Relating to this GC thing? Jan 01 03:42:08 Thanks, g00s. This stuff looks very interesting. Jan 01 03:43:00 i hope you are only worried about it because you are facing a problem though ;) Jan 01 03:43:29 TacticalJoke: are the gc calls causing your app to visibilty stutter? Jan 01 03:43:35 It's not really a problem, to be fair. It's more of an academic thing (but also I do care a lot about performance for this app). Jan 01 03:43:47 Not as far as I can see, lasserix_. Jan 01 03:44:02 Then dont worry about it Jan 01 03:44:08 It certain doesn't relate to things such as scrolling ListViews, either. Jan 01 03:44:10 Its just doing its job Jan 01 03:44:24 p_l http://arstechnica.com/tech-policy/2014/12/nsa-has-vpns-in-vulcan-death-grip-no-really-thats-what-they-call-it/ :( Jan 01 03:44:48 its like you are obsessing about bears s--t in the woods ;p they just do. Jan 01 03:45:07 Note that I'm pretty wise regarding app development. I take on complexity only if it's really, really justified. So I'd almost never even think about actually using a ByteBuffer here. Jan 01 03:45:22 Lol. True. Jan 01 03:48:37 g00s: heard of it before Jan 01 03:49:05 might attempt to organize regular key rollover at client's site Jan 01 04:06:38 TacticalJoke http://www.theeffectiveengineer.com/blog/hidden-costs-that-engineers-ignore Jan 01 04:07:02 "Use data to prune unused features" i messed up on this one Jan 01 04:07:32 so, shit - i guess iTunes doesn't give you download counts - so there is no way to research an idea based on how its doing there Jan 01 04:13:44 "South Korean to drop The Interview in North by balloon" lol Jan 01 04:14:14 I love the idea of dropping unused features. Jan 01 04:15:31 have to have analytics to know. a mistake i made ;) Jan 01 04:28:06 if I don't want two of my apps to be running, just have one instance would I want to use semaphore? Jan 01 04:30:55 Semifive Jan 01 04:31:18 itym Semiphive Jan 01 04:32:41 Ha, yes. Even better Jan 01 04:33:11 Demon_Jester: you rarely need to use semaphore directly. There are almost always better ways to do synchronization Jan 01 04:34:12 jesusfreke I came across using android:launchMode="singletask" would that be preferred? Jan 01 04:34:19 or what would you recommend? Jan 01 04:39:15 Semaphore semaphive = new Semaphore(5); Jan 01 04:39:41 I gotta find some excuse to use a semaphore(5) in some code now Jan 01 04:40:34 heh. https://github.com/mojotech/semaphive Jan 01 04:40:40 what does the 5 parameter represent? Jan 01 04:40:56 The constructor is well documented at http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Semaphore.html Jan 01 04:42:00 Jesusfreke thanks for the link, reading now. Jan 01 04:42:40 Demon_Jester: I wasn't suggesting you use a semaphore, fwiw :) Jan 01 04:42:50 we were just having some pun with the name. Jan 01 04:44:05 ah ok, but should I use launchmode to restrict my app from running multiple times? Jan 01 04:51:53 What are your New Year's resolutions? Jan 01 04:52:21 I think mine is to get feature-complete (whatever that means) as rapidly as possible. Jan 01 04:53:03 finish my smali plugin for idea. I think it's been sitting around in various stages of proof-of-concept for 2 years now. Jan 01 04:53:12 JesusFreke :O Jan 01 04:56:02 i'd like to do what bill gates does - read a lot. more than what i do, so i hope maybe 1 book every other week is modest goal ;) Jan 01 04:57:08 JesusFreke: you a smali hacker? Jan 01 04:57:10 i guess i should learn some technical stuff outside android too. not sure what tho Jan 01 04:57:15 bankai_: I wrote it :) Jan 01 04:57:40 I used to read philosophy books a lot. Kinda miss that. Jan 01 04:57:49 I've actually been thinking about doing something more with music. Take some theory classes or something Jan 01 04:57:58 JesusFreke: You wrote smali? Or the plugin? Jan 01 04:57:59 I'd love to do some music composition Jan 01 04:58:03 TacticalJoke: yes. Jan 01 04:58:22 TacticalJoke yeah gotta read this one http://www.amazon.com/Guide-Good-Life-Ancient-Stoic/dp/0195374614 Jan 01 04:59:27 Ooh. I see your name on that page. Jan 01 05:00:22 Looks interesting, g00s. Jan 01 05:00:46 As insane as this sounds, one of my favourite philosophy books argued that it's best not to exist. lol Jan 01 05:00:51 i dont read much philosophy any more. kinda over my head, i never grokked it Jan 01 05:00:53 Better Never to Have Been by David Benatar. Jan 01 05:01:05 yeah i heard of that Jan 01 05:01:32 Probably one of the most uplifting was Sam Harris's Moral Landscape. Jan 01 05:01:43 i have his latest one with the blue cover Jan 01 05:01:55 Oh, I've been wanting to read that. Jan 01 05:01:59 'waking up' Jan 01 05:02:00 Free Will was awesomely concise. Jan 01 05:02:36 Sam Harris is impressively articulate. Love watching his talks and stuff. Jan 01 05:03:06 \o/ 2015! Now I can start filling out all my checks wrong :p Jan 01 05:03:15 JesusFreke: Do you play an instrument? Jan 01 05:03:32 whats that dideroo Jan 01 05:03:35 :) Jan 01 05:03:45 JesusFreke: wow i didn't know that about smali ... how/why did you start smali ? Jan 01 05:03:50 TacticalJoke: well, I played some "normal" instruments in high school. oboe, clarinet, bassoon, bari sax Jan 01 05:03:59 TacticalJoke: these days, my main instrument is didgeridoo Jan 01 05:04:05 http://en.wikipedia.org/wiki/Didgeridoo Jan 01 05:04:07 but that's mostly independent of my desire to write music Jan 01 05:04:07 If you're good at an instrument, people think you're a wizard of some kind. Jan 01 05:04:12 Cool. Jan 01 05:04:35 TacticalJoke: https://www.youtube.com/watch?v=LDISXCBUXhg :) Jan 01 05:04:38 JesusFreke are you looking at any software for writing scores, etc like protools etc ? Jan 01 05:04:54 g00s: it's just an aspiration atm :) Jan 01 05:05:18 I've been really interested in minimalist music (i.e. terry riley, philip glass, etc.) recently, and would love to try my hand at writing music Jan 01 05:05:56 I've never heard such rhythmic didgeridoo playing. :D Jan 01 05:06:10 TacticalJoke: oh, I'm just an intermediate player or so Jan 01 05:06:24 I can't help but think of Rolf Harris when I think of this instrument. Jan 01 05:06:51 TacticalJoke this came out recently http://www.amazon.com/gp/product/0231137095 Jan 01 05:06:57 not sure if i'll read it Jan 01 05:07:01 TacticalJoke: check this guy out :) Jan 01 05:07:02 https://www.youtube.com/watch?v=_2VEYIKbiX8 Jan 01 05:07:09 looked interesting also. i like merging ancient philosophy with science Jan 01 05:07:14 Neuroscience is fascinating. Jan 01 05:07:17 it's totally mind blowing what he can do Jan 01 05:07:17 I wish I knew more about it. Jan 01 05:08:18 When you think of it, all that matters is suffering/joy. And the brain creates suffering/joy. Since neuroscience studies the brain, neuroscience could (in theory) solve every single problem; address everything that matters in the universe. Jan 01 05:08:33 JesusFreke: That looks tiring. lol Jan 01 05:08:36 https://play.google.com/store/apps/details?id=com.fdgentertainment.bananakong Jan 01 05:08:40 TacticalJoke: it is :) Jan 01 05:08:44 10,000,000 - 50,000,000 installs Jan 01 05:08:46 JesusFreke: Do you know of the Piano Guys? Jan 01 05:08:50 TacticalJoke: that guy has abs of steel Jan 01 05:08:50 it's not a donkey kong clone Jan 01 05:08:54 :D Jan 01 05:08:58 TacticalJoke: nope Jan 01 05:09:09 it's actually a 2D side-scrolling endless runner without levels and with IAPs Jan 01 05:09:14 if you die you start over Jan 01 05:09:16 i'd like to get a keybaord and hook it into garage band or something Jan 01 05:09:17 JesusFreke: http://youtu.be/0VqTwnAuHws Jan 01 05:09:22 Totally unrelated to the didgeridoo, but they're awesome. Jan 01 05:09:23 WTF, how can this be fun for 50 million people? Jan 01 05:09:27 The world is braindead Jan 01 05:09:39 happy new year. Jan 01 05:09:57 if there was a zombie apocalypse, the zombies would actually be smarter Jan 01 05:10:03 TacticalJoke: hah, reminds me of https://www.youtube.com/watch?v=EOzFVk4F51k Jan 01 05:10:36 haha Jan 01 05:10:37 I remember this. Jan 01 05:11:38 It's hard to watch such a nice piano being treated like that in the Piano Guys video, though. Jan 01 05:11:57 I'd never want to touch those strings. Jan 01 05:12:24 oh a very-vaguely related note: I ran across this piano song recently: https://www.youtube.com/watch?v=LNyJ96w7A7U Jan 01 05:12:42 I had to pick my jaw up off the floor Jan 01 05:14:47 I'm liking this kind of music a lot lately (piano + strings): http://youtu.be/QgaTQ5-XfMM Jan 01 05:15:59 Their videos are also wonderful. Jan 01 05:21:51 all the books i want to read are too damn expensive :( Jan 01 05:22:13 * g00s isn't paying $40 for a kindle book :( Jan 01 05:23:06 buy a hard copy and scan it Jan 01 05:23:17 A lot of philosophy books are ridiculously expensive. Jan 01 05:24:36 seems like a lot of the books i'm interested in are academic i think thats why Jan 01 05:26:02 TacticalJoke but not the classics right ? Jan 01 05:26:52 a lot of the stuff i read from mcgee and sutton was affordable Jan 01 05:27:27 Right. Jan 01 05:27:56 Wrong. Jan 01 05:28:18 Left. Jan 01 05:34:40 today someone clicked on an image link in admob Jan 01 05:34:42 in my game Jan 01 05:35:14 $1.29 Jan 01 05:35:16 for one click Jan 01 05:35:55 that came from the US Jan 01 05:36:15 $80.75 impression RPM for the US today because of that 1 click Jan 01 06:01:54 It must be midnight for a lot of Americans now. Jan 01 06:02:05 1AM Jan 01 06:03:32 drose379: Did you make a resolution to buy a computer with more than 2GB RAM? Jan 01 06:03:41 Definatley Jan 01 06:04:08 Gonna go for 8GB this time Jan 01 06:04:14 Maybe even 16 if they have it Jan 01 06:05:12 I hear that SSDs are fast and awesome. Jan 01 06:05:27 Yeah, the new Macbook pros have them I think Jan 01 06:05:35 Although I wanted to get a refurb Jan 01 06:07:17 Did you discover any new ListView magic in the past few days? Jan 01 06:09:18 Yeah, been working with that. Added images to the listViews Jan 01 06:09:41 if I do ListView.setOnItemClickListener() : Jan 01 06:09:59 Can I pass a class into that, that implements onItemClickListener Jan 01 06:10:04 instead of the innerclass Jan 01 06:10:26 You can pass any instance of anything that implements AdapterView.OnItemClickListener. Jan 01 06:11:11 so If I had a class Jan 01 06:11:20 You can say stuff like "view.setOnClickListener(new WhateverViewOnClickListener());". Jan 01 06:11:27 would it be class A implements OnItemClickListener Jan 01 06:11:33 Yeah. Jan 01 06:11:51 And that class A just has to ovverride the default onItemClick method? Jan 01 06:12:16 Indeed. Jan 01 06:12:33 Ah, cool. \ Jan 01 06:12:51 I see that the onItemClick method accepts an AdapterView? Jan 01 06:12:53 Whats that about? Jan 01 06:12:58 Note that there is no "default onItemClick method". There is no implementation whatsoever (since AdapterView.OnItemClickListener, being an interface, doesn't implement a single thing). Jan 01 06:13:23 Right, It just says that Im defining the method from the interface Jan 01 06:13:49 A ListView is an AdapterView. Jan 01 06:14:06 Ah, ok Jan 01 06:14:18 So ListView parent, View view Jan 01 06:14:30 so View view would be the single row layout? Jan 01 06:14:58 Yeah, I think so Jan 01 06:14:59 . Jan 01 06:15:31 In my app, I'm not really using the onItemClickListener thing, because my individual views have to handle their own clicks. Jan 01 06:15:43 How do you do that? Jan 01 06:15:45 (The children of a row of my ListView.) Jan 01 06:15:58 I essentially set those click listeners in getView. Jan 01 06:16:00 So there could be multiple clicks accross each child? Jan 01 06:16:23 Each child has multiple views, each of which can be clicked. Jan 01 06:17:01 Right, sounds interesting Jan 01 06:17:14 Whats the difference from a long and an int Jan 01 06:17:20 If you don't need to do this, I think that using onItemClickListener works fine. Jan 01 06:17:39 Yeah, im gonna start with onItemClickListener Jan 01 06:17:46 That's a Java fundamental: http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html Jan 01 06:18:43 Just a longer integer Jan 01 06:19:53 so in my ListView.setOnItemClickListener() I would pass the class that implements onItemClickListener Jan 01 06:20:06 and that class needs the parent View Jan 01 06:20:08 the child view Jan 01 06:20:19 the int position Jan 01 06:20:28 What does it mean by "long id" Jan 01 06:20:39 Try googling it. Jan 01 06:21:30 Im not even getting an ID for each child view Jan 01 06:21:46 I'd imagine you're getting 0 for each. Jan 01 06:22:19 Unless you changed it to -1 or something later. Jan 01 06:22:56 so I would pass the class, className(list,singleLayout,pos,0) Jan 01 06:23:05 No. Jan 01 06:23:13 ? Jan 01 06:23:36 listView.setOnItemClickListener(new ClassThatImplementsAdapterViewOnItemClickListener()); Jan 01 06:23:46 You don't call the "onItemClick" method. They call you! Jan 01 06:24:33 You really should learn Java before trying to use Java. Jan 01 06:25:14 Im doing both Jan 01 06:25:18 Learning and using Jan 01 06:28:27 so when I call the classThatImplements, the onItemClick method automatically gets passed the params and gets called? Jan 01 06:29:23 You give them an instance of AdapterView.OnItemClickListener. They can then call onItemClick at any time. Jan 01 06:29:51 And they pass the parameters to onItemClick? Jan 01 06:31:32 Of course. It would not be possible for them to call onItemClick without passing four parameters of the required types. Jan 01 06:32:06 Ok, by the way: Jan 01 06:32:11 whos "Them" Jan 01 06:32:17 The android OS? Jan 01 06:35:04 AdapterView Jan 01 06:35:15 Got it Jan 01 06:35:35 What are the most fundamental parts of Android programming that I should definatley learn first? Jan 01 06:35:37 Or more probably AbsListView, but that doesn't matter Jan 01 06:35:42 Java Jan 01 06:35:58 Ok, what are the most fundamental parts Jan 01 06:36:01 Knowing Java well makes Android much easier Jan 01 06:36:03 That I should be concrete with Jan 01 06:36:59 I started with java but there was so much stuff to learn that I kinda got lost and decided to find a focus Jan 01 06:37:02 Which landed me here Jan 01 06:37:38 I'm on mobile. Ask tomorrow! Jan 01 06:37:46 hahah, alright Jan 01 06:37:48 Thanks Jan 01 06:38:14 TacticalJoke ? Jan 01 06:53:31 hey guys Jan 01 06:53:35 take a look at this Jan 01 06:53:36 https://play.google.com/store/search?q=animal+jigsaw Jan 01 06:54:28 even if it is temporary Jan 01 06:54:49 i am in 18th place Jan 01 06:54:51 or was Jan 01 06:55:52 must be a glitch Jan 01 06:55:57 drose379: ? Jan 01 06:56:01 I was brushing my teeth. Jan 01 06:56:13 I have to go in a minute, so if you have a question make it quick. :) Jan 01 06:56:14 can anyone confirm what i'm seeing? Jan 01 06:56:30 my game is there Jan 01 06:56:39 TacticalJoke im goin too Jan 01 06:56:41 the turtle in a blue backgroun Jan 01 06:56:43 backgroun Jan 01 06:56:47 background! Jan 01 06:57:03 TacticalJoke thanks for the help earlier, night Jan 01 06:57:11 not anymore, it's gone Jan 01 06:57:23 Agamemnus, Safari Jigsaw? Jan 01 06:57:41 yes Jan 01 06:57:50 now it is back to nowherestan Jan 01 06:58:55 had me going there Jan 01 07:05:39 Sj Jan 01 07:23:40 Agamemnus: YAY Jan 01 07:23:47 i remember testing fr you Jan 01 07:29:08 HAPPY NEW YEAR YOU CRAZY CATS! :) Jan 01 07:29:41 *<:) Jan 01 07:55:22 anl\\\\ Jan 01 07:56:57 We've taken another sad, lonely, cold trip around the sun Jan 01 07:56:59 Whoopee Jan 01 08:02:37 Snapchat just closed a 425M$ round with an 10B$ evaluation Jan 01 08:02:39 O_O Jan 01 08:03:44 Made 91 cents a click in Germany today - $19.18 Jan 01 08:04:17 Maybe people blowing out there end of year budgets Jan 01 08:04:53 Ologn: what do you have? Jan 01 08:05:22 A book reader app Jan 01 08:05:40 cool Jan 01 08:08:43 https://www.udemy.com/learn-javascript-jquery-from-scratch https://www.udemy.com/web-development-fundamentals-using-javascript https://www.udemy.com/javascript-road-trip-part-1 Jan 01 08:09:04 deryl: ? Jan 01 08:09:15 what are the links for? Jan 01 08:09:17 some good js courses Jan 01 08:27:15 motorola got readers choice mfg of the year Jan 01 08:27:20 (phandroid) Jan 01 08:28:29 thepoosh just reading google is gearing up to compete with whatsapp Jan 01 08:29:39 somehow doubt they will go for all the platforms though Jan 01 08:30:22 maybe 2015, meh Jan 01 08:52:32 g00s: link? Jan 01 08:53:08 thepoosh http://arstechnica.com/gadgets/2014/12/google-tracker-2015-everything-google-is-working-on-for-the-new-year/4/ Jan 01 08:53:15 "WhatsApp competition, but not Google Hangouts" Jan 01 09:00:50 thepoosh did you get it ? see you timed out Jan 01 09:00:57 yes Jan 01 09:01:02 sounds interesting Jan 01 09:01:18 who knows, maybe this will become a purchase offer Jan 01 09:01:26 :) Jan 01 09:13:29 Hello Jan 01 09:15:29 How can I append text to an outer class textview from an inner class? Jan 01 09:15:32 Any ideas? Jan 01 09:16:59 lemurs Jan 01 09:17:22 lasserix_, ? Jan 01 09:17:27 lemurs Jan 01 09:17:30 -,- Jan 01 09:17:37 I don't understand Jan 01 09:18:01 use final keyword Jan 01 09:18:04 such as the lemurs do Jan 01 09:18:11 lasserix_, -,- Jan 01 09:18:33 any code plx? Jan 01 09:18:36 lasserix_, final keyword doesn't let to change the value Jan 01 09:18:36 its too generic Jan 01 09:18:47 wrap it in an object Jan 01 09:18:49 no Jan 01 09:18:54 it doesnt let change the reference Jan 01 09:18:58 you dont need to Jan 01 09:18:59 If I declare a variable with final keyword, it can't be changed Jan 01 09:19:04 you can just change value of value in reference Jan 01 09:19:07 yes it can Jan 01 09:19:10 if you wrap it Jan 01 09:19:16 final TextView txt = ...; Jan 01 09:19:21 txt.setText("meow") Jan 01 09:19:23 you can Jan 01 09:19:26 yes Jan 01 09:19:37 you are not changing the txt reference that is final Jan 01 09:19:42 just some other data attached to it Jan 01 09:19:46 that is not final Jan 01 09:19:55 but you can txt = new Textview... or any other Jan 01 09:19:56 or just class cope it Jan 01 09:19:59 cant* Jan 01 09:20:05 then class scope it Jan 01 09:20:26 Ashiren, so, should I set use the final keyword in the outer class declaration? Jan 01 09:20:42 post some code cristian your question was vague Jan 01 09:20:43 ok Jan 01 09:20:49 lasserix_, ok Jan 01 09:22:56 http://pastebin.com/ZtzvDAym Jan 01 09:23:35 Ashiren, if I create a new istance, I then I don't change the original one Jan 01 09:24:14 you can final TextView unmountLogTextView Jan 01 09:24:26 or put that TextView as class variable Jan 01 09:24:55 I try Jan 01 09:26:27 Ashiren, http://pastebin.com/FJUJx3Lm Jan 01 09:26:38 I don't know if I must use Context Jan 01 09:27:15 to pass the textview to the inner class constructor Jan 01 09:27:51 context? where Jan 01 09:28:00 if it doesnt ask for it, then no Jan 01 09:28:16 ok Jan 01 09:28:47 Ashiren, line 18 and 19 Jan 01 09:29:31 ? Jan 01 09:29:44 I try with final, then Jan 01 09:29:54 is that your final answer? Jan 01 09:30:10 no , 'final' keyword Jan 01 09:30:18 it was a joke Jan 01 09:30:18 :o Jan 01 09:30:26 a bad one, agreed, but still a joke Jan 01 09:33:29 Ashiren, when I try to buld with ant debug, I get an 'cannot find symbol' when the outer class tries to access to the inner class constructor. I try again to create an istance of the inner class constructor Jan 01 09:34:46 mmmm, same error, I paste on pastebin the code Jan 01 09:35:27 doesnt your IDE tell you what to do Jan 01 09:35:39 http://pastebin.com/3kzfu0gv Jan 01 09:36:15 error: cannot find symbol Unmount um = Unmount(unmountLogTextView); symbol: method Unmount(TextView) Jan 01 09:36:35 maybe new Unmnount Jan 01 09:36:38 line 27 Jan 01 09:36:49 i presume its class, not method Jan 01 09:36:51 ok, sorry Jan 01 09:37:05 my bad Jan 01 09:37:15 and probably it will end up with NPE Jan 01 09:37:46 BUILD SUCCESSFUL Total time: 5 seconds Jan 01 09:45:20 cristian_c: 5 seconds?! what is this sorcery Jan 01 09:50:19 cristian_c: sorry about delay why dont you make unmountLogTextView just part of your activity? Jan 01 09:51:06 lasserix_, a class variable? Jan 01 09:51:20 no wai Jan 01 09:51:34 lasserix_, in that way, can I pass the variable to the inner class anyway? Jan 01 09:51:42 yes Jan 01 09:51:45 ok Jan 01 09:52:22 ok, I put the variable to the top of the outer class and I remove the 'final' keyword Jan 01 09:53:51 Ashiren, ok, 'successful' again Jan 01 09:53:55 *full Jan 01 09:54:08 *Lasserix Jan 01 09:54:18 wee Jan 01 09:54:21 congrats Jan 01 09:54:29 but, does it run Jan 01 09:54:29 yay for success Jan 01 09:55:09 I'm trying to look for an emulator , but I was told that avd is too slow Jan 01 09:55:21 eeyup Jan 01 09:55:26 try real device or genymotion Jan 01 09:56:10 I've looked for genymotion Jan 01 09:56:38 but I don't know if I want to purchase the licensed version for occasional use Jan 01 09:56:57 and it supports only android studio and eclipse Jan 01 09:57:20 I work with command line, it's more simpler for me :P Jan 01 09:58:08 I'll try real device :D Jan 01 09:59:05 genymotion is nice Jan 01 10:00:20 genymotion is free for personal use Jan 01 10:14:58 cristian_c: you can use genymotion with just adb Jan 01 10:15:12 yes! Jan 01 10:15:20 genymotion is very good Jan 01 10:15:36 the free one is a bit lacking but it's very good for the regular use-case Jan 01 10:15:53 also builds faster than a regular device Jan 01 10:16:20 thepoosh: wot Jan 01 10:16:28 the build will be the exact same speed Jan 01 10:16:41 the deploy is faster Jan 01 10:16:43 deploying the apk will be faster though Jan 01 10:19:46 also - does anyone know how I would go about turning this json into a List of objects with gson? https://gist.github.com/rymate1234/6c9a635f55a53e6652dd Jan 01 10:20:26 Make a Note class with 3 fields Jan 01 10:20:36 Make a class with a List field named "notes" Jan 01 10:20:47 I've tried that Jan 01 10:20:51 gson.fromJson(theJson, TheClass.class) Jan 01 10:21:01 got the following error Jan 01 10:21:05 https://www.irccloud.com/pastebin/RIa5XyHF Jan 01 10:21:26 rymate1234: moving the file to the device and installing is faster Jan 01 10:21:29 why didn't you lead with the error? Jan 01 10:21:37 anyway, you're trying to deserialize an object into a list Jan 01 10:22:07 my guess would be that you omitted the wrapper object with the "List notes" field Jan 01 10:24:06 Ok tried the following Jan 01 10:24:07 List notes = (List) gson.fromJson(result.toString(), Note.class); Jan 01 10:24:23 that isn't what i said above Jan 01 10:24:26 o Jan 01 10:24:28 you need an object which has the list inside of it Jan 01 10:24:35 the structure has to match the json Jan 01 10:24:35 OH Jan 01 10:24:37 ok Jan 01 10:24:38 when I scroll my listview the first time, it stutters horribly. After that it's fine. How can I debug what could cause this? Jan 01 10:26:35 JakeWharton: works now, thanks! Jan 01 10:26:40 excellent Jan 01 10:28:36 rymate1234, ok Jan 01 10:39:26 johnflux, traceview should give you at least a basic idea Jan 01 10:45:29 what do you guys do to make sure that the values of text fields do not allow something like "asdfffffffffffffffffffffffffffffffff" Jan 01 10:45:39 ellipsize end, and width on the textview? Jan 01 10:56:14 Mavrik: traceview seems to have been deprecated in favour of "monitor" Jan 01 11:00:39 What are you trying to say? Jan 01 11:30:29 In android studio, can I make "F2" only search for errors? Jan 01 11:30:45 or is there another key stroke that will jump to the next error Jan 01 11:54:51 does anyone know why blockingGetAuthToken() would not return for a custom Authenticator? Jan 01 12:05:01 can we define layout animations in xml that boot on inflation? Jan 01 12:05:44 err via xml, is it possible to set animation events on ui navigation? ie, i want a linearlayout to expand when activity setContentView and collapse when onFinish is triggered, but in the layout file of the xml Jan 01 12:13:36 rymate1234, for the future, there are some web tools which generate java class from json string Jan 01 12:18:44 so happy you can use final with ternary operator Jan 01 12:19:41 hm? Jan 01 12:26:56 you can't do final String blah. if (what) blah = 1 else blah =2 Jan 01 12:27:06 but you can do final String blah = what ? 1 : 2; Jan 01 12:28:18 gdrc: got a link? Jan 01 12:29:52 Hello i Want to protect my Certain contacts from Whats App (or simply delete them from WhatsApp (Do not block them) and dont want to delete them from Phone thanks Jan 01 12:30:09 ahh man that sucks onitemclick listener will throw double clicks Jan 01 12:33:47 I have a funky problem-- i have a list of items, if one is clicked, a view is pulled from a hashmap and added to the current view hierarchy. problem is if the user double clicks or rapidly clicks, this method will get called twice before the view that is added "covers" up the listview and thus crashes out since the view can't be added twice. Best way to handle? Jan 01 12:34:13 Rohan_14: you mean in your app? Jan 01 12:34:21 lasserix_: yes Jan 01 12:34:34 you put your contacts in the ContactsContract? Jan 01 12:35:00 lasserix_: So where should i put,em Jan 01 12:35:09 well you can't have it both ways, Jan 01 12:35:17 either they are available to other apps or they are not Jan 01 12:36:02 you could roll your own contact provider, register it to return for contact lookup and then block if the caller is whatsapp (theoretically dunno if that is actually possible) Jan 01 12:36:30 lasserix_: is there any way i can edit the premissions of whatsapp manually so that it can handle only those contacts which i want watsapp to access ? Jan 01 12:37:09 can you edit whatsapp permissions? Jan 01 12:37:56 lasserix_:dunno askin you thats why ? i think we can cause its basic shell is Linux Jan 01 12:38:08 oh you mean on your own dev ice? Jan 01 12:38:16 you are not talking about an app Jan 01 12:38:21 you mean on your own phone? Jan 01 12:38:24 that's a root question Jan 01 12:38:25 not dev Jan 01 12:38:29 #android-root Jan 01 12:38:47 lasserix_: cmon you r geek you can help me there Jan 01 12:38:59 i got more important things to do sorry Jan 01 12:39:06 lasserix_: its ok fella Jan 01 12:39:15 besides that is root question not to be discussed in this room on pain of electrolucation Jan 01 12:42:50 Can i change permissions of a Aplication Manually In Android ? ( Like I want to prevent WhatsApp from accessing my Contacts ) Jan 01 12:43:24 Rohan_14: Try #android-root, please Jan 01 12:44:01 Rohan_14: sounds like xprivacy stuff Jan 01 12:44:16 and yes, this channel is for android developers (programmers) mostly Jan 01 12:44:22 Ashiren: what is xprivacy ? Jan 01 12:44:44 Rohan_14: https://play.google.com/store/apps/details?id=biz.bokhorst.xprivacy.installer Jan 01 12:44:51 you can manage permissions of installed apps Jan 01 12:46:20 Ashiren: Can i restrict whatsapp from accessing my contacts ? Jan 01 12:46:37 Please take any further conversation to android-root, or other more appropriate channels Jan 01 12:46:48 probably yeah, but go to #android or #android-root Jan 01 13:05:29 hi Jan 01 13:05:47 why are int-constants used at so many places where enums should be used? Jan 01 13:05:50 e.g. public static final int ACTION_DOWN Jan 01 13:05:57 is this some compat-thing? Jan 01 13:13:42 When adding removing a view from the current hierarchy, what's the best place to attach animations to do attach/detach animations? Jan 01 13:14:16 unsigned_long: probably compactness Jan 01 13:14:41 good deal for losing typesafety.. :D Jan 01 13:14:51 * unsigned_long feels like using C Jan 01 13:14:52 :D Jan 01 13:16:40 There used to be a recommendation to not use enums because it was slower than int constants.. That probably don't hold true anymore Jan 01 13:16:48 Probably also had to do with memory usage Jan 01 13:24:02 unsigned_long, enums perform significantly slower in comparison to ints, so everywhere where it's performance critical, int constants are used Jan 01 13:24:23 if it's not performance critical... use enums Jan 01 13:29:51 is there a library / widget if i just want to slide something out, and have it stick, then push it back in but not a menu Jan 01 13:39:54 lasserix_: like the facebook notification? Jan 01 13:40:02 of incoming chat in messenger? Jan 01 13:40:04 no idea Jan 01 13:40:07 dont use Jan 01 13:40:10 think i found one tho Jan 01 13:40:10 hmmmm Jan 01 13:40:13 coolz Jan 01 13:40:15 SlidingDrawer Jan 01 13:40:28 i need it for a live preview of my keyboard while using the gooey editor Jan 01 13:40:33 SimonVT: Mavrik yeah that’s a point, yet only if they really measured it properly. I guess they probably did so, then :D Jan 01 13:41:08 uh, there's a rather high-ranking Google IO dev talk about performance that talks about that (including measurments) Jan 01 13:41:15 on YT that is Jan 01 13:41:33 Mavrik: can you remember the year/name? :D Jan 01 13:41:54 was it Mobile Web performance auditing ? Jan 01 13:43:07 lasserix_: like our iOS app Jan 01 13:43:35 unsigned_long: I think it was 2012 Jan 01 13:44:08 unsigned_long: https://www.youtube.com/watch?v=vQZFaec9NpA Jan 01 13:46:36 Ahh perfect sliding drawer works Jan 01 13:48:18 interestingly, the "avoid enums" bit was even removed from performance tips Jan 01 13:48:23 I guess people abused it too much :) Jan 01 13:48:43 I don't think it matters anymore Jan 01 13:48:45 ah, cool! Thank yo Jan 01 13:48:47 you * Jan 01 13:49:17 WHen android was made we had shitty processors, 16 MB heap, no jit, .. Jan 01 13:49:24 yeah, it's hard to believe that that would create a bottleneck :b Jan 01 13:49:43 also those ints are used in the drawing pipeline Jan 01 13:50:08 where avoiding method call to check VISIBLE on view is still a bonus on modern CPUs Jan 01 13:54:16 argh slidingdrawer is broken Jan 01 13:58:13 bleh Jan 01 13:58:21 can't use wrap content Jan 01 14:17:33 lasserix_: did you have an inner match_parent? Jan 01 14:58:46 no Jan 01 14:58:54 if you set wrap content to sliderdrawer Jan 01 14:59:05 it will force it match parent regardless of values of children Jan 01 15:00:23 but now i founda bug somewhere else so time to sleep and redo in a few horus Jan 01 15:08:38 hi Jan 01 15:40:26 hello is there any cool book for newbie for android cocos2d game-dev that you can recommend? Jan 01 15:50:38 monkeyisl, is cocos2d on android? I thought it was an iOS framework. Jan 01 15:52:32 cocos3d-x c++ Jan 01 15:52:42 ok thats different Jan 01 15:52:52 i'm sry, i meant that Jan 01 15:54:23 off the top of my head I do not know of any. Jan 01 15:54:57 Are you looking for a 3d engine? Jan 01 15:55:18 Unity or UE4 are well supported. Jan 01 15:59:21 DLSteve_ : i'm looking for 2d engine Jan 01 16:00:00 what about libgdx Jan 01 16:16:53 happy new year :) Jan 01 16:21:20 is there a way to get the public download directory or DCIM directory using the API Jan 01 16:21:36 Environment.DCIM? Jan 01 16:21:42 I'm trying to importing an eclipse project into AS 1.0.2, after importing I'm getting "Cannot resolve com.google.android.maps" Jan 01 16:22:02 I've added the play services dependency in build.gradle, still the problem persists... Jan 01 16:23:06 Ashiren: thanks alot, will that give the full path to it? Jan 01 16:23:23 ChrisUK, getExternalFilesDir(DIRECTORY_DOWNLOADS) Jan 01 16:23:31 and DIRECTORY_DCIM Jan 01 16:23:38 and DIRECTORY_PICTURES Jan 01 16:23:46 it's on Context. Jan 01 16:24:00 ChrisUK: something like https://stackoverflow.com/questions/19112793/how-to-get-an-image-only-from-dcim-directory Jan 01 16:25:04 ok thanks alot Jan 01 16:25:08 note that people will hate you if you put pictures in DCIM :) Jan 01 16:26:40 why is that? Jan 01 16:26:51 I was thinking of making a directory in there Jan 01 16:26:59 and putting the pictures they download in there Jan 01 16:29:03 DCIM is a standards convention directory for cameras Jan 01 16:29:10 people expect to have only their camera photos in there Jan 01 16:29:15 use the PICTURES dir for everything else Jan 01 16:29:28 ok thanks for the advice I will do that Jan 01 16:29:33 having random pictures synced to your photo albums is annoying :) Jan 01 16:29:35 will every phone have a pictures dir? Jan 01 16:29:50 you can always create it Jan 01 16:30:03 check, then run mkdirs Jan 01 16:30:27 all of that is on SD Card and there are no conventions about what should exist there Jan 01 16:30:44 ok ill just make it then Jan 01 17:36:06 TacticalJoke: HAI Jan 01 17:37:05 O hai. Jan 01 17:39:16 how goes the ending/beginning of the year? Jan 01 17:40:16 Pretty well. Had family around last night. My resolution is to implement features as quickly as possible (deferring performance worrying and stuff). :) Jan 01 17:40:18 How 'bout you? Jan 01 17:44:06 Good Jan 01 17:58:13 hi Jan 01 17:58:22 I merged my eclipse project to android studio Jan 01 17:58:32 and after adding previous dependencies i get this error Jan 01 17:58:32 https://gist.github.com/s1k3s/36a2c35ec09b1fe2d395 Jan 01 17:58:35 when compiling Jan 01 17:58:40 anyone has any idea what it means? Jan 01 17:59:54 TacticalJoke: kids went to sleep, I spent ysterday with a 15 hour day Jan 01 17:59:59 it sucked balls Jan 01 18:00:06 and i dislike your resolution Jan 01 18:14:39 anyone? Jan 01 18:16:44 Why do you dislike it? It assumes that the subject is disposed to microoptimise to the detriment of the project. :) Jan 01 18:17:11 because proper planning will help optimization Jan 01 18:18:56 premature optimisation is the root of all evil Jan 01 18:19:14 thepoosh: That's consistent with my resolution. Jan 01 18:21:25 s1k3s, you include google api client multiple times Jan 01 18:21:33 either yourself, or some of your dependencies are pulling it in Jan 01 18:21:48 look on gradle tab to see which dependency is pulling it in multiple times and add an exception. Jan 01 18:29:18 mavrik, I have 20+ dependencies here, how do I figure out which one is bad? Jan 01 18:29:33 s1k3s, it's not bad. Jan 01 18:29:37 It just has a transient dependency. Jan 01 18:29:45 As I said, look through them on the gradle tab. Jan 01 18:30:47 let me find that tab Jan 01 18:46:27 mavrik, here is my gradle tab: https://gist.github.com/s1k3s/684b8c849958aaaf13a2 Jan 01 18:46:47 i can't see any duplicates in there Jan 01 18:46:50 ... Jan 01 18:48:16 sorry it's the first time I use it and I have no idea what it does Jan 01 18:49:46 s1k3s, ok, first of all, knowing what build.gradle does is critical for Android development, do read the doc Jan 01 18:50:10 s1k3s, the sad news is that you'll have to find out which dependency on that list is pulling in API client by checking them Jan 01 18:51:25 also do check if you don't have the same libraries in "libs" folder for them to get pulled in Jan 01 18:52:11 I do have all of them in the libs folder Jan 01 18:53:17 hello Jan 01 18:54:11 does android studio on osx install adb anywhere? Jan 01 18:54:22 s1k3s: One of your maven dependencies has a transient dependency on a library that you have duplicated in libs/ Jan 01 18:54:28 fixed it Jan 01 18:54:30 found it Jan 01 18:54:35 Question: I have a FragmentStatePagerAdapter and an ArrayAdapter that feeds that... Jan 01 18:54:39 Solution: Never use jars Jan 01 18:54:39 motherfucking dependencies Jan 01 18:54:47 on the mother fucking plane Jan 01 18:54:57 mavrik, thank you so much Jan 01 18:55:07 SimonVT, that's how google provides them.. Jan 01 18:55:14 When using jars, you have to make sure there are no duplicate dependencies.. When using maven, gradle figures it out for you Jan 01 18:55:40 From MainActivity I launch a this ViewPagerActivity with Intent bundle and params... The array to be paged it a set of images based on params.. Jan 01 18:55:53 I'm sure all those are in maven central Jan 01 18:55:59 Most of them anyway Jan 01 18:56:11 s1k3s, yeah, getting rid of .jar files in libs/ and replacing them with dependencies from maven central repository is a smart idea Jan 01 18:56:16 How to save the current paged item when leaving the activity and show that one on second launch? Jan 01 18:56:49 onSaveInstanceState is not fired ... Jan 01 18:57:35 I also tried to bind onPageChanged on the pager, but how to store the value for next activity launch? Jan 01 18:58:28 "and show that one on second launch?" Jan 01 18:58:40 your view pager will store page automatically without your help Jan 01 18:58:52 are you SURE you're opening the right activity instance again? Jan 01 19:05:13 Maverik, no I am not.. How to maintain the activity? Jan 01 19:05:57 From the mainActivity, I have listView and onClick builds new activity ervery time... Jan 01 19:06:23 Using android 5.0.1 emulator x86. ONLY my app is very slow like progress bar drops frame and so on. Have you ever had this problem? Jan 01 19:07:08 Mavrik, I have Intent intent = new Intent(MainActivity.this, ChapterViewerActivity.class); Jan 01 19:08:14 and then startActivity(intent); Jan 01 19:32:11 anyone know if /how to force and.studio to use OpenJdk? Jan 01 19:32:46 Corey84: you mean run the ide itself under openjdk? Or use openjdk to compile projects in the ide? Jan 01 19:32:56 both Jan 01 19:33:11 for the first, I believe there's an environment variable you can sed Jan 01 19:33:13 set* Jan 01 19:33:24 IDEA_JDK or somesuch. I don't recall the name exactly Jan 01 19:34:01 IDEA_JDK.properties lol but for the second (the more improtant one for me ) Jan 01 19:34:18 keep in mind I'm talking about intellij IDEA here. I assume it would be the same in AS :) Jan 01 19:34:32 for the second, at least in idea, go to project properties Jan 01 19:34:42 and then on the left, there should be an SDKs entry Jan 01 19:35:03 and you can define a new sdk there, and point it at any java installation Jan 01 19:35:15 and then select that sdk as the sdk for the project Jan 01 19:35:36 It might be a little different on AS, but I would be surprised if it's not there in some form Jan 01 19:35:46 AS is intellij based (even says so on starup splash lol)( Jan 01 19:36:10 yes, that's why I'm answering based on my experience with IDEA :) Jan 01 19:38:32 g00s: wanna see something cool? Jan 01 19:39:18 http://en.wikipedia.org/wiki/Something_Cool Jan 01 19:40:26 lol Jan 01 19:41:21 JesusFreke: https://www.youtube.com/watch?v=gweDBQ-9LuQ Jan 01 19:41:26 a friend of mine gave it Jan 01 19:42:39 haha Jan 01 19:42:52 the first actual slide - lol Jan 01 19:43:05 he's a funny guy Jan 01 19:44:05 oh man, his pronunciation "scalar" Jan 01 19:46:17 Hey guys, I'm having a hell of a time trying to get my login screen layout cleaned up Jan 01 19:46:27 Any tips? Jan 01 19:46:59 JesusFreke: Israeli Jan 01 19:47:23 Diluted bleach is good. Jan 01 19:47:24 thepoosh: oh wow. I would have guessed frech Jan 01 19:47:30 french* Jan 01 19:47:56 t0astt: username textview with a hint "username" another one with a "password" hint and a toolbar continue arrow Jan 01 19:48:00 JesusFreke: nope Jan 01 19:48:09 known him since he was 15 Jan 01 19:53:16 thepoosh: heh. pretty interesting Jan 01 19:53:23 yep Jan 01 20:01:30 thepoosh cool. perl seems awful enough, people will be finding new teriible things about it 40 years from now Jan 01 20:01:43 yeah Jan 01 20:04:19 Ok, I got it: Setting targetSdkVersion 1 make the app behaves weird Jan 01 20:06:17 O.o Jan 01 20:06:20 doh. Jan 01 20:06:24 Why would you do that. Jan 01 20:06:53 I love one-liner changesets. So refreshing. Jan 01 20:06:57 Don't targetSdkVersion=42 Jan 01 20:07:06 There's so much blood Jan 01 20:07:20 LOL Jan 01 20:07:30 gdrc: wtf are you doing?! Jan 01 20:08:18 I was happy because I can set every API_LEVEL and build won't fail Jan 01 20:08:50 that is NOT a reason to be happy dude Jan 01 20:08:55 You're playing with dragons boy Jan 01 20:09:06 :D Jan 01 20:12:55 thepoosh: I would be really happy if anyone can help me understing this behaviour https://i.imgur.com/NnrRH1o.png Jan 01 20:13:33 gdrc, you're source code is not saved as UTF-8 Jan 01 20:13:38 ! Jan 01 20:13:39 *your Jan 01 20:13:42 yeah Jan 01 20:13:53 yes, it is. Jan 01 20:13:57 that is how UTF-8 looks when converted to ASCII Jan 01 20:14:00 that, or your code isn't compiled as UTF-8 Jan 01 20:14:03 yeah Jan 01 20:14:35 gdrc, are you using gradle? Jan 01 20:14:42 UTF-8 without BOM (says notepad++). And in build.gradle I have compileOptions.encoding = 'utf-8' Jan 01 20:15:02 also, string.xml man Jan 01 20:15:20 before publish, yes Jan 01 20:15:31 no! Jan 01 20:15:33 always Jan 01 20:16:52 Hey guys, im having trouble getting the value of a ListView and putting it into a toast Jan 01 20:17:54 toast. now i'm hungry Jan 01 20:18:05 I .setAdapter to an adapter that defines a currentList variable and that variable has access to all of its values Jan 01 20:18:20 I think this will be easier to describe if I just show the code first Jan 01 20:19:44 The problem is on :51 http://pastie.org/9808515 Jan 01 20:21:04 drose379, I don't see the issue Jan 01 20:21:10 thepoosh: I'm talking about aligning my stuff Jan 01 20:21:13 you have the position passed as a parameter Jan 01 20:21:24 drose379, the item at "position" index in adapter is what was cliked. Jan 01 20:21:26 *clicked Jan 01 20:21:33 Ok, so I cant use currentComputer Jan 01 20:21:35 go look at ArrayAdapter API Jan 01 20:21:37 Thats defned below Jan 01 20:22:03 Use "comps.get(position)" instead of "currentComputer.getModel()". Jan 01 20:22:21 Ok, then I have to do the same thing below in the subClass Jan 01 20:22:24 is that ok? Jan 01 20:22:36 You already do that in the adapter. Jan 01 20:22:52 Right, is it ok to do comps.get(pos) twice? Jan 01 20:23:00 one in the onClick and one in the subClass Jan 01 20:24:01 drose379: You have no choice but to. Jan 01 20:24:12 ops, Mavrik , sorry. Yes, I use gradle / AS Jan 01 20:24:19 hrmf Jan 01 20:24:20 Right, just making sure its the best way to do it Jan 01 20:24:30 drose379: It's the best way and the only way. :) Jan 01 20:24:39 Perfect Jan 01 20:24:49 t0astt: what seems to be the issue? Jan 01 20:24:50 There isn't actual duplication there. getView and onItemClick are entirely separate. Jan 01 20:25:02 relativelayout shoud take care of everything Jan 01 20:25:08 Right, there 2 different classes Jan 01 20:25:27 drose379: What I mean is that getView could be called for positions 0..1000 while onItemClick could be called only for position 5. Jan 01 20:25:36 Yes Jan 01 20:25:52 The only common factor is that they both look at the same list. Jan 01 20:26:12 Im thinking about moving the onItemClick listener into a seperate class Jan 01 20:26:20 Instead of an inner class Jan 01 20:26:27 Would that be ok? Jan 01 20:26:39 Yeah, I do that. I dislike the syntax of anonymous classes. Jan 01 20:26:49 You're reading a method and suddenly... whoa, a whole new class. Jan 01 20:27:03 Right, thats kinda what I was thinking too Jan 01 20:27:20 (I guess it's not really about syntax. More about methods observing the SRP.) Jan 01 20:27:27 SRP? Jan 01 20:27:52 Single-responsibility principle. Jan 01 20:28:00 Ah, yeah Jan 01 20:28:26 Question: To save user data or input, is the best way to use a SQlite DB? Jan 01 20:28:37 (Trying to see what area I should look into next) Jan 01 20:29:10 And I think saving data is important Jan 01 20:30:44 SQLite databases seem to be a good idea on Android. What kind of data are you going to be persisting? Jan 01 20:31:16 Idk, anything the user could want to save Jan 01 20:31:19 Can someone help me with using an image? I'm putting a decent sized image in my imageView, but it scales it down WAAAY too much, to where it is unreadable. I adjust the scaleType on the imageView and the image gets alrger, except it's highly-pixelated then (probably using a lower-resolution image instead of a higher one and then scaling it up) Jan 01 20:31:25 If the data is (are?) really simple, you could use SharedPreferences instead. Jan 01 20:31:28 No app in mind, just practicing TacticalJoke Jan 01 20:31:42 SharedPreferences? Jan 01 20:32:19 Hey guys I am new to android network programming using TCP, and just curious if I want to keep socket open, I just won't issue socket.close; right? Most of the tutorials I see have the socket close right away or so it seems. Jan 01 20:32:32 An API for saving/loading app preferences. Check it out on Google. :) Jan 01 20:32:59 I shall Jan 01 20:33:35 Mavrik: this is funny: setting file encoding to windows-1252 works Jan 01 20:34:04 drose379: If your data is more elaborate, though, an SQLite database might be the better choice. Jan 01 20:34:04 gdrc, something is messed up in your source file... do make sure all your editors are configured to save as UTF-8 Jan 01 20:35:25 t0astt, your image is either too small or you're saving the image in the wrong drawable directory. Jan 01 20:36:12 Ok so in my new class for ClickListener I have to give it the context of the mainActivity Jan 01 20:36:24 Mavrik: my image is 250x76, and I'm saving it in the drawable directories by importing a new image asset (by right clicking the res folder) Jan 01 20:37:06 ugh. Jan 01 20:37:50 I'm trying it now with 500x152 Jan 01 20:37:57 drose379: You don't need to if it's a *non-static* inner class. Jan 01 20:38:06 s/inner/nested/ Jan 01 20:38:12 I moved away from the inner class Jan 01 20:38:27 Its its own class now that implaments AdapterView.onitemClickListener Jan 01 20:38:41 You were using an anonymous inner class. Jan 01 20:38:59 Mavrik: larger image didn't make any difference :P Perhaps I'm using the imageview wrong? Or importing wrong? Jan 01 20:39:01 I know, I said i wanted to move it to its own class a lilttle while ago, remember? Jan 01 20:39:16 Yeah. Just pointing out that you could still be using an inner class. It's just not anonymous now. Jan 01 20:39:38 How do I give the context of the MainActivity? Jan 01 20:39:41 t0astt, well, how big is your imageview? In dp? Jan 01 20:39:56 drose379: Are you saying "private static class Foo"? Or "private class Foo"? Jan 01 20:40:10 Its public Jan 01 20:40:12 and not static Jan 01 20:40:32 Since it's not static, you can simply use "MainActivity.this" as before. Jan 01 20:40:36 It should be private, BTW. Jan 01 20:40:55 Mavrik: I set the imageview to fill_parent for both width and height Jan 01 20:40:58 Its saying MainActivity is not an enclosing class Jan 01 20:41:08 Wait, you've put it into its own file? Jan 01 20:41:27 Yeah Jan 01 20:41:32 t0astt, well ok, but you still need to know how big is it to get a clear non-blurry imag Jan 01 20:41:41 Oh. Lol. I don't think that's a great idea, to be honest. Jan 01 20:41:49 you'll need images that mostly match the size of your imageview on screen. Jan 01 20:41:50 Oh,ok. How come? Jan 01 20:41:56 Because that class is so specific. It's basically an implementation detail of MainActivity. Jan 01 20:42:02 Mavrik: is there any easy way to get the dimensions when I'm using fill_parent? Jan 01 20:42:11 Imagine how many top-level classes you'd end up with if you did that every time you needed an event handler. Jan 01 20:42:29 t0astt, well, you know the device you're targeting Jan 01 20:42:32 True, so in mainactivity.java I should put this class right below the ending brace of MainActivity? Jan 01 20:42:37 you know how big the screen is in dp for most devices Jan 01 20:42:44 you subtract any margins or paddings :P Jan 01 20:42:52 IMO, it belongs inside the MainActivity class. Jan 01 20:43:01 It's not often that I use nested classes, but I think this is a justified use. Jan 01 20:43:10 I thought you said you didnt like inner classes? Jan 01 20:43:14 This is an exception to that? Jan 01 20:43:18 I don't like *anonymous* inner classes. :) Jan 01 20:43:32 Anonymous ones are defined within methods. Non-anonymous ones aren't. Jan 01 20:43:44 Ok, lemme try this again Jan 01 20:44:07 Mavrik: forgive for this dumb question, but how do I know what device to target if I'm targeting all sizes? Jan 01 20:44:16 Note that a lot of people like anonymous inner classes. This is just my view. Jan 01 20:44:46 t0astt, YOU'RE the one controling the size of the view and screen sizes are pre-set Jan 01 20:44:57 when is getAuthToken of an AccountManager called? Jan 01 20:45:19 I'm trying to implement a refresh token functionality Jan 01 20:45:24 t0astt, to get images you NEED to know how big your image views are going to be on screen so you can create images of the correct size Jan 01 20:45:38 t0astt, if you're stretching the imageview over 1080px wide display... how wide is it? :P Jan 01 20:45:56 1080px Jan 01 20:45:58 lol Jan 01 20:46:07 (and to practice, how wide is it in dp? how wide in dp is a 720p xhdpi display? how wide in dp is a 800x480 hdpi display?) Jan 01 20:46:36 when you get that answer, then you'll know the size of your imageview in screen Jan 01 20:46:48 and then you'll know how big the image has to be to not look blurry and fit Jan 01 20:47:08 (remember: mdpi - x1.0, hdpi=x1.5, xhdpi=x2.0, xxhdpi=x3.0) Jan 01 20:47:22 t0astt: why are you loling 1080px width? Jan 01 20:47:24 TacticalJoke how come it should be private? Jan 01 20:47:30 LG-G3 has it Jan 01 20:47:35 and so does the N6 Jan 01 20:47:48 drose379: Because it's an implementation detail of MainActivity. The outside world has no business knowing about it. Jan 01 20:48:03 Very true, why not protected then? Jan 01 20:48:19 Because that suggests that we're preparing our code for subclassing, which we aren't. Jan 01 20:48:48 Private can only be used within this class Jan 01 20:49:06 drose379: Who else would want to use MainActivity's item-click-handler code? Jan 01 20:49:06 protected can be used if a class instantiates a new object of this class? Jan 01 20:49:10 No one Jan 01 20:49:13 You could have another activity with completely different click-handler code. Jan 01 20:49:18 Right Jan 01 20:50:59 drose379: This is another Java fundamental: http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html Jan 01 20:51:25 Got it, AS has my MainActiivty.java underlines in red Jan 01 20:51:31 But none of the code is underlined Jan 01 20:51:39 So idk whats goin on Jan 01 20:52:09 well read the error message. Jan 01 20:52:19 that's why they are there, to TELL you what's wrong. Jan 01 20:52:40 There is no error message Jan 01 20:53:14 When stuff is underlined red, then there's ALWAYS an error message related to it. Jan 01 20:53:26 The file name is underlined in red Jan 01 20:53:28 Nothing in the file Jan 01 20:54:24 Gone now, guess my AS is just slow :) Jan 01 20:56:19 Good to hear you're using an IDE finally. :) Jan 01 21:01:08 Yes, I am haha Jan 01 21:01:21 Anyways, Im out for a few. Thanks for the help Jan 01 21:04:34 am I supposed to be missing an ldpi folder, but have an xxhdpi folder? Jan 01 21:06:29 t0astt, yeah, there's no more ldpi devices Jan 01 21:06:34 for years :) Jan 01 21:06:59 Ok. Just wondering because I found a dp to px calculator online, and no setting for xxhdpi Jan 01 21:07:09 xxhdpi is 3.0 Jan 01 21:08:12 Mavrik: So I set my imageview to 350x125. That means I want to convert those dimensions to px for each screen size, so one image for mdpi, one for hdpi, one for xhdpi, one for xxhdpi, and then put those images in the correct folders, right? Jan 01 21:08:39 yes. Jan 01 21:09:21 if you set a scaleType of center the image will be centered even if the imageview resizes a bit due to different screen Jan 01 21:10:02 ok. awesome. time to take a shower and then tackle that. Jan 01 21:10:05 but I just wanted you to remember that for example on a modern xhdpi 1920x1080 device (multiplier 3.0), you'll need a 1050x375 sized image for it to look good Jan 01 21:30:46 If I have a method that returns the name of a Class Jan 01 21:30:57 It would just be public String right? Jan 01 21:32:45 Not sure what you're asking, drose379. Jan 01 21:33:19 I want to dynamically call an activity when a user clicks on a listview child Jan 01 21:33:43 So I was thinking I could have a method that returns the Class name Jan 01 21:33:52 Then instantiate a new Class Jan 01 21:34:55 You're wanting to start an activity at run-time, and the activity to start is determined at run-time? Jan 01 21:36:10 Yes Jan 01 21:36:26 The activity that I am starting depends on what the user clicks Jan 01 21:37:54 I don't think you need a text class-name to do that. Jan 01 21:38:09 Intent's constructor takes a Class (not a String). Jan 01 21:38:23 Right, thats what I was worried about Jan 01 21:38:52 So how would I dynamically call a new activity Jan 01 21:39:09 Have you managed to start an activity at all yet? Jan 01 21:39:11 Regardless of which. Jan 01 21:39:22 Havent started no Jan 01 21:40:00 If you've never successfully called startActivity, you should do that first. Start simple. Jan 01 21:40:14 Oh, I have done that Jan 01 21:40:22 I thought you meant for this ListView project Jan 01 21:40:39 I will do it again though, to make sure I understand it completley Jan 01 21:42:24 I got a recycler view that's supposed to be populated by a list of a simple java object. However, thre Jan 01 21:42:37 the list never seems to be populated Jan 01 21:42:45 code is here https://gist.github.com/rymate1234/bc08c36b956ec4652284 Jan 01 21:44:30 Screenshot of non populated recycler view https://i.imgur.com/6hnfmrA.jpg Jan 01 21:46:10 TacticalJoke it looks like intent has a constructor that accepts String? Jan 01 21:46:18 rymate1234: Have you checked whether "Notes notes = gson.fromJson(json.toString(), Notes.class);" is actually effective (e.g., by saying something like Log.i("rymate1234", "Size = " + notes.getNotes.size())? Jan 01 21:46:34 is there a way to refresh an imageview? myView.invalidate() does nothing Jan 01 21:47:03 drose379: That's for actions. Jan 01 21:47:15 TacticalJoke: I've used the android studio debugger to check that and the Java list is actually populated with notes from the server Jan 01 21:47:37 TacticalJoke: Did you finish the reddit app yet Jan 01 21:48:03 Darklust: Working on it. :) Jan 01 21:48:36 I don't want to baconreader anymore Jan 01 21:48:36 Would I use this constructor? Jan 01 21:48:39 Intent(Context packageContext, Class cls) Jan 01 21:48:41 TacticalJoke: and just to confirm 01-01 21:48:06.389 3127-3127/net.rymate.rymatenotes2 I/rymate1234﹕ Size = 100 Jan 01 21:48:42 Yes, drose379. Jan 01 21:49:09 so it would be Intent(MainActivitiy.this,newActivity.class) Jan 01 21:49:15 Right. Jan 01 21:49:15 drose379: Reddit sync is pretty good Jan 01 21:49:19 much better than baconreader Jan 01 21:49:31 baconreader? Jan 01 21:49:41 ollien: I believe you meant to ping Darklust :) Jan 01 21:49:42 drose379: wrong person Jan 01 21:49:45 rymate1234: fuck yeah, thanks Jan 01 21:49:54 hahha Jan 01 21:49:55 Darklust: reddit sync is pretty good; much better than bacon reader Jan 01 21:50:04 TacticalJoke's reddit app will be better than baconreader :p Jan 01 21:50:33 using the google chrome is better than baconreader Jan 01 21:50:40 I have a bit of an interesting problem now that I look into it Jan 01 21:51:19 I haven't tried BaconReader in a while. Hmm. But mine should be "better" than all the horrible ones I've tried lately. Jan 01 21:51:20 so I have a callback using an interface inside my custom adapter, that should be called once my tweet object loads the profile image Jan 01 21:51:47 the thing is that it ONLY happens once I move the list item out of frame Jan 01 21:52:31 Whats the difference from extending ActionBarActivity or Activity Jan 01 21:52:46 drose379: ActionBarActivity supports the action bar on older android versions Jan 01 21:53:05 What is the action bar Jan 01 21:53:22 the bar on top, under the notification bar Jan 01 21:53:29 Ah, alright Jan 01 21:53:39 So I should prob use ActionBarActivity Jan 01 21:53:45 yeah Jan 01 21:53:48 Crap my wifi just crashed Jan 01 21:53:57 thanks Jan 01 21:54:02 https://gist.github.com/ollien/1d36f6a43593790a697b Jan 01 21:54:08 Can't see why this wouldn't work Jan 01 21:54:59 If your minSdkVersion is 11 or more, I don't think there's any reason to use ActionBarActivity, is there? Jan 01 21:55:15 TacticalJoke: I don't think there is, but I couldn't get t he action bar to work without it for some reason Jan 01 21:55:19 TacticalJoke: lollipop styling on kitkat and under? Jan 01 21:55:25 and that Jan 01 21:58:59 I have an activity that can be launched from a scheme. However, when the browser launches on the sceme, it does not go to the open app, but it opens a brand new instance inside the browser. I tried using android:launchMode="singleInstance", but then my app does not get the scheme data, it just shifts focus to the currently running app. Jan 01 21:59:37 Is there a way to make the scheme launch open the currently running app, and still send the scheme data? Jan 01 22:01:21 Jonathan_Eyre: try singleTop Jan 01 22:06:10 rymate1234: For ActionBar and not Toolbar? Jan 01 22:06:10 wat Jan 01 22:06:50 rymate1234: Have you checked whether "note.getTitle()" and so on are returning something (by using Log.whatever)? And that your layout doesn't contain invisible TextViews or something? Jan 01 22:07:01 I can't really help more, since I haven't used RecyclerView yet. Jan 01 22:14:28 TacticalJoke: lemme try Jan 01 22:18:37 TacticalJoke: added Log.i("rymate1234", "Title = " + note.getTitle()); under onBindViewHolder and it appears it was never called Jan 01 22:18:38 o.o Jan 01 22:27:19 how can I cope/clone TextView object? Jan 01 22:31:48 if I know java swing will I be able to pick up android ui pretty well? Jan 01 22:31:49 vompatti: you very likely can't. what are you trying to do? Jan 01 22:33:30 I have some data object and I want to have textview for each of them and have them to have same (style) rules. This data class which defines the class is outside of the UI class so I (afaik) have no access to layout inflater Jan 01 22:34:08 maybe I just loop the items over on the UI class and add the TextView there.. Jan 01 22:35:17 vompatti: is it hard to pass in a layout inflater? you can get one from a Context. though in general I'd probably recommend you leave the data class "just" data, and have something external make the views. since you have a lot + you have a list of data to map to views, a ListView is probably the right choice. Jan 01 22:35:50 vompatti: you can define a textstyle Jan 01 22:36:00 then use setTextAppearance(R.style.textAppearance) Jan 01 22:36:11 if you want you can subclass textview Jan 01 22:36:17 then just use that in your adapter Jan 01 22:38:17 thanks for you help guys, I'll see what I come up with Jan 01 22:43:49 you know I only discovered "Rocket Man" like 2 weeks ago? Jan 01 22:44:16 This new knowledge will change my life. Jan 01 22:44:31 I mean I never thought to listen to elton john you know.. Jan 01 22:44:46 who knows how many other gems are out there Jan 01 22:45:43 uh oh, are we getting started on music again? :D Jan 01 22:45:52 rocket maaaaaaaaaaaaaaan Jan 01 22:46:01 could mean two thingssss since it's elton john...... Jan 01 22:46:03 haha Jan 01 22:48:06 hey guys :) how's going new year Jan 01 22:48:47 well it passed Jan 01 22:48:48 Is it accurate to say that android:onClick in the xml for a widget is useless? Jan 01 22:49:09 jgorak: What do you mean "for a widget"? Jan 01 22:49:52 jgorak: not if it's a small project, or a small activity Jan 01 22:50:39 jgorak: based on the idea the xml have the objective to separate thing like on MVC Jan 01 22:51:04 anyone know how can i change the side of the switch button draw the switch? Jan 01 22:51:36 TacticalJoke: I guess I mean in the layout referenced in my appwidget-provider . Jan 01 22:52:17 yea you have the thumb property of the switch Jan 01 22:52:20 its the thing inside Jan 01 22:53:56 Odaym: ok, but what value i put there. here on studio he is asking for a resource 'o' Jan 01 22:54:12 you need to have a drawable there Jan 01 22:54:16 abara: probably https://stackoverflow.com/questions/10118050/how-can-i-style-an-android-switch ? Jan 01 22:54:23 see "creating custom switch" Jan 01 22:54:25 yea or that Jan 01 22:55:04 ok, i will (wait Jan 01 22:55:11 * gdrc parsing xml in 2015... something gone wrong Jan 01 22:55:16 to load the page and see what can i do :) Jan 01 23:00:36 ette: don't send private messages without asking first. [22:49] Jan 01 23:00:46 googling examples of clickable widgets, I see a lot using onClickPendingIntent instead on a simple onClick. That and the constant crashes even when I set an empty method made me think it just wasn't possible Jan 01 23:00:53 What's the proper way of opening/closing login activities? Ex. it doesn't make sense to show login activity when you press back after you logged in Jan 01 23:01:57 finish() it? Jan 01 23:02:39 Odaym: hmm is that a good way? Jan 01 23:02:45 what's "good"? Jan 01 23:02:57 I don't know, popular/accepted approach Jan 01 23:03:04 don't know Jan 01 23:03:17 proper navigation has a lot about it written in the docs, though Jan 01 23:03:33 might be 10x more complex than simply finishing an activity when you dont want it to appear again Jan 01 23:03:40 also, what should the first activity be? A blank one opening logged in stuff or login form, or? Jan 01 23:03:44 jgorak: ah, widgets as in home-screen widgets? Jan 01 23:04:12 Yeah. Sorry, I'm still pretty new. Didn't realize there was another use for the term here Jan 01 23:04:34 it's an overloaded term, it's not just you :) Jan 01 23:04:42 you shouldn't have any forms Jan 01 23:04:48 login with Google, facebook, etc. Jan 01 23:05:10 jgorak: I don't know what those widgets do with onClick in xml, actually. never built one. Jan 01 23:05:21 Crash horribly :) Jan 01 23:05:47 jgorak: since you don't get an Activity / context to bind it to, it kinda makes sense that it wouldn't work / is useless, yeah. remote views are a different beast entirely. Jan 01 23:07:01 groxx: thanks, that's what I was looking for Jan 01 23:08:50 actually, the implication of "you don't get a...context" just gave me a "ah-ha!" moment Jan 01 23:09:09 fml android studio is slow as s*t Jan 01 23:10:47 slow? Jan 01 23:10:58 its so fast Jan 01 23:11:28 If I want to pass a new activity an object, do I pass it inside startActivity Jan 01 23:11:43 startActivity(newAct(object here)) Jan 01 23:11:48 no Jan 01 23:11:53 you pass it to the intent Jan 01 23:12:23 and then do I define in the class constructor that it accepts the object? Jan 01 23:12:24 dimitrovskif: first things first. Design the story board / flow of your application "without" login activity. After set the real main/launcher activity make a check if user is logged. After a successful login, you can start your main activity and "Clean" the Login Activity from the history/stack of openned activities. You can do this passing the correct Flag from Intent. Jan 01 23:12:46 no you set your class up to be parcelable, so you can send objects from it across to other places Jan 01 23:12:53 I'm having trouble implementing an AbstractAccountAuthenticator with retrofit Jan 01 23:13:00 abara: yep Jan 01 23:13:11 how should I display login activity Jan 01 23:13:23 I'm not sure where to check if the token is expired Jan 01 23:13:35 the first activity should redirect user to the proper activity, or the main activity should be the first one Jan 01 23:13:38 drose379: http://stackoverflow.com/questions/8610880/how-do-i-create-an-android-intent-that-carries-data Jan 01 23:13:44 Ok, got it Jan 01 23:14:27 ah, cool Jan 01 23:15:04 Which putExtra would I use for a object Jan 01 23:15:07 dimitrovskif: your main activity have to know how to check if user is logged, and if not call the login activity with the correct flag to not stack login on the history Jan 01 23:15:24 abara: what about showing the logged-in activity first? Jan 01 23:15:35 and if user is not logged in, show login activity Jan 01 23:15:35 drose379: you can user other approuch, not conventional but useful. Jan 01 23:16:01 drose379: make a class called "global" and put public static variables there Jan 01 23:16:06 Could i put the object in a bundle and putExtra the bundal Jan 01 23:16:11 bundle* Jan 01 23:16:25 JakeWharton: is RequestInterceptor.incerpt called on main thread? Jan 01 23:16:46 Yes Jan 01 23:17:21 thanks, just found this: https://plus.google.com/106567625933758304961/posts/a18m1XavSus Jan 01 23:17:23 dimitrovskif: it's ok if your intent to (really) close your application. got it? Show the login screen on startup means to me that you app is to be used and then complited shutdown on exit. Jan 01 23:17:32 which is the same thing I'd like to do Jan 01 23:17:39 abara: i don't get it Jan 01 23:17:49 drose379: What are you wanting to pass as a parameter to the activity? Jan 01 23:18:04 An object of a class Jan 01 23:18:10 That has method that return different values Jan 01 23:18:15 What is it? Jan 01 23:18:16 abara: start with ProfileActivity -> if not logged in -> show LoginFormActivity Jan 01 23:18:27 What is it? Jan 01 23:18:49 Its a public class TacticalJoke Jan 01 23:18:54 dimitrovskif: Facebook app do not close ever. He is intent to be running on background. So the act of "close" or switching for another do not say to close the session with server. Jan 01 23:19:09 wut Jan 01 23:19:17 dimitrovskif: so it's a waste of time put the Login flow as the call Jan 01 23:19:33 another app* Jan 01 23:19:34 I have no idea what are you talking about sorry Jan 01 23:21:19 dimitrovskif: did ever worked with web application? Jan 01 23:21:33 drose379: The answer to your question depends on what it is that you're trying to do. Jan 01 23:21:40 dimitrovskif: http with MVC or something? Jan 01 23:21:59 yes. Jan 01 23:22:07 dimitrovskif: what i'm trying to say that is a logic around this Login flow. Jan 01 23:22:16 TacticalJoke I have a class called Computer Jan 01 23:22:29 It returns different values. The "Model" for example Jan 01 23:22:42 dimitrovskif: your login activity dont need to know how to check if user is logged. This login activity need to know only how to login Jan 01 23:22:46 Then I have a List<> of computers and pass different values in Jan 01 23:22:59 then i have an instance of Computer called currentComputer Jan 01 23:23:07 dimitrovskif: if you startActivity within onCreate, you won't see the activity "underneath" at all. would that fix the login flow problem? Jan 01 23:23:17 And you want to pass the List to another activity? Jan 01 23:23:19 dimitrovskif: the main activity as the rest of your application need a function to check if your user is logged. Jan 01 23:23:21 groxx: yeah Jan 01 23:23:29 Or just the Computer? Jan 01 23:23:30 groxx: although the activity stack is confusing Jan 01 23:23:37 No, thats not it. This is hard to explain, maybe I should just show you the code Jan 01 23:23:55 groxx: ProfileActivity -> user not logged in -> LoginActivity -> press back -> ProfileActivity Jan 01 23:24:00 I want to pass just the currentComputer instance Jan 01 23:24:00 dimitrovskif: it is a bit, yeah. doing anything complex is hard. Jan 01 23:24:24 Hmm, you could use Parcelable. Or you could use JSON or something. Jan 01 23:24:31 Hi all. I was wondering, what is the best way to figure out how to display dates, times and temperatures on a device, and using what local format? Jan 01 23:24:43 I guess Parcelable is easier. Jan 01 23:24:45 dimitrovskif: I'd suggest startActivityForResult in ProfileActivity, then in onActivityResult check if they're logged in. if not, finish() immediately or call onBackPressed (I haven't done that, but it might work). that'll essentially hide the ProfileActivity. Jan 01 23:25:11 TacticalJoke Ive heard alot about JSON but never got an opportunity to use it Jan 01 23:25:22 dimitrovskif: it's not super efficient, but it's not as wasteful as it seems (as long as you're not unconditionally doing a lot of work in ProfileActivity.onCreate.) Jan 01 23:25:29 I can pass an object with JSON? Jan 01 23:25:44 Or would I just get all the values before hand and pass those Jan 01 23:26:17 You could have the object serialize itself into a JSON String and pass the String. But it might be more complex. Jan 01 23:26:27 TacticalJoke: i give up on java. let's play with delphi on android. Jan 01 23:26:48 Why? Java is simple. Jan 01 23:27:04 TacticalJoke: too mainstream now Jan 01 23:27:07 THe language, I mean. Jan 01 23:27:08 The* Jan 01 23:27:48 TacticalJoke I may try what you said above Jan 01 23:28:01 Serialize itself then would I unserialize once I get to the new Activity? Jan 01 23:28:30 Yeah, it'd have to instantiate itself from JSON at the other end. Jan 01 23:28:47 I'm not sure it's a good idea in your case, though. Jan 01 23:28:52 Why? Jan 01 23:28:53 Parcelable was made for this. Jan 01 23:29:02 Using JSON is kinda more "advanced", in a way. Jan 01 23:29:04 drose379: i think it's more easy saved your objec as an publi static reference Jan 01 23:29:30 dimitrovskif: http://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT Jan 01 23:29:39 Not really looking for _easiest_ just the best way to do it that I will be able to re-use in the future Jan 01 23:30:03 Another option is to give your class a toBundle method (and a "fromBundle" kind of constructor), and then use Intent.putExtra(String, Bundle). Jan 01 23:30:06 But it's a bit hacky, I guess. Jan 01 23:30:23 Either JSON or parcable I think Jan 01 23:30:31 I kinda want to try JSON, bad idea? Jan 01 23:30:35 TacticalJoke: it's a nice pratice i think Jan 01 23:30:35 I guess the standard way is to use Parcelable. Some uber-nerds probably use JSON for this. Jan 01 23:30:37 man Jan 01 23:30:52 you want to get this thing done in this century? or make a thesis on the best way to transfer objects in Android? Jan 01 23:30:54 if you are using android studio you can get parceable generator Jan 01 23:31:05 *plugin Jan 01 23:31:10 lasserix_: Do you think JSON is a good idea here, in general? Jan 01 23:31:11 Odaym: damn! dat phrase Jan 01 23:31:12 Odaym , the best way. Jan 01 23:31:19 not if you don't need it Jan 01 23:31:21 good luck then, start reading the docs Jan 01 23:31:22 json for intra app communication is dumb Jan 01 23:31:24 Or, don't add another layer Jan 01 23:31:42 just implement parceable and shove it int he intent Jan 01 23:31:47 you're not gonna get answers from here Jan 01 23:31:54 pfn: One case where I think it's a great idea is if the class in question already deserializes itself from JSON (for other reasons). Jan 01 23:31:58 still think the fast simple way is a class with public static references. help me a lot Jan 01 23:32:11 yeah Jan 01 23:32:21 abara: Yeah, that's definitely tempting. lol Jan 01 23:32:31 just remember to reset the reference properly Jan 01 23:32:32 I kinda hate how we have to use Intent here. Jan 01 23:32:37 I guess ill try Parcable Jan 01 23:32:51 drose379: Parcelable is pretty simple. Only downside is that it's kinda verbose. Jan 01 23:33:05 verbose? Jan 01 23:33:07 TacticalJoke: think about the old days using malloc and free! whats the fear on remember setting a variable to null? Jan 01 23:33:22 abara: It's kinda messy, I guess. The code isn't so obvious anymore. Jan 01 23:33:27 drose379: Google "parcelable". Jan 01 23:33:29 TacticalJoke: Dalvik garbage collector is mess. Jan 01 23:34:09 abara: If I have a large list, I'll often simply hold that globally (and then any Activity can have at it). Jan 01 23:34:14 Though even that depends on the exact scenario. Jan 01 23:34:28 i see. Jan 01 23:34:33 I dont even get what Id use parcable for Jan 01 23:34:43 this is kinda my scenario on the current project Jan 01 23:34:46 use database Jan 01 23:34:50 not json Jan 01 23:34:53 drose379: So that you can pass your object to another Activity. Jan 01 23:35:17 drose379: for basically anything you serialize. if you don't serialize much, and prefer bundles, it's fine to just bundle stuff. Jan 01 23:35:25 If only we could say something like "new FooActivity(someObject).start()". Jan 01 23:35:45 drose379: parceable for IPC Jan 01 23:35:45 Parcelable performs better, but it's not likely to be a bottleneck in most applications Jan 01 23:35:49 so class ClickListener needs to use parcable Jan 01 23:35:54 or the new activity Jan 01 23:36:05 Why would you pass a ClickListener? Jan 01 23:36:13 Im not Jan 01 23:36:22 The object you want to pass will implement Parcelable. Jan 01 23:36:27 Computer or whatever it was. Jan 01 23:36:41 ok but im passing a certain instance of Computer Jan 01 23:36:44 TacticalJoke: fwiw I always make FooActivity.makeIntent(Context, arg, arg, arg). then you can startActivity(FooActivity.makeIntent()) and it's not too painful / is basically impossible to mess up. Jan 01 23:36:59 groxx: Yeah, I do that. :) Jan 01 23:37:02 I call it 'createIntent', though. Jan 01 23:37:16 Then the putting/getting is in the same place. It's way neater. Jan 01 23:37:53 groxx: Do you ever use the "toBundle" pattern (with someIntent.putExtra("foo", object.toBundle())"? Jan 01 23:38:18 drose379: just think about this. you have 2 activities A and B. You Wanna pass an object W from A to B, right? So with you wanna work with him on OnCLickListener on B both activities (A and B) have to get attribute to hold an instance of W. Why not have a single class with this reference and reduce the redundant attributes? Jan 01 23:38:47 Yeah, it makes sense Jan 01 23:38:47 TacticalJoke: nope. does that need a hand-written toBundle method on the object, or is it something reflecty / based on Serializable? Jan 01 23:38:55 Hand-written, yeah. Jan 01 23:39:00 I've never used it, but I've considered it. Jan 01 23:39:00 Im trying to learn the java language and syntax though so learning new classes helps Jan 01 23:39:04 meh. I just make things parcelable. Jan 01 23:39:19 so I need to describe contents? Jan 01 23:39:26 it's boilerplatey, but it's not hard. Jan 01 23:39:29 drose379: right? google worth billions, but it not mean their programmers are wrong-proof Jan 01 23:39:31 drose379: Hence the verbosity comment. Jan 01 23:39:38 drose379: I still don't know what describeContents means. return 0, it works. Jan 01 23:39:51 hmm. I wonder if AS has a "Make Parcelable" code generator thingy Jan 01 23:39:52 Apparently "zero" is the description du jour. :) Jan 01 23:40:14 TacticalJoke: dude you are french? Jan 01 23:40:15 i just said it does Jan 01 23:40:15 JesusFreke: it might... or if not, it's certainly scriptable. Jan 01 23:40:21 Nah. I used to speak French, though. Jan 01 23:40:26 parceable generator plugin Jan 01 23:40:29 We dont know what describeContents means? Jan 01 23:40:32 TacticalJoke: awesome xD Jan 01 23:40:46 it describe_contents Jan 01 23:41:06 Why would I return 0? Jan 01 23:41:31 http://stackoverflow.com/questions/4076946/parcelable-where-when-is-describecontents-used/4914799#4914799 Jan 01 23:41:43 good answer Jan 01 23:42:11 If only implementing Parcelable were as concise as implementing Serializable. Jan 01 23:42:12 https://groups.google.com/forum/#!topic/android-developers/QVSWGS-8W0A Jan 01 23:42:15 better answer :) Jan 01 23:42:39 Or even just required "putInt" type stuff and nothing else. Jan 01 23:42:55 So if this class implaments parcelable Jan 01 23:42:59 How does that help me? Jan 01 23:43:19 You can then use Intent.putParcelable. Jan 01 23:43:24 drose379: the sense of fulfillment and "job well done"-ness is reward enough. Jan 01 23:43:39 hahahahahahahahaha Jan 01 23:43:42 ? Jan 01 23:44:05 I wish I felt fulfilled after implementing Parcelable. Jan 01 23:44:11 I usually feel frustrated and slightly unwell. Jan 01 23:44:52 drose379: then you can add it to the intent as an extra, using http://developer.android.com/reference/android/content/Intent.html#putExtra(java.lang.String, android.os.Parcelable[]) Jan 01 23:44:52 like was said once on stackoverflow: "this api is a mess" - http://stackoverflow.com/a/8598739/1594326 Jan 01 23:45:11 Oops, it's putExtra. Totally forgot. Jan 01 23:45:25 what does describeContents return? Jan 01 23:45:29 0 Jan 01 23:45:32 just return 0 :) Jan 01 23:45:43 fast forward 2 hours, you still haven Jan 01 23:45:48 't sent your object to the other activity Jan 01 23:45:51 lol Jan 01 23:46:00 drose379: if you use putExtra("key", yourParcelable), you can get it back out trivially with `YourParcelableClass obj = intent.getParcelableExtra("key")`, is one benefit. Jan 01 23:46:00 Odaym: Good ol' Android programming. Jan 01 23:46:26 Odaym: true Jan 01 23:46:43 OK I still have to implament the writeToParcel method Jan 01 23:46:53 ahahahahahahaha Jan 01 23:48:14 "The parcel in which the object should be writter" Jan 01 23:48:18 written* Jan 01 23:48:27 there is an android studio plugin. Jan 01 23:48:43 hi guys, is there any list of things to configure in Android Studio to have better experience? Jan 01 23:49:47 hey guys, i didn't get how to move the "button" on switch widget to being drawn on left Jan 01 23:50:12 dimitrovskif: shutdown the window effects, turn off spelling check. Jan 01 23:50:26 dimitrovskif: increase your heap size Jan 01 23:51:12 The heck has to go inside the writeToParcel method Jan 01 23:52:28 values to write to the parcel maybe Jan 01 23:52:48 ok Jan 01 23:53:35 no solution on swicth with the button on left side? :'/ Jan 01 23:53:55 you have to define its switched on/off states Jan 01 23:53:59 to different drawables Jan 01 23:58:43 Odaym: but can i say on drawble to paint the button on the left Jan 01 23:58:48 ? .-. Jan 01 23:59:06 no, you get a drawable that is like a circle, and you set it to that switch's thumb Jan 01 23:59:22 and you set its state to be false, unswitched, unchecked, the button will be on the left Jan 01 23:59:30 you press it, it switches and the button is now on the right Jan 01 23:59:51 along with those checked states, you change the background of the switch itself from dimmed to bright to show that it was off and is now on Jan 02 00:00:18 Odaym: no no no Jan 02 00:00:20 where the button is initially depends on what the initial state of the switch is Jan 02 00:00:43 Odaym: let put his way. I want the text of my switch be after the button Jan 02 00:00:55 no way Jan 02 00:01:00 I'd never do that Jan 02 00:01:08 switch button that moves, plus the text of it? Jan 02 00:01:10 drose379: key thing with Parcelable is that it's a pretty low-level serialization format. So you outParcel.writeInt / writeString / etc, which _essentially_ just writes the raw bytes to its memory, no metadata, nothing. then when you create an instance from the parcel, you have to be sure to read the same data in the same order, because it won't tell you Jan 02 00:01:10 if you did it wrong. Jan 02 00:01:13 it will look horrible Jan 02 00:01:20 Odaym: noooo Jan 02 00:01:48 then show picture Jan 02 00:01:51 Odaym: i want the normal switch. the on the screen i need to invert the position of button and text Jan 02 00:01:58 drose379: probably just look around at sample code containing parcelables, they're usually pretty simple, and your code should follow the same kind of patterns. Jan 02 00:02:30 groxx : thanks, yeah Im gonna look around at a few examples then implament it myself Jan 02 00:02:43 My class that implaments parcelable Jan 02 00:03:04 what do the methods like writeToParcel do? Where do I call those Jan 02 00:03:17 drose379: this looks at least OK for starting out, and it shows a fairly wide ranged use: http://blog.logicexception.com/2012/09/a-parcelable-tutorial-for-android.html Jan 02 00:03:51 writeToParcel is called by other code when it wants to write your object into a parcel, usually for saving to disk or sending to another process. you don't call it. Jan 02 00:04:07 Then what needs to go inside it? Jan 02 00:04:16 you're writing the code for _how_ to serialize your data, not _when_. Jan 02 00:04:22 abara Jan 02 00:04:36 dimitrovskif: yo Jan 02 00:04:46 Ok Jan 02 00:04:49 Thanks Jan 02 00:05:01 drose379: see the logicexception link. you put your data into the parcel you're given, using methods like that. Jan 02 00:05:11 I can understand now why Simon and others dont give you an answer on a plate Jan 02 00:05:25 make people learn Jan 02 00:05:29 this is bad, it only spoils the asker into relying on the next guy who will help and help and help and help Jan 02 00:05:31 so bad Jan 02 00:05:35 feed for a day, or fish for a lifetime Jan 02 00:05:44 Are you talking about me? Jan 02 00:05:47 simple Jan 02 00:05:53 not you per se Jan 02 00:05:57 any one in this situation Jan 02 00:06:11 Look dude Jan 02 00:06:17 if someone always tells her "do this to fix that, here's the link", I wouldn't go looking Jan 02 00:06:18 Im just looking for some direction Jan 02 00:06:20 Thats it Jan 02 00:06:40 yea that's cool, these people are not losing anything by helping :) Jan 02 00:06:47 someone is might lose Jan 02 00:06:59 How would someone lose Jan 02 00:07:09 you become dependant Jan 02 00:07:27 frustrated with having to ask so much about everything, end up hating the platform even Jan 02 00:07:46 I guess Ill just do my own research then Jan 02 00:08:51 don't get me wrong, there is no such thing as a "worthy question to ask" or something like that Jan 02 00:09:04 not saying don't ask, not saying don't help. saying to research more indepth behind the answer given. don't just stop at the answer Jan 02 00:09:12 edumicate yourself deeper :) Jan 02 00:09:20 to someone who has been programming 10 years for example, even some of his questions are not worthy for someone who has been programming for 20 years Jan 02 00:09:38 so there worthiness isn't there, but the personal effort is. when YOU try first and then get stuck, it shows in your question Jan 02 00:09:39 not worthy? Jan 02 00:10:07 you can be asking how to setBackground, but the way you ask about what part of it, thats where everybody can see if you tried or not Jan 02 00:10:28 hell, i know *zero* about android programming. Just starting out (a couple days). I'ma have a crapload of questions too. but i'll have tried something first before i ask (or ask for a pointer to where in the docs to look for info so i can) Jan 02 00:11:04 I used to do that too, but got insulted enough to stop Jan 02 00:11:05 alright Jan 02 00:11:09 lol.. Jan 02 00:11:42 drose379, trust me, whether someone has actually tried something or is just saying they did will show. if not in the initial question, then in the resulting conversation. people will quickly label the person a help vampire if that shows up often, and then stop helping Jan 02 00:11:43 Well im out to go figure out how to use Parcelable Jan 02 00:11:45 that's all Jan 02 00:12:02 I always put my questions to google before here, and the answer is usually there Jan 02 00:12:54 he would too, but there is something about the air of being around a lot of people who are doing some thing, that you'd get a better BACKGROUND KNOWLEDGE about the intricacies of the thing you're asking about, simply because you're in chat and not on SO (since SO is THE answer and that's it) Jan 02 00:13:22 while in reality you are fooling yourself into thinking "yea Im asking but I just wanna get it perfect from the first time, dont want any misinformation" Jan 02 00:14:03 meh, should talk less Jan 02 00:14:25 misinfo abounds in both places. just the nature of things. Jan 02 00:14:52 yea exactly, cause you're gonna be lost either way when you're doing it the first time, so best bet is to get it working and then see the PHILOSOPHY behind the code ;P Jan 02 00:14:55 i agree that here as in chat land there's generally less of it because there's the multiple people in real time aspect Jan 02 00:15:06 right, i can agree with that Jan 02 00:15:23 Odaym: it's all good, no need to discourage noobs from asking here, we may not be willing to answer but someone might, as long as they don't flood the channel with their question Jan 02 00:15:48 it has nothing to do with him actually Jan 02 00:15:49 oh, and not knowing something, or being a 'n00b' at it doesn't make you dumb. or shouldn't. if you let yourself go into stupid mode (click here then here then do this and that) you don't really learn Jan 02 00:15:54 just bad timing of mentioning it Jan 02 00:16:07 it has to do with yesterday someone answered a guy with a sort of reverse question, it was very smart Jan 02 00:16:09 oh yeah, not targeting 'him' Jan 02 00:16:15 didnt tell him the obvious thing that "this thing here is wrong" Jan 02 00:17:06 Im starting to understand parcelable Jan 02 00:17:18 Odaym, when i learned ruby and then rails, i had a friend who did that to me. truly aided my learning. didn't give me the direct answer, but guided me towards it. Jan 02 00:17:27 was really gentle about it too Jan 02 00:17:30 you have to have a lot of knowledge to do that Jan 02 00:17:35 agreed Jan 02 00:17:47 cause if he asks me why parcelable, I have no idea Jan 02 00:17:58 its just...what I do when I am faced with the thing you're asking about Jan 02 00:18:33 yeah, my friend knows the deeper aspects of the backend mechanisms of ruby (botht he language and the interpreter itself). lots of knowledge there Jan 02 00:19:26 Cna you guys take a look at something for me real quick? Jan 02 00:19:34 well gn Jan 02 00:20:00 ddd ? Jan 02 00:20:19 drose379, we were discussing a teaching style he saw yesterday Jan 02 00:20:34 something that a friend of mine that is insanely good with ruby and with rails uses. Jan 02 00:20:42 oh, nice Jan 02 00:20:58 Do you know anything about parcelable? Jan 02 00:21:06 he used it on me to help me learn and its highly effective. but its not a 'normal' teaching style in most channels Jan 02 00:21:45 Nice Jan 02 00:21:56 most channels its guys like you and me learning to do X and we pass the knowledge on as we gain it. its also the guys with LOTS of the knowledge basically using it like a club on others, at the same time that others come in and want spoon feeding. Jan 02 00:23:05 just the social aspect of tech and channels related to it. he takes a different approach. love the guy for it. been trying to learn to help that way but *I* don't have as deep a knowledge as he does. Mine is broad, not deep Jan 02 00:24:10 Right, I gotta go Jan 02 00:24:12 Talk later Jan 02 00:24:42 later Jan 02 00:30:00 for everyone who got confused with my question Jan 02 00:30:01 http://img42.com/EcidR Jan 02 00:30:13 this is what i want to do with switch :( Jan 02 00:31:16 abara: you want to move it to the left of a different view? Jan 02 00:31:25 yeah Jan 02 00:33:18 abara: that's a layout thing, which is controlled by the switch's parent view, not the switch itself. what does your view xml look like? Jan 02 00:34:30 groxx: Using just a linearlayout as base layout, and 5 of this switches Jan 02 00:35:34 abara: do you want a switch next to each line of text? Jan 02 00:36:47 groxx: yeah Jan 02 00:37:03 groxx: i just want it to left :( Jan 02 00:38:17 alright 4 moniter action Jan 02 00:38:56 groxx: it's possible? Jan 02 00:38:57 abra relative layout you can do Jan 02 00:39:23 abara: that's not really enough info to go by :) specifics help. but: I'm guessing you want 5 "rows" of "[switch] [text]"? Jan 02 00:39:30 oh oh oh, the text on switch is define on himself Jan 02 00:39:45 the text is not a TextView Jan 02 00:40:29 groxx: sorry, almost forgot you could think that way Jan 02 00:40:30 hm :\ I might be more confused now. Jan 02 00:40:55 this switch can have a text itself set by "android:text" Jan 02 00:41:08 like the checkBox Jan 02 00:41:58 oooh, I see what you mean Jan 02 00:42:07 I thin, anyway :) Jan 02 00:42:10 think* Jan 02 00:43:01 groxx: that could be a solution to use a separated textView to hold text, but didnt really wanna use one more widget Jan 02 00:43:04 :/ Jan 02 00:43:06 http://pastebin.com/8tFxEa17 Jan 02 00:43:22 abara what i would seriousily recomend doing is making a compound view out of atextview and switch Jan 02 00:43:35 then you can have it have a initiliazer or custom attrbiteu / left right for positioning the switch Jan 02 00:44:52 abara: hm. I'm not sure you can do that with switches (or checkboxes). you might have to use two views. Jan 02 00:44:53 lasserix_: ok, but i was hoping not get into this deep. i thought switch could have a tag to make this simple task Jan 02 00:45:33 thats up to you Jan 02 00:45:41 thats why i am saying make a compound view Jan 02 00:46:05 ie subclass a relative layout, add a textview (header) switch and switch text orientated how you like Jan 02 00:46:10 then you can just add that to the xml file Jan 02 00:46:13 and it'll be a lot simpler Jan 02 00:46:19 to manage Jan 02 00:46:35 ok Jan 02 00:46:53 thanks guys for the options! i will try them o/ Jan 02 00:47:02 abara: it does seem like something that could be simple. but alas, I don't think it is. Jan 02 00:49:36 abara forget the stuff about the viewholder and adapter and stuff Jan 02 00:49:40 but if you look at this article Jan 02 00:49:40 http://blog.xebia.com/2013/07/22/viewholder-considered-harmful/ Jan 02 00:49:47 see how it makes the compound view for the row Jan 02 00:50:04 ie the ContactView in the example Jan 02 00:50:11 you can make your own widget to add to xml Jan 02 00:50:22 what in the world is this? https://developer.android.com/reference/android/widget/TextView.html#setElegantTextHeight%28boolean%29 "elegantTextHeight"? Jan 02 00:50:25 to make things simpler for you Jan 02 00:50:44 it won't be too difficult if you look at that link for guide on how to set up custom compound viewgroup Jan 02 00:56:59 lasserix_: ok, i'm reading it now Jan 02 01:00:25 dont worry o much about listview and all that for now Jan 02 01:00:30 just look at the contactview class Jan 02 01:00:44 think of how you can make your textview-switch compound class Jan 02 01:01:10 Is there a good way to store API secrets in the app, without the user of a server, or storing them in source code? Jan 02 01:01:33 lasserix_: yeah. it's a straight forward solution Jan 02 01:01:59 lasserix_: thanks, i will build one for me know, and fuck google for that messy api Jan 02 01:02:30 ollien: hardcoding this? Jan 02 01:02:46 abara: that's storing them in source Jan 02 01:03:14 ollien: yeah. i cant think why not do that now Jan 02 01:03:27 abara: Because it's going to be an open source project Jan 02 01:03:45 I don't want my API keys to be public Jan 02 01:03:55 but I can't just store them in plaintext, someone could extract that from the APK Jan 02 01:04:07 they will always be extractable Jan 02 01:04:10 there is nothing you can do Jan 02 01:04:28 you can encrypt send key from server Jan 02 01:04:34 but you need a server Jan 02 01:04:37 I was hoping there was a way without a server Jan 02 01:04:51 but still user can sniff etc Jan 02 01:04:57 I mean I was thinking just obfuscate them within the app, and not post the obfuscation in the repo Jan 02 01:05:07 that just slows someone down Jan 02 01:05:12 of course Jan 02 01:05:15 as does any method Jan 02 01:13:31 ollien: you can obfuscate, but beyond that there's no way without a server. period. Jan 02 01:13:36 groxx: damn Jan 02 01:13:43 Can't use keystore or anything? Jan 02 01:14:24 you still need to get the keys onto the device somehow. that can be intercepted. Jan 02 01:14:32 got it Jan 02 01:14:33 thanks Jan 02 01:14:44 also not all devices have secure hardware storage Jan 02 01:16:16 if you're protecting e.g. oauth keys, it's pretty normal to assume it's public. there's basically nothing you can do about it, without proxying every api call through your servers (or something equivalent, like signing the requests on your server) Jan 02 01:16:17 ollien: it's good to hide it from plain site even if you can't hide it from advanced hackers Jan 02 01:16:24 shmoooz: Of course. Jan 02 01:31:49 so is everyone going from eclipse to android studio or what Jan 02 01:32:05 cbot`: I will when they support JVM unit testing. Jan 02 01:32:09 Which might be soonish. Jan 02 01:32:32 In fact, I was just about to complain about that. Wish they'd hurry up and support it. Jan 02 01:33:21 cbot`: Have you tried Android Studio yet? Jan 02 01:33:27 nope Jan 02 01:35:38 TacticalJoke: are you sure about Junit? it's already implemented afaik Jan 02 01:35:48 i've both installed. Checking them both out. Haven't hit Android Studio beyond installing it so no clue whether it beats eclipse with ADT plugin or not Jan 02 01:36:11 cbot`: just wait a bit. they're talkning about writting a gradle version to eclipse Jan 02 01:36:22 abara: Running tests on the JVM isn't supported yet. Jan 02 01:36:28 current version for AS is 1.0.2. just added ADT plugin from https://dl-ssl.google.com/android/eclipse/ just now Jan 02 01:36:32 They've been working on it lately. Jan 02 01:36:43 TacticalJoke: oh, ok Jan 02 01:37:39 TacticalJoke: why do you need jvm unit testing? Jan 02 01:38:06 Speed, convenience, etc. Jan 02 01:38:08 JUnit 4. Jan 02 01:38:21 (Actually, more like !(JUnit 3).) Jan 02 01:39:17 ollien: so you have access to a online service/api called A, and want to write some manipulation lib B and distribute. Why not make your library accept an Key from the user. Make user register their on key on service A to use your project Jan 02 01:39:34 abara: it's against Twitter's TOS Jan 02 01:39:49 ollien: Are you making a Twitter client? Jan 02 01:39:55 TacticalJoke: Yes, manually Jan 02 01:39:56 ollien: in my mind you're build something like retrofit: a middleware for something else Jan 02 01:40:03 Is there any other way? :D Jan 02 01:40:05 no, I'm building an app Jan 02 01:40:11 TacticalJoke: Yeah, using a library Jan 02 01:40:13 abara, do you think they will do that for eclipse? Jan 02 01:40:14 which I don't care to do Jan 02 01:40:27 (Also wouldn't solve my problem anyway) Jan 02 01:40:57 cbot`: really dont know. but Vogella has posted a while about eclipse getting an plugin version of gradlw Jan 02 01:41:01 gradle* Jan 02 01:41:21 TacticalJoke, are you saying you can't run JUnit tests at all or are you saying you can't run tests against the JVM itself? (New to android and java period so wondering what you meant) Jan 02 01:41:51 so please forgive if the question is idiotic at some level :) Jan 02 01:41:58 In Android Studio, you can easily run unit tests. But (unless you jump through hoops) they have to run on a device or the emulator, which is slow. Jan 02 01:41:59 still sad about my switch button ;'/ Jan 02 01:42:02 Well, it can be slow. Jan 02 01:42:16 However, they are adding the ability to run unit tests on the JVM. Jan 02 01:42:21 TacticalJoke: The emulator isn't too slow now, with Intel HAXM right? Jan 02 01:42:23 (Without jumping through hoops.) Jan 02 01:42:32 ollien: yay Jan 02 01:42:40 abara ? Jan 02 01:42:40 ahhhh. ok i see now. thank you for clearing that Jan 02 01:42:46 I still find HAXM slow and memory-intensive. Jan 02 01:42:57 It is intensive, but it's not as slow as it once was Jan 02 01:42:59 ollien: HAXM make emulator for useful than ever Jan 02 01:43:00 ddd: Note that you can easily run JVM unit tests in Eclipse. Jan 02 01:43:08 TacticalJoke, blow up a 4GB machine? 2.1GHz cpu btw Jan 02 01:43:42 TacticalJoke, thats what i'm setting up right now. (eclipse on windows 8.1. then doing the same on kubuntu 14.10 later tonight) Jan 02 01:43:46 let's abandon it. i'm going to objective-c Jan 02 01:44:01 NDK people can't move to Android Studio, as far as I understand. So not everyone is moving. Android Studio does, however, appear to be where the Android-tools team is focusing its efforts now. Jan 02 01:44:22 abara noo, swift Jan 02 01:44:25 ddd: Honestly, I find Eclipse significantly faster than Android Studio. In basically every way. Jan 02 01:44:28 Not just building. Jan 02 01:44:35 Though I haven't tried AS in about two months. Jan 02 01:44:41 they are from what i read on the android site today Jan 02 01:44:50 TacticalJoke: Faster, but more rage inducing Jan 02 01:44:51 take your pick Jan 02 01:45:19 TacticalJoke, i have installed AS and upgraded it to 1.0.2 but haven't done a thing in either eclipse or AS as of yet. Jan 02 01:45:35 ddd: It's probably best, if you're new, to go with Android Studio. Jan 02 01:45:35 it's pretty undeniably slower still. static analysis is noticeably better though, which IMO makes it a nicer programming experience. but it's not a clear win :/ Jan 02 01:45:39 That's where stuff is happenin'. Jan 02 01:46:04 gradle's manifest merging is infinitely better than in eclipse though Jan 02 01:46:25 i'm not looking to be with the 'happenin' group. just looking for working and solid tools. i don't see a problem with checking both IDEs out :) Jan 02 01:46:27 ddd: My complaints are those of a unit-testing fanatic. Jan 02 01:46:35 K. lol Jan 02 01:47:08 TacticalJoke how many unit tests do you have so far ? Jan 02 01:47:15 I've never had any slowness problems with IDEA. Other than when it does the initial indexing on a large project Jan 02 01:47:16 ahh see i'm coming from ruby and I'm used to MiniTest, RSpec and the like. I've yet to learn JUnit or any other java testing equivs to those 2 Jan 02 01:47:16 I actually don't have many for this current app. Jan 02 01:47:18 Fewer than 100. Jan 02 01:47:27 But the ones I do have are quite valuable. Jan 02 01:47:39 Make sure that you bump up the -Xmx in the idea.vmoptions/idea64.vmoptions, if you have the ram Jan 02 01:47:49 or whatever the corresponding files are called for AS :) Jan 02 01:47:59 ddd: To be honest, JUnit is not so amazing. But it works, I guess. Jan 02 01:48:10 ddd: AssertJ is a nice assertion framework which plays well with JUnit. Jan 02 01:48:19 i'm actually going to have to do a fair bit of googling to see what testing frameworks java has, if any of them are even remotely syntactically similar to rspec or minitest from ruby, and how to properly write tests for java apps Jan 02 01:48:39 Another option is TestNG, but I haven't used it much. Almost everyone seems to use JUnit (4). Jan 02 01:48:44 there is cucumber , but i haven't used that Jan 02 01:49:09 ddd: couldn't you theoretically use a ruby testing framework for java classes? I've never used ruby, but I assume it has to be cross-compatible with java classes? Jan 02 01:49:21 cucumber is a toplevel. rspec in the middle, minitest (asserts etc) is the low level. Jan 02 01:49:46 JesusFreke, it might. something to investigate especially since we have JRuby which is a ruby implementation written in java Jan 02 01:49:57 I hate when Google Chrome gets confused and tries to "download" an HTML page when I click a link. Jan 02 01:50:05 oh, I was thinking ruby itself was a jvm language Jan 02 01:50:16 not sure why Jan 02 01:50:19 hehe np Jan 02 01:50:27 TacticalJoke: what? on android? Jan 02 01:50:38 ddd: AssertJ lets us write assertions such as "assertThat(someNumber).isBetween(5, 10);". It's not amazing, but it's way nicer than Hamcrest or something. Jan 02 01:50:43 gdrc: On Windows. Jan 02 01:51:06 TacticalJoke: never happened to me. try reinstalling Jan 02 01:51:16 TacticalJoke: Is chrome confused, or is the web server confused about what mime type it should be sending? Jan 02 01:51:19 TacticalJoke, ok then it is equivilant to Ruby's MiniTest or TestUnit Jan 02 01:51:33 unkerror: Oh, it's Chrome in this case. Clicking the link again will work as normal. Jan 02 01:51:51 I was thinking JUnit was java's TestUnit ruby equiv. i've a lot of investigating to do I see Jan 02 01:52:05 TacticalJoke: interesting, never had that happen before except when the server sent the wrong mime type Jan 02 01:52:10 hard to know what matches to what Jan 02 01:52:16 test-unit sounds (from my googling) like JUnit. Jan 02 01:54:10 ddd: Does MiniTest require that test methods begin with 'test'? You don't have to do that with JUnit4 anymore (gladly). Jan 02 01:55:17 Cucumber looks nice. Have you used this for Android, g00s? Jan 02 01:55:25 TacticalJoke no Jan 02 01:55:34 remember, i don't do much testing ;) Jan 02 01:56:07 the first step is admitting you have a problem... :D Jan 02 01:57:04 JesusFreke, there's jruby, which for a while was better than normal ruby Jan 02 01:57:38 Oh, someone said that already Jan 02 01:57:52 heh. I think I had to write a little ruby script once. I remember running into some WTF with the language, but I can't recall what it was now. Jan 02 01:58:04 mirah and jruby are both workable on the jvm Jan 02 01:58:15 ruby is a complete wtf Jan 02 01:58:20 open classes are fail Jan 02 01:58:34 pfn: Did you read about Nim? Jan 02 01:58:38 Just curious. Jan 02 01:58:45 for me all scripting languages are shit Jan 02 01:59:07 except PHP Jan 02 01:59:07 no, I haven't Jan 02 01:59:20 Oh. It looks really nice. Jan 02 01:59:35 php? it's the worst Jan 02 01:59:45 it looks like C Jan 02 02:00:03 Didn't the creator of PHP admit that he doesn't know anything about creating a programming language? :D Jan 02 02:00:38 sounds irrelevant to android, nim Jan 02 02:00:52 Hello, i need help with my hard bricked phone, and operating with fastboot anyone can help me? Jan 02 02:00:54 Yeah, I'm not sure it'd work here. But I wish I could use that. Looks so neat. Jan 02 02:00:58 and of course, php was never intended to be a language Jan 02 02:01:19 gdrc lua is ok Jan 02 02:01:27 The creator of PHP: "I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests." Jan 02 02:01:33 TacticalJoke: link Jan 02 02:02:02 gdrc: http://en.wikiquote.org/wiki/Rasmus_Lerdorf Jan 02 02:02:16 Yeah, that's it. Jan 02 02:02:24 anyone in here play game of war? Jan 02 02:03:10 that's hilarious Jan 02 02:04:57 I need help pretty badly, my phone cant boot at all, i can go only to download mode, but i cant flash anything cos of signature errors. When i type "oem unlock" or "oem device-info" it gets stuck, can anyone help me? Jan 02 02:05:32 BlayDee: #android #android-root Jan 02 02:05:47 yee noone is there Jan 02 02:06:19 BlayDee: that doesn't mean you should go to another channel and ask an off-topic question Jan 02 02:06:57 BlayDee, I can fix this for you for $8000 Jan 02 02:07:02 Thats still android based and most of you know about fastboot Jan 02 02:07:05 this is going to be an odd question but in my "onStop" void I have a socket close in try/catch statement, my question is how can throw the try/catch so I can see if my error is displayed properly? Jan 02 02:07:30 Just say "throw new WhateverException();". Jan 02 02:07:44 BlayDee: if someone wanted to answer questions like that, then they would be in #android/#android-root Jan 02 02:07:58 and would have answered you there Jan 02 02:08:28 Yee sorry im little desprated cos i need this phone for my job Jan 02 02:08:34 really? hmm I will try that thanks! Jan 02 02:08:49 BlayDee, Pony up the 8k! Jan 02 02:08:53 you cheapskate Jan 02 02:09:01 Jan 02 02:09:01 $157.53 Jan 02 02:09:04 blaydee: if youre rooting I would've have waited until the weekend in case something happened and I had time to fix it. Jan 02 02:09:05 Demon_Jester: You could throw an IOException or some such. Jan 02 02:09:13 $157.53 impression RPM on videos today Jan 02 02:09:19 the magic of numbers Jan 02 02:10:03 Agamemnus: so? Jan 02 02:10:11 I've rooted it already, problems started to show when i ported rom from another device, everywhere white screen nor even Boot logo showing up Jan 02 02:10:21 nothing Jan 02 02:10:45 I need a 78 RPM to make up my ad spend Jan 02 02:11:12 13.5 today... Jan 02 02:11:14 Guys i found on web this "trick" that work on checkbox: if we set android:button="@null" and android:drawableRight="?android:attr/listChoiceIndicatorMultiple" it will move the position of the square from left (default position) to right Jan 02 02:11:34 I am not even paying that much. Jan 02 02:11:55 but i cant make it draw on the left a "thumb" which i think it's the code for the switch button Jan 02 02:13:51 how old does it make me that when I read "78 RPM" I think "didn't old records play at that speed"? Jan 02 02:19:12 Leeds: 60s Jan 02 02:19:46 not quite :P Jan 02 02:23:26 In order to have a good environment to run Android Studio, should I install a 32 bit or 64 bit operating system (Mint Mate 17.1)? Jan 02 02:25:10 you first need to change OS :P Jan 02 02:25:36 <_genuser_> hey guys. Jan 02 02:26:18 <_genuser_> if your app has million+ users, what's a good logging/analytics framework? Or rather, please suggest some. I know of flurry as one. I have heard there's others better ones. Jan 02 02:26:24 jimcooncat: depends on your amount of memory right? Jan 02 02:29:11 abara: I got 3 gigs, CPU can run either, mostly concerned about the Android Studio software. Jan 02 02:29:50 so if you have 3 only, you unable to run 64 version .-. Jan 02 02:30:36 abara: why would that be? 64 bit means you can access more than 3.something, not that it's a minimum to run it. Jan 02 02:31:16 you should always run 64-bit now - Jesus Freke, it's 2015! - but you'll probably need 32-bit support for the SDK Jan 02 02:31:19 jimcooncat: ok jimmy boy, but you dont have this need with 3g Jan 02 02:31:28 jimcooncat: so it will be a 32x Jan 02 02:36:03 I have a bonsai tree. It has a label attached which reads "Do not eat". Jan 02 02:36:20 Do people need to be told not to eat a bonsai tree? Jan 02 02:37:27 sure Jan 02 02:37:30 bonsai fruit tree Jan 02 02:39:21 lasserix_: What do you think of the idea of my ActionBar/Toolbar disappearing when scrolling down a comment list? Jan 02 02:39:26 Like in Google Chrome. Jan 02 02:40:02 as long as you do it witha cool animation Jan 02 02:40:14 does it reappear on stop scroll? Jan 02 02:40:29 Umm. Maybe. Or when they scroll up. Jan 02 02:42:44 lasserix_: i found this http://stackoverflow.com/a/12438374/1594326 Jan 02 02:43:27 lasserix_: maybe there is hope to make it for a switch? i've tried here but cant find the default drawable of switch Jan 02 02:45:34 BlayDee: probably the only thing you can do is flash an official rom. at least sometimes you can get roms from the manufacturer, or they may have a recovery tool. Jan 02 02:46:29 Yee i have everyting with radio recovery and kernel, but the thing is, i cant unlock bootloader to flash it, it just gets stuck... Jan 02 02:46:53 how did you flash it the first time without unlocking the bootloader? Jan 02 02:47:15 <_genuser_> flashing only requires unzipping.... Jan 02 02:47:41 _genuser_: and a trenchcoat. it's just not the same otherwise. Jan 02 02:47:42 Umm, i booted boot.img with script, and that autoflashed recovery CWM Jan 02 02:47:58 <_genuser_> groxx: well in that case, just unbuttoning. Jan 02 02:48:25 lasserix_: This is on my phone (so the text doesn't look great), but isn't the ActionBar just in the way? http://i.imgur.com/XvYMc1z.png Jan 02 02:48:38 <_genuser_> groxx: and now I should actually focus on my android devving Jan 02 02:49:00 I'm gonna remove the icon and so on. But in any case I just dislike its presence when reading a comment listing. Jan 02 02:49:33 groxx i used this tutorial to root my phone http://forum.xda-developers.com/showthread.php?t=1633344 Jan 02 02:49:39 TacticalJoke: actionbars are always in the way. kill them. with fire. Jan 02 02:49:49 And it didnt seem to unlock bootloader Jan 02 02:50:11 groxx: Do you think it makes sense for a reddit client to hide the ActionBar/Toolbar like Google Chrome does? I'm not sure whether it'll annoy users. Jan 02 02:50:44 TacticalJoke: personally, yes. anywhere you have a lot of content and don't need access to the bar's tools 100% of the time. (which is like 99% of apps) Jan 02 02:50:50 Hmm. Now that I think of it, couldn't that view at the top (with the post title) effectively *be* the ActionBar. Jan 02 02:50:56 phones are small, let them use as much of the screen as possible. Jan 02 02:51:13 Actually, I take that back: that view is just a child in the ListView. It disappears on scroll. Jan 02 02:51:17 Hi All. I have buyed a Android Mobile Phone but the Vendor does not update the Android Firmware anymore. I would like to ask if it is possible to list all Kernel Modules of Android and Extract them and then rebuild the Android Kernel that way to use then the needed extracted Modules. If yes is there some step by Step How-To to do this ? Jan 02 02:51:24 Yeah, that makes sense. Jan 02 02:53:42 any idea how to use the method setChecked with widget Switch before API 10 ? Jan 02 02:54:46 before API 10??? Jan 02 02:54:56 yes Jan 02 02:55:08 because you need that last 1% of users? Jan 02 02:55:29 you have reliable statistics ? Jan 02 02:55:40 per country Jan 02 02:55:54 I would be glad if that was the case Jan 02 02:56:01 api 10 lol Jan 02 02:56:35 not per country - but unless you have a *really* strong reason to believe that API 10 matters to you for some really specific way, nuke it Jan 02 02:57:07 anyway there must be something to toogle the switch Jan 02 02:58:21 ok, maybe I didn't realize how old it was :p Jan 02 02:58:43 yeah :) Jan 02 02:59:00 I think the lowest people should be supporting in general is API 15. Jan 02 02:59:19 that does seem to be the general feeling... even 16, if you want to be forward-looking **** ENDING LOGGING AT Fri Jan 02 02:59:59 2015