**** BEGIN LOGGING AT Tue Mar 22 02:59:58 2016 Mar 22 03:01:19 s/just//g Mar 22 03:15:06 is there a java class for manipulating/comparing timestamps? Mar 22 03:16:04 i.e. a string Mar 22 03:16:27 what^ Mar 22 03:20:36 timestamps are just `long` Mar 22 03:21:15 DateFormat.parse() Mar 22 03:22:20 if you search "strtotime java" you will find some starter code Mar 22 03:22:39 probably on stackoverflow Mar 22 03:27:04 its not that I can't figure it out Mar 22 03:27:13 its that someone smarter than me probably has a better solution Mar 22 03:35:29 <|PiP|> how can i make a simple layout where a view is stuck to the bottom always (footer) and the rest of the content fills up the remainder of the view Mar 22 03:35:49 <|PiP|> im trying to use a webview and attach a "footer" for navigation Mar 22 03:39:37 PiP: with a relative layout it should be obvious how to do this. Mar 22 03:39:53 what's the issue? Mar 22 03:40:11 <|PiP|> hmm im trying with a relativeLayout Mar 22 03:40:35 <|PiP|> http://paste.ofcode.org/xHDnBZZcmfRS56cRGhB3R8 Mar 22 03:41:30 <|PiP|> the issue I'm facing w/ my code is that the WebView is sitting under the footer Mar 22 03:41:34 layout_below Mar 22 03:41:43 remove the alignparentbottom Mar 22 03:42:51 relativeLayout has a bug with alignParentBottom and makes the height of the view fill the entire screen. Mar 22 03:43:13 one solution is to give an explicit height to the LinearLayout Mar 22 03:43:28 <|PiP|> when I use layout_below, the webview takes up the entire viewport Mar 22 03:43:40 refactorial ha orly ? i thought it was just me Mar 22 03:44:51 although its so old, would have thought all bugs have been fixed by now Mar 22 03:44:52 g00s yeah, the other workaround is to use a FrameLayout and use layout_gravity and you can specify `bottom` for gravity. Mar 22 03:45:43 There are alot of lingering bugs the Android Devs don't fix :( Mar 22 03:45:51 <|PiP|> refactorial: can you show me an example Mar 22 03:45:55 I don't know why this one has been ignored. Mar 22 03:46:25 I don't recall alignParentBottom doing that Mar 22 03:46:28 PiP: android:layout_height="50dp" for your LinearLayout Mar 22 03:46:30 and I use it pretty often Mar 22 03:46:40 Guys, is there a way not to call all methods in an interface? Mar 22 03:46:49 br0mahn, not implement all? no Mar 22 03:46:57 interfaces must be fully implemented Mar 22 03:47:03 yea, just overriding some. Mar 22 03:47:05 google maps pliss -__- Mar 22 03:47:14 pfn: ok thanks Mar 22 03:47:19 maybe they fixed it in later version and PiP is using an older device I don't know. I remember that bug being there for many android versions. Mar 22 03:47:34 <|PiP|> im testing this on simulator, 6.0.1 Mar 22 03:47:37 <|PiP|> and a nexus 6p Mar 22 03:48:20 PiP let me know if setting layout_height="50dp" made it to bottom. Mar 22 03:49:19 <|PiP|> the issue isn't that it is'nt at the bottom Mar 22 03:49:29 <|PiP|> the issue is that the LinearLayout is on top of the webview Mar 22 03:49:33 <|PiP|> it covers a portion of it Mar 22 03:50:06 oh I see, add layout_above="@+id/bottom_bar" to your WebView Mar 22 03:50:22 br0mahn you could create an abstract class that implements the interface then extend that. kind of weird though. Mar 22 03:50:32 <|PiP|> ahh there we go! Mar 22 03:51:05 PiP does it still work properly if you change back layout_height="wrap_content" in LinearLayout? Mar 22 03:51:12 <|PiP|> refactorial: yes it does Mar 22 03:51:26 ok great, I guess that bug has been fixed :) Mar 22 03:51:54 <|PiP|> Okay great! thank you very much. been writing layouts only for a few days now trying to get the hang of things ! Mar 22 03:52:05 dsardari: pfn: thanks though. I found a way https://blogs.oracle.com/CoreJavaTechTips/entry/listeners_vs_adapters Mar 22 03:52:24 that isn't a way Mar 22 03:52:34 many interfaces on android don't follow that pattern Mar 22 03:52:49 <|PiP|> are there any good guides that show you common design guidelines and what to use in each scenario to achieve certain common layouts? Mar 22 03:52:57 listeners are callbacks are hard to keep neat and organized Mar 22 03:53:05 I find them extremly confusing sometimes Mar 22 03:54:06 br0mahn: The answer is yes, you can create a class not implementing all methods of an interface. Mar 22 03:54:19 br0mahn: It's called an "abstract class" and has to be marked as such. Mar 22 03:54:34 br0mahn: Such classes can't be instantiated, but only subclasssed further. Mar 22 04:03:04 |PiP|: the easiest way is to use a linear layout, set layout_weight="1" layout_height="0dp" on the "rest of the content", and leave layout_weight unset on the bottom item <|PiP|> how can i make a simple layout where a view is stuck to the bottom always (footer) and the rest of the content fills up the remainder of the view Mar 22 04:22:44 loke, not quite the intent of the question, though, I'm sure Mar 22 04:23:06 * pfn writes a macro to generate concrete classes from interfaces Mar 22 04:24:04 single[ListenerType].listenerMethod((args) => body) Mar 22 04:25:40 Whoa, I just spent 6 hours doing a major refactoring and I didn't have a single crash when I finally got my code able to run. I think I earned a beer Mar 22 04:35:13 anyone have any opinons on project structure? layer vs feature? or something else? Mar 22 04:35:51 look up android boilerplate on github Mar 22 04:36:05 its overarchitected Mar 22 04:36:26 but so far its working very nicely for this project Mar 22 04:36:33 I only used a portion of the libraries they do Mar 22 04:36:50 cool AHBottomNavigation got auto hiding behavior Mar 22 04:37:54 dsardari i'm trying something like this https://medium.com/the-engineering-team/package-by-features-not-layers-2d076df1964d Mar 22 04:38:24 this one? https://github.com/hitherejoe/Android-Boilerplate Mar 22 04:41:06 https://github.com/ribot/android-boilerplate Mar 22 04:41:12 didn't realize there was more than one Mar 22 04:41:55 with this I could develop my app with network calls Mar 22 04:42:24 then easily go back and add persistence with a database so you don't need to make unnecessary network calls Mar 22 04:42:47 the DataManager makes it really easy to hide and change the implementation Mar 22 04:45:00 looks like the ribot one is a fork of the one i linked. weird. Mar 22 04:45:37 and not vice versa? Mar 22 04:45:56 oh you're right Mar 22 04:45:59 i never noticed Mar 22 04:46:19 yeah i kind of have a mix of both. a data layer, service layer and a group of feature packages like goos linked. Mar 22 04:46:34 just trying to get an idea of what people here are doing Mar 22 04:55:28 I can't believe how much time I've spent on this app already Mar 22 04:55:34 and it barely does anything Mar 22 04:55:59 RustyShackleford lol, welcome to android Mar 22 04:56:34 if the #s are to be believed, in an alternative universe your iOS port would be 30% further ahead Mar 22 04:56:45 is that really true? Mar 22 04:56:48 Really? Mar 22 04:56:58 we're really struggling to keep up with the iOS team Mar 22 04:57:18 Most iOS teams I've worked beside end up staying pretty much side by side Mar 22 04:57:33 it could definitely just be my team Mar 22 04:57:38 Although I think they do generally have a little more time for polish Mar 22 04:58:42 3 network calls, database persistence Mar 22 04:59:06 some adapters, and the UI that android studio generated Mar 22 04:59:13 6 weeks probably Mar 22 04:59:28 2 be fair, one of those things is very much not like the others Mar 22 04:59:35 Database persistence done right takes time Mar 22 05:00:07 sqlbrite and rxjava Mar 22 05:00:10 pretty neat Mar 22 05:00:26 I need to check out sqlbrite Mar 22 05:01:03 queries return and observable and when a table is updated you recieve the new query result Mar 22 05:01:20 *an observable Mar 22 05:02:28 * pfn hasn't had a problem keeping up with ios teams Mar 22 05:02:34 receive* Mar 22 05:02:34 my latest project had android ahead of ios Mar 22 05:03:11 Yeah it's a weird argument. This tells more about each team's expertise on their respective platform than anything else. Mar 22 05:03:13 but overall, it seems harder to find good android developers vs. ios Mar 22 05:03:51 i remember reading years ago, most android devs were hobbyists Mar 22 05:03:53 java stuff has too many moving parts, probably Mar 22 05:04:09 many people got into iOS to make money from the get go Mar 22 05:05:03 well, you practically have to make money for the initial investment to be worthwhile Mar 22 05:06:13 thats the main reason I got into android hah Mar 22 05:06:28 I liked the idea of writing mobile apps Mar 22 05:06:29 I got into android because it leveraged my java expertise Mar 22 05:06:30 RustyShackleford these are the #s i was talking about https://infinum.co/the-capsized-eight/articles/android-development-is-30-percent-more-expensive-than-ios Mar 22 05:06:37 but didn't want to pay Mar 22 05:06:59 i know, everybody is going to cry foul :) Mar 22 05:07:34 * pfn shrugs Mar 22 05:07:39 random blog does not make fact Mar 22 05:07:47 some data > no data :) Mar 22 05:08:46 mobile dev shops are in unique place to see this, because its common to do contract / quote for both platforms Mar 22 05:08:54 across many projects Mar 22 05:09:10 and it just makes common sense, if you have to test on lots of devices Mar 22 05:10:19 anyhow, i'd rather do android if only to avoid apple approvals Mar 22 05:10:57 do you see many device specific bugs? Mar 22 05:11:02 and how do you solve them? Mar 22 05:11:27 here's how it goes at work: we have a defect on a galaxy s6. well we don't have one Mar 22 05:11:31 defect resolved Mar 22 05:11:55 for hardware apis, yes - but for simple stuff not really. differences are more across versions of android Mar 22 05:12:15 UI bugs Mar 22 05:12:32 my guess is that a newer version of the support library would solve these Mar 22 05:14:03 You'll make more money with a salary at a company than individually on a mobile app, that's for sure Mar 22 05:14:27 nah dude just put obnoxious ads in your free app Mar 22 05:14:42 https://twitter.com/kotlin/status/710834104657420288 Mar 22 05:14:46 first comment :D Mar 22 05:15:29 gordon_ that was the "other" section, LOL Mar 22 05:16:07 https://stackoverflow.com/research/developer-survey-2016#technology-most-popular-technologies Mar 22 05:16:21 yes I know Mar 22 05:16:25 that's why it's funny :D Mar 22 05:16:29 then after that it was "Most Popular Technologies - Other" which is like, noise :D Mar 22 05:17:07 https://twitter.com/thepracticaldev/status/707561057242447872 is it just me or does this now apply to Android too Mar 22 05:17:46 wabz: "you should use RxJS, convert the numbers to an observable sequence, and then reduce it into a result" Mar 22 05:17:48 this Mar 22 05:17:59 hah thats funny Mar 22 05:18:12 it's funny, because it's true Mar 22 05:18:12 hits too close to home Mar 22 05:18:25 I used to have a simple test to give candidates, "put the results of this webservice in a listview" Mar 22 05:18:32 rxjava is cool okay? Mar 22 05:18:51 I haven't changed the text of the test for years, but doing it has become so much more complex Mar 22 05:18:56 that was my test, sorta. They gave me a json file. Mar 22 05:19:30 wabz: how many libraries did they put in ? Mar 22 05:19:40 most people use 2 or 3 now Mar 22 05:19:52 the code ends up being concise, which is nice Mar 22 05:20:02 but I mean, for someone new to android it's a pretty daunting task Mar 22 05:20:26 * gordon_ remembers the asynctask... Mar 22 05:21:08 the last guy I hired used asynctask because he thought he wasn't allowed to use 3rd party libs Mar 22 05:21:18 he managed to make it not crash on rotation, so I hired him straight away Mar 22 05:21:50 g00s: https://stackoverflow.com/research/developer-survey-2016#education-developer-occupation if I have master degree in CS and dont data science.. who am I ? Mar 22 05:22:02 wabz: haha Mar 22 05:22:07 wabz: Good for you. I would certainly hire right away someone who can write AsyncTask code that works decently well. Mar 22 05:22:33 If that person does well with AsyncTask, imagine what they'll do with Rx... Mar 22 05:22:50 hehe Mar 22 05:22:59 CedricBeust: add two numbers Mar 22 05:23:36 That is not dead which can eternal lie, And with strange aeons even AsyncTask may die. Mar 22 05:23:54 g00s: https://stackoverflow.com/research/developer-survey-2016#technology-most-loved-dreaded-and-wanted *cough* 4th place *cough* Mar 22 05:23:59 practical developer is great Mar 22 05:24:35 gordon_ yeah, but i'm still wondering if its because Ruby : RoR :: Scala : Spark Mar 22 05:24:43 I need this shirt https://twitter.com/ThePracticalDev/status/711237584077381632 Mar 22 05:25:36 RustyShackleford: and this book https://scontent-nrt1-1.xx.fbcdn.net/hphotos-xfl1/t31.0-8/12496141_1262237010456341_3917794817531048700_o.jpg Mar 22 05:25:48 hahah. that shirt is great. Mar 22 05:26:49 gordon_ dreaded: coffeescript - i wonder why they used that in Atom Mar 22 05:27:05 right? while they have scala.js ;) Mar 22 05:27:15 lol LAMP is dreaded ... Mar 22 05:27:29 any of you guys frequent #sqlite? Mar 22 05:27:39 dsardari: just ask Mar 22 05:27:56 wonder if its the L , A, M, or P Mar 22 05:28:27 g00s: it's a synonym to S U C K Mar 22 05:28:54 gordon_: lol. read my mind. Mar 22 05:28:56 CedricBeust: hang on are you beust@? Mar 22 05:29:12 wabz: Sounds like me, yes Mar 22 05:29:18 oh. I'm rnelson@ Mar 22 05:29:29 what is @ Mar 22 05:29:52 twitter Mar 22 05:29:57 nah email :p Mar 22 05:30:09 what's email ? Mar 22 05:30:19 something for old people ;( Mar 22 05:30:29 need to google that... Mar 22 05:32:06 is it me, or apple fans clap with less excitement nowadays ? Mar 22 05:33:13 gordon_ maybe, they are getting kind of boring Mar 22 05:33:26 i mean, new ipad yey new iphone yey Mar 22 05:33:31 well iphone SE seems like good move Mar 22 05:33:42 hope it doesnt stand for Suck Edition Mar 22 05:33:54 If I want to move all my network functions into a separate class. Should I simply add a java class? Or should I make it an interface? Mar 22 05:33:56 yeah, 4" i would have gotten one if $350 came with 32GB, not $400 with 16 Mar 22 05:34:11 g00s: I'm android guy, sorry ;) Mar 22 05:34:23 i'n not a fan of anything ;) Mar 22 05:34:41 brand loyalty is for suckers Mar 22 05:34:42 I'm not fan, I just prefer open source, than closed blob Mar 22 05:35:16 I could remove google apps and stay with f-droid Mar 22 05:36:00 i dont find any google or android apps very useful Mar 22 05:36:11 really Mar 22 05:36:13 iOS does have some killer apps Mar 22 05:36:18 like ? Mar 22 05:36:23 I think those are the only ones I think are useful Mar 22 05:36:45 gmail/inbox, music, drive, maps Mar 22 05:36:50 gordon_ garage band is nice Mar 22 05:36:54 keep Mar 22 05:37:15 yeah i use gmail, thats about it. keep is a toy, OneNote is better Mar 22 05:37:16 g00s: dont know garage band Mar 22 05:37:24 its really useful Mar 22 05:37:31 its a drum machine basically Mar 22 05:37:38 oh Mar 22 05:37:42 so useful Mar 22 05:37:48 I will use it everyday Mar 22 05:37:50 ;) Mar 22 05:38:00 lol not just a drum machine :D Mar 22 05:38:29 hi Mar 22 05:38:31 anyway, I thought you will tell me something more usefull Mar 22 05:38:34 Anyone out there? Mar 22 05:38:41 so we could start open source version :P Mar 22 05:38:53 gordon_ compare the top to android to iOS apps Mar 22 05:38:57 top 10 Mar 22 05:39:09 dont know top 10 for ios Mar 22 05:39:13 so how can I compare ? Mar 22 05:39:19 oh ok, lol Mar 22 05:39:24 nm Mar 22 05:39:32 I have ipod touch at home Mar 22 05:39:40 Bcadren hello hello, is there anybody in there ... Mar 22 05:39:52 but lack of back button seems unnatural Mar 22 05:40:10 i was hoping apple would go the microsoft way with things - merge desktop and mobile OS Mar 22 05:40:15 I should drop everything and buy x200 so I can have open source laptop Mar 22 05:40:24 still think MS has the right vision there, too bad Mar 22 05:40:24 install debian and write in emacs Mar 22 05:41:32 I programmed Android in Emacs, before Android Studio Mar 22 05:41:41 But not from Debian, from Ubuntu Mar 22 05:41:49 not hardcore enough Mar 22 05:41:50 kjeldahl did too .. Mar 22 05:41:57 RMS doesnt approve Mar 22 05:42:39 Debian isn't hardcore enough...Gentoo is more hardcore Mar 22 05:43:01 gordon_ yeah and emacs, pfft .. nano Mar 22 05:43:18 it's more about being 'clean' ;) Mar 22 05:43:40 If I ever figure out easy text justification on vi or emacs I'll stop using nano Mar 22 05:43:52 http://pastebin.com/tUCHe6ZV Mar 22 05:43:54 nano it's easy - load up, go to paragraph, ^J, that's it Mar 22 05:44:12 g00s: check out ensime ;) Mar 22 05:47:22 i've been using VS Code actually , pretty nice - a little faster than atom Mar 22 05:47:33 Anyone? Please Mar 22 05:47:50 one thing these electron based editors have over emacs / vi is you can draw anything you want on the canvas, its not just a text buffer Mar 22 05:47:51 Bcadren: ask question Mar 22 05:48:18 It was in the pastebin Mar 22 05:48:24 g00s: I wish people stop making electron apps Mar 22 05:48:28 so much ram wasted Mar 22 05:48:29 I just made extra comments with it Mar 22 05:48:33 is Slack an electron app ? Mar 22 05:48:34 also - laggy Mar 22 05:48:37 yes Mar 22 05:48:49 VS Code is pretty snappy to me Mar 22 05:48:50 or maybe not, just chromium Mar 22 05:48:56 and, i have 4G of ram so ... Mar 22 05:49:02 http://pastebin.com/tUCHe6ZV Mar 22 05:49:03 I have 16 Mar 22 05:50:41 Bcadren: wait a sec Mar 22 05:51:17 one of thigns I dont like much - selecting images from camera / gallery, integrating 3rd party login like facebook Mar 22 05:51:50 Bcadren: it's activity, right ? Mar 22 05:51:57 or fragment Mar 22 05:52:54 gordon_ fair point the whole definition is the two lines before it. (Intent) Mar 22 05:53:32 is that the issue; not reaching on activity result because a single Intent isn't considered an Activity? Mar 22 05:53:52 Bcadren: what's mActivity? Mar 22 05:53:53 I'm asking, since your onActivityResult isnt called so I thought you're inside fragment Mar 22 05:54:09 which will explain why it's not called Mar 22 05:54:51 also add super.onActivityResult(..) to method Mar 22 05:55:00 final Activity mActivity = UnityPlayer.currentActivity; Mar 22 05:55:18 (It refers to the game engine running that's trying to get the video link). Mar 22 05:55:33 would also add this to intent : intent.setAction(Intent.ACTION_GET_CONTENT); Mar 22 05:57:00 so "intent.setAction(Intent.ACTION_GET_CONTENT);" between line 5 and 6 on the paste? and super.onActivityResult where? Mar 22 05:57:16 to onActivityResult Mar 22 05:58:06 So overriding super.onActivityResult instead of just onActivityResult? Mar 22 05:59:17 OH I see Mar 22 05:59:23 I googled that. Mar 22 06:00:34 you need to call base method also Mar 22 06:00:41 so need to call super Mar 22 06:02:17 I have no idea what I'm doing. I'm generally a C# Programmer and was asked to handle the Unity (C#) app communicating with Android (Java) and...yea I've never done this language before or anything. Mar 22 06:07:22 that didn't appear to change anything. Mar 22 06:08:20 Bcadren: are you using fragment or not ? Mar 22 06:08:28 because I'm lost ;) Mar 22 06:09:13 I can show full code of that section if you like (PM though) because I'm feeling paranoid lol Mar 22 06:10:18 post the whole activity here Mar 22 06:10:25 someone will help Mar 22 06:13:56 Expires in 10 minutes: http://pastebin.com/n1kEsWUg Mar 22 06:17:51 Suppose I could switch to more toast popups instead of having Unity print it... Mar 22 06:18:14 Badren: what class are those methods in? Mar 22 06:19:56 The same one? (the name shouldn't be an issue) Mar 22 06:20:19 does it extend Fragment or Activity? Mar 22 06:20:22 or none? Mar 22 06:21:54 hi! Mar 22 06:21:57 extends UnityPlayerActivity Mar 22 06:22:20 (necessary for it to use some of those Unity-specific functions, I think). Mar 22 06:24:03 dsardari do I need the second function somewhere else? (seperate class file extending plain Activity or Fragment or something)? Mar 22 06:25:24 well, if UnityPlayer.currentActivity is a reference to the activity you're calling startActivityForResult, then it should work Mar 22 06:26:04 if it's referencing a different one, then that activity will get the event Mar 22 06:26:44 http://developer.android.com/intl/es/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int, android.os.Bundle) Mar 22 06:28:44 heading to bed. gl! Mar 22 06:30:23 Night. (I was looking for the source on that function to confirm, but you're gone now.) Mar 22 06:33:59 when compiling native code, is it possible to see the ARM instructions generated from c/c++ code? can the names of the function be also indicated in the assembly code? Mar 22 06:36:41 Bcadren: sorry, I' quite busy now Mar 22 06:36:56 did you manage it to work ? Mar 22 06:37:03 I'm trying to be I'm just...stuck here lol Mar 22 06:38:19 HunterD, saywhat Mar 22 06:44:14 I think I figured out the issue. The activity that's receiving the result (Object of Class UnityPlayerActivity) does not have an onActivityResult() built-in function to override. It's not getting called because the behavior to call it doesn't exist in UnityPlayerActivity object. There needs to be a seperate Object of normal Android Activity Class to receive it. Mar 22 06:56:34 pfn: I mean something like this: http://www.cs.virginia.edu/~evans/cs216/guides/asm_disassembly1.gif but for ndk code Mar 22 07:00:38 also, is GCC the only toolchain available for compiling ndk projects? Mar 22 07:07:22 Is there a way to pass a pointer to an Activity inbetween classes? Mar 22 07:10:20 a... pointer? Mar 22 07:10:48 Sorry I'm thinking like C++ Mar 22 07:11:25 Bcadren: in java everything is passed by reference Mar 22 07:11:41 so just pass the object and it's the pointer Mar 22 07:11:54 unless you're talking about strings or collections Mar 22 07:11:56 Yea but there's no Intent.AddExtra() overload to pass an activity. Mar 22 07:12:11 you can hold a static memeber is some manager Mar 22 07:12:25 Bundles have to pointers Mar 22 07:12:42 actually Mar 22 07:12:55 its passed by value Mar 22 07:13:00 not by reference Mar 22 07:13:03 :/ Mar 22 07:13:45 http://stackoverflow.com/a/40523/1056359 Mar 22 07:13:47 oh myyy Mar 22 07:15:45 well, copy constructors for all Mar 22 07:25:09 good thing java doesnt have those.. pointers Mar 22 07:25:24 Java totally does have pointers. Mar 22 07:26:21 hey Mar 22 07:27:52 Like values-v21, do we have to create one for every API level? Mar 22 07:28:05 values-v22 and values-v23? Mar 22 07:29:11 I'm a dope. Mar 22 07:41:10 arunl: no Mar 22 07:41:18 v21 will work for v21+ Mar 22 07:41:36 until it encounter higher v Mar 22 07:43:24 Ashiren: thanks Mar 22 07:44:36 if I wanted to call the action package.classx.actionx from the action package.classy.actiony; would I use intent.setAction(package.classx.actionx); ? Mar 22 08:00:10 so, why do people hate AsyncTasks? Mar 22 08:05:20 because they suck Mar 22 08:05:27 [solved] Mar 22 08:06:12 lol Mar 22 08:06:28 insufficient explanations, solve declined! Mar 22 08:06:45 the code seems bloated at least for beginner Mar 22 08:06:57 and when you work with threading, alternative solutions are better Mar 22 08:07:20 such as? Mar 22 08:07:29 i mean that there is this article http://simonvt.net/2014/04/17/asynctask-is-bad-and-you-should-feel-bad/ Mar 22 08:07:32 not to mention most examples provide anonymous or inner AsyncTask (non-static_ which could leak Mar 22 08:08:01 i.e. using executors and handlers for callbacks Mar 22 08:08:42 http://pastebin.com/Ep4k4Bww Mar 22 08:09:09 Bcadren: logcat? Mar 22 08:09:22 also, why are you holding a reference to mActivity? Mar 22 08:09:26 what is the context here? Mar 22 08:09:39 Doing UI stuff in the onPostExecute can cause leaks, right? Mar 22 08:10:11 not this Mar 22 08:10:23 pduin: the thought, I think, is that having the wrapper die before onPostExecture causes leaks Mar 22 08:10:30 *onPostExecute Mar 22 08:10:40 being AsyncTask and having reference to Activity which dies of i.e. change orientation is bad Mar 22 08:11:07 mActivity is the activity that called the activity that's calling that intent (where we need to end back up at after everything runs). Mar 22 08:11:14 Ashiren: well, BitmapWorker example has documentation about how to avoid this with WeakReference Mar 22 08:11:37 Bcadren: wut Mar 22 08:12:13 WeakReference sounds like expert stuff Mar 22 08:12:24 by then i will be expert in executors Mar 22 08:12:59 WeakReference is a normal way to do this Mar 22 08:13:22 Ashiren: http://developer.android.com/training/displaying-bitmaps/process-bitmap.html Mar 22 08:13:28 I'm going to try something else one sec Mar 22 08:13:42 thepoosh: i know Mar 22 08:13:51 the thing is bad examples Mar 22 08:14:00 ? Mar 22 08:14:08 and first thing newbies try with backround threads is using asynctask Mar 22 08:14:20 because of implicit reference and whatnot Mar 22 08:14:42 in your earlier link there is alternative mentioned Mar 22 08:15:19 that is one of the only official example of AsyncTasks Mar 22 08:15:19 otto, which i know nothing about Mar 22 08:15:25 on the documentation Mar 22 08:15:29 Is there any kind of support for 9-slicing of vector assets/drawables? Mar 22 08:15:37 Ashiren: otto is the father of RxAndroid Mar 22 08:16:25 as i see AsyncTask - they arent "bad". just better solutions exists Mar 22 08:16:33 and more foolproof Mar 22 08:26:50 can the android experimental plugin be set to output verbose information of the gcc commands? Mar 22 08:31:20 how Mar 22 08:31:25 use startActivityForResult Mar 22 08:31:30 in static function? Mar 22 08:32:05 static? Mar 22 08:32:13 that's a instance method Mar 22 08:32:25 all you need is context Mar 22 08:32:26 I know Mar 22 08:32:42 (or love) Mar 22 08:33:14 public static void name () { blah blah blah startActivityForResult(activity, int);} ...I want it to go to the onActivityResult in the same class. Mar 22 08:33:56 it says I can't use startActivityForResult in a static function, but the function needs to be static in order to be accessed from where it needs to be accessed from. Mar 22 08:34:24 ...I really should take a break I'm deeloping the text equivalent for slurred speech out of fatique. Mar 22 08:35:30 Ashiren you mean like ClassName.startActivityForResult()? Mar 22 08:35:43 read some tutorials. you need to understand bigger picture of that Mar 22 08:36:34 "Cannot make a static reference to a non-static function." Mar 22 08:39:39 If you like to do it that way, you need to pass in an Activity reference to the static function Mar 22 08:39:49 Ashiren that's just the thing really; Unity's android package doesn't even have a library reference. All I know is what I get from error messages and it tells me it can only call Static functions from the internal game engine code...so I need a static function to wait for result that's all there is to it. Mar 22 08:40:03 You can call startActivityForResult from that Activity reference Mar 22 08:40:54 And it can't actually be the activity I want to end at (oddly enough) since the UnityActivity class doesn't get onActivityResult calls, it needs to be the same class. Mar 22 08:41:23 Hi, I wrote some helper classes to fix Volley's listeners context leak [https://dpaste.de/U9ND]. It works fine, the context doesn't leak anymore but sometimes even when the activity is open, listeners are GCed. How do you guys use volley? Mar 22 08:42:18 hello, im trying to implement new gcm registration but when i start service to register my app, service is not invoked. any help would be appreciated. http://paste.ubuntu.com/15470826/ Mar 22 08:42:36 dammit I'm getting confused. I NEEDS to be like this class instead of actually the inside Activity Mar 22 08:42:44 Hi, I work in tech support for a smartphone manufacturer who keeps changing the "settings tree" layout on almost every device and doesnt support me with those devices. So I would like to create an App, which includes all the "settings lists" in one app. I hope its clear where I want to go. Is there a way to do that by code like pseudo "get List of Settings" or "open settings and get list entries"? So that I can start that app on a Mar 22 08:42:44 device, and copy that list? Mar 22 08:44:45 I think I have to go back to what I was failing at earlier. Have one class with a static function call a different class completley Mar 22 08:45:01 I haven't looked inside a rom yet, (could make the reverse engeneering part legal through the manufacturer), would it be easy to copy and use the xml files there? Mar 22 08:50:08 is it possible to use Android Studio's debugging feature (for ndk) using a prebuilt .so (with dysm file also, and debug mode build) ? Mar 22 08:50:21 Good morning you all. Mar 22 08:50:39 * I have the sources and a built system already in place, I want to see if I can skip the build using Gradle (experimental plugin) Mar 22 08:50:48 *build system Mar 22 08:51:29 How do I tell intent.SetAction(); to access a function in another class? Mar 22 08:53:17 oh my god, this app is even worse than I though Mar 22 08:53:19 t Mar 22 08:53:44 it's looping somewhere waiting to show a notification Mar 22 08:53:58 spamming my logcat about scheduled notification Mar 22 08:55:09 now android killed it Mar 22 08:55:16 I'm working on an Android compass, but my compass is not moving smoothly. Does anyone know a good compass solution with the latest api? Or a link to a project hosted on github I can borrow some code from it? Mar 22 09:00:01 oh god... I looked at the code where it looped and it seems like it set a new alarm in alarmmanager for each iteration Mar 22 09:00:10 about the experimental plugin, can I set it to print verbose info about the gcc commands executed? Mar 22 09:00:10 I'm expecting hundreds of notifications in about 1.5h Mar 22 09:01:35 evil evil monkees Mar 22 09:04:34 are shared preferences able to deal with long strings? let's say 5 book pages for example. Mar 22 09:05:31 theoretically yes. this is just xml Mar 22 09:05:52 alright, thanks Mar 22 09:08:04 Of course since it's just XML you need to be aware that they're always loaded and saved in full Mar 22 09:08:15 With the performance implications that contains Mar 22 09:09:07 Anyone? No one? Mar 22 09:09:15 you peoplare being slow adversaries. Mar 22 09:18:43 Seriously if I want intent.SetAction() to call a function called repeater; would SetAction("class.repeater") work? Mar 22 09:20:04 Nope. Mar 22 09:20:21 setAction is just a string that's interpreted by the target. Mar 22 09:20:49 it's completely arbitrary and the target activity/service/receiver needs to check it and do something with what's in there. Mar 22 09:27:22 bcadren: we also have work to do ;) Mar 22 09:28:26 Mavrik this is the issue I'm trying to tackle (and have been for hours now); BlackBoxed Code will only call Static Functions. Static Functions do not allow startActivityForResult() without using a different context. I need to use StartActivity for result inside a staticfunction so the BlackBoxed Code can communicate with it and get a result back. Mar 22 09:28:55 What you just wrote makes no sense :/ Mar 22 09:29:02 What do static functions have to do with startActivity() ? Mar 22 09:29:03 I've been trying different convoluted solutions to get a Static Function to call StartActivityForResult() at the right context depth. Mar 22 09:29:37 I'm trying to get the content URI for a video from the Gallery...lol Mar 22 09:30:19 Using StartActivityForResult at the wrong context depth I can open the gallery, but that depth doesn't include any function to get the URI back. Mar 22 09:30:29 I can't seem to make it work at the right context depth. Mar 22 09:33:35 In theory this section should do it, but the first function there can't be static because that breaks startActivityForResult(); Mar 22 09:33:36 http://pastebin.com/24MCFuyQ Mar 22 09:34:38 (Making it static and giving it an activity context which CANNOT be modded to have the relevant (OnActivityResult) does bring up the Gallery as intended, but that's useless). Mar 22 09:36:43 so tired (in general and of this one problem for so long) Mar 22 09:44:43 this page has been removed :> Mar 22 09:45:52 Hello, I have a challenge using contentResolver to retrieve data within a cursorAdapter. This always throws DatabaseObjectNotClosedException even when I explicitly call .close() on the cursor instance after reading the data. Any suggestion on how to fix this? I need to retrieve more info from DB on click on a recyclerView item. Mar 22 09:52:42 g33kyboi: Some code would help here. Mar 22 09:59:52 holy crap... I think this app also has some receiver that causes it to start looping the notification crap when I unlock the phone Mar 22 10:00:11 I have some serious talk to do with the developer of this app Mar 22 10:02:33 why do you care? Why not just uninstall it and move on? Mar 22 10:03:17 because I want to use this Mar 22 10:03:54 but it sounds like it will be faster to just write your own Mar 22 10:04:02 possibly Mar 22 10:04:26 I just don't really want to take over the application, the UX design and such are good, it just has some serious problems Mar 22 10:05:07 ... why though Mar 22 10:07:49 but you're right, it'd be easier to redesign the logic Mar 22 10:12:19 * bcadren curses loudly. Mar 22 10:13:26 If I want the context for startActivityForResult to include the current class from a static function what's the context dot operator I need? Mar 22 10:15:53 I want this line UnityPlayer.currentActivity.startActivityForResult(intent, 210); to go to protected void onActivityResult(int requestCode, int resultCode, Intent data) { AT THIS LEVEL instead of back to the last activity (which is what Unity.currentActivity is doing); because that activity is blackboxed and I can't alter the onActivityResult there. Mar 22 10:15:58 You want to call startActivityForResult from a static function, and you like to receive the result in the class in which that static funciton is defined? Mar 22 10:16:53 I can't wrap my head around how this developer decided it'd be a good idea to commit code that causes an infinite loop of notifications being scheduled... and then publishing it... when pretty much the only logging in the app is "notification published" and "notification scheduled" and it's really easy to see that it starts looping -.- Mar 22 10:17:10 why are people so bad Mar 22 10:18:00 pduin yes. Mar 22 10:18:51 bcadren, can you pastebin some code Mar 22 10:19:02 That's not going to work Mar 22 10:19:55 pduin I get the feeling you're right I've been googling for how people have fixed the same issue and get all sorts of convoluted work arounds, but I haven't made any of them work yet. Mar 22 10:20:30 For example, only creating the class for that one specific function and overwriting OnCreate to do the functionality, while the called function is nonsense. Mar 22 10:21:12 Isn'ty there a way to catch the result in one Activity instance, and pass it on the the Activity instance you need it in? Mar 22 10:22:08 Maybe last time I attempted that I just made a crashing program. lol Mar 22 10:23:23 pduin: what are you trying to accomplish? Mar 22 10:23:59 pduin: without any additional information, it seems like you want a broadcastreceiver or an eventbus Mar 22 10:24:41 I dont want to do anything! I'm trying to help bcadren :) Mar 22 10:24:49 http://pastebin.com/etSbtG03 Mar 22 10:25:01 That's all the code. Mar 22 10:25:02 ah :) Mar 22 10:26:07 Call startActivityForResult on an videoCall instance? Mar 22 10:26:14 Sorry Mar 22 10:26:20 Internet blip Mar 22 10:27:24 pduin I think that would require calling an intent on one class from another class and last time I attempted that it didn't work. Mar 22 10:27:33 I'm not 100% sure, but I think the result delivery is done based on the task stack Mar 22 10:27:45 and not on which Context/Activity you call the method on Mar 22 10:27:49 the docs don Mar 22 10:28:01 *don't really clarify what happens under the hood, though Mar 22 10:28:53 One thing you should do is lose the thought that using a static function is going to somehow direct the flow of the onActivityResult callback Mar 22 10:29:14 what I think what happens is that, once the startActivityForResult-started activity finishes the system simply looks which activity is below it on the task stack Mar 22 10:29:17 and delivers it there Mar 22 10:29:24 ^ this Mar 22 10:31:04 And that's back to the blackbox where I can't alter the OnActivityResult, unless I had the (1) blackbox call a function in a class (2) which creates an object of a class (3) specifically just to do the pickvideo function in that class (3); that's passed down to OnActivityResult in (2); which is then given back where it's needed in (1). Mar 22 10:31:16 It seems unnecessarily complex, but if it's the only way to do it... Mar 22 10:32:14 but it seems like you have a problem with your design Mar 22 10:32:25 as activities have as seperate lifecycle Mar 22 10:32:54 the system, on finish(), will restart the activity below the finishing one, but not any others in the task Mar 22 10:33:14 *start the activity below the finishing one if necessary Mar 22 10:34:40 why can't you handle the result in the activity below it on the task stack? Mar 22 10:34:49 Because it's blackboxed. Mar 22 10:34:52 It's a game engine. Mar 22 10:35:26 I can't access how it directly interacts with the Android environment. Mar 22 10:36:46 I found someone's work around and am trying it. Mar 22 10:37:00 right, so where are you calling UnityPlayer.currentActivity.startActivityForResult(intent, 210); from? Mar 22 10:37:44 (your paste is gone) Mar 22 10:38:21 Inside Unity (Game Engine) it's making an external call to AndroidJavaObject(Class_Name).Function(variables); -> that Function in the external Java Class is called. Mar 22 10:40:48 what you could do, but this is a bit of a hack, is start your own activity, which in turn starts the activity you want to capture the result from Mar 22 10:41:16 and then passes it back to your game logic running in the unity activity in a manner of your choosing Mar 22 10:42:10 I tried that earlier, tried setting an intent to a function in a different class and it just crashed Mar 22 10:43:10 hithere Mar 22 10:44:32 This was someone else's work around and I'm trying to adapt it now Mar 22 10:44:32 http://pastebin.com/dG9UKwgd Mar 22 10:47:39 if I want to run only tests for a single build config I need to do "gradlew testFlavorBuildvariant" right? Mar 22 10:47:41 I think I get it; when the function is called, it's telling Unity to create a new one (without calling any function) and the new one onCreate...I'm not sure if it worked for them maybe it'll work? No CLUE but I'm trying anything right now. Mar 22 10:54:51 Certainly worth a shot bcadren! Mar 22 10:57:30 pduin it worked, kind of. it made the gallery popup twice and took the second one. (giving it a setting to only do it the second time shouldn't be an issue; just need to add a boolean somewhere). Mar 22 10:57:46 I have a problem with the rendering of the background in my game causing lag. I'm creating it at runtime using Bitmap.createBitmap with ARGB_8888. Any ideas? Mar 22 11:01:27 Sounds a little dirty. But hey, if it works, it works. :) Mar 22 11:06:12 pduin I think because of the blackboxing, dirty is the only way to do it Mar 22 11:21:05 Hvae you guys ever experienced your app giving ANR on a specific phone, not a model but a specific phone Mar 22 11:26:48 astroduck: yes, especially with different implementations Mar 22 11:27:30 i had an exception today when a specific Samsung device (Tab) returned an SpannableString instead of a CharSequence from TextView.getText() Mar 22 11:27:36 If anybody is having the same problem, it's because the pixelformat of the canvas needs to also be ARGB_8888 Mar 22 11:29:09 thepoosh: The device acting weird with my app belongs to a user, how should I figure out whats wrong? Weirdly, Play store doesn't show any ANR reports Mar 22 11:29:39 astroduck: yes it does Mar 22 11:29:47 under crashes > ANRs Mar 22 11:35:44 thepoosh: No, I mean I still haven't received any report in the console. Mar 22 11:35:57 do you have access to the device? Mar 22 11:36:09 astroduck: No, tne user is in some other country Mar 22 11:36:37 I've tried my app on same phone and same OS, it works fine Mar 22 11:36:44 *same model Mar 22 11:36:55 can you send him a specific build that detects crap and uploads logs? Mar 22 11:37:02 can be configured in NDK Mar 22 11:37:40 Yeah I can send them a specific build. Mar 22 11:38:32 What do I configure in it? Mar 22 11:39:26 https://github.com/SalomonBrys/ANR-WatchDog Mar 22 11:40:40 for GAv4 campaign tracking, do I strictly need to use com.google.android.gms.analytics.CampaignTrackingReceiver or can I safely extend it? or is there a better way to get the referrer for later use? Mar 22 11:41:44 GAv4 says "CampaignTrackingReceiver is not registered, not exported or is disabled." if I extend it and put the extended class in my manifest which makes me doubt that this would actually work Mar 22 11:42:21 thepoosh: Ok, I'll try it and send them a build. Thanks :) Mar 22 11:42:56 with my test broadcast it of course works because I can specify the component to my liking, but is google play services "smart enough" to do that too or does it always assume it's app.package.name/com.google.android.gms.analytics.CampaignTrackingReceiver Mar 22 12:02:15 Evening. Does anybody know if there is a preferred method to receive a callback when a new video is available on the external storage? I could do it through a FileObserver, I think, but it'd be even more convenient if I could just get a callback for a new video having arrived. Mar 22 12:06:24 Amadiro_, listen to ACTION_MEDIA_SCANNER_SCAN_FILE broadcast? Mar 22 12:08:12 Mavrik, thanks, I'll look into that. Mar 22 12:10:47 Hello, I have a challenge using contentResolver to retrieve data within a cursorAdapter. This always throws DatabaseObjectNotClosedException even when I explicitly call .close() on the cursor instance after reading the data. Any suggestion on how to fix this? I need to retrieve more info from DB on click on a recyclerView item. Please see http://pastebin.com/RJazT5y6 line 38 precisely throws this error. Mar 22 12:10:50 I'm trying to do setAction(); in an activity that starts a parent activity that's likely to get reused, so in onResume I call getAction(). but that's null. any idea why the action might get lost? Mar 22 12:16:36 same problems with extras Mar 22 12:17:33 https://youtu.be/ey3sY4VExBs Mar 22 12:17:54 as much as I hate his videos on youtube, this talk is pretty good Mar 22 12:23:08 Anyone got a good way of "stacking" a small icon image on top of a EditText field? Mar 22 12:24:43 Bernzel_, on top? just place an ImageView? Mar 22 12:30:00 ktwo: I thought there was some native method for stacking item over eachother. So just draw the imageview on top is common practice? Mar 22 12:30:31 I dont quite get what stacking means Mar 22 12:31:14 I dont see any issues with placing an ImageView on top of it, so i would just do it Mar 22 12:34:54 that's good enough for me, thanks Mar 22 12:38:42 for EditText you could use android:drawableTop="@drawable/meow" Mar 22 12:39:19 on the other hand if you want it to be like an overlay or something, that won't work Mar 22 12:41:02 anyone knows how to find what's changing the color of the status bar.. ? pretty big project and somwhere it's being changed Mar 22 12:41:47 setStatusBarColor? Mar 22 12:41:47 setStatusBarColor Mar 22 12:41:51 :s Mar 22 12:41:52 :p Mar 22 12:42:07 there's also the theme option Mar 22 12:42:34 colorPrimaryDark I think is the one there Mar 22 12:42:37 I don't know why but it keeps showing black and i'm setting it to green in the styles Mar 22 12:43:36 it was working fine before so i must have changed something but i can't find it Mar 22 12:48:35 any idea Mar 22 12:48:41 ? Mar 22 12:49:12 Twirl: are you overriding your android:theme anywhere? like a ThemeOverlay? Mar 22 12:49:37 Napalm: i don't think so Mar 22 13:01:25 anyone knows what to look for on ANR logs? Mar 22 13:08:49 Raoul11: do you have access to the device? Mar 22 13:09:03 its a report generated by a user Mar 22 13:09:15 looking at it via developer console Mar 22 13:09:18 you need the stacks dump Mar 22 13:09:20 and its long as f Mar 22 13:09:28 check what is holding up your meain thread Mar 22 13:09:34 main thread Mar 22 13:10:06 trying to Mar 22 13:11:53 Raoul11: if you look at this image: http://imgur.com/Weenq0L Mar 22 13:12:06 you can see that the main thread is stuck because of an SQL connection Mar 22 13:12:12 this is what you're looking for Mar 22 13:12:25 k Mar 22 13:12:25 checking Mar 22 13:14:25 found about 4 spots for timedwaiting Mar 22 13:20:47 keep an eye open for skipped frames while developing :> Mar 22 13:27:49 Zharf, are you still here ? Mar 22 13:28:22 I'm always here Mar 22 13:29:12 if you do not mind - I have completed my question - yesterday was not my lucky day - I have destroyed my example by wrong push with git Mar 22 13:29:27 Zharf, I have changed ActionBar to android.support.v7.widget.Toolbar accordingly to http://developer.android.com/training/appbar/setting-up.html#add-toolbar result is here https://github.com/sonavolob/ABIconTest/tree/440f981b96d4079f6c95599f35d6f519339ac569. Mar 22 13:29:40 here are some screenshots Mar 22 13:29:41 ActionBar-device-480x768x320dpi-API18 http://snag.gy/55VVZ.jpg vs Toolbar-device-480x768x320dpi-API18 http://snag.gy/8hw7o.jpg Mar 22 13:29:47 ActionBar-device-480x768x160dpi-API21 http://snag.gy/s59kE.jpg vs Toolbar-device-480x768x160dpi-API21 http://snag.gy/s62xx.jpg Mar 22 13:30:59 That change brought new until now non-existing problems: Mar 22 13:31:30 1) API < 21 with a Toolbar - is hidden behind layout (moving android.support.v7.widget.a Toolbar at the end of the layout brings a Toolbar to the front, but it brings another problem 2. - even if training says "Position the a Toolbar at the top of the activity's layout, since you are using it as an app bar.") Mar 22 13:31:30 2) a Toolbar is in front on API <> 21, but all other parts of layout starts on top of the layout (behind a Toolbar) Mar 22 13:32:44 I was trying to find solution (all of them seems to be workarounds but not fully working ones - I am unable to achieve former functionality as with ActionBar: Mar 22 13:32:59 wrap android.support.v7.widget.a Toolbar in Linear or Relative layout Mar 22 13:32:59 later I have found that it might by possible to use android.support.v4.widget.DrawerLayout as a wrapper http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html - but some says that it is not suitable for more than 2 childrens (design where I am going to use a Toolbar has more than 2 childrens) Mar 22 13:33:28 How can I overcome z-order problem with a Toolbar on API < 21 and ordering of layers (other layers must start at the bottom edge of a Toolbar)? Mar 22 13:34:52 bolovanos, are you using coordinatorlayout as root view? Mar 22 13:36:11 bolovanos, nvm i saw the layout file Mar 22 13:36:13 Is the Context object a singleton, in general? I have a BroadcastReceiver that is called upon device boot, and it needs to have access to the Context to initialize other libraries et cetera (which expect to be passed a Context object.) At this point in time, the main Activity may not even exist, however. Mar 22 13:36:24 bolovanos, im not sure but I think the problem is your elevation Mar 22 13:36:49 elevation isn't supported on earlier API levels Mar 22 13:36:53 you need a different solution Mar 22 13:36:53 on android > 21 the recyclerview will take the 4dp toolbar elevation into account and therfor position the toolbar above Mar 22 13:37:04 danijoo, ad coord... never heard of it -at least will look at that Mar 22 13:37:04 he's not even using recyclerview :E Mar 22 13:37:09 on pre 21 this is not the case so it will print it in the order it sdefined in the file Mar 22 13:37:47 bolovanos, try to replace android:evelvation with app:elevation Mar 22 13:38:09 elevation wont be drawn pre 21 but this might make sure the system handles at least the positioning properly Mar 22 13:39:34 you're using app:elevation with the FAB which seems to work on the screenshots Mar 22 13:39:52 always use app namespace for appcompat stuff Mar 22 13:39:59 danijoo, replacing it does not do the trick either - furthermore it hides Toolbar in API 21+ Mar 22 13:40:29 oh, nevermind, the FAB is on the top of the layout anyway Mar 22 13:40:33 bolovanos, it works :) if its hidden on both now that means you get consistent behaviour across versions Mar 22 13:40:48 now you can move the toolbar at the bottom of the layout file and it will appear on all versions Mar 22 13:41:09 danijoo: are you talking about bottom navigation? Mar 22 13:41:15 because if so i hate you Mar 22 13:41:18 no Mar 22 13:41:22 layout file z order Mar 22 13:41:25 thepoosh, no. Im talking about drawing order in layout files Mar 22 13:41:29 oh Mar 22 13:41:32 I was thinking of having API qualifier for newer API 21+ and leaving old ActionBar as it is for API < 21 - but it does make a sance when Toolbar is part of appcompat Mar 22 13:41:33 well, I like you again Mar 22 13:41:52 bolovanos, your list content will end up under the toolbar though Mar 22 13:41:57 thepoosh, http://e.lvme.me/ert0bvl.jpg Mar 22 13:42:07 lolz Mar 22 13:42:18 damn.. who replaces hate with ideas in there :( Mar 22 13:43:17 danijoo: it's ok, I sent this to my jewish mother last night Mar 22 13:43:17 http://cdn.meme.am/instances/500x/32996509.jpg Mar 22 13:43:35 : D Mar 22 13:43:37 danijoo, ad namespace solution and latter moving of android.support.v7.widget.Toolbar to the layouts bottom - yes, but appearance is not caused by changing namespace - it works without propper namespace - moving is simply enough... Mar 22 13:44:03 ok Mar 22 13:44:44 which I have wrote here "1) API < 21 with a Toolbar - is hidden behind layout (moving android.support.v7.widget.a Toolbar at the end of the layout brings a Toolbar to the front, but it brings another problem 2. - even if training says "Position the a Toolbar at the top of the activity's layout, since you are using it as an app bar.")" Mar 22 13:45:30 I'm having really hard time understanding your sentences for some reason Mar 22 13:45:59 sry - my english is not as good is it should be Mar 22 13:46:18 ask me I will try to clarify the part you do not understand Mar 22 13:46:19 what is problem 2 Mar 22 13:46:36 look at those screenshots Mar 22 13:46:50 for example Mar 22 13:47:02 right, behind the toolbar, yes Mar 22 13:47:47 I would like to have it at the bottom of the toolbar as it was with ActionBar Mar 22 13:47:48 do you want to move the toolbar off the screen when scrolling? Mar 22 13:47:54 no Mar 22 13:48:04 ActionBar-device-480x768x160dpi-API21 http://snag.gy/s59kE.jpg vs Toolbar-device-480x768x160dpi-API21 http://snag.gy/s62xx.jp Mar 22 13:48:53 then just put android:layout_below="@id/my_toolbar" on the ListView Mar 22 13:49:31 (also dump listviews, use recyclerview :p) Mar 22 13:50:35 below cannot be used - because of solution used for 1 - moving android.support.v7.widget.Toolbar at the end of the layout Mar 22 13:50:49 you don't need to move it when using below Mar 22 13:50:51 otherwise it says "Error:(21, 31) No resource found that matches the given name (at 'layout_below' with value '@id/my_toolbar')." Mar 22 13:50:56 ok Mar 22 13:51:00 give me a second Mar 22 13:52:31 Zharf, I am seeing light at the end of the tunnel - it worked on example, I will test it on my app Mar 22 13:52:38 rbb Mar 22 13:53:17 Sounds like you're trying to place two views linearly in a vertical orientation.. There's probably something better than RelativeLayout for that Mar 22 13:53:36 he has a FAB on top of everything on there though Mar 22 13:53:44 I think relativelayout will work just fine Mar 22 13:54:14 aalthough a coordinatorlayout might be better but I haven't really used it much for anything myself so I'm not sure Mar 22 13:56:17 Not entirely sure a RelativeLayout is better than a FrameLayout and a LinearLayout for that Mar 22 13:57:32 fair enough Mar 22 13:57:36 gotta go Mar 22 13:58:12 People just tend to try and use RelativeLayout for everything.. For some misguided reason Mar 22 13:59:28 SimonVT because Google say in it's guides Mar 22 13:59:40 "NESTING LAYOUTS IS TERRIBLE DON'T EVER DO IT! EVER!" Mar 22 13:59:57 instead of "nesting is ok, overnesting is not ok" Mar 22 14:01:19 casadogg: unless you use merge and include Mar 22 14:03:14 its not as simple but the fanciest approach would be to use a coordinatorlayout + recyclerview for scrolling effects here Mar 22 14:03:32 thepoosh then? Mar 22 14:04:19 then what? Mar 22 14:04:34 if you use merge and include, the depth of the layout is decreased Mar 22 14:05:37 hey guys i'm using a toolbar that has a menu with a custom actionlayout in it. I can't set a title via the setTitle method. how can i achieve this? Mar 22 14:06:15 MartialLaw: wut Mar 22 14:07:04 nvrmind ig ot it Mar 22 14:07:16 MartialLaw, add a TextView to your toolbar is the easiest way Mar 22 14:14:37 it was the way i had my actionlayout aligned Mar 22 14:25:32 Hey guys, quick question. Does it make sense to have ScrollView as a parent view for all of my fragments? I'm running into an issue where I wanted to create a listfragment whose ancestor is a scrollview, but I'm now realizing that this is frowned upon inside the android community Mar 22 14:26:11 hm, why not the other way around? Mar 22 14:26:21 Im trying to figure out how to use RetroFit Mar 22 14:26:26 Anyone familiar? Mar 22 14:26:36 if you have content which should scroll, have a scrollview or something using scrollview to scroll the content Mar 22 14:26:44 *inside the fragment Mar 22 14:27:50 you're right Maurits-, for some reason I came up with this absolute thought in my head that scrollview should be the parent of EVERYTHING, in order to fit things inside the screen always Mar 22 14:28:53 So all calls to the API go in an interface? Mar 22 14:30:11 wait Maurits-, how do I know when I have too much content to fit most screens? Mar 22 14:33:15 IggyGee: usually you have some descendant that takes care of that for you Mar 22 14:34:23 Would people here say the using Retrofit is the "right" way to communicate with rest API Mar 22 14:34:48 me Mar 22 14:34:55 I mean yes Mar 22 14:35:03 IggyGee: ie, if you present a list of concent you would have a RecyclerView or a ListView Mar 22 14:35:06 *content Mar 22 14:35:16 JakeWharton, I am trying to move my app from using ResultReceiver to Retrofit, but not really sure where to begin Mar 22 14:35:42 Any reccomendations? Mar 22 14:36:01 I don't know what ResultReceiver is, but I would begin looking at Retrofits sample folder Mar 22 14:36:12 And the website Mar 22 14:36:14 IggyGee: and in general, if you have content which should be positioned statically you can see how your layout looks on a variety of screen sizes Mar 22 14:36:16 JakeWharton, http://developer.android.com/intl/pt-br/reference/android/os/ResultReceiver.html Mar 22 14:36:39 IggyGee: and maybe write seperate versions for very big or very small screens Mar 22 14:36:42 Maurits-: what I meant was like if I have like 10 big images on a LinearLayout and it all fits inside my phone's screen, but I'm not sure if it would fit on a phone with a smaller screen. Mar 22 14:36:48 JakeWharton: you're famous today, saw your talk about immutable classes Mar 22 14:37:22 IggyGee: the layout designer will allow you to preview on a variety of screen sizes Mar 22 14:37:27 you can also use the emulator for that Mar 22 14:37:51 Maurits-: so I have to manually check myself. Got it. Thanks :) Mar 22 14:37:58 IggyGee: and of course having a scrolling layout is also a degraded user experience that you mostly want to avoid Mar 22 14:38:16 (in such a case) Mar 22 14:38:21 Oh really? Mar 22 14:38:33 IggyGee: well yeah, it depends on what you're showing of course Mar 22 14:38:53 but if you unnecessarily hide some of the information that would otherwise fit with an adjusted layout Mar 22 14:39:46 Interesting, that's the first time I heard that. I guess that fits within the common sense of UI and making things easily accessible Mar 22 14:42:19 JakeWharton: I greatly admire you, I just saw your talk about AutoValues on YouTube this morning, it was great. It inspired me to attend future NY Android Developers meetup. Just wanted to say hi. Mar 22 14:43:34 autovalue 1.2 finally leaves snapshot -_- Mar 22 14:47:00 IggyGee: the last thing you could do is restrict your app to certain screen size classes, if you care more about the user experience than about app availiability Mar 22 14:47:47 That's true. But I'll go with your suggestion to remove the scrollview as the parent, and only use it when I need to. Mar 22 14:49:41 can I test android apps on android x86 Mar 22 14:49:48 the ones I build Mar 22 14:50:07 Btw, since this topic has kinda been mentioned. Is ScribeJava an alternative to Retrofit? Mar 22 14:50:28 because, I don't have a device Mar 22 14:50:39 stuck in the emulator :( Mar 22 14:51:23 guideX: use the x86 emulator in conjunction with HAXM Mar 22 14:51:35 guideX: still not great, but perfectly workable Mar 22 14:51:50 oh hrm Mar 22 14:52:19 Maurits-: sorry for my confusion, so use android x86 with haxm or use the android emulator with haxm Mar 22 14:52:33 the one near my android studio Mar 22 14:52:39 android emulator emulating x86 Mar 22 14:52:42 rather than ARM Mar 22 14:52:56 and then installing HAXM and enabling it in its settings Mar 22 14:53:01 guideX, or genymotion Mar 22 14:53:18 ah ok hrm Mar 22 14:53:23 what about the cheap devices route Mar 22 14:53:34 I have money, I just don't wanna spend much of it on an android device Mar 22 14:53:50 how low can I go, any recommendations for android test devices? Mar 22 14:54:22 nexus devices Mar 22 14:55:12 I also have the option of: stealing my wifes s4 mini, however, I would have to swap sims, not sure how well that'd work Mar 22 14:55:20 I have a /menu/log_in_menu.xml that is displayed in my actionbar , but it's positioned all the way to the right and I want it centered and increased in size as well. Is this properties I'll set in the attribute it self or in the layout file it's used in? Mar 22 14:56:00 Hello! For example i have applications with service which is alive most time. After application update my app process will die until user open it manualy? Mar 22 14:56:12 not sure A) how well the s4 mini would work for my testing and B) how well the sim would go from the lumia 1520, to the s4 mini, and back Mar 22 14:56:24 any hints on what should be done would be helpful Mar 22 14:57:51 guideX, I do not know what is the right way, but I have devices with API 19 and API 16, and for other API versions I am using emulators Mar 22 14:58:19 ah ok Mar 22 14:58:20 in my case - I am debugging on emulators, and than i am testing it on real device Mar 22 14:58:43 I seem unable to use the emulator, it's unbelievably slow for me, and slows down the whole computer Mar 22 14:58:55 I mean, its gotten me this far, but I need a device lol Mar 22 14:58:57 it is bit faster, one of those device is not mine, but for testing purposes - it is ok to have it for few minutes Mar 22 14:59:17 Could someone comment on the use cases of ScribeJava and Retrofit? Are they interchangeable? Because I'm currently using ScribeJava for my api requests and it works just fine. Mar 22 14:59:26 one problem is, my mouse isn't working for dragging in the emulator, so I can't adjust some settings and things likke that Mar 22 14:59:50 guideX, ad emulator - unless you have hw with virtualization it wont be fast Mar 22 15:00:48 guideX, install HAXM Mar 22 15:00:51 (windows) Mar 22 15:01:12 IggyGee: they don't look at all related from their GitHub descriptions: an OAuth thing and an HTTP abstraction Mar 22 15:01:13 danijoo: haxm eh, ok I'll check it out Mar 22 15:01:28 I also have the option of using my asus eee slate tablet pc as a test device running android x86 if it'll help Mar 22 15:01:46 guideX, http://developer.android.com/intl/pt-br/tools/devices/emulator.html Mar 22 15:01:52 the new emulator is faster than real devices for me Mar 22 15:01:56 because of fast adb speed Mar 22 15:02:00 unless you have Mar 22 15:02:01 Intel Virtualization Technology (VT, VT-x, vmx) extensions Mar 22 15:02:01 AMD Virtualization (AMD-V, SVM) extensions (only supported for Linux) Mar 22 15:02:03 ah ok Mar 22 15:02:44 Bernzel_: The action bar displays menu items to the right, you can't control that in any way Mar 22 15:03:17 you wont be able to install HAXM which means you will have slow emulation Mar 22 15:03:34 JakeWharton: Isn't Retrofit a specialized http abstraction for REST apis? That's what I understood when I compared Retrofit to Okhttp. Mar 22 15:05:19 Hello! For example i have applications with service which is alive most time. After application update my app process will die until user open it manualy? Mar 22 15:05:45 SimonVT: really? So there's no way of displaying items centered in the top bar ? Mar 22 15:06:00 xgearx, an update shuts down the whole app process before the update Mar 22 15:06:20 and after update? Mar 22 15:06:23 your service wont run until its started again (via launch, broadcast receiver or whatever) Mar 22 15:07:05 Bernzel_: Not with the action bar, no. Noone does that on Android Mar 22 15:07:41 Bernzel_, you can do that with toolbar but .. please dont Mar 22 15:08:06 Why not danijoo ? Mar 22 15:08:57 you should stick to the design conventions and guidelines Mar 22 15:09:20 for the same reason you wouldnt put the X to close a window in the middle on windows toolbar Mar 22 15:10:16 question is what is he about to do Mar 22 15:10:25 I would like to have an image in the middle instead of displaying a string for the current activity, displayed in the middle, not clickable or anything Mar 22 15:11:02 Like instagram has on this: http://wpuploads.appadvice.com/wp-content/uploads/2012/02/IMG_4924.jpeg Mar 22 15:11:28 Toolbar it is then ;) Mar 22 15:11:40 :) Mar 22 15:11:52 but be prepared for pain Mar 22 15:11:55 Even instagram got smarter Mar 22 15:12:14 They probably used a custom layout anyway Mar 22 15:12:36 yeah it doesnt look like a default toolbar Mar 22 15:12:47 note the round edges at the top Mar 22 15:13:27 So what will be the pain? Displaying an image at all, or positioning it in the middle? Mar 22 15:13:31 Kinda looks like iOS, actually.. Mar 22 15:13:48 oh.. Mar 22 15:14:05 Bernzel_, both is easy with toolbar Mar 22 15:14:20 that's an ios screenshot... Mar 22 15:14:51 pfn: you should start giving talks as well Mar 22 15:15:01 danijoo: hm okey. Sounded like it would make me bald Mar 22 15:15:25 I've declared " IggyGee: it's an abstraction for any HTTP call, not just REST Mar 22 15:21:13 danijoo: so do I add a ImageView inside my Toolbar ? Since Toolbar is just a ViewGroup basically? Mar 22 15:21:30 yes Mar 22 15:24:18 technically speaking Toolbar doesn't extend ViewGroup Mar 22 15:24:23 but it is one Mar 22 15:25:19 wat Mar 22 15:25:42 maybe I'm just talking about the menu button Mar 22 15:25:56 Yeeeahhh... Mar 22 15:26:13 thepoosh, someday maybe Mar 22 15:26:18 but if I recall correctly, in the view hierarchy it shows as View Mar 22 15:26:27 pfn: I'll watch that youtube link Mar 22 15:27:12 ist toolbar extending framelayout? Mar 22 15:27:39 No, just ViewGroup Mar 22 15:29:38 SimonVT: it doesn't look like this in the hierarchy viewer Mar 22 15:29:39 http://imgur.com/l1Zlph1 Mar 22 15:29:41 anyone have any experience with ssdp? Mar 22 15:30:20 What does it matter what hierarchy viewer says.. Mar 22 15:30:35 Just read the documentation Mar 22 15:32:22 I have two activities, A and B. A is singleInstance. Mar 22 15:32:39 A needs B to do some work. I’m using startActivityForResult. Mar 22 15:33:07 On pre-5.0, that fails. I immediately get an onActivityResult() callback with a result of CANCELED. ON 5.0, it works fine. Mar 22 15:33:51 I don’t see any documenation of the change, but I see people on SO complaining of the issue on 4.0. Is there something I can do on a 4.x device to make it work, or do I need to change to a different strategy? Mar 22 15:34:24 what does your intent look like? Mar 22 15:34:44 SimonVT: i stand corrected and feel quite weird about this Mar 22 15:34:45 public class Toolbar extends ViewGroup { Mar 22 15:34:46 the one I use for setResult()? Mar 22 15:35:33 I feel weird about using anything but the documentation as documentation ;/ Mar 22 15:35:50 dsardari I call setResult() with getIntent() from Activity B, having set one string extra on that intent. Mar 22 15:37:13 SimonVT: documentation (especially google documentation) is not very accurate Mar 22 15:37:25 for more, try reading the play services docs Mar 22 15:37:54 You can't extend that to this.. Mar 22 15:39:10 dubosij: setResult(RESULT_OK); or setResult(RESULT_OK, intent); Mar 22 15:39:11 It has always been properly documented what the framework classes extend: https://developer.android.com/reference/android/support/v7/widget/Toolbar.html Mar 22 15:40:06 dsardari: the latter : setResult(RESULT_OK, getIntent()) (where I’ve previously done getIntent().putExtra(…) Mar 22 15:49:16 duboisj: just tested on 4.3 and it seems to work Mar 22 15:49:54 dsardari: hmmm ... Mar 22 15:49:59 startActivityForResult works fine on all versions Mar 22 15:51:34 I have 4.4.2 as the one with a problem. Maybe I’m doing something else wrong, but on the 4.4.2 tablet I get an immediate RESULT_CANCELED, and on 5.1 the same .apk waits for my 2nd activity to complete and receives the result I expect. Mar 22 15:51:52 then activity you're launching is canceling Mar 22 15:53:00 Probably added some flags to the manifest or intent that you're not supposed to add Mar 22 15:53:39 the 2nd activity does actually display. Mar 22 15:53:44 e.g. you're recreating the activity Mar 22 15:54:27 which do you think I’m recreating, the “caller” activity or the callee? Mar 22 15:54:30 What's the best way of changing the texture of a button on click? So the user get's some response visually Mar 22 15:56:33 Bernzel_, selector Mar 22 15:56:40 thanks pfn Mar 22 16:19:30 when would one choose BottomSheetDialog over BottomSheetDialogFragment = i haven't used Dialogs in a long time Mar 22 16:20:42 and FFS, this shit is still not on d.android.com ? Mar 22 16:27:09 g00s: hey Mar 22 16:27:25 hey Napalm Mar 22 16:27:41 g00s: BottomSheetDialog the content cannot be used "in place".. where as BottomSheetDialogFragment can be used in a layout as a normal Fragment and also as a dialog Mar 22 16:28:05 so this is great for tablets where you might want a bottomsheet on mobile but a panel on the right on tablet Mar 22 16:28:50 brb Mar 22 16:28:55 k thx Napalm Mar 22 16:34:19 Napalm would a CoordinatorLayout inside another CoordinatorLayout interfere? My top level activity needs CoordinatorLayout for bottom sheet, but a fragment that gets put in there also needs one for its stuff Mar 22 16:34:52 i guess i could take the CoordinatorLayout out of the Fragments view hierarchy and just say 'this fragment needs to be in a layout with CL' but thats lame, because its not self contained Mar 22 16:41:29 g00s, I've used nested CoordinatorLayouts before, it works. Mar 22 16:42:17 Adyrhan ok great, thanks Mar 22 16:42:40 g00s, looking into using Retrofit for what we spoke about yesterday Mar 22 16:43:33 Adyrhan, yeah but my god it's awkward :P Mar 22 16:43:40 what I've seen is that, if you use a behavior lets say for nestedscrolling, the coordinatorlayout instance that is going to make it work is the first that you find on the hierarchy going up on parents. Mar 22 16:45:11 drose379 yesterday we all spoke about services and UI and queueing events, etc ... Mar 22 16:45:23 but glad retrofit is helping Mar 22 16:45:33 g00s, oh, someone reccomended I use retrofit Mar 22 16:45:57 good advice, but must have been somebody else :D Mar 22 16:46:03 Yep Mar 22 16:48:56 Does Retrofit have a bit of a learning curve? Mar 22 16:49:30 Hello guys Mar 22 16:49:55 just a bit Mar 22 16:50:14 Ok Mar 22 16:50:22 i cant imagine doing things with json without retrofit now Mar 22 16:51:20 How does android know which drawable to use for displaying an image (mdpi, hdpi, xhdpi, ...)? Is this handled by the OS or do I have to tell it explicitly? Mar 22 16:51:46 it will choose automatically Mar 22 16:52:02 drose379, no, just pick some examples, try it out and you'll get the idea :) Mar 22 16:52:16 Thanks Number5 Mar 22 16:52:31 drose379, if I can do it, so can you ;) Mar 22 16:52:38 lol Mar 22 16:52:46 Well I dont know you, so Im not sure Mar 22 16:54:50 Napalm so if i want to have a modal bottom sheet, which contents are a fragment, i need to use BottomSheetDialogFragment? i hope not, because not suddenly my Fragment isn't just a Fragment to re reused anywhere, its a BottomSheetDialogFragment :| Mar 22 16:55:34 s/not/now Mar 22 16:55:37 drose379, :) Mar 22 16:57:27 hi need to help with linear layout widget Mar 22 16:57:57 i have mapview and date picket inLinearLayout but i dont see Datepicket Mar 22 16:58:05 could you please help mi set it ? Mar 22 16:59:24 post your layout Mar 22 17:02:14 s73v3r: http://pastebin.com/WAdbjhL7 Mar 22 17:06:32 <_genuser_> anybody remember the commadn to restart adb off the top of their head? Mar 22 17:06:41 adb restart-server Mar 22 17:06:55 <_genuser_> trying to read thru the output of the adb and it's making me wish I had just put it in a bat file. Mar 22 17:06:59 <_genuser_> Ashiren: thanks. :) Mar 22 17:07:22 <_genuser_> hmm, doesn't accept it. Mar 22 17:07:32 <_genuser_> ah, kill-server Mar 22 17:07:57 <_genuser_> saves so much times vs. restarting the emulator. :) Mar 22 17:07:59 killall adb; adb Mar 22 17:08:10 <_genuser_> windows. :) Mar 22 17:09:27 Hey anyone know anything about the @Query annotation Mar 22 17:09:34 and yet your name is genuser Mar 22 17:10:02 drose379: what you need ? Mar 22 17:10:14 Call loadQuestions(@Query("tagged") String tags); Mar 22 17:10:24 Does that query item get put into the url I have above this line? Mar 22 17:10:29 Maybe I shud pase the entire thing? Mar 22 17:10:54 nngh Mar 22 17:10:57 nnnnnngh Mar 22 17:11:14 this application.. Mar 22 17:12:08 <_genuser_> Ashiren: my fileserver is linux. my desktop is windows. :) Mar 22 17:16:01 Hi all, new to android dev, I have a TableLayout with table rows that contain buttons, but It seems like the buttons in the row aren't making individual cells, Mar 22 17:16:38 Code: http://pastebin.com/z6vcBmLy Mar 22 17:16:44 drose379: yes Mar 22 17:16:44 Use a linearlayout and set weight Mar 22 17:16:55 Thanks Ashiren Mar 22 17:16:56 Don't think I can ever remember using a tablelayout? Mar 22 17:16:56 it will be ?tagged=blah Mar 22 17:17:24 Ok so allows for dynamic url Mar 22 17:17:26 Zharf, danijoo, SimonVT thank you for your help with android.support.v7.widget.Toolbar, there is one more thing. Due to hiding original ActionBar with "@style/Theme.AppCompat.Light.NoActionBar" I do not have I do not have ActionBar within in PreferenceActivity . It is not that bad when on larger display with header on one side and PreferenceFragment on other. Problem is with smaller displays where only PreferenceFragment is visible and user does Mar 22 17:17:26 not see Title of that fragment which was formally visible on ActionBar. I do not thing that ActionBar/Toolbar is needed in Settings, but some title roofing one settings category is mandatory. Are you using solution similar to http://stackoverflow.com/questions/26564400/creating-a-preference-screen-with-support-v21-toolbar (does not work for me) or something else? There is one more on my mind - separate style for settings which will be based on Mar 22 17:17:26 "Theme.AppCompat.Light.DarkActionBar". But I do not like this solution Mar 22 17:17:44 Mnkras, what are you trying to accomplish? Mar 22 17:17:47 NoirAvlaa should I use something different than a table layout? Mar 22 17:18:14 basically I have a grid, and I need 1 element in each cell Mar 22 17:18:21 and I need to be able to have empty cells Mar 22 17:18:49 Can you draw it out roughly real quick? :) Mar 22 17:19:07 sure, suggestion on where to do that? Mar 22 17:19:10 mspaint Mar 22 17:19:15 :p Mar 22 17:19:25 http://snag.gy/ for paste image Mar 22 17:19:28 Hi. I want to use the fluent-hc API of apache http components. However it seems that android has has httpcomponents.httpclient by default, which conflicts with the one that fluent-hc uses... So I get exceptions at runtime that classes do not exist. Mar 22 17:19:31 <_genuser_> you're going to send hm to #mspaint, aren't ya? Mar 22 17:19:37 hahaha Mar 22 17:19:46 NoirAvlaa thanks for that ;) Mar 22 17:20:12 <_genuser_> I mean what is a dev withotu graphical skills. he's just increasing your resume value... Mar 22 17:20:33 haha, just so I can actually see what he's trying to accomplish :P Mar 22 17:20:43 httpClient is deprecated and removed from android 6 Mar 22 17:20:55 Because so far I'd just make a listview/recyclerview and stick a linearlayout in the holder Mar 22 17:21:08 With a button on 1 side, edittext on the other Mar 22 17:21:13 NoirAvlaa http://imgur.com/Cax6zMB Mar 22 17:21:20 for i Wow retrofit is bad ass and I barely know how to use it yet Mar 22 17:21:41 Ah Mar 22 17:21:45 Ashiren, What should I do then? Mar 22 17:21:49 need to line stuff up like that basically Mar 22 17:22:26 minas114: honestly i dont know. i didnt use android's httpclient nor 3rd party's Mar 22 17:22:49 <_genuser_> http? what are you looking for? Mar 22 17:22:51 <_genuser_> downloading files? Mar 22 17:23:22 A-F = buttons yeah? Mar 22 17:23:26 _genuser_, was that for me? Mar 22 17:23:30 And 1-5? Mar 22 17:23:31 yea, all the text are buttons Mar 22 17:23:36 Fair Mar 22 17:23:38 <_genuser_> minas114: for whoever was talking about httpclient.. Mar 22 17:23:48 _genuser_, I want to make a web service call to my server Mar 22 17:24:37 <_genuser_> minas114: oh, I see. I just had a http file downloader on my github, I thoguth if you're just needing to download files that might help. Mar 22 17:24:40 Always 6x7 grid? Mar 22 17:24:44 NoirAvlaa nope Mar 22 17:24:51 arbitrary Mar 22 17:24:55 Both ways? Mar 22 17:24:58 yep Mar 22 17:26:30 the code I gave was only partial, Mar 22 17:26:42 I basically have 2 arrayLists that interesct Mar 22 17:27:34 <_genuser_> minas114: http://stackoverflow.com/questions/34149961/example-of-webservice-calling-using-okhttp-class Mar 22 17:27:51 omg guys, android dev is great, i'm so addicted now Mar 22 17:27:55 <_genuser_> minas114: having used okhttp, I can say it's simple and easy to use. Mar 22 17:28:09 <_genuser_> guideX: haven't you been in this channels for years? Mar 22 17:28:12 _genuser_, I have found http://developer.android.com/reference/java/net/HttpURLConnection.html Mar 22 17:28:13 oh no Mar 22 17:28:32 _genuser_: I've been on irc for years, but android development not before Mar 22 17:29:01 <_genuser_> minas114: okhttp is what I preferred fwiw. and from what I hear a lot of people prefer it over using barebones android stuff. nothing wrong with using android/java stuff directly, tho. Mar 22 17:29:14 _genuser_, alright, thanks Mar 22 17:29:16 <_genuser_> guideX: hmm, I've either seen you in #gentoo or #csharp for years, then, lol. Mar 22 17:29:18 *for the help Mar 22 17:29:24 _genuser_: yes, #c# Mar 22 17:29:36 <_genuser_> minas114: it's not direct help, but it might give you something to work with. Mar 22 17:29:39 <_genuser_> guideX: oh. :) Mar 22 17:29:39 in fact, c# daily for years too Mar 22 17:29:54 so android dev, not your regular hum dum visual studio day Mar 22 17:31:03 <_genuser_> guideX: everything in android is different from our visual studio experience. for one, AndroidStudio is (to me it seems) much much more heavy and RAM hog. Mar 22 17:31:07 NoirAvlaa do I need to switch to a grid view or something? Mar 22 17:31:26 <_genuser_> guideX: UI design is just.... you gotta just wing it and then run it to see. wysiwig is sort of blegh. Mar 22 17:31:26 Mnkras, honestly that's what I'd do yea Mar 22 17:31:42 <_genuser_> guideX: if you can get past all that and write apps for the mobile world, it's a lot of fun. Mar 22 17:32:08 NoirAvlaa is all I need to do change the parent view from TableLayout to Grid and leave the tablerows? Mar 22 17:32:33 Mnkras, I pretty much work most things with recyclerviews these days, they're a lot more flexible than trying to force tables etc... you can set the layoutmanager to a gridlayoutmanager and specify the columns that way Mar 22 17:32:56 thats out of my range of knowledge :P Mar 22 17:33:23 RecyclerView is basically a fancy listview Mar 22 17:33:25 <_genuser_> NoirAvlaa: I haven't used the recyclerview yet. read much about it. Mar 22 17:33:40 With a lot more flexibility Mar 22 17:33:52 <_genuser_> Mnkras: good thign about android is, if you're not afraid of reading the android docs, you can pick it up quickly. Mar 22 17:34:10 <_genuser_> android docs. dev guides (android ones) are typically enough to pick up most stuff. Mar 22 17:34:14 _genuser_, would recommend them over listviews/gridviews Mar 22 17:34:34 <_genuser_> if you still don't get it, hit the google search and pick something like vogella (that one will hand hold you). Mar 22 17:34:41 Recyclers combined with Realm is amazing aswell Mar 22 17:35:01 <_genuser_> NoirAvlaa: ah, I see. most of my android stuff has been pretty simple. but I do have a really processor and memory intensive project that's about 40% done. Mar 22 17:35:59 NoirAvlaa yea, its not bad, just gotta get used to it, Mar 22 17:36:14 https://www.bignerdranch.com/blog/recyclerview-part-1-fundamentals-for-listview-experts/ Mar 22 17:36:34 Pretty decent start to recyclerviews Mar 22 17:36:35 <_genuser_> big nerd ranch. nothing says "getting laid tonight" like surfing "big nerd ranch". Mar 22 17:36:41 Hahaha Mar 22 17:38:12 NoirAvlaa GridLayout, or GridView...? Mar 22 17:38:24 Im so confused Mar 22 17:38:24 :P Mar 22 17:39:01 GridLayout is for RecyclerView Mar 22 17:39:10 Well Mar 22 17:39:12 Sec Mar 22 17:39:58 Im tempted to ask your for an example on how you would do this Mar 22 17:40:04 http://android-pratap.blogspot.co.uk/2015/01/using-linearlayoutmanager.html Mar 22 17:40:16 Few examples Mar 22 17:40:24 It depends, will the other "cells" have data in them at all? Mar 22 17:40:27 Or will they be blank> Mar 22 17:40:28 ? Mar 22 17:40:48 blank Mar 22 17:41:02 I guess I could stick empty textViews Mar 22 17:41:31 hi what is the pattern to set a value with setvalue and retrieve it with get value inside an aidl service ? it seems like mine is dying when no client is bound and the internal members are reset to null Mar 22 17:43:56 NoirAvlaa im looking at the grid layout, seems like I would have to make a fake list to feed to the adapter that has blank elements in it for spacing... no? Mar 22 17:44:13 Mnkras, nope, you can just set span on the element Mar 22 17:44:34 and how would I do that? (is it called span?) Mar 22 17:44:59 freelancerbob: layout_below doesn’t apply to LinearLayouts Mar 22 17:45:18 if you want to have them all on screen, you’ll have to look into layout weights Mar 22 17:45:21 Mnkras, the layoutmanager has a method you can overide Mar 22 17:45:46 wtf, since when has r/android_dev been private? Mar 22 17:45:55 mLayoutManager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup(){ @Override ... } Mar 22 17:46:03 hmmm Mar 22 17:46:15 Taios: r/androiddev Mar 22 17:46:24 In there you get the item type with mAdapter.getItemViewType(position) Mar 22 17:46:30 And return the span size Mar 22 17:46:51 * Mnkras slams his face into his keyboard Mar 22 17:46:53 You'll need to set the return value in getItemViewType method of your adapter as well Mar 22 17:47:04 woooa weird, it wasn't showing up in search ty orbyt_ ! Mar 22 17:47:21 Start with something simple though and work to that Mnkras... For now I'd recommend getting to grips with the language more Mar 22 17:47:56 yea lol, got a minor time crunch and was kinda thrown into this ;) Mar 22 17:48:17 And it "must" be that layout? Mar 22 17:48:23 What do the buttons do? Mar 22 17:48:47 purely cosmetic, could be any element type Mar 22 17:48:53 Oh Mar 22 17:52:07 r/androiddev is an mvp, kotlin, rx circlejerk Mar 22 17:53:04 i'm mvp and scala Mar 22 17:53:07 not trendy :( Mar 22 17:58:08 pfn, also full of idiots :P Mar 22 17:58:22 "Why is google adding new APIs and forcing us to update our apps once every 5 years?!?!" Mar 22 18:00:14 <_genuser_> Mavrik: right, why? Mar 22 18:00:15 <_genuser_> why??? Mar 22 18:00:20 <_genuser_> heh Mar 22 18:00:32 A few days ago there was this guy. Mar 22 18:00:46 "Why does Google waste my time and force me to use HTTPS in my app?!" Mar 22 18:00:52 <_genuser_> oh there was a specific incidence of some guy really going on? Mar 22 18:01:00 <_genuser_> ugh, why would you not use https. Mar 22 18:01:16 <_genuser_> haha "waste his time" Mar 22 18:01:37 Mavrik, yeah, I just tend to ignore those Mar 22 18:01:45 maybe help with a downvote Mar 22 18:02:25 I just don't know wheter I should tell them they're idiots and why they're wrong (and get -15) Mar 22 18:02:32 Or just leave them to mislead like 500 other people. Mar 22 18:02:34 I get -15 on all my comments Mar 22 18:02:35 * pfn shrugs Mar 22 18:02:58 say anything the slightest bit negative about the all might kotlin and face the wrath of the r/androiddev circlejerk Mar 22 18:03:00 <_genuser_> I"m ok with the API changing. Mar 22 18:03:13 mighty Mar 22 18:03:20 <_genuser_> I do however tend to dislike the UI redesign that seems to be random and tpically illogical. Mar 22 18:03:26 <_genuser_> which forces them to re-redesign it. Mar 22 18:04:00 <_genuser_> by UI redesign, I mean, re-design of their own apps. Youtube, Hangouts, Play Store, Books, News, etc. Mar 22 18:04:13 <_genuser_> it's like I still haven't figured out why google doens't like Hangouts/talk/chat. Mar 22 18:04:37 <_genuser_> they keep redesigning it into something that might be really great and maybe people will catch on and then they break it down or merge with something. Mar 22 18:05:30 guys, if I just want to develop android apps for like my phone or tablet, where should I start? I mean, wearables seems like the wrong or at least, half-right answer... Mar 22 18:05:52 material design seems to skip the "how to develop android apps" step Mar 22 18:05:53 <_genuser_> jerit: are you in android studio file new project menu? Mar 22 18:06:09 material design is just the design aspect, has nothing to do with coding Mar 22 18:06:12 <_genuser_> or still at the how to start step? Mar 22 18:06:22 jerit: material design is how to design the app. You want the developer.android.com stuff Mar 22 18:06:30 _genuser_: haven't downloaded anything, still looking for learning material Mar 22 18:06:37 <_genuser_> what s73v3r said. Mar 22 18:06:53 <_genuser_> developer.android.com and the documentation is really helpful. Mar 22 18:07:06 <_genuser_> I have not often had to go outside of there to udnerstand something. Mar 22 18:07:34 My connection is only 2mbps though :( I know... So this download is going to take a hell of a long time Mar 22 18:07:59 you kinda need the sdk and tools to start Mar 22 18:08:28 <_genuser_> 2mpbs shouldn't be a problem. Mar 22 18:08:53 s73v3r: I'll come back in 3-4hrs when this download is finished Mar 22 18:09:06 <_genuser_> I have used a 1mpbs connction with 4-5 computers youtubing, and amazon video'ing and still downloading stuff. Mar 22 18:09:07 time is on my side, yes it is Mar 22 18:09:12 in the meantime, read the developer docs Mar 22 18:09:24 maybe go out and get a copy of the Big Nerd Ranch books Mar 22 18:09:28 book Mar 22 18:09:30 <_genuser_> s73v3r: do'nt forget the ram upgrade,! Mar 22 18:09:45 <_genuser_> yeah if you have like < 8GB might as well run out and buy another stick. Mar 22 18:11:16 seriously...5.1 by default do not have the option to display battery percentage? Mar 22 18:11:37 <_genuser_> does anybody remember their github password, etc. etc? Mar 22 18:11:49 <_genuser_> or do you guys just setup an ssh cert and push over ssh? Mar 22 18:11:59 _genuser_: (sorry for delay, wothless meeting) I love the android ui so far, I use mostly the text based stuff to design Mar 22 18:12:01 I like it! Mar 22 18:12:16 _genuser_: I remember my GitHub password Mar 22 18:12:23 by default, the recyclerview doesn’t have a concept of “sections”, does it? Mar 22 18:12:27 I just use it any time I need to ssh to my repo Mar 22 18:12:33 like after a restart Mar 22 18:12:38 <_genuser_> guideX: I wanna see it before runnig it tho. saves time and hassle. especially if you have to navigate 3 activities to get there when running it. Mar 22 18:12:43 I'm learning more and more how to be efficient with it, it's clicking for me, I think I'm going to be an android programmer :D Mar 22 18:13:03 well I usually dfo the text stuff, and then go look in the wysiwig to see if it looks right Mar 22 18:13:04 <_genuser_> guideX: its pays way more than .NET for same number of years. Mar 22 18:13:18 <_genuser_> markyosullivan: ssh to your repo? as in push stuff to it? Mar 22 18:13:28 yes Mar 22 18:13:34 push and pull stuff to and from it Mar 22 18:13:48 _genuser_: well, learning for me is sometimes hard.. I am not the kind of person to change my ways very often, so the fact I'm not steaming mad during my learning process is a really good thing Mar 22 18:14:07 the idea that I can leverage my c# services too, just golden Mar 22 18:14:43 you know with android Mar 22 18:15:37 so it pays more eh, nice Mar 22 18:16:31 <_genuser_> markyosullivan: ah, I see. I have such a long complicated password hard to remember. I'm having to copy/paste it just to push stuff. LOL. Mar 22 18:17:01 <_genuser_> guideX: yeah, I started a few projects where I'm going backend (mvc/asp.net) and front end (android) and it's taking forever, tho. gotta learn all teh new things on both sides... Mar 22 18:17:26 _genuser_: I find android WAY more natural than wpf, metro, xaml, etc Mar 22 18:17:31 not sure why yet... Mar 22 18:17:44 those xaml based languages never quite clicked with me Mar 22 18:17:53 <_genuser_> guideX: robert half (recruiter guys) says it's about 120K/yr for 5yr experiences on low-end and 150k'ish for medium skill level. with few cases hitting 180+ Mar 22 18:18:33 nice Mar 22 18:18:38 <_genuser_> guideX: well the android is just xml, we've done that for year. the XAML stuff is xml but also have the additional stuff of datasets, data bindings, and even UI/visual transformations, etc. Mar 22 18:18:38 that's more money, I like more money Mar 22 18:18:58 ah gotcha Mar 22 18:19:01 makes sense Mar 22 18:19:08 <_genuser_> more money buys bigger TV. bigger TV plays better star trek. I'm already in favor of this idea... Mar 22 18:19:37 that's my exact thoughts too, can always have a bigger tv to watch sci fi Mar 22 18:19:59 <_genuser_> altho, I normally watch that just on my second monitor. while working some project. Mar 22 18:20:25 I like background tv's better, this way people can join me watching tv while I do computer things Mar 22 18:20:33 pfft. More money buys more hookers and blow Mar 22 18:20:52 also does android really pay more than .net? im honestly not so sure Mar 22 18:20:56 maybe more than asp.net Mar 22 18:21:24 So that means that, I'm being paid an C# programmers rate for Android apps... Mar 22 18:21:30 * guideX is getting greedy Mar 22 18:21:48 No. You're being paid what you managed to negotiate Mar 22 18:21:52 "boss, the guys on irc said...." Mar 22 18:22:01 languages in my experience doesnt matter too much Mar 22 18:22:11 they do Mar 22 18:22:18 the more obscure the more money too Mar 22 18:22:28 No. Your communication and negotiation skills matter way more than any platform or technology ever could Mar 22 18:22:29 for instance, os/2 dev work, get paid a bazillion bux Mar 22 18:22:49 because they literally can't find other devs Mar 22 18:22:49 no, but Cobol, you could write your own ticket Mar 22 18:23:32 ... if you have 30 years experience Mar 22 18:23:40 I have 20 :) Mar 22 18:23:44 but then again, any niche where you have 30 years experience probably pays pretty well Mar 22 18:23:48 I have less than one month in android though LOL Mar 22 18:24:28 <_genuser_> guideX: you can show experience in java, c# (and UI), and 1 published app and anybody will hire you. Mar 22 18:25:01 <_genuser_> which means you gotta be able to deliver. if you can you'll be just moving on up with the experience and moneyzzz. Mar 22 18:25:39 it certainly seems like I'm catching on, so good.. Mar 22 18:28:44 <_genuser_> the main thing about android development is, switch to java (from c#) and then on top of java way of doing things, you have android way of doing things. Mar 22 18:28:59 <_genuser_> other than that, it's just like anytyhing else, spend time and you're having fun. Mar 22 18:30:52 well java is a little bit of a problem, because I haven't done java since the 90's, however I remember alot of what I knew then, and then java is already so similar to c# Mar 22 18:31:04 and I know c# like the back of my hand Mar 22 18:33:28 <_genuser_> there's java specific things like overuse/abuse of interfaces.... just to pass events, etc. etc. Mar 22 18:33:47 <_genuser_> that one was hard to use for a while. it's like the back-asswards way of doing events. Mar 22 18:34:20 <_genuser_> once I decided tho that it was what it was and I could force implement events a different way or just stick with java way, it was easier. Mar 22 18:34:53 <_genuser_> I just do it that way even if it doesn't make sense to me that it would be done that way. overtime tho, I'm fine with the idea that when I code stuff in java, I pass 10,000 interfaces back and forth pointlessly just for notifications. Mar 22 18:35:05 <_genuser_> and when I do c#, I just raise events. and it's so much easier. Mar 22 18:36:09 Qt Signal / Slots is cool Mar 22 18:37:01 that stuff is old too, wonder why java guys never added any kind of mechanism like that Mar 22 18:37:06 _genuser_: I had trouble with the forced use of threads for internet communications.. Not that I don't use threads for some of that stuff, was just blown away to be forced to do it Mar 22 18:37:18 on Swing, JafaFX, android widgets ... Mar 22 18:37:43 _genuser_: the "packages" are a little bizare to me, but i'm getting used to them Mar 22 18:38:53 g00s, hmm, been awhile since I used Qt, what's the difference between signal/slot and callback? Mar 22 18:39:16 compiler magic Mar 22 18:39:23 err, I guess preprocessor magic Mar 22 18:39:40 <_genuser_> guideX: packages are just namespace. except! each segment of the namespace is it's own folder!! (dumbest thing ever, just wasting folder space and creating huge paths). Mar 22 18:39:49 the way they are wired up; you can have slots listening for multiple signals and signals going to multiple slots, its just pretty convenient (and typesafe) Mar 22 18:40:00 download is 18% lol Mar 22 18:40:16 and then after you’ll have to download the SDKs Mar 22 18:40:25 _genuser_: I'm very used to separating everything into folder, so I must admit to being very confused about where to put everything Mar 22 18:40:34 folders* Mar 22 18:40:36 <_genuser_> guideX: the forced use of threads is definitely android specific, you don't want the UI tied up for communication. especially since any activity not in teh front can be unloaded by the OS is resources are tight. Mar 22 18:40:54 Hey there! I'm using FragmentManager with setCustomAnimations. I switch the fragments on button click. Everything is fine, until i do click the button too fast. Then the fragments disappear. (No fragment is shown) Has anyone experienced this? I do not seem to find an answer on stack overflow. If i disable setCustomAnimations everything works fine. Mar 22 18:40:54 it’s the same on other mobile platforms Mar 22 18:41:06 blocking the UI as bad is not android specific :) Mar 22 18:41:08 _genuser_: I usually use threads *later, but during dev, I wanna skip threading just to see it come together Mar 22 18:41:21 s73v3r: many of the apps on my phone use phone storage rather than SD Card, got any ideas why the developers my have preferred to use phone storage rather than the much larger SD Card? Mar 22 18:41:21 nope. don’t do that Mar 22 18:41:21 so was just a little shocked at first to see, I can't do my usual thing Mar 22 18:41:34 <_genuser_> guideX: this way, let's say you need something you can do it on background thread. But if you really really want it, you'll have to do services. so it runs smoothly. Mar 22 18:41:42 jerit: SD card access has changed over the iterations, and it’s generally a pain in the ass Mar 22 18:41:53 <_genuser_> guideX: it's kinda like you can't hit the UI components from background thread in c#, either. Mar 22 18:42:04 <_genuser_> I know there used to be a setting you could turn on, but I haven't done that in ages. Mar 22 18:42:18 guideX: you can turn it off. But they have it on by default because lazy assholes wouldn’t go back and fix it Mar 22 18:42:27 jerit, because SD card is write protected on many Android versions Mar 22 18:42:41 guideX can you give one example of a UI toolkit that doesn't get messed up when you block the event loop for an operation ? Mar 22 18:42:58 Mavrik: I assume thats what s73v3r meant by "pain in the ass" lol Mar 22 18:43:07 <_genuser_> g00s: yeah, I suppose. but I guess on desktop when you can't really do anything else and you choose to do it on the main thread... pfft go ahead piss off your user, eh... Mar 22 18:43:08 Yes. Mar 22 18:43:10 :) Mar 22 18:43:17 nexus phones should have sd card slots Mar 22 18:43:24 jerit, also what "getMeExternalStorage" calls return has changed over time :) Mar 22 18:43:25 simply because they are RI platforms Mar 22 18:43:43 not because they should further google services agendas Mar 22 18:43:45 oh well Mar 22 18:43:46 <_genuser_> g00s: I know some stuff you still could do on main thread (recommended or not). but android won't even do it. Mar 22 18:43:54 <_genuser_> which is what I was trying to say. Mar 22 18:44:06 _genuser_, like what_ Mar 22 18:44:08 ? Mar 22 18:44:14 _genuser_, won't even do what? you can still disable strictmode Mar 22 18:44:17 stupid, but you can Mar 22 18:44:26 The only limited stuff is network communication which has absolutely no bussiness doing ANYTHING on main thread on ANY platform. Mar 22 18:44:36 <_genuser_> pfn: ah, don't think I have had to resort to that. I just put it in the background thread. :) Mar 22 18:44:44 pfn: If nexus phones had SD card slots, they couldn’t push the idea of cloud storage as easily Mar 22 18:44:49 <_genuser_> pfn: better to build it right, than to have to re-write it half way later, Mar 22 18:44:57 s73v3r: at this point, I've unscrewed my brain, changed the part that Mar 22 18:45:09 Hello Mar 22 18:45:10 <_genuser_> Mavrik: probably not. but we all know it happens. (sure that still doesn't make it right). Mar 22 18:45:15 so no problems there, just a little initial shock Mar 22 18:45:31 I had a question regarding gprs for mmy project Mar 22 18:45:40 s73v3r, considering sales rates of nexus devices, they're really irrelevant in terms of pushing cloud storage Mar 22 18:45:41 Sagar_Agrawal, yes? Mar 22 18:45:43 <_genuser_> I think you'll find most of you adjustment is already done by the time you're done with your first project. Mar 22 18:45:48 even on desktop, if you block the event loop the OS may think the app is ANR Mar 22 18:46:21 I am creating a security app and I want to enable gprs connection(3g/4g) inside my activity Mar 22 18:46:27 <_genuser_> g00s: and to be fair, lot of the high-level components already do crap on teh background thread, just that you don't have to manually rig it. Mar 22 18:46:43 <_genuser_> g00s: which might give the illusion of "easy use right there without having to do threads". Mar 22 18:47:11 <_genuser_> g00s: drag drop type components is what I'm referring to. tho, can't say I have used those after VB6. Mar 22 18:48:07 <_genuser_> guideX: folders-wise, I think I mostly just stick my code under the main package, I'll create subpackages. as in .listadapters, .model, etc. etc. Mar 22 18:48:18 ah ok hrm Mar 22 18:48:31 so far my code probably looks very noobish, with all files in one package Mar 22 18:48:39 <_genuser_> altho, mostly I've just resotred to doing .classes for classes that don't belong in anywhere specific thing. Mar 22 18:48:42 move stuff into packages as you see fit Mar 22 18:48:46 <_genuser_> guideX: yeah, it's super easy to move them to packages. Mar 22 18:48:52 overarchitecting packages is dumb Mar 22 18:48:59 <_genuser_> just go to the top where it says package com.you.app Mar 22 18:48:59 a little to afraid to venture out yet, not sure how the structure is supposed to look Mar 22 18:49:13 Sagar_Agrawal: Ask your question, but so far I don’t see what the difference is between what you want to do and normal internet communication Mar 22 18:49:13 <_genuser_> and add whatever youw ant. - com.you.app.listadapters Mar 22 18:49:18 usually, I wanna have a folder for Models, a folder for Controllers, a folder for Views/front end Mar 22 18:49:25 but not sure if that's the correct aproach here Mar 22 18:49:31 <_genuser_> and then it will complain and give you a red-bulb, click on it and it will let you move it to it's own package right there. Mar 22 18:49:54 guideX: Don’t do what _genuser_ does. Putting stuff in packages based on what it is is redundant Mar 22 18:49:58 If mobile data is off my app will requires to turn it on without user interaction Mar 22 18:50:07 Sagar_Agrawal, not allowed Mar 22 18:50:10 <_genuser_> s3shs: that's an example. Mar 22 18:50:18 <_genuser_> s73v3r: that's an example. Mar 22 18:50:24 Sagar_Agrawal, unless you have root, not going to happen Mar 22 18:50:24 it’s a poor example Mar 22 18:50:32 <_genuser_> s73v3r: that it may be! Mar 22 18:50:38 s73v3r: I'm going to have to revisit project structure for sure, as I am a little not sure right now what the proper aproach should be Mar 22 18:50:56 then how can i get permission to make my app as system app then i can have permission to enable the data Mar 22 18:51:00 there was a good article on /r/programming last week guideX Mar 22 18:51:01 <_genuser_> so the point was you can easily move them to package as they make sense to you. Mar 22 18:51:03 Sagar_Agrawal, you don't Mar 22 18:51:07 Sagar_Agrawal, unless you have a custom rom Mar 22 18:51:18 Sagar_Agrawal: you get your app included as a system app by the manufacturer Mar 22 18:51:33 <_genuser_> s73v3r: actually come to think of it, I do remember a project there I had a .listadapters. heh. Mar 22 18:51:34 right now, I have... my app package, and everything under that one package Mar 22 18:51:35 further, why do you care if the communication is going over cell network or wifi? Mar 22 18:51:38 how about permission from google Mar 22 18:51:40 probably the nooby way Mar 22 18:51:44 they won’t give it to you Mar 22 18:51:50 guideX, doesn't matter, unless you have hundreds of classes Mar 22 18:51:59 is their a way to contact google for this as my app is bit of a revolutionary idea Mar 22 18:52:04 no it isn't Mar 22 18:52:05 Sagar_Agrawal, no Mar 22 18:52:07 and it isn't Mar 22 18:52:10 everyone thinks that Mar 22 18:52:17 and you haven’t said why you require cell network instead of wifi Mar 22 18:52:19 <_genuser_> guideX: until your code starts getting out of control, you can leave it in the same folder. Mar 22 18:52:29 <_genuser_> guideX: when it goes out of control just organize it the way it makes sense. Mar 22 18:52:32 ah ok Mar 22 18:52:41 well it's not too bad for now, maybe 20 files Mar 22 18:52:42 I stated it is a security app Mar 22 18:52:51 so? Mar 22 18:52:53 a little hard to find things.. thats ok! Mar 22 18:53:00 <_genuser_> guideX: in the end, if you can follow a known organization pattern and find your code and your fellow devs can find it... that's all that matter. Mar 22 18:53:05 lots of people make security apps Mar 22 18:53:18 _genuser_: I just use the find/replace dialog, and don't go looking for classes in the folder structure at all Mar 22 18:53:23 it's working fine for now Mar 22 18:53:32 Sagar_Agrawal: The closest thing you can do is check and see if you have internet access, and if not, pop a dialog asking the user to enable it Mar 22 18:53:44 <_genuser_> guideX: or just find an instance and ctrl-click, lol. it takes you to it. ctrl-b is also go to definition. Mar 22 18:54:14 oh yes, goto-> declaration Mar 22 18:54:17 I use that too :) Mar 22 18:54:43 <_genuser_> guideX: I had a super long project. I just organized it the way it was easy for me. .picasso.extensions where I put all my custom extension. Mar 22 18:54:55 <_genuser_> .model for all the model stuff. Mar 22 18:55:33 <_genuser_> sometimes I just put stuff in packages when I just really needed to be in a "folder" and collapsed away out of sight Mar 22 18:55:49 yeah that's what I'm kinda looking for out of it too Mar 22 18:55:57 I guess it's the c# programmer way :) Mar 22 18:55:58 <_genuser_> as a single dev tho, I am only coding for me. Mar 22 18:56:10 <_genuser_> if I was working in a group, people would probably have soemthing to say about that. Mar 22 18:56:34 I'm also the only android dev on my team Mar 22 18:56:56 <_genuser_> altho, my boss' idea of team stands is, "he's just a poor shmuck trying to make a buck to feed his family, don't but him with rules." Mar 22 18:57:01 <_genuser_> *standards Mar 22 18:57:17 <_genuser_> as a result, our team has 0 standards. Mar 22 18:57:23 <_genuser_> heck most of them don't even use ... source control. Mar 22 18:57:50 O.o Mar 22 18:57:53 Run awaaaaay Mar 22 18:58:10 well we have ok c# standards, change controll, dba's, tfs.. but when it comes to android, it's like my own little world Mar 22 18:58:17 <_genuser_> Mavrik: I have a server space from the network admin that he backs up nightly. I use mercurial/git and push my source there everyday when I do dev work. Mar 22 18:58:21 _genuser_: I would run away from that boss and that team Mar 22 18:58:22 and there lies magical goblins tghat only I can deal with Mar 22 18:58:28 they are nothing but incompetent morons Mar 22 18:58:35 <_genuser_> s73v3r: haha, I know what you mean. everyone says the same thing. Mar 22 18:58:45 sounds like _genuser_'s team is like mine, a shtshow Mar 22 18:58:59 err office Mar 22 18:59:04 <_genuser_> my boss actually told me to quite harrassing people. Mar 22 18:59:32 <_genuser_> when I told the team, we were going to use mercurial. one guy immediately asked me, how do I "check all files in". and start just writing down commands. Mar 22 18:59:38 <_genuser_> second guy shot off a long email to the boss. Mar 22 18:59:43 Take this kind of warning from your boss seriously. Not just because he could fire you but because you should probably take this opportunity to learn something about yourself. Mar 22 18:59:47 <_genuser_> my boss in turn ... forwarded that to me. Mar 22 18:59:51 <_genuser_> talk about privacy. Mar 22 19:00:46 huh Mar 22 19:00:48 :) Mar 22 19:00:56 if it was something subjective, then you’d have a point. But if it’s the question of using source control versus not, then no Mar 22 19:00:58 Please run away to a good company. It's for your own good. Mar 22 19:01:20 It's hard to dig yourself out of such position if you want to go ahead in your career :/ Mar 22 19:01:21 Mavrik: bad company, good experience maybe Mar 22 19:01:23 <_genuser_> s73v3r: I don't question the matter of using source control. he doesn't want the team to use it, I still use it. Mar 22 19:01:48 <_genuser_> s73v3r: I want all my daily code backed up. and since I use dvcs (git/mercurial) I do incremental checkins during the day. Mar 22 19:01:51 _genuser_: my team has no tasking system.. or change control.. or devices.. or testing/testers Mar 22 19:02:01 guideX: Very, very few times will a bad company lead to good experience Mar 22 19:02:04 guideX, not knowing how to work within a good process is a serious problem in an interview candidate Mar 22 19:02:07 <_genuser_> Mavrik: so true about career advancement in places like that. Mar 22 19:02:10 usually they’ll just drill crappy practices into your head Mar 22 19:02:11 (I'm telling you that as someone who did interviews.) Mar 22 19:02:26 <_genuser_> guideX: neither do we. we are the testers, haha. Mar 22 19:02:34 <_genuser_> I wrote it, I test it, I approve. SOLD! Mar 22 19:02:35 If you come up to people and say you didn't use CI, VCS and reviews properly you're taking a huge hit Mar 22 19:02:49 <_genuser_> Mavrik: CI? Mar 22 19:02:51 _genuser_: and then make the change in production later.. without telling anyone Mar 22 19:03:02 <_genuser_> Mavrik: no, I use vcs. I don't care about other devs. I want to have the work backed up. Mar 22 19:03:02 and the dba makes a secret change too, later Mar 22 19:03:13 I mean just the worst case scenario lol Mar 22 19:03:15 _genuser_, there goes your CV into the bin :P Mar 22 19:03:23 <_genuser_> guideX: we have customer tickets daily where somebody changes something and in proudction. Mar 22 19:03:27 <_genuser_> Mavrik: what is CI tho. Mar 22 19:03:38 continious integration Mar 22 19:03:51 <_genuser_> Mavrik: oh, I see. Is that an agile thing? Mar 22 19:04:00 _genuser_: these structureless places are bad, but in a way good, I mean you're just in control of everything Mar 22 19:04:11 I kind of like it after being stuck in it for so long Mar 22 19:04:11 <_genuser_> our customers are like, I want agile. our PMs are like, we ARE the very definition of agile. Mar 22 19:04:21 agile != chaos :) Mar 22 19:04:32 agile == lazy Mar 22 19:04:36 <_genuser_> customers are like, ok, 2 days before production release, I change my mind on teh entire thing and the deadline can't change because the customer is always right. Mar 22 19:04:39 according to some Mar 22 19:04:46 <_genuser_> our PMs are like, but of coruse. we'll just make the devs work harder. Mar 22 19:05:23 <_genuser_> guideX: I'm thinking more along the lines of mavrik. Mar 22 19:05:32 <_genuser_> to change the place to keep the career moving on forward. Mar 22 19:05:42 sdk build tools 23.0.3 - haven't seen a new one of these in months Mar 22 19:05:51 _genuser_: CI is a “Make sure you didn’t break the build with your checkin” thing Mar 22 19:06:14 guideX: They’re not really good unless you have the experience to create your own structure Mar 22 19:06:54 _genuser_: Sounds like your PMs need to be fired. Out of a cannon. Into the sun Mar 22 19:07:12 s73v3r, _genuser_: I look at this way, maybe a chance to improve the situation, an opportunety to make a bad company good, with what you know about the things, structure, good code, reviews, proper divying of resources, etc Mar 22 19:07:37 for instance, things where I am are bad too, so I do my best to educate from what I learned working at webagencies and such Mar 22 19:07:51 unless you actually have support for that, it’s like the person that starts dating a bad person with the idea of “I can change them!" Mar 22 19:08:10 you’ll get burnt out, and no one at the company will learn a lesson Mar 22 19:08:14 yeah, but what else can you do Mar 22 19:08:23 go work somewhere not shitty? Mar 22 19:08:32 let those places go out of business Mar 22 19:08:37 they are hard headed, but sometimes, a light goes off in their head, and you've fixed one of the 30 things you tried to fix, sweet Mar 22 19:08:59 ultimately, I'm here to make a bad business great again, so I'm going to try Mar 22 19:09:05 and then two months down the line, something breaks, and now everything is your fault Mar 22 19:09:12 well yes Mar 22 19:12:34 <_genuser_> you just can't change a bad company. Mar 22 19:13:01 <_genuser_> a bad company is the result of bad management. and mangement doens't listen to little guys and say, "oh I'm wrong, and my ego is small enough to admit that." Mar 22 19:13:01 guideX when you quite, give this to your manager http://www.amazon.com/Fifth-Discipline-Practice-Learning-Organization/dp/0385517254 Mar 22 19:13:05 *quit Mar 22 19:13:06 you can, but it's a painful process, and requires you to yell, stand your ground, and oppose existing practices, which could get you fired Mar 22 19:13:20 g00s: ! Mar 22 19:13:25 hey thepoosh :D Mar 22 19:13:32 <_genuser_> guideX: do'nt know how old you are, but I've found out that it is just not worth the stress. Mar 22 19:13:56 <_genuser_> I have done lot of yelling and standing my ground. AND my boss has often told me about projects that were saved only because of that. Mar 22 19:14:02 guideX: Life is too short for that kind of stress Mar 22 19:14:10 <_genuser_> he tells me stuff like, "if you hadn't forced us there, we woudl be in great trouble." Mar 22 19:14:16 <_genuser_> but he doesn't learn from it. Mar 22 19:14:31 My notification icon that I set looks blown up in Android 4.0, but looks perfect in 5.0 and up it seems. Ideas? Mar 22 19:14:32 <_genuser_> but I did. I don't force anything. I give my "educated/experienced" opinion once. take it or leave it. Mar 22 19:14:40 <_genuser_> when it falls flat on its face, don't look at me. Mar 22 19:14:43 _genuser_: I'm 36, and I work at one of these places.. they used to be greatt in the 90's, however falling behind the times now... Mar 22 19:14:48 <_genuser_> s73v3r: I second that! Mar 22 19:15:04 <_genuser_> I'm in my late 30s too. Mar 22 19:15:12 <_genuser_> trust me, you can't change people. Mar 22 19:15:17 <_genuser_> only they can change themselves. Mar 22 19:15:58 s73v3r: I find it to be the opposit, standing my ground, and preventing something that'll cause me more stress Mar 22 19:16:16 for instance, yelling at the boss and dba together, to let them know I'm very unhappy with the situation Mar 22 19:16:22 otherwise, they'll just do stupid sht forever Mar 22 19:16:25 <_genuser_> I've moved to documenting stuff and double checking wiht PMs/manager that X is what they want. Mar 22 19:16:26 i’m saying that having to stand your ground and yelling at the boss is too much stress Mar 22 19:16:27 guideX well it sounds like you enjoy it, we should all stop trying to convince you :D Mar 22 19:16:30 <_genuser_> then I just let it fall. Mar 22 19:16:34 <_genuser_> and then I do my best to fix it. Mar 22 19:16:35 "people get the company they deserve" Mar 22 19:16:37 <_genuser_> .... within work hours. Mar 22 19:16:38 especially when you can go somewhere else where you don’t have to do that Mar 22 19:16:56 they can do all the stupid shit they want. It won’t affect me, because I’m not working there Mar 22 19:17:23 <_genuser_> s73v3r: unless they write the tax software you use, Mar 22 19:17:24 <_genuser_> lol. Mar 22 19:17:34 well, there is that Mar 22 19:17:38 <_genuser_> heh Mar 22 19:17:48 but I’m at the point where I should probably be using an accountant anyway Mar 22 19:18:16 <_genuser_> oh a recruiter on the phone. Mar 22 19:18:34 well _genuser_, it'll be interesting to see where our two stupid companies go... maybe they'll get better, who knows Mar 22 19:19:02 within half a year, you’ll probably be jumping ship Mar 22 19:20:10 s73v3r: well i've been here a year so far, I've done alot... Mar 22 19:24:07 With the new NDK support in Gradle, how can I have platform-specific headers for a SharedLibraryBinary? Mar 22 19:26:28 <_genuser_> guideX: mine's a fortune 20. Mar 22 19:26:34 <_genuser_> so it will take a while to fizzle out. Mar 22 19:27:02 <_genuser_> s73v3r: mine's been like that the last 10-12 years. I just adjusted my attitude to realize they do'nt want to change. Mar 22 19:27:12 ah ok, not mine... mines an old feature phone cell phone topup company (actually for the time, THE biggest), but now, of course cell phones have evolved :) so we're littler Mar 22 19:27:12 <_genuser_> and my job is to provide feedback and let them make a decision. Mar 22 19:27:37 <_genuser_> while letting them do dollar to dollar match to 401k contributions. Mar 22 19:27:41 <_genuser_> upto 6% of pay Mar 22 19:27:42 a formerly huge company for telecommunications in the 90's, now hit hard by modern times, so trying to bring them into modern times best i can Mar 22 19:28:08 <_genuser_> wait wait, are you at the said telecomm company? Mar 22 19:28:13 yeah Mar 22 19:28:22 <_genuser_> guideX: does it enjoy the colors blck and red quite a bit? Mar 22 19:28:48 <_genuser_> or is "blue" more their speed?... Mar 22 19:28:57 hrm red white and blue Mar 22 19:29:07 blue the primary color Mar 22 19:29:12 <_genuser_> red white and blue. what the heck is that... Mar 22 19:32:11 is there any way to reference progressbar in progressdialog? Mar 22 19:33:29 <_genuser_> so recruiter calls me. Mar 22 19:33:40 <_genuser_> then tells me this is a resume that looks pretty old, I haven't seen this format lately. Mar 22 19:33:46 <_genuser_> we talked to you in 2002. Mar 22 19:33:53 <_genuser_> and then in 2012. Mar 22 19:33:55 hah, they're trying to sell you new resume maybe, hate that Mar 22 19:34:06 <_genuser_> well if you're using a resume from 2012, what do you expect. Mar 22 19:34:11 <_genuser_> of coruse it's old. Mar 22 19:34:22 <_genuser_> no, he says shoot me a new resume. Mar 22 19:34:30 <_genuser_> doesn't even give me his email. like he knows it's a no go. Mar 22 19:34:45 <_genuser_> ilke I'm at the edge of the chair waiting to email a guy who's email I might have saved in 2002. Mar 22 19:35:34 I also hate the "We'll propose you as a full time employee, for the temp job" guys Mar 22 19:35:54 <_genuser_> this guy calls saying it's a fulltime and we need a CRM guy doing dynamics. Mar 22 19:36:06 <_genuser_> he's still better than the one who send me an email for a .... RHEL administrator. Mar 22 19:36:31 <_genuser_> like .NET on my resume really translates as " I used to install red hat linux and administer it for huge corporations." Mar 22 19:38:14 _genuser_: Just do all of your server admin related stuff in .net Mar 22 19:38:37 been there before, then if they ask, "why did you hire a .net dev then?" lol Mar 22 19:39:22 <_genuser_> guideX: I don't respond. if your recruiters are that low interest that they're just spamming, they're not going to find me a decent job. worth my time. and the company itself (if the recruiter works for the company) is run poorly. Mar 22 19:39:50 yeah true Mar 22 19:42:01 Doesn't proguard log says which classes gone wrong ? https://gist.github.com/wviana/1ee248d69aed7810e424 Mar 22 19:42:36 It says, 5 unresolved references to classes or interfaces. Mar 22 19:43:40 so, anyone have any opinions on react native? I hadn't seen much buzz on it recently and was curious about it Mar 22 19:43:50 it's javascript, so it sucks Mar 22 19:44:45 heh, fair enough. I'm generally opposed to hybridized apps but the fact that it uses the literal native components piqued my interest Mar 22 19:44:55 doesn't make it not javascript Mar 22 19:45:41 not a javascript guy eh Mar 22 19:46:11 my major complaint about hybridized apps is how non-native they feel. I don't particularly mind js tbh Mar 22 19:46:44 worked with javascript for a large number of years, and my most popular apps are javascript Mar 22 19:46:46 javascript is garbage Mar 22 19:46:58 idk, javascript is a good choice if you're doing front end web, idk Mar 22 19:47:06 it's interesting to me to consider writing your logic primarily in js/react/redux and then just rewrite the UI logic for specific platforms. seems like a good opportunity for code reuse while sidestepping the usual hybridized pitfalls Mar 22 19:47:07 to do certain things, like call ajax Mar 22 19:47:10 the momentum is towards languages that compile to javascript Mar 22 19:47:19 not really anymore Mar 22 19:47:21 <_genuser_> my favorite interview scenario. "have you worked with javascript a lot?" "no, just when needed. I'm comfortable with it." Mar 22 19:47:21 e.g. typescript, coffeescript, scala, etc. Mar 22 19:47:29 <_genuser_> "ok why wo'nt this convoluated closure not compile?" Mar 22 19:47:29 kotlin as well Mar 22 19:47:30 <_genuser_> pfft. Mar 22 19:47:36 unless you consider es2015 to be compiled to js Mar 22 19:47:39 * guideX doesn't like compiled javascript, /me likes his own javascript Mar 22 19:47:53 I guess I don't like most compiled for me type code Mar 22 19:47:58 written/compiled Mar 22 19:48:03 generated etc Mar 22 19:48:09 well, let me revise that, typescript is gaining popularity but it's still in the minority compared to es2015 Mar 22 19:48:22 coffeescript is effectively dead at this point Mar 22 19:48:23 I mean, it's a good idea, but I don't like it Mar 22 19:48:38 clojurescript is popular among clj heads but I haven't heard of it outside of that realm Mar 22 19:48:45 and I didn't even know scala had a js runtime Mar 22 19:48:48 momentum, like I said Mar 22 19:48:55 no one wants to write javascript Mar 22 19:49:26 I dunno about that Mar 22 19:49:27 I like writting javascript, when using it to call c# services I wrote, and then update the front end with the data I get back and that kind of thing Mar 22 19:49:32 I don't really have a problem with JS Mar 22 19:49:48 I like big filled js pages too, idk, where most of it is in js, don't mind Mar 22 19:49:49 I have a problem with the backend ecosystem being somewhat anemic for traditional webapps Mar 22 19:50:00 but that's not js' fault Mar 22 19:50:06 oh, I think that I found it. Warning:org.apache.commons.math3.geometry.euclidean.twod.Line: can't find referenced class java.awt.geom.AffineTransform . It's about awt. Mar 22 19:50:09 we're pretty far off topic at this point though, heh Mar 22 19:50:18 I guess no one has tried react native seriously itc? Mar 22 19:50:30 i've never heard of it Mar 22 19:50:41 but then,there's so many js libraries... Mar 22 19:50:47 basically they take a js runtime and use it to script native components in android Mar 22 19:51:10 the idea being that your app logic can be contained in js and ported from web to android & ios and then you can write your ui logic per-platform Mar 22 19:51:24 idk, for that kind of thing, I perfer xamarin Mar 22 19:51:31 Scala and Kotlin can compile to JS? I had no idea, I thought they were strictly JVM Mar 22 19:51:34 That's cool Mar 22 19:51:48 I'm not interested in xamarin because I'm not interested in .net or ms technologies atm Mar 22 19:51:56 powersurge, I heard of that. Seen stuff written about it online which made me a slight bit nervous. Mar 22 19:52:00 react native is nice & open source & free Mar 22 19:52:14 Though would there not be some performance issues? Mar 22 19:52:23 can't argue with the free part, paying for xamarin is the pits Mar 22 19:52:39 it'll use v8 on android which should get similar speeds to JIT java afaik Mar 22 19:52:41 rumor is, xamarin will be 100% free in the next versions of visual studio, but rumor at this point Mar 22 19:52:44 I wouldn't trust anything made by React Mar 22 19:52:45 once it warms up, that is Mar 22 19:52:55 and it runs everything in background threads Mar 22 19:52:59 so the ui stays snappy Mar 22 19:53:03 and the ui itself is all native Mar 22 19:53:06 *made by Facebook Mar 22 19:53:13 Remember what happened Parse? Mar 22 19:53:27 Yeah, well that's why I wouldn't feel comfortable relying upon React Mar 22 19:53:38 so in theory it should be slower than fully native, yes, but not too much slower & also pretty imperceptible since the slowness shouldn't block the ui Mar 22 19:54:25 Has anyone tested React Android app out? I'd like to know their thoughts on it. I'd like to try it myself sometime. Mar 22 19:54:52 I dunno. I'm probs going to stick to native for the time being due to how young react native is, but I think it's probably the best option of the hybridized options Mar 22 19:55:01 plus react + redux is a really cool paradigm imo Mar 22 19:55:28 konk3r, yes Mar 22 19:55:34 or rather, I think it *will* probably be the best option of the hybridized options Mar 22 19:55:47 powersurge, wtf how can you NOT have a problem with javascript? Its type system is completely broken, it does not implement basic aritmetic correctly (a+b != b+a), it adds ; in the most random places which causes hard-to-debug bugs, it does stupid fucking type coercion for some of the most used operators in programming etc etc etc Mar 22 19:56:20 it really is a horrible language and noone should ever ever *WANT* to write it. They may be force to, due to circumstances, but want to? *shudders* Mar 22 19:56:59 ASI can be avoided with a linter, most languages follow the same numeric spec which causes that float weirdness in virtually every language (if that's what you're referring to with the arithmetic) & type coercian is regretable but avoidable if you're careful Mar 22 19:57:01 liefer: I think javascript is good on the front end, but yes wouldn't use it elsewhere Mar 22 19:57:08 on the *web front end Mar 22 19:57:13 Its not good at the frontend, its as useless there as anywhere else Mar 22 19:57:21 its just very ubiquitous Mar 22 19:57:31 konk3r, kotlins js support is not very good though Mar 22 19:57:33 open vertually any repl and type .1 + .3 and you'll get .4000000004 Mar 22 19:57:33 liefer: but it is there, on every browser, making it the goto language for front end web Mar 22 19:57:40 they focus more on jvm right now. Mar 22 19:57:41 liefer: anything else, is just faking it for yuou Mar 22 19:57:44 to make you comfy Mar 22 19:57:44 the reason why is because you cannot accurately represent .1 in binary Mar 22 19:57:57 guideX, so? Just because everyone has an asshole doesnt make it a nice beautiful thing Mar 22 19:58:04 similarly to how you can't accurately represent 1/3rd in decimal Mar 22 19:58:07 liefer: I think for the front end, javascript, and maybe even some jquery is perfectly fine on the front end Mar 22 19:58:10 That's awesome. I can't stand JS Mar 22 19:58:18 guideX, you're wrong. Mar 22 19:58:22 I mean, I guess it's not for everyone Mar 22 19:58:27 certainly, I wouldn't throw it away! Mar 22 19:58:29 Okay, let me rephrase that: I don't mind JS, I can't stand working on JS problems Mar 22 19:58:37 there are certainly some very strong opinions in here :/ Mar 22 19:58:37 projects* Mar 22 19:58:50 well if not js, what?! Mar 22 19:58:52 I've just never worked on a JS project where the code style wasn't all over the place Mar 22 19:58:55 luckily webassembly is coming soon :D Mar 22 19:59:01 sure js is a bit ackward, what else can you do? Mar 22 19:59:05 that's unfortunate konk3r Mar 22 19:59:14 there's plenty of linters out there to enforce code style Mar 22 19:59:20 js' biggest problem imo is library churn Mar 22 19:59:27 you're not about to say that, something should abstract javascript away for you? Because that just sucks more Mar 22 19:59:28 but I think it's just going through a growth spurt Mar 22 19:59:38 I mean outside of like jquery or something Mar 22 19:59:38 I'd be surprised if that continues beyond this year Mar 22 20:00:46 powersurge, its pretty sad for a language to REQUIRE linters just to be usable though =/ Mar 22 20:00:52 but yeah, stuff like jslint really really helps Mar 22 20:01:09 I think a linter should be required tooling for any language tbh Mar 22 20:01:14 some languages deffo need it more than others Mar 22 20:01:24 sure, but the language should be usable without a linter Mar 22 20:01:24 but style is a consistent problem even if it's just down to bikeshedding Mar 22 20:01:31 whereas JS is completely broken without one Mar 22 20:01:48 i mean it doesnt even do block scoping, cmon man Mar 22 20:01:48 you can write js without a linter you just have to be careful Mar 22 20:01:53 you really cant Mar 22 20:02:00 not in a professional environment Mar 22 20:02:16 it's interesting to me that you have a problem with a linter being necessary since I presume you program java and in java you're generally p. dependent on an IDE Mar 22 20:02:38 I've been learning java/android lately and they don't even write tutorials explaining the imports because they assume everyone uses an IDE, heh Mar 22 20:02:47 which will auto-import Mar 22 20:02:52 and we all use lint on anroid too right LD Mar 22 20:03:03 Dont get me wrong, i *like* static code analysis. A lot. There is a lot of value in it, for sure. But there are just way way too many pitfalls in JS that you dont find in e.g. java. Mar 22 20:03:33 hah, at least you can do imports in java :P Mar 22 20:03:44 fair Mar 22 20:03:48 there is no real static analysis for js Mar 22 20:03:50 modern js includes modules though Mar 22 20:03:54 I get what he's saying though Mar 22 20:04:00 that's why compiled languages are a thing Mar 22 20:04:11 pfn, what do you call jslint then? Mar 22 20:04:16 i hear good things about Typescript Mar 22 20:04:22 liefer, a toy Mar 22 20:04:26 lol okay Mar 22 20:04:33 yea, typescript is becoming p. popular Mar 22 20:04:41 Why is this not removing retrofit logs into logcat ? https://gist.github.com/wviana/a246a25cd28697c913cb Mar 22 20:04:43 We use Lint on Android, but more for android edge cases than for base level language issues Mar 22 20:04:43 I personally don't care for it though Mar 22 20:04:58 I'm fine with es2015 & a linter Mar 22 20:07:03 This is going to sound wierd, coming from a guy who does xamarin every day, but adding another layer on top of the "native" platform is not all joy and happy days. I hear good things about typescript too, but im very sceptical about going that route Mar 22 20:08:04 i'd much prefer fixing javascript with tooling Mar 22 20:08:14 well, trying to at least :P Mar 22 20:08:29 there is no tooling to fix the type mess Mar 22 20:08:44 agreed Mar 22 20:08:57 iirc there is tooling to add types to vanilla js Mar 22 20:09:01 let me see if I can find it Mar 22 20:09:03 sec Mar 22 20:09:09 which is exactly what something like typescript solves Mar 22 20:09:43 https://github.com/gcanti/tcomb Mar 22 20:10:11 it's not quite the same thing as it's runtime checking Mar 22 20:10:42 but better than nothing, if you're into this sort of thing Mar 22 20:10:46 Its cool, i guess, but it seems a bit like a desperate attempt to fix something thats broken by design :) Mar 22 20:10:58 runtime checking is useless Mar 22 20:11:15 if you can't check it before it runs, it remains just as broken Mar 22 20:11:39 At least you could argue that it would force people to write more tests \o/ Mar 22 20:11:46 but in my experience, not many javascript tests are written =/ Mar 22 20:11:53 I like static checking because it reduces the number of tests I must write Mar 22 20:12:04 with dynamic typing, tests are an absolutely requirement Mar 22 20:12:17 Is there some way that retrofit may be logging into logcat without Log class ? Mar 22 20:15:35 So this might be a bit flamebait-y, but the whole "javascript being the only real language for frontend in browser"-thing is a little bit sad, considering the browser could very well take over the native app market Mar 22 20:16:12 can i run android os on a 808 nokia ? Mar 22 20:16:24 99% of all apps could easily be replaced by a webapp running in the latest chrome. Between offline support, push notifications, gps and other sensors, i really have a hard time arguing why one should make a native app over a webapp Mar 22 20:16:36 I deffo agree with that tbh Mar 22 20:16:42 but I'm primarily a web dev, heh Mar 22 20:17:06 it's obviously easier to attain a platform feel by going native and I think users expect that to a degree Mar 22 20:17:13 liefer, use a language that compiles to javascript Mar 22 20:17:24 and users are also accustomed to going to the app store to find an app rather than installing to home screen Mar 22 20:17:41 but beyond those two things you can get a lot of parity between a web app and a native app in today's technology Mar 22 20:17:49 powersurge, that part is easy, the store -> publish a shim to store Mar 22 20:18:14 pfn, i've had my fair share of "joy" with xamarin. Im sceptical about adding another layer to my stack. You may be right, and i may end up doing so, but im fearful of the issues im inevitably going to encounter doing that Mar 22 20:18:20 like something with phonegap or similar or are you talking about something else pfn ? Mar 22 20:18:37 powersurge, a simple activity that just installs a shortcut to the homescreen when installed/run Mar 22 20:18:43 at least we're "lucky", that safari is still a terrible browser, so iOS is holding back the mobile-targeted webapps for now Mar 22 20:18:46 ah Mar 22 20:18:51 I didn't even know you could do that Mar 22 20:19:03 yea, web apps on ios are second class for the most part Mar 22 20:19:05 which is kind of funny Mar 22 20:19:20 considering originally apple was going to be the only ones allowed to make native apps and all the plebs had to make web apps Mar 22 20:19:37 haha jep Mar 22 20:20:14 actually, i think its funnier we are doing native apps for google Mar 22 20:20:23 pfn, but i guess you know all about those issues yourself, i think i remember seeing you talk about using scala for android :) Mar 22 20:20:23 is there a way to look at whats holding up an android app... the specific calls... I have a project that I trying to find where an ANDROID app is Hanging... it hangs for a about 5 seconds then continues... trying to find bad code that would do this... also thinking it could be garbage collection Mar 22 20:20:36 liefer, yes, except I have no issues :p Mar 22 20:20:45 *no* issues? I find that hard to believe :P Mar 22 20:21:48 * pfn shrugs Mar 22 20:21:49 Oh wow, it's called Timber because it's logging Mar 22 20:21:50 IrishGringo: use the debugger Mar 22 20:21:51 scala has 100% java interop Mar 22 20:21:58 there are no issues Mar 22 20:22:03 ... I should have figured that out a long time ago Mar 22 20:22:10 start at a known good place and then step through until you see the bad behavior Mar 22 20:22:31 Officially xamarin supports all iOS and android api's 100%. The devil is in the (implementation) details Mar 22 20:22:46 afaik you can even step into android internals although those will be less readable Mar 22 20:22:59 might be the tooling, might be the build system, so much extra stuff you have to account for once you go that route Mar 22 20:23:06 liefer, the difference is that xamarin wraps all apis in something that .net stuff can work with Mar 22 20:23:16 so you have a lot of stuff to have issue with Mar 22 20:23:21 my stuff works flawlessly Mar 22 20:23:25 everyone should just drop those toolkits entirely and switch to Kivy Mar 22 20:23:29 what's your stack look like pfn Mar 22 20:23:43 for what, android? scala Mar 22 20:23:46 and whatever libraries as necessary Mar 22 20:23:48 I'm curious. I looked into scala before I looked into the java way but the info was spread out too far Mar 22 20:23:58 maybe I'll revisit it once I learn the canonical way of android dev Mar 22 20:24:58 no matter what path you eventually go down, the canonical way is helpful to know Mar 22 20:25:35 Wasn't there an Android library that let you annotate methods, and it would log the call time and variables whenever it was called? Mar 22 20:25:53 Oh yeah, hugo Mar 22 20:25:53 you can do that with aspectj Mar 22 20:25:55 it's not android-specific Mar 22 20:26:57 aspectj is much more powerful than just logging though, and can be a bit of pandoras box to open if you're not careful Mar 22 20:27:22 presumably, hugo is done through aspectj Mar 22 20:28:20 personally i generally avoid using aspects. I have however seen it do absolute magic for legacy codebases Mar 22 20:28:30 liefer, but yes, for scala, there is some issue around the tooling that has hiccups here and there Mar 22 20:28:57 mostly with aar resources not automatically being recognized by IDE Mar 22 20:29:18 Hmm, yeah, i figured. But honestly, those are not too bad for xamarin, so i guess they're even less for scala Mar 22 20:29:23 some day, I'll fix jetbrains/sbt-structure for it (or find some volunteer to do it) Mar 22 20:29:34 these days most of my issues are with 3rd party libraries not being available in a .net version Mar 22 20:29:55 yes, not an issue with scala, consume java libraries all you want Mar 22 20:30:18 thats a very big plus for sure Mar 22 20:30:47 my build system also completely ignores dex limits in development Mar 22 20:30:55 not a problem, regardless of api level Mar 22 20:31:05 there are some binding stuff for xamarin, that lets you auto-magically use objective-c and java libraries in .net, but the results vary a lot Mar 22 20:31:37 I need to give my .net projects some love some day Mar 22 20:31:59 im curious, it seems like you will be able to use java8 in android soon.... will you still be using scala then? Mar 22 20:32:16 yes, java8 doesn't do anything except add lambdas and streams Mar 22 20:32:23 the language itself is still shit Mar 22 20:32:27 type system is garbage Mar 22 20:32:27 lambdas and streams are pretty sexy though Mar 22 20:32:30 I scala for the type system Mar 22 20:32:44 and java8 and kotlin both are lightyears behind in that regard Mar 22 20:33:14 and light years ahead in some other areas. To each their own. Mar 22 20:33:27 kotlin and java8 aren't lightyears ahead in any area Mar 22 20:33:35 ease of use Mar 22 20:33:38 Tooling? Compilation speed? Documentation? Community? Mar 22 20:33:48 there’s a reason scala has it’s reputation of being difficult to use Mar 22 20:33:57 mostly troll fud Mar 22 20:34:12 stackoverflow survey reveals otherwise Mar 22 20:34:13 yup, everyone who disagrees is a troll Mar 22 20:34:14 Scala is slower to compile than Java is troll fud? Mar 22 20:34:29 slower to compile isn't really an issue Mar 22 20:34:33 but yes, that is true Mar 22 20:34:41 kotlin is slower to compile than java Mar 22 20:34:42 so what Mar 22 20:34:53 So in your opinion, Scala is light years ahead than Java and Kotlin in all areas… oooookay Mar 22 20:35:39 I don't consider compile time to be an area Mar 22 20:35:51 but ok, yes, java is ahead in compile time Mar 22 20:35:51 That was not your claim. Mar 22 20:36:06 I don't consider it to be an area, thus my claim of all areas stands Mar 22 20:36:07 “pfn: kotlin and java8 aren't lightyears ahead in any area” Mar 22 20:36:12 i dont care about compilation speed either, hardware is cheap. But you cant deny there is a definte learning curve with scala, compared to java, and i feel like the documentation and community concerns are very real too (although scala seems to be growing rapidly, so i may be overestimating this) Mar 22 20:36:18 and Tooling (IDE). And a bunch of other things. Mar 22 20:36:26 It’s a matter of compromises, all languages make compromises Mar 22 20:36:47 Some people prefer a rich type system and worse support in other areas, others make different choices Mar 22 20:36:49 IDE support for scala is not weak Mar 22 20:36:59 kotlin has less tooling support if you take the IDE argument Mar 22 20:37:27 Kotlin’s IDE support has been top notch even from the beta days, Scala is still buggy as hell after years in existence. Mar 22 20:37:51 Most Scala devs I know have now reverted to ENSIME or vim in desperation. Mar 22 20:37:54 agree, there are some issues with faulty false-positive errors Mar 22 20:37:59 I wouldn't say most Mar 22 20:38:31 ensime and scalaide both use the same presentation compile Mar 22 20:38:45 not the complaint out of people working at verizon, morgan stanley, goldman, etc. Mar 22 20:38:54 largest scala shops in the world Mar 22 20:39:31 I honestly would never consider using kotlin. I justdont see its potential for ever gaining a big following. Sure its cool... but not cool enough. Scala on the other hand has some very real advantages in the enterprisey scalability and big-data things that are apparently a big deal these days Mar 22 20:39:52 verizon has several hundred people working with scala Mar 22 20:39:59 at least last I heard Mar 22 20:40:18 liefer: Good for you, pick the language you prefer. As for gaining traction, there are about 2300 people on the Kotlin Slack right now, in one channel alone. I think Kotlin has some momentum. Mar 22 20:40:24 if im going to invest my time into a language, i want many many thousands developers Mar 22 20:41:07 Verizon has become the poster child of people defending Scala. Used to be LinkedIn and Twitter but these twoc ompanies are moving away from Scala. Even Typesafe seems to be moving away from it too Mar 22 20:41:10 I wonder who are and why people are using my kotlin-plugin Mar 22 20:41:10 jaana, huh, thats interesting. Seems like more people than i would expect Mar 22 20:41:16 twitter is not moving away from scala Mar 22 20:41:19 that is absolutely false Mar 22 20:41:27 twitter has hired a core scala compiler developer Mar 22 20:41:39 and to sponsor his work on core compiler work Mar 22 20:41:56 Yes yes, think bigger. Compare the Scala job reqs Twitter has compared to Java's Mar 22 20:42:06 Anyway, again, pick the language you want Mar 22 20:42:18 Just be aware it has pros and cons like all the others. No language is “light years ahead of all the others in all areas". Mar 22 20:43:04 Lets be honest, except for javascript pretty much every language these days is pretty good. Its all about the tooling and community. Well, community really, because if the community is there tooling will come Mar 22 20:43:20 liefer: I’d say this applies even to Javascript Mar 22 20:43:41 i was partly joking :) Mar 22 20:45:11 Kotlin seems pretty nice, but in the end I don't think Java is sufficiently bad to move to it Mar 22 20:46:40 For some reason my onResponse is being called in my retrofit callback, but my logs say that a request never hit my server Mar 22 20:46:44 I think it is Mar 22 20:47:03 Its weird Mar 22 20:47:15 I have a log message at the top of my script whenever something hits Mar 22 20:47:18 And nothin Mar 22 20:48:19 you'll see scala growing in financial because of Spark, maybe Kafka Mar 22 20:48:45 but i think now you can so Spark with Python, Java, Scala, and R even if API parity isn't complete Mar 22 20:48:56 R probably furthest behind Mar 22 20:49:05 scala was growing in financial before spark Mar 22 20:49:37 and first world problems, but kotlin is so similar to swift in syntax that it's bound to cause confusion Mar 22 20:49:46 Growing is meaningless. Especially if the growth has been happening for years and the technology is still a niche. Mar 22 20:49:52 similar yet different, I mean Mar 22 20:50:09 "growing is meaningless" lol wat? Mar 22 20:50:12 even Dean Wampler pretty much said the same thing (Spark/Scala <- Hadoop/Java) Mar 22 20:50:25 surely beats stagnating or fading, no? Mar 22 20:50:33 If you grow for years but still getting nowhere, growth alone is meaningless Mar 22 20:50:46 It’s not the right metric to assess success Mar 22 20:51:06 exhibit A : profit share Android vs Apple :D Mar 22 20:51:11 Maybe. You could argue that you're just getting closer and closer to the critical mass where you'll finally grow exponentially Mar 22 20:51:15 all speculation, of course Mar 22 20:51:23 but saying its all meaningless? cmon Mar 22 20:51:49 Meaningless as a measure of success Mar 22 20:51:52 well, absolute growth as a number is fairly meaningless, imo Mar 22 20:51:54 It’s a necessary condition but not sufficient. Mar 22 20:51:59 relative growth is relevant Mar 22 20:52:51 Not really, growing 100% when you have 0.04% of market share sounds impressive but is meaningless. Mar 22 20:53:00 Growing 1% when you have 95% of the market, now that’s impressive. Mar 22 20:54:23 (using these numbers because Scala seems to be in 0.08% market share today from odersky’s latest graph) Mar 22 20:55:34 i like g00s point about Android vs Apple. Marketshare is not everything :) Mar 22 20:55:56 For technologies that are free, it’s everything :) Mar 22 20:56:30 hehe Mar 22 20:56:37 hippies giving stuff away for free, pfft :P Mar 22 20:56:44 Whats the correct way to dismiss a "contextual action bar" - from outside - i.e. without calling mode.finish() from within one of the interface methods ? Mar 22 21:02:04 for android wear are there different flavors of android wear or it's all the same? Mar 22 21:02:07 for the os Mar 22 21:03:40 the os is the same, but there are different versions of it Mar 22 21:03:44 just like regular android Mar 22 21:04:00 so like samsung can have their modifications of it also? Mar 22 21:04:11 that make it slightly different from the pure android wear Mar 22 21:04:12 no, I meant 5.0 vs 6.0 Mar 22 21:04:16 oh yeah Mar 22 21:04:21 ok Mar 22 21:04:26 manufacturers are not allowed to skin it like normal android Mar 22 21:04:36 that's what I thought but I couldn't find where I saw that Mar 22 21:07:02 has anyone ever experienced an issue with repo sync where it will pause partway through and wait for input? the only thing that makes it start going again is scrolling up. it happens in 2 different terminal emulators Mar 22 21:10:57 need help with Call requires permission which may be rejected by user. Code should explicitly check to see if permission is available. location manager Mar 22 21:11:54 you don’t need help; it says pretty clearly what to do Mar 22 21:16:15 freelancerbob: was that a sentence? Mar 22 21:16:48 ^^ Mar 22 21:18:37 <|PiP|> do onClickListeners stack? in other words, can i attach more than one? and if so, how can I remove a handler? Mar 22 21:18:51 no Mar 22 21:19:31 you can remove it by setting it to null, i believe. or just overwrite it Mar 22 21:19:46 <|PiP|> So a view can't have more than a single handler at a time? Mar 22 21:19:50 nope Mar 22 21:19:59 Is there a way to customly de-seriaize a json item for a pojo Mar 22 21:20:10 blocky ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED Mar 22 21:20:12 For example, I have a string, but I want to parse it into an arraylist instead of a string Mar 22 21:20:17 Can I do this with RetroFit? Mar 22 21:20:19 i call it from fragment Mar 22 21:20:35 what i have to set to "this" Mar 22 21:21:02 freelancerbob, what do the docs say? Mar 22 21:23:57 So is anyone aware of any way to loop an audio track for 20+ mins without the gaps caused by mediaplayers .setLooping()? Mar 22 21:24:29 let my client know its been a long known issue but really want to find a workaround Mar 22 21:37:37 orbyt_, AudioTrack? Mar 22 21:42:37 Mavrik: Looked into using that before, came across some issues. I'll look into it again I suppose. Mar 22 21:47:39 Using the camera flash as a flashlight is a OS version 6.0.0 (Marshmellow) [API 23] and newer feature, yes? I was looking for the command for it and had no luck. Mar 22 21:48:04 it’s also baked into several manufacturer’s versions of the software Mar 22 21:53:34 how to let application accept permissions ? Mar 22 22:01:27 you need to request it at runtime Mar 22 22:01:31 eglmakecurrent failed Mar 22 22:01:40 Anyone know how to fix this for Genymotion? Mar 22 22:02:43 really ? Mar 22 22:02:54 yes Mar 22 22:03:13 and why i can't allow ? Mar 22 22:03:29 that is allowed once you have it in the manifest Mar 22 22:03:41 its not a dangerous permission so you dont have to request it Mar 22 22:04:12 ok what is best place in code to put requesting permissions ? Mar 22 22:04:22 ... Mar 22 22:04:28 The one written in the basic documentation O.o Mar 22 22:04:40 ^ Mar 22 22:05:20 ok i got it Mar 22 22:05:20 http://developer.android.com/training/permissions/requesting.html Mar 22 22:05:23 thanks guys Mar 22 22:07:14 you're not using android studio? Mar 22 22:07:18 oops Mar 22 22:07:18 nm Mar 22 22:08:40 I think I fixed some of the leakage in this app Mar 22 22:08:59 Plumbin'_ Mar 22 22:10:10 hey when using MediaPlayer and .setDataSource to stream from a url, why isnt a network on main thread exception thrown? Mar 22 22:10:24 does mediaplayer internally hand threading for it? Mar 22 22:10:55 MediaPlayer isn't written in Java Mar 22 22:11:07 So the rules don't even apply :) Mar 22 22:11:16 And yes, it's threaded internally Mar 22 22:12:03 lol Mar 22 22:12:06 but alright thanks Mar 22 22:13:00 orbyt_, also be careful if you're relying on implementation details... devices MediaPlayers aren't 100% consistent :) Mar 22 22:13:05 Especially when it comes to handling network Mar 22 22:13:33 I've been fighting with MediaPlayer for a few days, its a pain in the ass Mar 22 22:14:26 but we need an uninterrupted 25 minutes playback stream so...this: https://code.google.com/p/android/issues/detail?id=18756 was killing us Mar 22 22:17:01 As I said, use audiotrack and don't rely on MediaPlayer Mar 22 22:17:22 AudioTrack feeds raw audio directly to sound card buffers Mar 22 22:17:30 As far as I can tell AudioTrack has the same looping issue Mar 22 22:18:26 What do you mean? Mar 22 22:18:37 It can't have beacuse it doesn't loop anything Mar 22 22:18:46 You're giving it data that it should play in realtime. Mar 22 22:18:53 If you have a "looping issue" then your source stream is broken Mar 22 22:21:47 Mavrik: I tried it and ran into a looping issue, dont remember the exact details but a few SO answers suggest the same. I'm gonna try and re implement it regardless. Mar 22 22:22:14 I want to create something at least a bit profitable, and afaik, that requires some market research in android market - can you suggest any tools/apps/resources that help researching android market, trends etc? Mar 22 22:22:31 orbyt_, just feed it audio continiously Mar 22 22:22:43 Deele: nothing more than on any other platform Mar 22 22:22:46 don't use looping and stuff, just feed it buffers as long as you need Mar 22 22:23:12 Mavrik: will try it Mar 22 22:25:52 you need to handle properly audiotrack but you can definitely play for hours with it Mar 22 22:26:13 you need a consumer and a producer thread basically Mar 22 22:26:47 and you must ensure that you can feed audiotrack buffer faster than it consumes the pcm data Mar 22 22:27:09 rgr Mar 22 22:27:31 yeah, I bet there's some code somewhere that decodes an MP3 and feeds it to audiotrack on github :) Mar 22 22:27:43 pretty sure there are many Mar 22 22:28:24 Getting some Date overflows after Linux epoch even though they use longs Mar 22 22:28:52 and based on what you asked orbyt_: "hey when using MediaPlayer and .setDataSource to stream from a url, why isnt a network on main thread exception thrown?" you are doing it wrong Mar 22 22:29:02 Would work with Java Date, but Mar 22 22:29:06 adq: whys that Mar 22 22:29:11 has a weak API and a lot of deprecations Mar 22 22:29:12 don't do network stuff on UI (main) thread, same for producing and consuming buffer with audiotrack Mar 22 22:29:32 Any actual real decent date classes out there I should reach for? Mar 22 22:29:33 orbyt_, because these operations can be costly and can block your UI thread and you don't want that Mar 22 22:29:53 (audiotrack is also blocking in streaming mode, at least in lower api) Mar 22 22:30:28 orbyt_, read online about android UI thread and what should not be done in it Mar 22 22:30:34 adq: Thats why I asked, wanted to know if it handled it internally which Mavrik noted it did. Though I'm just going through my options currently, and my client suggested uploading the entire track to a server and just streaming it. Mar 22 22:31:33 For some reason when I add retrofit and gson to my current gradle dependencies, the build fails Mar 22 22:31:42 Error:Execution failed for task ':app:transformClassesWithDexForDebug'. Mar 22 22:31:42 > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2 Mar 22 22:33:15 Any ideas? Mar 22 22:35:26 JakeWharton, you around? Mar 22 22:36:49 You haven't provided enough infi Mar 22 22:37:12 Ok, I added these two dependencies to my gradle file: Mar 22 22:37:17 compile 'com.squareup.retrofit2:retrofit:2.0.0' Mar 22 22:37:35 compile 'com.squareup.retrofit:converter-gson:2.0.0-beta2' Mar 22 22:37:37 that is not the error Mar 22 22:37:43 Now when I try to build the project Mar 22 22:38:04 I get: Mar 22 22:38:04 Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2 Mar 22 22:38:10 that is not the error Mar 22 22:38:40 Then where do I find the error Mar 22 22:39:28 pfn what do you mean Mar 22 22:39:53 dunno, gradle is stupid, but that is not the error Mar 22 22:40:01 Thats the only error im getting Mar 22 22:40:05 there is more Mar 22 22:40:15 if you're in IDE, look at the various console windows Mar 22 22:40:21 it outputs that shit somewhere stupid Mar 22 22:40:57 pfn, JakeWharton : http://pastie.org/private/auf2tyx1om4bonzplnxpcq Mar 22 22:41:23 again Mar 22 22:41:25 that is not the error Mar 22 22:41:27 stop pasting it over and over Mar 22 22:41:44 drose379, this is just the build result. the error is somewhere above Mar 22 22:41:46 you've pasted it 3 times now, and gotten the same response Mar 22 22:42:14 DexIndexOverflowException Mar 22 22:43:17 That look familiar to anyone? Mar 22 22:44:30 sounds like you're over 65k methods Mar 22 22:44:44 No way Mar 22 22:44:54 Well maybe in the libs I have Mar 22 22:46:01 Never knew there was a limit Mavrik Mar 22 22:47:40 yup. it’s one of the dumber things about android development Mar 22 22:47:58 I got rid of one 2 of my dependencies but same issue Mar 22 22:48:49 Ok fixed, but thats annoying Mar 22 22:48:49 wt Mar 22 22:48:50 f Mar 22 22:49:43 drose379: you can use multidex you know Mar 22 22:49:54 s' that? Mar 22 22:50:19 http://lmgtfy.com/?q=multidex+android Mar 22 22:50:55 thx Mar 22 22:51:18 I'm trying to get a map to display in my fragment but nothing is showing up, just blank, it doesn't crash or anything though :( It's a fragment below a collapsing toolbar. Mar 22 22:51:20 http://pastebin.com/92FxvuFf Mar 22 22:53:13 Akayllin check your map api keys Mar 22 22:53:22 usually thats what causes mine to be blank Mar 22 22:56:19 Retrofit question: I made a base retrofit client that connects to an endpoint and exposed it as a Dagger2 module. Elsewhere I have that client wired into classes that extend from a baseclass Mar 22 22:57:15 I'm getting the following exception (java.lang.IllegalArgumentException: API interfaces must not extend other interfaces) thrown from line 8: http://pastebin.com/LvWdsQbh Mar 22 22:57:25 Taios: It should be correct, this is the first time doing api key though let me check again Mar 22 22:58:21 buuut, the API interface isn't extending from other interfaces, so is the inheritence structure that's causing this issue or something else? Mar 22 23:02:10 Good evening folks, do you think it is a good practice to do boolean check like this in abstract class? http://pastebin.com/Uph5dBc2 I mean the whole throwing error when checking for available space in abstract class and catching error in the subclass. Mar 22 23:10:31 scratch that, stale build. Man, I want that last hour of my life back again Mar 22 23:34:34 Is it inappropriate to make a retrofit call on the main thread (In an activity, and handle the onResponse in an anon class)? Mar 22 23:36:57 if you use the version of the call which executes async, it should be fine Mar 22 23:38:14 Yes im using call.enqueue Mar 22 23:38:26 When would it *not* be fine s73v3r ? Mar 22 23:39:01 that’s not what I meant Mar 22 23:39:12 OK Mar 22 23:39:27 So making this call from the activity is fine, since its async Mar 22 23:39:30 Basically what im asking Mar 22 23:39:35 unless they changed it, there are two versions of the call that can be generated. One which just returns a thing, which is a synchronous call, and one which takes a callback parameter, which is async Mar 22 23:39:42 Taios: well my api key is correct and :\ Mar 22 23:39:46 Right s73v3r Mar 22 23:39:57 .execute = synchronous Mar 22 23:40:02 .enqueue is asynchronous Mar 22 23:41:36 So I think i'm all set Mar 22 23:46:04 Anyone with input please LMK, im trying to do this right Mar 22 23:47:22 does anyone see any glaring problems with the code i pasted? The api key is correct Mar 22 23:50:07 Akayllin where is the code you pasted Mar 22 23:55:43 http://pastebin.com/92FxvuFf Mar 23 00:01:45 Akayllin your android manifest? Mar 23 00:02:38 also your parent framelayout is wrap content while the child (the map) is match parent - i'd imagine this will cause some weird pproblems Mar 23 00:04:51 Akayllin - are you getting grey for the map, or zilch? Mar 23 00:07:20 Taios zilch. it used to just crash. this is the furthest i've gotten so far haha. Mar 23 00:07:28 here is manifest: http://pastebin.com/NtVrJZbx Mar 23 00:07:41 Akayllin i'm pretty sure the issue is related to the fact your framelayout is set as Mar 23 00:07:43 wrap content Mar 23 00:07:47 and then your child (the map) Mar 23 00:07:50 is set to match parent Mar 23 00:07:56 Can you see why this would be an issue? Mar 23 00:08:03 i fixed that and reloaded, still nothing Mar 23 00:10:01 is there something in android like an asp:repeater? Mar 23 00:10:11 no idea what that is Mar 23 00:10:35 it's like you create a item template in the repeater, and then bind to the repeater Mar 23 00:10:38 let me find a sample.. Mar 23 00:11:13 http://stackoverflow.com/questions/674204/binding-a-generic-list-to-a-repeater-asp-net Mar 23 00:11:29 sounds similar to recyclerview? Mar 23 00:12:05 recyclerview eh Mar 23 00:12:12 i'll check that out Mar 23 00:12:45 well what do you guys do, when you have an arraylist, and want to display each item the same way over and over with the different data Mar 23 00:13:00 yeah recyclerview Mar 23 00:13:03 ah ok Mar 23 00:17:30 hmm - Akayllin it also seems you're using a mapview in the layout and then a mapfragment? Mar 23 00:18:07 i've not used a mapview before, only played around with mapfragments Mar 23 00:18:19 i tried just a but couldn't get it to work. half of the guides i found use old methods that are outdated :\ Mar 23 00:19:18 it's a viewpager with different fragments, the entire fragment is a map so whichever way works is fine, the way it is now is just the only way that hasn't instacrashed for me Mar 23 00:19:50 the entire fragment being this specific one* the other fragments do different thigns Mar 23 00:21:04 presuming you've tried getting it to work on it's own first? & is mapView.getMapAsync(this); called? Mar 23 00:21:49 urg I can barely keep my eyes open so i'm going to have to sleep - however if this is still an issue tomorrow i'll take a proper look for you =) Mar 23 00:23:26 also - mapview is depreciated? Mar 23 00:24:09 ah no it's not my bad Mar 23 00:27:37 it is called in onResume. i tried it in onCreate but kept getting null errors Mar 23 00:47:35 hardware repair on a phone, whitch channel do I go? Any suggestions? i have a trublesome phone that I need peers to communicate with :-) Mar 23 01:16:26 Anyone familiar with retrofit? Mar 23 01:16:52 me Mar 23 01:17:23 Perfect, Ok. Is it ok to call Call.enqueue from an Actiivty? Mar 23 01:17:44 I can show code if you would like Mar 23 01:18:30 You asked this already and it was answered yes Mar 23 01:18:46 Hey I had to hear it from you Mar 23 01:19:14 Do you get a notification whenever someone types the word retrofit? Mar 23 01:19:41 I just sit here watching 24/7 Mar 23 01:20:35 Interesting, mind if I show you a snippet of code while you're here? I just started with retrofit today and I wanna make sure im on the right track Mar 23 01:20:50 I was using ResultReceiver before, so I hope this is a step in the right direction? Mar 23 01:20:53 Sure Mar 23 01:21:02 I don't know what ResultReceiver is Mar 23 01:21:17 Its just a class that comes with the sdk Mar 23 01:21:56 My totally unbiased opinion is that you are on the right track making the switch Mar 23 01:22:38 Lol, Ok is it ok if I PM you the code? Its a work project dont want to be sharing it in public..? Mar 23 01:23:34 drose379: for code like that, I usually just paste the relevant parts, with the names of the innocent removed Mar 23 01:23:46 Good point guideX Mar 23 01:24:00 :) Mar 23 01:24:08 OK, JakeWharton and whoever else wants to check it out: http://pastie.org/private/c6j35gzo75o1zxrtssbka Mar 23 01:24:13 drose379 just convert it to scala first; jake loves that stuff Mar 23 01:25:02 won't have to worry about anyone figuring it out :) Mar 23 01:25:18 Funny g00s Mar 23 01:26:40 Did anyone get a change to look at it? Mar 23 01:32:48 Lost ya Mar 23 01:44:53 hm, thinking about the N floating window stuff - if I have a floating activity (small), which is above another activity (full screen) i think this will look weird Mar 23 01:45:12 on a mobile, it just looks like a dialog over an activity Mar 23 01:45:28 but on N multi-window it could look like two apps overlaying each other Mar 23 01:45:37 * g00s ponders Mar 23 01:46:30 (this is for modal stuff) Mar 23 01:55:32 hi all, i have an sqlite db and a corresponding sqliteopenhelper and contentprovider for my app. i would like to keep it in sync with mediastore's images table (let's say i have one record per image ID in my database; whenever the user taps a button the app will loop through mediastore with a Cursor and insert into my db). what would be the best-practices way to get differring records (not necessarily Mar 23 01:55:33 newly inserted; modified or deleted records should be shown too) between the two DBs? Mar 23 01:56:20 should I use execSQL and brush up on my SQL JOINs or can i simply do set difference with removeAll() in the application logic Mar 23 01:59:15 theres a really good sql library I don't know on top of my head it lets you do stuff like select().from(someTable).where(bla) etc.. Mar 23 01:59:55 but yeah you should learn some sql it helps very much. Mar 23 02:00:42 :O wow i'll be hunting for that library for the rest of today then lol Mar 23 02:02:28 yeahh i'm getting a little fed up of constructing hacky selects with lots of INs and manually creating the ?,?,? string lol Mar 23 02:02:38 It's called DBFlow Mar 23 02:02:54 \o/ yay thanks Mar 23 02:03:33 your welcome :D Mar 23 02:12:54 that robot (Liam) that recycles iphones is pretty cool Mar 23 02:13:09 maybe Andy Rubin should have worked on something like that for android :D Mar 23 02:33:38 Hey so I wanted to implement hashtags with unique borders around it, my thought process was to have a linear layout and dynamically add them, however I do want them to be next to each other so I figued orientation horizontal, but what happens if the tags are more than the width of the screen does it start moving onto the second line or how do I go about that Mar 23 02:35:34 Lonesoldier728 maybe you want FlowLayout Mar 23 02:35:55 https://github.com/blazsolar/FlowLayout Mar 23 02:38:00 yep sounds like exactly what I need thanks **** ENDING LOGGING AT Wed Mar 23 02:59:58 2016