**** BEGIN LOGGING AT Mon Apr 25 02:59:58 2016 Apr 25 03:02:57 Oh how embarrassing, was thinking Thomas Dylan instead of Dylan Thomas Apr 25 03:07:35 TacticalJoke, huh. is that poem the commit message? Apr 25 03:09:12 No, just the commit msg lol Apr 25 03:09:32 Doh, i cant red, yes Apr 25 03:09:54 Or right either, read not red Apr 25 03:23:20 i'm display a string have this {code=1MWE45} is there a way to just get the characters between = and } Apr 25 03:24:32 hert look up Spannables Apr 25 03:50:04 Hello, planning on using CakeDC's user plugin but am wondering whether it would be a good solution for where I want customise the specific 'actions' a user is allowed to make. Apr 25 04:22:45 Is it possible to assign multiple roles to cakedc Apr 25 04:35:56 Hey guys what type of notification is it called that is rectangle and shows up at swipe/lock screen? Apr 25 04:59:39 capella Verge gave Firefox 8.6 http://www.theverge.com/2016/4/24/11489572/the-verge-review-of-animals-the-red-panda Apr 25 04:59:45 i mean red panda :D Apr 25 05:00:59 Such a face ... such a cute face :) Apr 25 05:04:36 https://youtu.be/DSehQsYU9h4 Apr 25 05:05:06 hey I have a list of dates in an arraylist (pulled from JSON) that I want to filter by CalendarView selection. What would be the best way to do that? Apr 25 05:07:19 http://www.theverge.com/2016/4/24/11500082/chromebooks-android-app-support-coming Apr 25 05:10:52 g00s: how is that with windows phones? Apr 25 05:11:05 both run programs of each other? Apr 25 05:11:32 i haven't had a chance to play with universal apps, but thats the idea Apr 25 05:12:08 i think MS has the best platform - too bad their mobile isn't going anywhere Apr 25 05:12:27 best? Apr 25 05:12:41 bestest ! Apr 25 05:13:04 you mean development environment is better than android studio? Apr 25 05:13:32 android studio is shit and is not comparable to anything at all Apr 25 05:16:19 i remember when everyone complained about eclipse; i thought - you wait and see when google gets their hands on intellij; we'll see how they butcher that too haha Apr 25 05:17:51 i almost think, maybe google should have contracted with jetbrains and just given them requirements to implement Apr 25 05:18:55 also think, the idea of gradle being the one and only model was a cool idea, but the experiment so far has failed Apr 25 05:19:23 the IDE is way out of step with gradle, and not reporting errors when they are there (until a build), etc Apr 25 05:19:52 g00s: well, you have the problem of DRY Apr 25 05:20:09 g00s: you don't want to constantly be building certain stuff, but you don't want the IDE to do certain stuff Apr 25 05:20:22 g00s: so you add interfaces to Gradle, and make it slow, etc. Apr 25 05:20:37 g00s: it's all a tradeoff Apr 25 05:21:46 i guess i was naive, in the beginning that the gradle model was going to replace whatever internal representation the IDE already had Apr 25 05:22:01 but seems its more like keeping 2 models in sync Apr 25 05:23:20 g00s: have you tried PDFium? Apr 25 05:23:24 or anyone? Apr 25 05:23:24 no Apr 25 05:24:12 looks like it should be native to android PDF renderer, it is part of chromium project Apr 25 05:24:18 but Apr 25 05:24:27 it is not in the api? Apr 25 05:25:13 instead: http://developer.android.com/reference/android/graphics/pdf/PdfRenderer.html Apr 25 05:25:21 > Added in API level 21 Apr 25 05:25:30 this is weird, isn't it Apr 25 05:29:30 PDF is a hell-on-earth spec of I don't know how many hundreds of pages Apr 25 05:30:44 haha Apr 25 05:30:49 1310 pages Apr 25 05:30:54 available option is MuPDF, which license demands to publish app or pay them Apr 25 05:30:57 throw in some JS ... Apr 25 05:30:59 https://www.adobe.com/devnet/pdf/pdf_reference_archive.html Apr 25 05:31:10 Gradle 2.13 final is out Apr 25 05:31:14 https://code.google.com/p/android/issues/detail?id=204041 Apr 25 05:31:20 ... to publish source code of app Apr 25 05:31:23 \o/ Apr 25 05:31:38 XScreenSaver for Android is on its way, and it is going to be awesome Apr 25 05:31:51 too bad I already made a solution of my own Apr 25 05:32:07 and it's rather superior than depending on the pid getting logged Apr 25 05:32:50 I'm using http://cpansearch.perl.org/src/VICHOU/App-logcat_format-0.01/lib/App/logcat_format.pm Apr 25 05:33:05 modified to colour selected logs Apr 25 05:33:26 and filter non related stuff Apr 25 05:34:02 squ datalogics might also have an android port (pdf toolkit) ... they are an official adobe partner Apr 25 05:34:12 costs lots of money of course ;) Apr 25 05:34:16 thank you Apr 25 05:34:25 they basically port the official adobe pdf tools to different platforms Apr 25 05:34:35 i remember the guy working on the android site was hating life :D Apr 25 05:34:41 *side Apr 25 05:35:02 googled this: https://plugpdf.com/order/ Apr 25 05:35:12 sure all that java <--> ancient C stuff was lots of fun ! Apr 25 05:35:16 $3000 unlimited android apps Apr 25 05:35:18 Morning! Apr 25 05:35:18 ha ha. Apr 25 05:35:47 Ologn is it going to undo all the battery optimizations google has been adding :D Apr 25 05:35:55 One of the worst programs I used on Ubuntu was the default PDF reader, evince document viewer Apr 25 05:36:19 i remember xpdf Apr 25 05:36:25 xpdf is nice Apr 25 05:36:28 g00s, probably. Actually jwz has very wisely said it should be a daydream but I have been punting on that Apr 25 05:36:54 Ologn do eet ! Apr 25 05:37:01 xpdf allowed thru xresources config file to change default white background Apr 25 05:37:11 which is nice Apr 25 05:37:22 squ lol i think i may have submitted that patch Apr 25 05:37:32 damn that was like 10 years ago, for reverse video Apr 25 05:37:33 Evince used a library called poppler, which ripped the code from Xpdf and made it a library Apr 25 05:37:58 linux has this nasty habit of just writing shit layers on top of shit layers Apr 25 05:38:18 i remember poppler though Apr 25 05:39:50 speaking of writing shit layers on top of shit layers, XScreenSaver's xlib for Android is something like Xlib to OpenGL to OpenGLES - it's quite a port Apr 25 05:40:49 now that the 5x has fixed it's performance issues, I really like it a lot again Apr 25 05:41:03 only thing I dont like about it is the lcd screen Apr 25 05:41:05 Ologn how does vulcan impact what you are working on ? Apr 25 05:41:11 oled is much nicer Apr 25 05:42:44 g00s, not much, these guys are even more dubious about the newest API's than I am Apr 25 05:43:27 romain guy thought vulkan was great Apr 25 05:43:36 * g00s misses romainguy Apr 25 05:43:41 g00s: cool, set it to non-irritating gray Apr 25 05:45:07 is PDF turing complete ? Apr 25 05:45:11 The big thing about today is we ported 91 live wallpapers today Apr 25 05:45:11 PS was Apr 25 05:45:20 Ologn nice :) Apr 25 05:45:31 Although not all of them are 100% functional Apr 25 05:45:59 Ologn as long as they don't slaughter the battery so that even when plugged in the device loses charge :D Apr 25 05:46:00 Lots of stuff is Turing complete...the requirements are pretty simple Apr 25 05:47:14 Mu-recursive functions have three simple primitive functions, and three operators, and that's Turing complete Apr 25 05:48:26 is there any way to get AS + gradle CLI to use the same cache ? Apr 25 05:48:30 The primitive functions are f(x) = 0, f(x) = x+1 and f(x1,x2,x3,x4,x5,x6,3) = x3 Apr 25 05:49:30 of course we expect one with nick Ologn to know this :D Apr 25 05:49:36 The operators on those primitive functions are combination/composition, primitive recursion aka induction, and a minimization function Apr 25 05:50:31 For me it's even simpler than a Turing machine...more mathematical...although obviously Turing machines are more like how processors work Apr 25 06:09:50 anyone know how I can inflate two views correctly in recycler view http://stackoverflow.com/questions/36833149/how-to-show-multiple-viewholders-in-recycler-view Apr 25 06:12:48 Lonesoldier728: https://github.com/squm/template_recyclerview Apr 25 06:15:03 squ where do I find a possible solution? Apr 25 06:15:07 In that code? Apr 25 06:15:16 idk Apr 25 06:15:57 Did you understand my question? Apr 25 06:17:24 nope Apr 25 06:56:13 NPE ... the lowest of the error codes Apr 25 06:57:11 capella do you understand how to inflate the views correctly? Apr 25 06:57:22 yes, yes I do Apr 25 06:57:37 What am I missing or doing wrong in my code? Apr 25 08:08:29 hi I have a problem Apr 25 08:08:38 I try to run this command: cp -a /data/local/nhsystem /mnt/sdcard/nhsystem it says with every folder/file operation not permitted Apr 25 08:08:45 I run as root already Apr 25 08:15:04 i would like to code a simple graphical android game - the graphics have not yet been confirmed - so it may be simple 2d sprites on a canvas, or may be 3d objects. what options in terms of game / graphic libraries do i have? Apr 25 08:15:19 Moult: have a look on Vulcan Apr 25 08:15:47 one extra factor is ideally it is easy to port to ios too Apr 25 08:16:30 javascript then Apr 25 08:18:03 squ: hmmm? really? Apr 25 08:18:10 what Apr 25 08:19:21 squ: i don't quite understand. would android run a javascript engine to execute my code, and my javascript would, uh... draw on a canvas provided by ... what technology? Apr 25 08:19:32 yes Apr 25 08:20:14 try LibGDX Apr 25 08:20:19 it's very easy and it's in Java Apr 25 08:20:20 you can call javascript function from activity Apr 25 08:20:24 *very* easy Apr 25 08:21:31 > libGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on your WebGL enabled browser Apr 25 08:21:46 yes ma'am Apr 25 08:21:48 really good one too Apr 25 08:22:02 not much choices except webview Apr 25 08:22:19 you can run it on the device Apr 25 08:22:22 I've made a game with it Apr 25 08:22:33 that's good Apr 25 08:23:43 squ: so i would make a webview, and my android java layer would call my game logic libraries, and pass the values it needs to the interface layer written in javascript. the javascript would run in the javascript engine provided by the webview, and draw on the canvas provided in the webview. the canvas would support webgl and thus i can achieve both 2D and 3D. does this summary sound accurate? Apr 25 08:24:21 google it Apr 25 08:24:31 not going to read your question Apr 25 08:24:58 http://developer.android.com/guide/webapps/webview.html Apr 25 08:25:01 googled for you Apr 25 08:38:13 Odaym: do you have any comments between using libgdx+webview or using unity? Apr 25 08:39:07 (i undestand they are not the same thing - but the question about approach still applies) Apr 25 08:39:26 libgdx is something you can use to get up and running quickly without getting muddled down with complexity and ending up not writing anything Apr 25 08:39:46 the guy even made a series on how to implement a flappy bird clone in Libgdx https://www.youtube.com/watch?v=rzBVTPaUUDg&list=PLZm85UZQLd2TPXpUJfDEdWTSgszionbJy Apr 25 08:40:28 I have a LinearLayout nesting inside a HorizontalScrollView, the LinearLayout is filled with 5 items that extend a bit beyond the screen (hence the scroll). But the LinearLayout for some reason is expanding twice as long as it should be. So there's an extensive amount of scrollable space when the last item is reached. I can't see why this is happening: http://pastebin.com/rfJdsdr4 Apr 25 08:40:38 Odaym: i am also not really finding good results on porting libgdx games to ios. is this true? Apr 25 08:40:55 you don't port them, you just check a box and now you have the game ready to be run on iOS Apr 25 08:41:03 you check another box and you can run it in the browser Apr 25 08:41:44 Odaym: hmm, ok, let me do a bit of googling around. perhaps that youtube video you linked to will help Apr 25 08:52:14 Is anyone familiar with Picasso? Apr 25 08:54:05 Lets says i use load().fetch() and then .load().into() Apr 25 08:54:20 But i use the same url Apr 25 08:54:56 If fetch hasnt finished will Picasso make two requests to the same url? Apr 25 08:56:12 Or will it recognise that a request to the url has already gone out and wait for it? Apr 25 09:01:08 AKK9: I think you'll have your answer sooner if you just tried it out and see. Picasso's open source, so just do two loads, set a waypoint and see what it does Apr 25 09:09:10 You mean like setting breakpoints? How would i see that a request has been made to the web from picasso? Wouldnt i need to go in the picasso library and find the right place to set a breakpoint? Apr 25 09:09:55 pduin, sorry bit of a beginner Apr 25 09:11:18 have anyone tried MockWevServer for OkHttp? Apr 25 09:12:12 when i try to return MockResponse with response code for an error (ex. 404) it fails and throws timeout exception Apr 25 09:12:30 and the same response with OK response code works fine Apr 25 09:13:44 AKK9: Just set a breakpoint on the lines where you make the load calls, and step into the Picasso methods. Apr 25 09:14:43 The problem though is that by the time i have stepped through the request would have finished Apr 25 09:15:03 pduin, would be good if i could set logging inside Picasso Apr 25 09:15:57 Ill read the docs, maybe it does have some loggging i can enable Apr 25 09:20:05 Odaym: hum, i see how libgdx works :) i don't see why squ suggested webview + javascript though, i would expect webview+js to be very slow. Apr 25 09:20:28 and useless Apr 25 09:20:36 it doesn't use webview? Apr 25 09:20:49 its the JS part that you shouldn't be doing Apr 25 09:20:53 regardless where the thing runs Apr 25 09:21:29 android needs a proper C++ SDK... java is simply annoying... :( Apr 25 09:21:35 Java is amazing Apr 25 09:21:42 I'm amazed right now Apr 25 09:21:45 it's not even java 8 :( Apr 25 09:21:48 I mean 1.8 Apr 25 09:21:51 there is java 8 support Apr 25 09:22:01 not in android studio Apr 25 09:22:09 I think I have to enable it explicitly Apr 25 09:22:18 maybe :) Apr 25 09:22:19 and then I don't know how well it will run on a device Apr 25 09:22:45 but honestly, java byte sucks. Apr 25 09:22:47 java int sucks Apr 25 09:22:52 Well. Apr 25 09:22:57 anyone here uses GreenhouseCI? Apr 25 09:22:58 You can go develop for Symbian? :P Apr 25 09:23:06 Moshdev: symbian sucks squared Apr 25 09:23:14 it seems everything sucks Apr 25 09:23:15 sorry, Mavrik Apr 25 09:23:17 Well then. Apr 25 09:23:23 Odaym: some suck less than others :) Apr 25 09:23:26 cbreak, let me play you the worlds smallest violin. Apr 25 09:23:42 and in different ways Apr 25 09:23:42 And tell you to stop being a whiny little bitch and start being a professional. Apr 25 09:23:44 squ: from googling, no, i don't think libgdx uses a webview Apr 25 09:23:52 you got served Apr 25 09:23:56 what does it use Apr 25 09:23:59 Lol Apr 25 09:25:51 Hrmf, I'm pretty sure libgdx has no connection to any webviews :P Apr 25 09:26:29 it recompiles to native code? java & objc? Apr 25 09:26:49 yea you get folders for each Apr 25 09:27:01 squ, it used RoboVM on iOS Apr 25 09:27:22 what that fancy name means Apr 25 09:27:40 what is that folders Odaym Apr 25 09:27:45 *what in these Apr 25 09:27:57 real android code, real iOS code Apr 25 09:28:13 am I being trolled Apr 25 09:28:15 friendly to edits too Apr 25 09:30:51 Hi, i want to create a layout that show in front of an activity. I mean that the previous activity is still visible, but in background and grayed. Do you know am i looking for ? Apr 25 09:31:05 like an alertdialog, but bigger :D Apr 25 09:31:57 you can create a dialog and give it a transparent layout Apr 25 09:33:00 yes. Apr 25 09:34:11 Im trying to change a UI element from a non-UI thread. but for some reason I does not work.. here is the code: http://pastebin.com/M5wpgpGh Apr 25 09:34:37 as far as I can tell I told it to use the mainactivity and make use runonuithread... Apr 25 09:34:54 but its still giving me this error: Only the original thread that created a view hierarchy can touch its views. Apr 25 09:35:33 true Apr 25 09:35:56 you have to run code that will talk to a handler Apr 25 09:36:05 that code will be inside runonUiThread Apr 25 09:36:31 runOnUiThread is sufficient, it happends in UI thread Apr 25 09:36:41 so why doesnt it work? Apr 25 09:36:46 runOnUiThread you say textView.setText? Apr 25 09:36:55 it should break Apr 25 09:37:18 huh? Apr 25 09:37:21 well I tried other things as well...some simple method in mainactivity which accepts a string Apr 25 09:37:25 Odaym: OK thanks. Just to be sure, here is an example of what i want. We can still see other activity in backgroud : http://3.bp.blogspot.com/-r8noYQu6hfI/VYUM8kRLl_I/AAAAAAABUL4/mqWBqIqhv9w/s1600/Magic%2BRush%2BHeroes%2BBest%2BHero%2BLineup%2Bfor%2BNewbie%2BPlayers%2B%255BGuide%255D%2B2.jpg Apr 25 09:37:30 this string will be passed by TcpClient Apr 25 09:37:36 and will then set status accordingly Apr 25 09:37:43 it shouldn't break because it says runOnUiThread :P Apr 25 09:37:48 but its still saying only the original thread..... Apr 25 09:37:52 but I remember something I didn't understand back then, and I use a handler Apr 25 09:37:55 dunno Apr 25 09:38:10 that's a dialog mtR_ Apr 25 09:38:21 allright, thanks man :) Apr 25 09:38:28 You could just post it to a view Apr 25 09:38:32 basically It would be sufficent to set the status textview inside TcpClient directly Apr 25 09:38:34 or that Apr 25 09:38:34 Rarhet than use a handler Apr 25 09:38:36 I think Apr 25 09:38:50 E.g. textView.post() Apr 25 09:38:54 ahh yeah Apr 25 09:38:58 yea you can do that! Apr 25 09:38:58 Put your runnable inside there Apr 25 09:39:13 hmm Apr 25 09:39:15 that's how I make the scrollview scroll programatically i post to it directly Apr 25 09:41:50 so something like this? http://pastebin.com/wHyXTkWA Apr 25 09:42:37 public static x_x Apr 25 09:43:21 Getting started with Swift on Android :P https://github.com/apple/swift/blob/master/docs/Android.md Apr 25 09:44:19 eh well I dont get it... Apr 25 09:44:28 I dont see why runOnUiThread isnt working. Apr 25 09:44:38 what's it say Apr 25 09:44:54 Only the original thread that created a view hierarchy can touch its views. Apr 25 09:45:01 feelsgoodman Apr 25 09:45:02 to be right Apr 25 09:45:11 help him Ashiren Apr 25 09:45:14 why isn't it working Apr 25 09:45:16 :D Apr 25 09:45:18 well yea...obviously it is not running on UI Apr 25 09:45:20 but it SHOULD Apr 25 09:45:49 I dont understand why this is so damn complicated.... Apr 25 09:45:58 maybe I can say what I wish to accomplish... Apr 25 09:46:02 hello Apr 25 09:46:19 how to enable GPU tracing within android studio without rooting the hardware? Apr 25 09:46:20 Bavilo http://www.pastebin.com/SeSxSRRn Apr 25 09:46:23 TcpClient will establish a tcp connection. when it does, i just want a simple textview to say..."Connected", thats it. Apr 25 09:46:50 Dont worry man, everything is complicated until you get the hang of it Apr 25 09:47:29 AKK9 that is for TcpClient? Apr 25 09:47:32 or the activity Apr 25 09:47:34 AKK9, for him to be able to write that code, he has to be able to reference "status" Apr 25 09:47:52 that's what we're discussing here, where will he be able to reference "status" element without getting UI thread error Apr 25 09:48:28 I am no were near a good android programmer :( Im mostly working my way through with tutorials sadly Apr 25 09:48:38 and things like this which should work, and then dont, just dont make sense Apr 25 09:48:39 to me... Apr 25 09:48:53 I don't see where you ran the thread you created Apr 25 09:48:58 is there a start() somewhere else? Apr 25 09:49:14 http://stackoverflow.com/questions/11140285/how-to-use-runonuithread Apr 25 09:49:52 stackoverfloat Apr 25 09:50:33 I have some other Fragments which are able to use getActivity().runOnUIThread just fine... Apr 25 09:51:11 keep trying bruh, its a good feeling when you figure it out Apr 25 09:51:21 i know nothing, i dont get bigger picture of this Apr 25 09:52:13 Ashiren, check this again please Apr 25 09:52:13 http://pastebin.com/XH29LEgP Apr 25 09:52:25 where I commented, I want to change the text of a textview... Apr 25 09:52:37 the textview is in mainactivity Apr 25 09:52:42 thats it...thats all I want to do :( Apr 25 09:53:10 I see Apr 25 09:53:18 Bavilo just use a handler instead Apr 25 09:54:34 ok I'll look at handlers then Apr 25 09:55:04 so create a new Handler like: final Handler handler = new Handler(); Apr 25 09:55:11 Whats the use of the ClientActivity myActivity = new ClientActivity(); line? Apr 25 09:55:18 Then use my pastebin, but instead of post to status, post to handler Apr 25 09:55:30 like handler.post() Apr 25 09:56:05 omg! really - ClientActivity myActivity = new ClientActivity(); Apr 25 09:56:07 wtf Apr 25 09:56:40 well I guess thats wrong :D Apr 25 09:56:55 The textfield you want to change is in the ClientActivity instance? Apr 25 09:56:59 eeyup Apr 25 09:57:00 yes Apr 25 09:57:22 Then that line is not the right way to get a reference to the activity in which you want to change the textfield Apr 25 09:57:39 you are refering to some random not initalized activity instead of the activity which is visible Apr 25 09:58:08 well thats my problem then :) Apr 25 09:58:17 And its probably not a good idea to have a reference to an activity in an object you want to be running on the background Apr 25 09:58:32 But that's something you will have to worry about later Apr 25 09:58:39 how would I get the correct reference? Apr 25 09:59:05 see Apr 25 09:59:09 its basic java Apr 25 09:59:38 nothing is basic Apr 25 10:04:50 how to enable GPU tracing within android studio without rooting the hardware? Apr 25 10:04:52 Bavilo, i what is your use case here? Apr 25 10:04:57 or you can send a broadcast and register a broadcast receiver and post to it, receive the event and ......change the textview :D Apr 25 10:04:58 haha Apr 25 10:05:18 AKK9_ what do you mean? Apr 25 10:05:45 I copied gpu API libs to jnifolders and used static { System.loadLibrary("gapii");} in my code... Apr 25 10:05:52 karab44, check developer options: http://developer.android.com/tools/device.html#device-developer-options Apr 25 10:06:02 ... Apr 25 10:06:30 adq I am not sure did you understand my problem... Apr 25 10:06:34 but thanks for help Apr 25 10:06:39 i'm not sure you explained it properly then Apr 25 10:06:45 Bavilo: at a high level what are you doing? Apr 25 10:06:58 I state it clear. I need GPU monitor in Android Studio Apr 25 10:07:04 without Rooting my device Apr 25 10:07:06 you said GPU tracing Apr 25 10:07:21 well gpu monitor in AS does not require a rooted device too Apr 25 10:07:35 Bavilo: you have an activity on screen and in the background you want to connect to something, get some data, and return it to the activity? Apr 25 10:07:36 AKK9_ I am waiting for the tcp client to connect, when it did, change the textview to connected. Apr 25 10:07:54 but i don't know more karab44, maybe someone will put you in another direction Apr 25 10:08:02 this is what they say so but I added static { System.loadLibrary("gapii");} to my code and copied libraries to JNIFolders... Apr 25 10:08:10 when the socket is created, socket = new Socket(serverAddr, SERVER_PORT);, change textview. Apr 25 10:08:28 and it still says device needs to be rooted Apr 25 10:09:20 maybe it's easier to root device... :S Apr 25 10:09:26 Bavilo: so is there a constant connection? do you have a background service runnign ro something? Apr 25 10:10:35 yes constant connection, activity has an AsyncTask running which checks for incoming messages Apr 25 10:11:00 activity: http://pastebin.com/J8J323Wa Apr 25 10:11:28 so why not use an asynctask to do this also? Apr 25 10:11:34 i was going to suggest it Apr 25 10:11:34 A project which involves messing around with background threads is not something I'd start with Apr 25 10:13:34 the only thing that will solve this is a handler Apr 25 10:13:52 go to Tibet and back if you want Apr 25 10:14:09 I said it before and I'll say it again, we need change in this country Apr 25 10:14:30 Wait you're calling that method from the async task? Apr 25 10:14:40 Why not just return the data from that method? Apr 25 10:14:48 Then you can return the data to the asynctask in your activity Apr 25 10:14:57 and then let the asynctask update the textView.... Apr 25 10:15:40 If you return the data to the asynctask you can update the textView in onPostExecute method of the Asynctask Apr 25 10:15:52 No need for handlers or anything Apr 25 10:16:40 That would be better than passing a reference to the other class Apr 25 10:17:01 is there any fast arm7 emulator? This android studio starts forever... Apr 25 10:17:06 hi, when i connect usb, i want my device to show up in only one computer (the one which has the key). how can i achieve that? Apr 25 10:17:18 k well im confused now :) Apr 25 10:17:25 I think this is just too much for me :) Apr 25 10:17:31 oh well. Apr 25 10:18:04 Just gotta do the steps,; you'll get it Apr 25 10:18:18 But i think you're trying to take too big of a step right now Apr 25 10:18:20 Bavilo: try something else first. There are a few pitfalls when using background threads on Android Apr 25 10:18:49 they're all wrong bro Apr 25 10:18:55 well I didnt think it would be such a big deal to change a simple textview from some other thread :) Apr 25 10:18:57 listen to your heart, embrace the handler Apr 25 10:19:32 Bavilo, my pastebin updates a textview from another thread. But thats not the bit thats the problem, its the rest of it Apr 25 10:19:39 Rather embrace the eventbus or Service class when dealing with background stuff Apr 25 10:20:05 the thing is Apr 25 10:20:15 for instance, I have another app where I start a Thread Apr 25 10:20:21 he's sitting here and waiting for answers, if he had put in effort in one of the suggestions, it would've worked an hour ago Apr 25 10:20:22 this Thread will call a method Apr 25 10:20:39 and this method uses getActivity().runOnUiThread(new Runnable() { to update a bunch of textviews Apr 25 10:20:41 no problem.. Apr 25 10:20:43 works fine. Apr 25 10:20:55 maybe I have to mention that this is all inside a Fragment Apr 25 10:20:59 getActivity() Apr 25 10:21:04 Tha tis different to what you are doing. Apr 25 10:21:18 yea, this was all in one Fragment Apr 25 10:21:29 now I have one Activity which holds the textview Apr 25 10:21:39 and one undefined class which needs to update the textview Apr 25 10:21:52 Yep Apr 25 10:22:08 didnt think this would make thigns THIS complicated for me Apr 25 10:22:16 At a high level you can describe anything to make it sound simple Apr 25 10:22:21 Its the detail you need to work out Apr 25 10:22:23 yea Apr 25 10:22:31 well actually..... Apr 25 10:22:42 the activity I have right now,,,,will later also have to be a Fragment Apr 25 10:22:49 which will then hold the textview Apr 25 10:22:59 and TcpClient will remain an undefined class Apr 25 10:23:05 will this change anything? Apr 25 10:23:14 Depends on the solution. Apr 25 10:23:21 the simplest? Apr 25 10:23:22 :D Apr 25 10:23:32 If you implement it properly with an Asynctask for example, then no. Apr 25 10:23:47 Properly, as in passing the data back to the asynctask and letting it take care of updates. Apr 25 10:23:59 THis way you dont need to keep any references in your tcp class Apr 25 10:24:20 ok Apr 25 10:24:24 I would find an asynctask tutorial and see how you use onPostExecute Apr 25 10:24:50 Make a new tutorial app so you can mess around with it and experiment Apr 25 10:25:14 well onPostExecute just takes the returned parameter from doInBackground right? Apr 25 10:25:28 Yes, but guess what thread it runs on. Apr 25 10:25:43 UI? Apr 25 10:25:47 Yup Apr 25 10:26:02 So if you can get your datra passed back to the asynctask, its easy peasy Apr 25 10:26:44 so I could just do something like this in activity? http://pastebin.com/7XW8eia0 Apr 25 10:27:21 Been a while sionce I used Asynctask, but yeah you get it Apr 25 10:27:52 so how do I execute the task from TcpClient? Apr 25 10:27:53 And it means you dont even need to think about handlers or runnables Apr 25 10:28:28 Make that part that created the connection, or whatever, seperate so it can return when its done Apr 25 10:28:42 Thats probably what i would do Apr 25 10:28:45 not sure if this is correct...new ClientActivity.changeStatus().execute(""); Apr 25 10:29:12 it will execute the aynctask and error with the same error as before Apr 25 10:29:23 it jumps to protected void onPostExecute(String result) { Apr 25 10:29:23 and says: Only the original thread that created a view hierarchy can touch its views. Apr 25 10:30:38 dude you're lying Apr 25 10:30:50 ? Apr 25 10:31:23 Why are you creating a new activity? Apr 25 10:31:40 If you're in the activity already just create a new changeStatus and execute that Apr 25 10:32:14 but im not in the activity Apr 25 10:32:19 im in the TcpClient class Apr 25 10:32:51 Nah, you run the asynctask in the activity Apr 25 10:33:11 create it and run it there Apr 25 10:33:13 TcpClient: http://pastebin.com/TS99YCJM Apr 25 10:33:13 Activity: http://pastebin.com/HRKgxzdf Apr 25 10:35:41 why's everything static Apr 25 10:36:36 Don't think you need static there Apr 25 10:36:51 Also that is correct but your click listener is still using the old asynctask Apr 25 10:37:07 thats a different asynctask Apr 25 10:37:24 I thought you wanted to test your new asynctask? Apr 25 10:37:50 yea one sec Apr 25 10:39:25 ok new changeStatus().execute(); is placed inside my onclicklistener Apr 25 10:39:27 it works Apr 25 10:39:32 the text changes Apr 25 10:39:44 boom Apr 25 10:39:45 there you go Apr 25 10:39:47 so follow that Apr 25 10:40:47 well, so now it would be great if I could run the task from TcpClient :D Apr 25 10:44:07 Lol, forgot everything you know and just follow that Apr 25 10:44:38 You could also use OnProgressupdate Apr 25 10:45:04 So you could split up your tcclient.run(); into runPart1() and runPart2() Apr 25 10:45:23 in the asynctask in doinbackground, you can do part1, the updateprogress, then part2 Apr 25 10:56:11 How can I make an Imageview have it's gravity both in the bottom and center_horizontal? I get errors for using both as bottom||center_horizontal Apr 25 10:57:52 How do I make parallax effect viewpager of images. To be clear, each page has a background image and some content, I want parallax effect only on images and not on content Apr 25 10:58:08 Bernzel_: | not || Apr 25 11:00:16 crap.. thanks Ashiren Apr 25 11:01:54 onNestedFling or onNestedPreFling callbacks aren't triggered for NestedScrollView inside CoordinatorLayout when flinging in upward direction. However, when I fling in downward direction, they're triggered. Any known issue? Apr 25 11:04:05 Hi Apr 25 11:04:44 I am trying to set the typeface for a textView. I have placed the custom fonts in the assets/fonts folder. Apr 25 11:04:53 Then I create a type face using Typeface robotoReg = Typeface.createFromAsset(getAssets(),"fonts/RobotoItalic.ttf"); Apr 25 11:05:15 Then I set it by title.setTypeface(robotoReg); Apr 25 11:05:30 But it does not have any effect. No errors but the font does not change. Apr 25 11:06:50 Ah...I think I got it. Apr 25 11:08:12 onNestedFling or onNestedPreFling callbacks aren't triggered for NestedScrollView inside CoordinatorLayout when flinging in upward direction. However, when I fling in downward direction, they're triggered. Any known issue? Apr 25 11:08:24 Anyone with experience in custom CoordinatorLayout behaviors? Apr 25 11:08:51 There's no issue when I replace NestedScrollView with a RecyclerView. Apr 25 11:09:39 Ashiren: you don't happen to know if it's possible to have a FrameLayout stick at the bottom without using marginTop ? I got some elements inside the FrameLayout that need to be static at the bottom Apr 25 11:15:39 Bernzel_: try layout_gravity = bottom Apr 25 11:16:55 have done so already. Must be the overall structure of that Layout file that's causing the unwanted behaviour Apr 25 11:19:23 suppose i have an app with 4 productflavors, in 2 of these i want to allow certain functionality, but not in the others (adviews, specifically). How do i go about defining an include layout for the ads such that the other 2 productflavors know nothing about it? Apr 25 11:30:39 Hi all. I have a maven project with multiple modules (like fravors). Currently I use Intelij to work with the project. Is it easy to change to Android Studio and gradle? How about maven dependencies? Is it easy to migrate to AS? Apr 25 11:47:58 what would you guys expect in an Android "starter" project? Apr 25 11:48:11 ex. social logins code Apr 25 11:48:32 ex. base activity that other activities inherit from Apr 25 11:48:35 Is it considered bad practice to have multiple LinearLayouts defined in one layout activity? Apr 25 11:49:28 multiple relative layouts is bad practice Apr 25 11:50:31 there's an episode about android performance patterns where the guy says that relative layout requires 2 passes to calculate the children too Apr 25 11:51:15 stacked layouts have O(2^n) complexity Apr 25 11:51:42 this one I think https://www.youtube.com/watch?v=we6poP0kw6E Apr 25 11:52:11 Odaym: okey.. currently I nest a few FrameLayouts and LinearLayouts inside the "parent" LinearLayout since I want some elements to orientate vertically and some horizontally Apr 25 12:16:36 Anyone familiar with Charles proxy that can help me recreate the certificate on my Charles proxy? I'm on Ubuntu and I suls Apr 25 12:17:20 Anyone familiar with Charles proxy that can help me recreate the certificate on my Charles proxy? Can I just delete the ~/.charles/ca directory? Apr 25 12:18:39 Ah, answered my own question: Yes I can. Thanks Zta77! Apr 25 12:19:40 anytime! Apr 25 12:22:34 [solved] Apr 25 12:25:57 there's a very good drag sort list view implementation out there by beaurca and its no longer maintained, I'm thinking to take it and turn it into a recycler and get all the fame for keeping it alive Apr 25 12:28:33 Yes do that Apr 25 12:28:35 pls Apr 25 12:29:24 you use it too? :P Apr 25 12:29:26 i really like it Apr 25 12:29:45 I used it a while ago before there were recyclerviews Apr 25 12:29:56 but i dropped development for a long time and came back recently Apr 25 12:30:09 :o why'd you drop it? Apr 25 12:30:09 i couldnt find a good recyclverview sort library Apr 25 12:30:22 I gave up trying to learn it Apr 25 12:30:30 was struggling Apr 25 12:30:32 and now? Apr 25 12:30:36 enlightened? Apr 25 12:30:49 not really, ive just accepted the fact that i am shite, and now taking small steps Apr 25 12:30:59 we're all shit :D Apr 25 12:31:04 I have a thread that is doing some stuff and in the end I want to call a method on an activity that possibly is launched after Apr 25 12:31:06 i think i was tyring to do too much before Apr 25 12:31:19 my questions is what is the best way to solve this Apr 25 12:31:38 Im thinking on observer pattern, simple callback interface Apr 25 12:31:47 I think you should read this AKK9_ https://www.laserfiche.com/simplicity/shut-up-imposter-syndrome-i-can-too-program/ Apr 25 12:31:47 now im taking one thing at a time and accepting that i may spend hours trying to get htem right before moving on to the next small thing Apr 25 12:32:00 Odaym: Can you share a link to that lib? Apr 25 12:32:04 what would you do? Apr 25 12:32:18 Odaym, DSLV? it's decent, but it's been like 3-4 years since I wrote the code that used it Apr 25 12:32:29 I don't remember what issues I had with it Apr 25 12:32:41 its amazing Apr 25 12:32:57 and very neat, I've changed my copy of it sometimes to do things I wanted Apr 25 12:32:58 pycas: Broadcast? Apr 25 12:33:04 it should stay alive and get recycler Apr 25 12:33:09 we'll make millions i tell you Apr 25 12:33:17 astroduck, https://github.com/bauerca/drag-sort-listview Apr 25 12:33:20 doing it in recyclerview shouldn't be hard Apr 25 12:33:46 but I haven't had time to look into it much Apr 25 12:34:20 Why can't you just use ItemTouchHelper for drag and drop? Apr 25 12:34:32 not good enough to roll my own honestly Apr 25 12:34:35 astroduck, i was thinking in something simpler Apr 25 12:35:16 s/good/patient :D Apr 25 12:35:36 astroduck, I already have some broadcasts but wanted to do it in another way Apr 25 12:35:43 pycas: Broadcasts are very simple, and safe! Apr 25 12:35:56 astroduck, just because I want Apr 25 12:35:59 Odaym: thanks for the link, will read up later Apr 25 12:36:09 to know other approaches Apr 25 12:36:23 EventBus? Apr 25 12:36:42 Kinda like Broadcast but less code Apr 25 12:38:04 use rxjava and make a eventbus Apr 25 12:38:53 or you could use eventbus libraries Apr 25 12:39:20 ok nice Apr 25 12:41:15 astroduck, mostly because 3-4 years ago those didn't exist and I haven't looked at the problem since? ;) ... also a quick look makes me still want to customize it, but I probably won't have the time Apr 25 12:50:33 is there a way to build apps (not APK, but just simple console app) from android for android? Apr 25 12:51:55 good morning Apr 25 12:52:02 im using termux and gcc, I can make simple apps that can produce text output, its okay, but I cant find any way how to access sound Apr 25 12:53:33 so, I always wanted to make some animated wallpapers for my friends. can I make em' using the Android Studio software? Apr 25 12:55:14 I shall use vectors moving, rotating and with different levels of opacity on the screen Apr 25 12:55:56 any tips? Apr 25 13:09:59 there's object animator Ahiiru Apr 25 13:11:20 Odaym: really? Apr 25 13:11:46 really Apr 25 13:12:10 lies Apr 25 13:12:42 is there away to take full control of the device audio? to not to work with complex libraries but just to break normal java control over the audio device and work with the device directly? Apr 25 13:13:09 What are some common uses of SharedPreferences aside from storing preferences? Apr 25 13:13:43 If I have a ListView with 50 items and I'm scrolled to item 20, and I want to replace item 20 with a brand new object, will I get any issues? Stuttering... and such? The reason is that my objects that are in my list are immutable. Currently whenever I need to change an object, I create a brand new adapter =/ and it jumps to the top Apr 25 13:15:25 cant you remove item20 and add new item there? Apr 25 13:15:50 and then notify? Apr 25 13:19:03 AKK9_: I guess so. My structure right now is all over the place, and so I thought I screwed myself additionally by having immutable objects Apr 25 13:23:04 I dont think its a massive problem. Apr 25 13:23:16 In my allocation tracker, I am getting a lot of RectF HashMap$HashMapENtry allocations, how can I track its source? Apr 25 13:23:55 its just a case of creating a new object, adding it to the array in the the right place, then removing the exissting one you're replacing, and then calling the notifychanges method Apr 25 13:24:04 shouldnt affect the scroll Apr 25 13:24:33 you can wrap it all inside a replace() method in your adapter Apr 25 13:24:40 AKK9_: Alright. I will give it a go in a sample app maybe and see what happens. Really dug myself into a hole in my production app and now I'm scattering to find the best way to fetch objects from a background thread, and then add them to the list. Apr 25 13:24:54 Lapis1, don't think so.. Apr 25 13:26:09 Zharf: thats sad =( I want to make simple console app that can make beep.. Apr 25 13:27:42 beep? like console bell? Apr 25 13:28:17 to make a sample with sine wave and feed it to phone speaker to hear it when I launch it from a console like ./myapp Apr 25 13:28:39 it should be the simplest way to do it, but aparently noone does anything apart from through a NDK or java Apr 25 13:33:04 Lapis1, you could just write stuff to your device's audio device in /dev but you're going to run into trouble finding the right device on each phone Apr 25 13:33:22 (might work, might not) Apr 25 13:33:51 I hope it will work. I dont mind if it will work only on my phone Apr 25 13:34:53 oh. there are hunderd of devices Apr 25 13:35:21 look in /dev/snd Apr 25 13:35:31 might be something like /dev/snd/pcmsomething Apr 25 13:36:28 yeah, 20 or about that devices in ./snd Apr 25 13:37:22 if I will check them with something like dd if=/dev/uradom of=/dev/snd/pcm... it may work? (to find a correct one) Apr 25 13:40:28 you can probably find the right device by interpreting stuff from /proc/asound/ Apr 25 13:40:37 but I'm not familiar enough with alsa Apr 25 13:43:26 http://www.tldp.org/HOWTO/Alsa-sound-6.html Apr 25 13:43:40 6.3 and 6.4 seem to have some relevant info Apr 25 13:44:18 so android is using alsa? I thought its opensl (opensles) Apr 25 13:45:03 it's still alsa underneath, whatever might be on top Apr 25 13:52:06 hmm, I have a problem on my mac after I upgraded to android studio 2.0 that my emulators don't show up when I want to run the app... Apr 25 13:52:55 I've created several new ones, and I can see them in device monitor, but in the adb window where I select them when I press run Apr 25 13:55:50 Zharf: thanks! i have some libraries that can work with alsa Apr 25 13:57:14 Lapis1, problem is linking then, but if you can get it linked then it should work Apr 25 13:58:53 yeah, when I try to build a library that needs alsa (ona phone) it does not do it because cant find alsa in the system (on a phone) Apr 25 14:00:28 linker on android sucks Apr 25 14:00:33 i use buildtools 'com.android.tools.build:gradle:2.1.0-rc1' building from AS works fine, but when i run > ./gradlew assemble it cannot find the buildtools. How can i let gradle know about it? (i.e. let it know what repo to use) Apr 25 14:05:25 no seriously there's such a class Apr 25 14:05:43 also property animator Apr 25 14:05:53 so easy Apr 25 14:13:01 xorgate, that's not build tools Apr 25 14:13:31 and if you mean the plugin, you would need to add jcenter Apr 25 14:20:22 pfn ah that would make sense Apr 25 14:20:58 works, coolio Apr 25 14:21:29 other question, i have this in my build.gradle: https://gist.github.com/anonymous/d4a232926a7a9ee7a3c05d7417701e8f Is there a way to avoid the repetition in lines 6-7 and 11-12 ? Like a groovy method or something? Apr 25 14:23:03 basically what i *really* want is to flag a certain variant to have ads or not, and have it add certain sourcedirs Apr 25 14:24:29 maybe i should loop over all variants and add the dirs depending on a special flag... Apr 25 14:25:23 Make ads/no ads a flavor Apr 25 14:28:01 but flavor1 and flavor2 themselves are flavor, right? whether or not to have ads is a property of a certain flavor, not a flavor itself Apr 25 14:28:07 at least that's how it seems to me Apr 25 14:29:49 Just seems easier to do assembleFlavor1WithAds Apr 25 14:32:28 I don't gradle Apr 25 14:33:57 but then it's cluttered with assembleFlavor1WithoutAds Apr 25 14:33:59 i don't like that Apr 25 14:42:02 HI all. I have Android Studio 2.0 on my Mac. I try to run updates, i accept license agreement, the Next button is blue but looks somewhat greyed out. clicking does nothing, no feedback. Any ideas? Apr 25 14:45:09 okay that was weird, i had to click on a subfolder and accept its license agreement too, not very intuitive. no instruction to do so either Apr 25 14:45:59 how's it cluttered, it's an ad flavor Apr 25 14:57:22 hi, is it possible to control/script an activity lifecycle through adb? can I pause an activity for example? Apr 25 15:00:36 pause = start something else Apr 25 15:01:58 otherwise, no Apr 25 15:34:24 pfn, you know any common activities/intents that will only partially obscure the foreground so that onStop isn't called? Apr 25 15:51:50 What's up all. Apr 25 15:52:23 Anyone familar with Picasso? Apr 25 15:52:53 i am Apr 25 15:53:22 thebishop, not offhand Apr 25 15:53:34 If I use load.fetch() and then load.into() with the same url immidiately after, will Picasso know not to Apr 25 15:54:18 the requests will be merged into one Apr 25 15:54:54 JakeWharton: ah man nice thanks Apr 25 15:55:57 JakeWharton: One other thing, when I do fetch() there is no context of the view. But when I do into() I am doing fit() before it because I have the view at this point. Apr 25 15:56:01 Is this a problem? Apr 25 15:56:50 I was worried that it wouldn't use the cached image because it's the wrong size, or something along those lines. Apr 25 15:57:28 can I set headers on a response from a mock service with the behavior delegate? Apr 25 15:58:02 Sorry pretty specific question, I'll do some testing on it Apr 25 15:58:12 ty for the help Apr 25 16:00:38 anyone here know where the microphone drivers are located? I am looking to remove microphone capabilities without having to make any hardware modifications Apr 25 16:01:41 #android-root Apr 25 16:02:46 yea im in there as well Apr 25 16:02:53 nothing so far : / Apr 25 16:11:20 Retrofit response builders don't let me set headers on error responses? Is there another way I can do this or is there a design decision behind that I'm not considering? Apr 25 16:11:47 Just trying to build mock responses that mimic an API Apr 25 16:33:03 What’s your favorite Android dev IDE? Apr 25 16:33:13 as if there are options Apr 25 16:36:19 Android Studio I’m guessing…no longer eclipse? Apr 25 16:36:22 FoosMasta netbeans ! Apr 25 16:37:07 Yes, it’s studio. FoosMasta: Whenever you have a question like this, go to the developer site first. that’ll tell you the best answer Apr 25 16:38:43 also…is it the same answer for continuous integration? i.e. Do most people use Android Studio to do their automated builds from the command line (executing unit tests etc)? Apr 25 16:39:11 AndroidJUnitRunner I guess Apr 25 16:39:12 most mature CI solutions have support for building android Apr 25 16:39:25 I know we use Jenkins, although I couldn’t really comment as to how it’s set up Apr 25 16:41:57 hi Apr 25 16:42:09 s73v3r: What tasks does Jenkins take care of? Apr 25 16:42:10 anyone work a lot with rtsp streams? Apr 25 16:42:17 barq: building stuffs Apr 25 16:42:19 :) Apr 25 16:42:29 building and deploying Apr 25 16:42:34 I have a stream going but i need to restart it and pausing it and resuming is not working Apr 25 16:42:42 What about test automation? Apr 25 16:42:45 although deploying isn’t much. just copying to a directory Apr 25 16:42:46 in a VideoView Apr 25 16:42:49 we don’t have tests :( Apr 25 16:43:10 oh Apr 25 16:43:20 What build system do you use? Apr 25 16:44:30 Jenkins Apr 25 16:46:04 with gradle Apr 25 16:46:50 yeah, we’re not doing anything crazy there Apr 25 16:48:16 thanks Apr 25 16:51:07 Lot’s of links here on testing android apps: http://developer.android.com/training/testing/index.html Apr 25 16:51:22 Just not sure which ones folks actually use and work well. Apr 25 16:59:11 Cant use weight in RL? Apr 25 16:59:19 no Apr 25 16:59:23 How come Apr 25 16:59:29 cause it doesn’t support weight Apr 25 16:59:40 it’s a Relative layout. So you’re positioning things relative to each other Apr 25 16:59:40 What if I want to make a View half of the height Apr 25 16:59:45 Ah true Apr 25 16:59:46 then you’re using the wrong layout Apr 25 16:59:52 So I'll use a LL Apr 25 17:01:05 hi! anyone knows any good resource about SEO in android apps Apr 25 17:01:12 to follow? Apr 25 17:29:06 any thoughts on how to disable the microphone by messing with system files? Apr 25 17:29:55 nightmarefuel wrong channel Apr 25 17:43:58 #android-root Apr 25 17:55:24 hi all Apr 25 17:55:39 i not speak very well english... Apr 25 17:56:02 i have problem with android studio 2 and junit Apr 25 17:56:33 its possible link post on google plus ? Apr 25 17:57:19 you can. people link from stack overflow all the time Apr 25 17:58:28 SDK Tools 25.1.3 Apr 25 17:58:30 link google plus Apr 25 17:58:31 https://groups.google.com/forum/#!topic/android-developers/JKwkMO_nzDY Apr 25 17:58:36 g00s: Apr 25 17:58:41 google group sorrt Apr 25 17:58:43 google group sorry Apr 25 17:58:49 hey thepoosh Apr 25 18:00:45 I get an error that I do not know how to solve Apr 25 18:01:18 your stack trace says it right there Apr 25 18:01:28 read the first line Apr 25 18:02:41 s73v3r: but this method is public Apr 25 18:02:45 no it isn't Apr 25 18:03:06 i don’t see “public” anywhere near that method declaration Apr 25 18:03:19 sorry on posted code method is not pubblic but on real code yes... Apr 25 18:03:34 then you’re getting a different error Apr 25 18:03:40 'lo Apr 25 18:03:47 post the error you’re getting Apr 25 18:03:53 I was wondering how I boot up an emulated Android device in Android Studio Apr 25 18:03:55 I corrected in the post in the thread Apr 25 18:04:15 ThePendulum: use genymotion Apr 25 18:04:18 you can’t be getting the same error, then Apr 25 18:04:32 not same erro :( Apr 25 18:04:40 then post the fucking error! Apr 25 18:04:54 how do you expect us to help you if you’re not even giving us the right information Apr 25 18:05:12 orbyt_: I'm poor Apr 25 18:05:19 its free Apr 25 18:05:20 lol Apr 25 18:05:34 genymotion is only free for NON-COMMERCIAL USE Apr 25 18:05:34 oh there is a personal version hidden somewhere Apr 25 18:05:56 hes so poor he cant afford free version Apr 25 18:05:56 if you plan on selling the app, or putting ads in the app, or having the app associated with a business in any way, then you must pay for it Apr 25 18:06:05 s73v3r: somewhere under I corrected the information. the mistake has remained the same Apr 25 18:06:11 s73v3r: who's gonna find out? Apr 25 18:06:14 i did not see it in that thread Apr 25 18:06:33 Ashiren: If you can’t be bothered to respect the license of software you use, how can you expect anyone else to respect the license of your software Apr 25 18:07:09 android-dev: I don’t see it. Just paste the error you’re now getting in something like pastebin and link it here Apr 25 18:07:17 ok Apr 25 18:07:18 joke's on you. ill make my software public domain :v Apr 25 18:07:38 good for you. No exceuse for acting unethically Apr 25 18:11:22 I'm having trouble using an arrayadapter. Here's a gist of the code: https://gist.github.com/JayFialkowski/df2b227ce9530da5817a8b64377e8de1 Apr 25 18:11:31 Essentially, the arraylist is size 13 but the adapter says its size 0? Apr 25 18:12:07 when do you pass the items into the adapter? Apr 25 18:13:12 for two, why do you call notifyDataSetChanged twice in one method? don’t do that Apr 25 18:13:15 s73v3r: Do you mean when I assign values to the ArrayList or when I pass the Arraylist to the adapter? Apr 25 18:13:20 s73v3r: that was an accident Apr 25 18:13:23 jasus: in getMatchesJSON() do you do something like matches = ...? Apr 25 18:13:31 Ashiren: Yes Apr 25 18:13:45 I have a method that parses the json object and returns an arraylist Apr 25 18:13:47 then matches in activity and matches in adapter are 2 different things Apr 25 18:13:51 in your adapter, what do you do with the array that’s passed in? Apr 25 18:13:59 try matches.addAll(other arraylist) Apr 25 18:14:39 Ashiren: Perfect, thank you. I had suspected it had something to do with that. Apr 25 18:15:15 Guess the arrayadapter was pointing somewhere else after doing an = Apr 25 18:15:31 yup Apr 25 18:15:39 Thanks again, cheers. Apr 25 18:17:07 s73v3r: http://pastebin.com/CeyRGhRe Apr 25 18:17:36 that’s the same fucking thing Apr 25 18:17:46 your issue is that the method is not marked as public Apr 25 18:19:30 exact. but it's not true. I tried to clear the cache and restart but same error Apr 25 18:19:44 except it is true Apr 25 18:19:49 mark that method as public Apr 25 18:19:57 is public Apr 25 18:20:01 no, it isn't Apr 25 18:20:05 how can you tell Apr 25 18:20:15 public is nowhere near that method declaration Apr 25 18:20:33 line 24 Apr 25 18:20:35 public void addActionWithTag(String p_tag, ICommand p_iCommand) { m_commandMap.put(p_tag,p_iCommand); } Apr 25 18:20:54 android-dev: THAT’S NOT THE METHOD IT’S COMPLAINING ABOUT Apr 25 18:21:07 Your error: java.lang.Exception: Method addActionWithHandler() should be public Apr 25 18:21:29 that method is not public Apr 25 18:21:41 line 52: void addActionWithHandler() Apr 25 18:21:43 no public Apr 25 18:23:27 :(. that stupid. I lost a lot of time for something so stupid are fused!. I apologize for wasting your time and thank you very much:) Apr 25 18:27:26 nyoro~n Apr 25 18:28:38 s73v3r: thank you very much Apr 25 18:34:17 quit Apr 25 18:35:58 and, for the discussion to know how can detect when an app is in background i implemented the next code in mi application subclass Apr 25 18:36:01 http://pastebin.com/9UAK0eXu Apr 25 18:37:16 and make my activities inherits from an activity that register the application as a callback Apr 25 18:37:51 this solution is compatible with all the devices Apr 25 18:45:27 In MVP, is it ok to have ANY logic in the View? I just need to check if the Presenter is null in onStart Apr 25 18:48:25 orbyt_: thanks, got genymotion working :) Apr 25 18:50:00 hopefully it’s just personal use, and not for busienss Apr 25 18:50:04 business Apr 25 18:50:27 any body can answer this questions http://stackoverflow.com/questions/36848586/how-to-get-rnc-ecno-net-dist-and-bear-values Apr 25 18:50:57 i have been searching but couldn't find any proper answer. Apr 25 18:59:44 Any viewPager indicators with numbers instead of circles out there ? Apr 25 19:03:49 Anyone with experience with MVP around? Apr 25 19:04:55 lol Apr 25 19:05:34 Just wondering on how I should set something up g00s Apr 25 19:07:11 Think you could help? Apr 25 19:07:52 not likely Apr 25 19:07:56 Hm ok Apr 25 19:08:09 orbyt_: do you know MVP? Apr 25 19:08:16 Where should I put I file that I'll read just in unit testing ? Apr 25 19:08:46 a file * Apr 25 19:10:42 Is the opposite event of onCreate onDestroy? Apr 25 19:12:31 I have a String that I'm getting a "constant string too long" error. Apr 25 19:12:45 drose379, yes Apr 25 19:12:52 Got it, thanks thebishop Apr 25 19:22:08 Anyone knows if code iris can be customized to show methods and properties and constructor calls and dependency injection annotations etc? Apr 25 19:22:25 I am looking for a list population technique that I can implement in a library... So I have the code working in the main activity but not I want to move code to library... and This I am not sure how to do. Apr 25 19:22:36 hi, developing for m, R.drawable. only has some strange abc_ things and nothing that should be there (like ic_). any idea what i'm doing wrong? Apr 25 19:23:36 Hey.... Apr 25 19:23:50 When I run my app... the app is running on the emulator Apr 25 19:23:55 But I'm getting a black screen. Apr 25 19:24:04 This just started happening today with a new project. Apr 25 19:24:16 I know the app is running because I can make a toast and see it. Apr 25 19:25:22 TinFury: if u want other colors besides black you have to tell the computer otherwise it probably going to look black or sometimes white Apr 25 19:25:39 No it's a error thing.. Apr 25 19:25:45 I don't see my app at all Apr 25 19:25:50 It works most of the time. Apr 25 19:26:04 But sometimes on the emulator its just turning up black... unable to click Apr 25 19:27:29 mac is being a pain Apr 25 19:27:37 how the hell do you simply set an env variable Apr 25 19:27:49 TinFury: it must be something wrong with the computer Apr 25 19:27:58 k Apr 25 19:29:09 orbyt_ uh, the same way you do it with anything running bash ... Apr 25 19:29:15 .bash_profile ? Apr 25 19:30:24 g00s: not familiar with osx mate Apr 25 19:30:32 or bash Apr 25 19:30:36 lol Apr 25 19:30:42 "lol" Apr 25 19:31:07 How can i identify what is using lots of memory in my app? Apr 25 19:31:33 Somethign is destroying android and my app has no images Apr 25 19:31:45 how can i find the cause? Apr 25 19:34:12 Oh wait it was images Apr 25 19:41:39 I'm reading a .json in my UnitTest. I was trying to read it's content and place it into a String. But I'm getting OutOfMemorryError: Java heap space. I've tried by StringBuilder and StringBuffer. Same on both. Any help of how to deal with it ? https://gist.github.com/wviana/b670dfd7abc43b4a60285d7d2cfd47c3 Apr 25 19:43:34 This json data I got by my running app using debugger. So It's working with this size file. The only diference it that, when running the app, it gets this data by http request. Apr 25 19:43:58 your loop confuses me Apr 25 19:44:07 while (line != null){ Apr 25 19:44:08 sb.append(line); Apr 25 19:44:08 } Apr 25 19:44:13 when will that ever end? Apr 25 19:44:16 oh, shit. Apr 25 19:45:06 w4ffles_: thank u, so stupid of my part. Apr 25 19:45:19 Already fixed it. Worked like a charm Apr 25 19:47:48 w4ffles_: when hell freezes over? Apr 25 19:47:54 w4ffles_: when Dalvik runs out of memory? Apr 25 19:48:10 w4ffles_: when the user gets bored? Apr 25 19:48:14 This game is fun. Apr 25 20:23:04 Ok Apr 25 20:23:05 RequestQueue queue = VolleySingleton.getInstance(this.getApplicationContext()).getRequestQueue(); Apr 25 20:23:08 Oopps Apr 25 20:23:09 sorry Apr 25 20:23:13 http://pastebin.com/gC4BU9PD Apr 25 20:23:25 on this pastebin... line 31 Apr 25 20:23:44 I create a RequestQueue...... called queue... Apr 25 20:23:56 But queue is never used.... it's grayed out.... is that ok? Apr 25 20:24:02 I've working from this example. Apr 25 20:24:20 http://developer.android.com/training/volley/requestqueue.html Apr 25 20:29:44 zDoes anyone know what fail to install android libaray mean? Apr 25 20:29:59 only happon when i try to install it Apr 25 20:30:43 it failed :p Apr 25 20:31:16 yes on android studio 2.0 Apr 25 20:31:49 i hope someone can help Apr 25 20:32:31 does it fail on installing the sdk or what? Apr 25 20:32:35 something it fail becuase of network prob never had this prob with other android studio. Apr 25 20:32:53 if the the prob how can i fix that. Apr 25 20:33:32 no android sdk Apr 25 20:33:49 there got to be away to update it. Apr 25 20:34:48 AS gives more that a single line if an update fails Apr 25 20:34:53 usually it prints the reason Apr 25 20:35:09 unless u are talking about an sdk thing Apr 25 20:35:14 yes Apr 25 20:36:02 update it outside of AS Apr 25 20:36:08 i never had the prob before hope i don't have that prob again. Apr 25 20:36:25 danijoo,There away i can do that. Apr 25 20:37:05 i never hear of outside of android studio before. Apr 25 20:37:17 now u did Apr 25 20:37:47 oh Apr 25 20:37:59 Sorry for the newbie question. Apr 25 20:38:36 you can launch the sdk updater from outside of as Apr 25 20:38:47 should give you better error messages Apr 25 20:38:55 is that the standalone Apr 25 20:38:59 yes Apr 25 20:39:05 i see Apr 25 20:39:13 never thought of that. Apr 25 20:39:15 thanks Apr 25 21:07:29 uhm, i'm using android studio and installed ndk from within android studio (i.e., i can now see ~/Android/Sdk/ndk-bundle/), i can't seem to find where its placed samples/hello-jni. any ideas? Apr 25 21:38:48 I want to open my Android studio project on another PC that doesn't have API 23. I don't actually want to use 23, how can I remove it? Apr 25 21:40:14 I've tried setting the minimum and target API level to 22 but it still wants 23 to be installed Apr 25 21:40:31 Moult, samples aren't part of the NDK, there's a public repo on github with those. Apr 25 21:40:33 what support library are you using? Apr 25 21:41:09 Pudsey: ^ Apr 25 21:42:04 I'm not sure what you mean. I installed the API via the SDK manager Apr 25 21:42:14 post your gradle files Apr 25 21:42:34 or, conversely, just install API 23 on that other computer Apr 25 21:44:37 Mavrik: thanks, trying to piece it together now - i've got it working in C, now trying to load a C++ class. this really isn't documented that well Apr 25 21:45:09 Which grade files? The other PC I wanted to open it on is a lab PC. Can't install any new API. Apr 25 21:45:40 your gradle files Apr 25 21:46:02 Moult, ? Apr 25 21:46:15 It's the same as if you'd be working on a C++ code for desktop. Apr 25 21:47:09 Mavrik: sorry, i'm not too familiar with this. right now, the example for android + jni calls a C file. Apr 25 21:47:32 Mavrik: i'm trying to figure out how to tell android studio i want ndk to build c++ files, not c Apr 25 21:47:47 wouldn’t that be in the makefile? Apr 25 21:48:00 It determines which language it is by file extension. Apr 25 21:48:13 CPP/CXX files are compiled as C++, C/CC as C Apr 25 21:48:36 i thought cc files were c++ Apr 25 21:49:04 Mavrik: hmm, i've changed the file extension. let me clean and rebuild. Apr 25 21:49:44 s73v3r, you're right Apr 25 21:49:45 :) Apr 25 21:50:00 Okay I've pastebin the two gradle files. I've tried changing these today but I still couldn't get it to work http://pastebin.com/8LQZjppY Apr 25 21:50:04 Mavrik: i see, you're right. Apr 25 21:50:39 Pudsey: Your compileSDKVersion is 23 Apr 25 21:50:42 Mavrik: quick question then, in the C example, they use return (*env)->NewStringUTF(env, "foo"); to return a jstring. where can i find documentation to learn how to return this in c++? Apr 25 21:50:59 also, you’re using v23 of the support libraries Apr 25 21:51:32 Moult, that's JNI API, it's the same as when using C++ code on desktop Apr 25 21:51:39 so look for JNI documentation / tutorials Apr 25 21:52:08 Mavrik: thanks, i'm rather new to JNI. Apr 25 21:52:33 the best fix would be to ask the lab monitor to update to v23 of the SDK. If that’s not possible, however, then you need to change your compileSdkVersion and the versions of the support libraries down to whatever SDK version you wanted to use Apr 25 21:54:02 Moult, JNI is going to be more or less pure c. you'll have to then import the results into your C++ objects, ie turning char* into std::string, etc Apr 25 21:54:50 Moult, because c++ allows operator overloading, which causes non-standardized (and therefor non-deterministic) symbol mangling, in general any interface from C++ to "something else" is going to require C functions to broker the connections Apr 25 21:54:52 hm? Apr 25 21:55:02 JNI has a C++ API as well. Apr 25 21:55:07 (It's almost the same tho( Apr 25 21:55:24 Mavrik, How do they solve symbol mangling, or do they just provide a c++ class w/ functions that return more or less the same stuff? Apr 25 21:55:43 They don't, extern "C" :) Apr 25 21:55:49 Mavrik, Your JNI native functions still have to be in C namespace regardless Apr 25 21:55:49 yeah Apr 25 21:55:50 ok Apr 25 21:56:05 The JNI calls on jniEnv object do have C++ versions Apr 25 21:56:18 But yeah, use Djinni or something else to move you away from this insanity. Apr 25 21:56:21 so they just wrap the ptr and kind of fake a class out of it, sure Apr 25 21:57:30 It's a struct in any case. Apr 25 21:57:35 C++ version just has methods. Apr 25 21:57:44 You can see it in jni.h Apr 25 21:58:03 s73v3r where can I find the correct version number for the support libraries for API 22? Apr 25 21:58:41 Pudsey: I honestly don’t know. You might try MavenCentral Apr 25 21:58:56 or jcentral? Wherever they’re pulling the libraries from Apr 25 21:59:32 support libs are in local repo in android-sdk folder :) Apr 25 22:21:28 hi, guys i have a big issue with android studio on mac, it takes minutes till it starts, any idea why? Apr 25 22:22:24 Hi guys! How inexact alarms set by AlarmManager.setRepeating() are? I mean, if I schedule it for once for every 5 minutes, can it trigger like once in every 12-20 minutes or it's a matter of a couple of minutes of inexactness? Apr 25 22:25:44 s73v3r I've changed the gradle to use API 21 and deleted the 23 SDK but now but now when I run the app I get "Unable to locate adb within SDK". Apr 25 22:26:02 why did you delete the SDK? Apr 25 22:26:10 you probably deleted a bunch more than you should have Apr 25 22:27:29 It worked fine before I deleted the SDK but it won't be able to use it on the lab PC. Apr 25 22:27:39 yes, you would have Apr 25 22:27:55 it would have used the 21 API that you specified Apr 25 22:27:59 you didn’t have to delete a thing Apr 25 22:29:11 I'll reinstall it on my PC. What will happen in the lab do you think? will it run without the 23 sdk installed there? Apr 25 22:31:49 if you’ve told it to use SDK 21, it should be fine Apr 25 22:34:02 I'll take it down and try it. Thanks for your help! Apr 25 22:39:53 hi Apr 25 23:26:19 The "Android" button on bottom left of Android Studio has disappeared. How can i restore this ? Apr 26 00:04:09 Can anyone help me fix this error in Android Studio "resolveUri failed on bad bitmap" Apr 26 01:17:25 Why does TypeToken need to be made into an anon class? Apr 26 01:18:58 new TypeToken(){}.getType(); Apr 26 01:20:46 drose379 to capture the type Apr 26 01:21:13 Why not just new TypeToken() Apr 26 01:21:41 would just be erased like all other generics Apr 26 01:22:08 Ohh, kind of like how you do List l = new List<>(); Apr 26 01:22:17 You dont need the type in the declaration? Apr 26 01:22:42 Does that make sense jug6ernaut Apr 26 01:22:56 no, thats just syntax sugar lol Apr 26 01:23:25 So why dont you need the type in the declaration of a list Apr 26 01:24:22 Thats different, since it is specified on the declaration it doesnt need its definition. But like i said thats something different. Apr 26 01:24:41 the reason TypeToken needs to be an abstract class is because of java's type eraser Apr 26 01:25:01 basically at runtime all type information is tripped out, generics only apply at compile time. Apr 26 01:25:18 the type eraser only runs against objects Apr 26 01:25:22 So the type does not get erased if its made into an anon class Apr 26 01:25:28 yup Apr 26 01:25:37 But TypeToken is not an abstract class Apr 26 01:26:12 I guess you can still make an anon class out of a regular class Apr 26 01:26:23 TypeToken is an abstract class Apr 26 01:26:57 http://grepcode.com/file_/repository.jboss.org/nexus/content/repositories/releases/org.jbpm.jbpm3/gwt-console/1.0.0-Beta1/com/google/gson/reflect/TypeToken.java/?v=source Apr 26 01:26:59 http://google-gson.googlecode.com/svn/tags/1.1.1/docs/javadocs/com/google/gson/reflect/TypeToken.html Apr 26 01:27:12 Oh I thought in the doc it would say Abstract Class and not just Class Apr 26 01:27:13 "public abstract class TypeToken" Apr 26 01:27:23 Ah I was looking at the h1 Apr 26 01:27:30 :) Apr 26 01:27:36 My Bad, thanks btw Apr 26 01:27:57 but the key thing isnt that its abstract, but that you are defining a new class Apr 26 01:28:03 Right Apr 26 01:28:04 since its a new class the type isnt erased Apr 26 01:28:12 Basically its only purpose is to store the Type really Apr 26 01:28:14 I guess hence the name Apr 26 01:28:19 lol yup Apr 26 01:28:30 Cool, I never knew that type gets erased for objects only Apr 26 01:28:53 yeah Apr 26 01:29:11 its one of those things u dont really have to worry about until u use reflection Apr 26 01:29:30 (which gson does under the hood) Apr 26 01:30:05 Ill have to look into what reflection is Apr 26 01:30:16 Maybe itll help me understand the point of erasure Apr 26 01:30:43 the point of erasure... Apr 26 01:31:05 not 100% sure, but its not as much the point but the fact that the information simply doesnt exist at runtime Apr 26 01:31:18 probably goes back to generics not existing when java first came out(through 1.5) Apr 26 01:31:22 Well what is reflection? Apr 26 01:31:35 drose379 not sure if erase has a 'point' - we wound up with it likely because of corners cut, but it has some good qualities like making jvm language interop a bit easier Apr 26 01:31:50 reflection is a mechanism for accessing class structure information at runtime Apr 26 01:31:59 seeing classes, methods, fields, and interacting with them Apr 26 01:32:17 Ohh, so thats what the .class does Apr 26 01:32:31 .class is just a bunch of byte code Apr 26 01:32:35 .fromJson( myString, TargetType.class ) ? Apr 26 01:32:38 Is that reflection Apr 26 01:32:43 oh Apr 26 01:32:44 yup Apr 26 01:32:58 I see, awesome Apr 26 01:32:59 its basically determing the structure of your class form the *.class Apr 26 01:33:03 yeah, sweet Apr 26 01:33:09 Good stuff Apr 26 01:33:14 What does Intent do with it? Apr 26 01:33:24 new Intent( ctxt, Destination.class ) ? Apr 26 01:33:34 so Apr 26 01:33:43 u know how we never manually create activities? Apr 26 01:33:53 u will never do new MyActivity() Apr 26 01:33:54 Yes Apr 26 01:33:56 Right Apr 26 01:34:06 you are passing the class to the intent so the android system can create your class Apr 26 01:34:11 thing Apr 26 01:34:19 Destination.class.newInstance() Apr 26 01:34:33 I see Apr 26 01:34:35 Cool Apr 26 01:34:39 (though i would imagine its more complicated then that for what hte android system does) Apr 26 01:35:03 Right Apr 26 01:36:11 Is it bad that whenever I want to do a quick task on the background thread I throw it in a runnable Apr 26 01:36:18 Then post back to the callback on main Apr 26 01:37:31 idk about bad Apr 26 01:37:33 ugly Apr 26 01:37:40 but idk about bad Apr 26 01:38:12 Ok Apr 26 01:38:19 Where would you rather see the code Apr 26 01:38:21 IntentService? Apr 26 01:38:37 what kind of logic Apr 26 01:38:54 Hmm, things such as SQLite transactions Apr 26 01:40:34 i wouldnt use an intentservice for that Apr 26 01:40:42 Runnable? Apr 26 01:40:58 i hate that my answers always go back to RxJava, but it would definitely be beneficial to learn up on it now Apr 26 01:41:24 Yeah that would be a good thing to learn Apr 26 01:41:27 I wanna learn kotlin too Apr 26 01:41:35 Prob should do Rx first Apr 26 01:41:57 rx then kotlin Apr 26 01:42:13 actually the sqlite question is a bit tricky; if its important you want it done before onStop Apr 26 01:42:41 g00s: does threading matter with sqlite? I cant remember if its thread safe Apr 26 01:42:49 * jug6ernaut hasnt used sqlite in a good 3 years Apr 26 01:42:56 What do you use for local storage jug6ernaut Apr 26 01:43:36 most of the java bindings for sqlite are thread safe, yeah Apr 26 01:43:39 i havent had a need for a local db. only local/remote. Apr 26 01:43:55 to which ive used my own solution (divide.io), parse, and more recently firebase Apr 26 01:44:17 Interesting Apr 26 01:44:28 i dont think Cursors are thread safe though ... Apr 26 01:44:31 * g00s forgets Apr 26 01:44:39 So I keep hearing all the talk about using RxJava, I've just picked up Retrofit, so whats the deal with Rx Apr 26 01:44:49 Also if I keep the cursor on one thread it should be fine right g00s Apr 26 01:44:54 Is that what "thread safe" means Apr 26 01:44:59 yeah Apr 26 01:45:03 Ok Apr 26 01:45:23 Yeah I just stay on the one thread w/ the cursor Apr 26 01:45:25 * g00s still not sold on kotlin, meh Apr 26 01:45:26 thread safe means if its safe to access an object across multiple threads Apr 26 01:45:54 g00s: i think the language is pretty solid Apr 26 01:45:58 g00s: why not sold? Apr 26 01:46:17 drose379 well, i tend to be 'meh' about most things anyhow Apr 26 01:46:19 there are some things i wish they did differently(mainly checked exceptions) but i can get over that Apr 26 01:46:29 I've sort of noticed g00s :po Apr 26 01:46:30 right now they need to get the tooling better Apr 26 01:46:31 :P Apr 26 01:46:42 jug6ernaut what needs improving ? Apr 26 01:46:47 I tried to implement retrolambda in my project but it wouldnt build :( Apr 26 01:47:04 from tooling? Mainly speed and AS compatability Apr 26 01:47:09 ah k Apr 26 01:47:15 granted im sure the latter is bc im always on beta AS builds Apr 26 01:47:36 i say that because when i use it for pure java projects i havent had issues Apr 26 01:47:43 but with android its meh Apr 26 01:47:53 i wouldnt use it for anything over small projects Apr 26 01:49:33 jug6ernaut: do you use retrolambda in your java projects? Apr 26 01:49:48 yup Apr 26 01:50:06 Hm, wonder why it wouldnt build for me Apr 26 01:50:32 retrolambda is awesome Apr 26 01:50:44 Just allows you to use lambdas basically right Apr 26 01:51:11 yup Apr 26 01:51:21 it backports some other java8 language features Apr 26 01:51:27 but i wouldnt use them Apr 26 01:51:30 Is it lightweight? Apr 26 01:51:52 zero weight, it has no runtime Apr 26 01:52:09 but u need to be aware that every lambda turns into an anonymous inner class Apr 26 01:52:14 which does have a cost Apr 26 01:52:28 Well im using the lambda in place of an anon inner class anyways Apr 26 01:52:32 but most often when u use a lambda u would have used an anonymous inner class anyways Apr 26 01:52:34 So its not adding any cost really Apr 26 01:52:37 exactly Apr 26 01:53:13 Ok quick question: Apr 26 01:53:40 So I have a static method that runs something on a bg thread, then calls a callback method Apr 26 01:53:50 So I defined a one method interface for the callback Apr 26 01:54:31 Now from my view, I call the static method, and create a new anon inner class as the callback param Apr 26 01:54:37 Now what if the method is still working on the bg thread (holds a ref to my callback I passed it) and the View closes Apr 26 01:54:41 Would that cause a leak Apr 26 01:55:05 yup Apr 26 01:55:10 How can that be avoided Apr 26 01:55:28 use a method like rxjava and unsubscribe Apr 26 01:55:46 but like g00s said it gets complicated if u need the thread to keep running Apr 26 01:55:52 No I dont Apr 26 01:55:55 Maybe eventbus? Apr 26 01:55:57 Or... Apr 26 01:56:38 Actually, eventbus may be the only way Apr 26 01:56:50 i always recommend not going the eventbus route Apr 26 01:57:04 Yeah I just stripped all eventbus use from my projecet Apr 26 01:57:22 all it does is promote spegetti code Apr 26 01:57:45 Theres no way around this leak Apr 26 01:58:03 jug6ernaut google keep has some insane event bus Apr 26 01:58:19 Unless I make this a dedicated class, store an instance of the Callback as an instance varaible, when the View closes, call disconnect Apr 26 01:58:21 i think the googlers struggle as much with android as we do Apr 26 01:58:38 Would that make sense Apr 26 01:59:01 drose379: manually stop the thread and dereference it Apr 26 01:59:07 g00s: lol probably Apr 26 01:59:08 When? Apr 26 01:59:23 g00s: what event bus impl they use? Apr 26 01:59:33 jug6ernaut their own of course lol Apr 26 01:59:33 drose379: onstop, ondestroy, onpause Apr 26 01:59:42 w/e makes sense Apr 26 01:59:45 g00s: lol Apr 26 01:59:55 jug6ernaut: is that going along with storing the class as an instance variabel Apr 26 02:00:06 g00s: u see the rx library they published from the movies team> Apr 26 02:00:18 jug6ernaut only heard about it ... Apr 26 02:00:26 its meh tbh Apr 26 02:00:38 didn't really look ... yeah heard it was meh too, at best Apr 26 02:00:49 more like pfft Apr 26 02:00:54 drose379: kinda Apr 26 02:01:01 drose379: or Apr 26 02:01:07 u could just use a WeakReference Apr 26 02:01:23 but the thead will continue running, butt wont hold the reference Apr 26 02:01:28 g00s: lol Apr 26 02:01:39 Ahhh forgot about WeakReference! Apr 26 02:01:50 i mean im glad they open sourced it, i just hope ppl dont go with over rxjava just because its from google Apr 26 02:01:56 only to shoot themselves in the foot Apr 26 02:02:10 So if I dont care about the Thread just running and terminatiing by itself, weakref is fine then? Apr 26 02:02:25 yup Apr 26 02:03:06 And the way WeakReference works is.. if the View is destroyed, the Reference to it in my thread is not going to keep it from being GC'd, avoiding a leak Apr 26 02:03:10 Yeah? Apr 26 02:03:38 drose379 jug6ernaut sadly, not due for a while yet http://www.informit.com/store/android-concurrency-9780134177571 Apr 26 02:03:53 but looks interesting. that series is supposed to be more advanced Apr 26 02:04:17 wow, the play store works amazing bad in multi window Apr 26 02:04:35 g00s: i may read an android book one of these days Apr 26 02:04:41 Did what I said about WeakRef make sense though g00s Apr 26 02:04:42 but today is not that day :P Apr 26 02:04:53 i just put a DrawerLayout in my DrawerLayout ... Apr 26 02:05:05 cha cha cha Apr 26 02:05:30 jug6ernaut yeah i haven't read one lately either Apr 26 02:06:23 once i publish this app i wrote in kotlin ill move on to something else Apr 26 02:06:27 i have this swift book here, though haha Apr 26 02:06:28 really need to learn swift Apr 26 02:06:33 :D Apr 26 02:06:41 :D Apr 26 02:07:01 jug6ernaut: whats the app? Apr 26 02:07:24 drose379: little 1 off app i wrote for a friend Apr 26 02:07:35 basically stores a list of super user commands by device model Apr 26 02:07:39 Anything fun? Apr 26 02:07:40 that it can then execute Apr 26 02:07:53 "hiddenmenu" Apr 26 02:08:23 Oh interestring Apr 26 02:08:27 primis is simple, but i made it all fancy with material design, bottom sheet, pretty animations lol Apr 26 02:08:48 basically used it to learn more about proper material design, animations, and kotlin Apr 26 02:09:07 Hey, so what if I pass the View in as a param, and then store it within the method as a Weak Apr 26 02:09:18 It only holds onto the WeakRef right and not what I actually passed in? Apr 26 02:09:52 If that makes sense... Apr 26 02:10:35 Actually no I think it holds on to the param passed in through the life of the mehtod Apr 26 02:10:38 Which is fine actually Apr 26 02:10:44 Im kind of in a funny situation Apr 26 02:11:43 its more common then you think lol Apr 26 02:12:01 Funny situations? Apr 26 02:12:28 Well I can explain it Apr 26 02:12:37 I have a static util method, that now accepts this callback Apr 26 02:12:49 also accpets something else (X) Apr 26 02:12:58 I check if X meets whatever condition... Apr 26 02:13:16 If yes, call the callback immediately, if not, start a new task to check something else, giving it the callback to use Apr 26 02:13:31 So, the callback is only stored as a weak ref when is passed to the background thread Apr 26 02:13:58 That make any sense? Apr 26 02:14:31 this fixation on weak refs... Apr 26 02:14:55 drose379: might not want to use a static method, but rather something you can monitor the state of Apr 26 02:15:19 Yeah I'm planning on changing this whole setup to MVP design tomorrow so maybe I should just wait Apr 26 02:15:25 drose379 just learn some rxjava ;) Apr 26 02:15:25 monitor/control Apr 26 02:15:34 lol Apr 26 02:15:36 seriously tho Apr 26 02:15:39 RxJava Apr 26 02:15:48 I'm happy, I have my plugin automatically downloading the android sdk if you're missing stuff Apr 26 02:15:50 I know I know, I just gotta finish a project first Apr 26 02:15:57 the original goal for rxjava was that onboarding engineers at netflix wouldn't have to read JCIP Apr 26 02:16:00 its not the hammer we deserve, but it is hte hammer we need Apr 26 02:16:09 automatically download platform, tools, ndk, support and gms repos Apr 26 02:16:30 jug6ernaut that sounds like some superhero line Apr 26 02:16:35 haha Apr 26 02:16:37 :) Apr 26 02:16:42 is it ? Apr 26 02:16:43 that's batman Apr 26 02:16:44 heh Apr 26 02:16:46 lol Apr 26 02:16:48 yes lol Apr 26 02:17:09 ITS BATMAN Apr 26 02:17:22 pfn: plugin? Apr 26 02:17:30 sbt Apr 26 02:17:43 Whats it written in pfn Apr 26 02:18:06 ill pretend like i know what that is while i google it Apr 26 02:18:10 https://github.com/scala-android/sbt-android/commit/0dd43beeb93b1cc18ab51422a31270454d4f4206 Apr 26 02:18:35 Everything pfn writes is in Scala :) Apr 26 02:19:33 lol Apr 26 02:20:10 Later guys, thanks for the help Apr 26 02:20:48 scala for android? i to like to live dangerously Apr 26 02:21:10 yes g00s that also is from a movie lol Apr 26 02:22:33 plugin builds projects of all types for android, not just scala Apr 26 02:22:38 can do scala, kotlin and java trivially Apr 26 02:23:02 and why? because you can instant run with my plugin for any of those languages Apr 26 02:23:05 can't say the same of gradle Apr 26 02:25:11 all of my java android projects that build using gradle, I build with this Apr 26 02:25:19 auto gradle import Apr 26 02:26:43 I recently added auto sdk manager to the Kobalt Android plug-in, such a life saver Apr 26 02:26:50 I can build Android projects on Jenkins and Travis now Apr 26 02:29:54 yeah, I mean to do similar with the rest of the sdk Apr 26 02:30:52 Hey guys, I've been trying something for ours with no result Apr 26 02:31:13 I'm launching an activity which has setHomeButtonEnabled(true) and setDisplayHomeAsUpEnabled(true) Apr 26 02:31:33 so a back button is shown on the android.support.v7.widget.Toolbar instead of the menu icon Apr 26 02:32:01 but I couldn't make that back arrow white. the title is white but the back arrow just won't change! Apr 26 02:32:03 Any idea? Apr 26 02:33:51 Mattx using appcompat ? Apr 26 02:34:05 yep, I'm using AppCompat Apr 26 02:34:15 it causes some issues with tinting Apr 26 02:34:26 really? what's the way to go? Apr 26 02:34:40 i just left it in hopes by the time i release it will be better Apr 26 02:34:43 I'm not looking for anything fancy, just a toolbar with blue background and white text/icons Apr 26 02:35:33 Mattx this works for me app:navigationIcon="?attr/homeAsUpIndicator" Apr 26 02:35:43 its the hamburger thats the wrong tint Apr 26 02:35:54 the back arrow is shown, the problem is its color Apr 26 02:36:41 pfn: interesiting Apr 26 02:36:45 i think i'm going to fix this with minSdk=21 Apr 26 02:36:47 ill have to check it out Apr 26 02:37:39 g00s, API 21 and above accounts for only 35.4% of the devices Apr 26 02:37:59 Mattx yeah .. i just lost patience with all the appcompat bugs, don't care. just hibby project Apr 26 02:38:05 *hobby Apr 26 02:38:08 ah, ok Apr 26 02:38:28 just in case, did you get the menu icon/back arrow animation to work? Apr 26 02:38:44 when you transition from the menu icon to the back arrow I meant Apr 26 02:38:48 nah, i dont see that often any more Apr 26 02:39:12 I think I understand your frustration with android :P Apr 26 02:39:21 the nav drawer goes over the hamburger anyhow, you only see the first few degrees of spin Apr 26 02:40:17 I'm not getting any animation at all, I may be doing something wrong Apr 26 02:40:18 google drive has it, maybe books does ... thats about it Apr 26 02:40:54 it's supposed to play when you add a new activity to the stack? Apr 26 02:41:04 right? Apr 26 02:41:10 oh dunno Apr 26 02:41:49 ok, never mind, it's not important **** ENDING LOGGING AT Tue Apr 26 02:59:58 2016