**** BEGIN LOGGING AT Tue Dec 30 02:59:58 2014 Dec 30 03:00:35 I updated my app to now include a DrawerLayout. I now have two activities one that I know works on most devices (reliable) and this new one that has no problems with Android 3.0 onwards. I would like to keep the old layout/activity as a fallback is this possible ? Is it possible to tell start MainActivity if Android < 3.0 and DrawerActivity when Android > 3.0 ? Dec 30 03:01:08 Or better yet anyway to try and first open DrawerActivity if that fails fallback on MainActivity ? Dec 30 03:02:08 whats the best way to interact with a sharedpreferences file across multiple java files? create it as static and initialize it in the mainactivity? and access it using MainActivity.nameOfSharedPreferencesVariable? Dec 30 03:04:41 oh nvm could just use getSharedPreferences Dec 30 03:05:16 but that brings me to another question, must i interact with sharedpreferences in an activity? can it be in a java class that does not extend Activity? Dec 30 03:07:36 mantazer: well, you have to have a Context to get the shared preferences, of course Dec 30 03:07:43 but it doesn't have to be an Activity context Dec 30 03:08:03 the actual class that contains the code is irrelevant Dec 30 03:08:34 hmm Dec 30 03:08:50 not sure i follow. Dec 30 03:09:23 You have to have a context object to be able to call Context.getSharedPreferences() Dec 30 03:09:47 That context object colud be an activity, a service, the context you get in a BroadcastReceiver, etc. Dec 30 03:10:02 so just have a context field in my class? Dec 30 03:11:58 oh i think i understand, maybe. when calling the function that uses sharedpreferences, just pass in a context from the calling activity Dec 30 03:13:06 yes, there are many ways you could go about it :) Dec 30 03:13:29 thx! i appreciate your help Dec 30 03:33:29 Question for you all: In my Facebook login button callback, I'd like to start a new Intent so I can launch my "HomeActivity" after the user logs in via Facebook. In the example for using Intents I found on the Android dev website, they do Intent intent = new Intent(this, HomeActivity.class);. My problem is the "this" parameter in the constructor is referencing the Facebook callback, not the MainActivity. I tried replacing "this" with MainActivity.cl Dec 30 03:34:34 this would be awesome http://arstechnica.com/gadgets/2014/12/google-tracker-2015-everything-google-is-working-on-for-the-new-year/2/#h3 Dec 30 03:36:33 t0astt: not really following, but the 'this' is a Context, so you need to pass it in some how Dec 30 03:37:50 bankai_au, I think I figured it out... I found a StackOverflow article where the person used MainActivity.this. I'll try it and let you know if it works. If it doesn't I can provide some pastebin or something so you can see what I'm doing. Dec 30 03:37:57 t0astt: MainActivity.this Dec 30 03:38:02 yes, that :) Dec 30 03:38:43 that's how you access the "this" instance of the outer class from a non-static inner class. Dec 30 03:38:49 g00s: want a chip in your eye? contact lenses scare me enough let alone 'smart' ones Dec 30 03:40:11 bankai_au as long as its low sodium Dec 30 03:40:20 i think the salt would hurt Dec 30 03:40:47 "Android Apps as a universal binary" i've been wondering about this for a while Dec 30 03:43:27 g00s wants a chip on his shoulder ;) Dec 30 03:44:11 g00s: I'm pondering using rx(java|android) for some input handling. rx seems like a natural fit for input in general. could there be any surprises I might want to know about? (obviously I'm a newbie to rx, so pretty much anything goes) Dec 30 03:44:34 groxx don't mutate state outside the pipeline Dec 30 03:44:35 lots of surprises, have fun! :) Dec 30 03:44:47 when I include in my androidmanifest.xml I have "0 supported devices" on my play listing. When I remove it I have 1113 supported. What gives? Lots of android devices have cameras Dec 30 03:45:06 groxx and see part 4 of grokking rxjava for the subscription / cache / thing Dec 30 03:45:43 yup, have read. and yeah, I'm aiming for purity :) Dec 30 03:46:10 i vote rxjava best library of 2014 :D Dec 30 03:46:11 bilb_ono: well, it should be android.permission.CAMERA Dec 30 03:46:21 although, I'm not sure if that would cause the problem you're seeing Dec 30 03:46:28 bilb_ono: you probably want `required="false"` in there too, unless you actually require a hardware camera. Dec 30 03:46:36 but yeah, .CAMERA might be the problem Dec 30 03:47:12 groxx: that would be on the uses-feature, not the uses-permission Dec 30 03:47:24 if i want to compile "twrp" only, as in team win recovery, why would i need to download and compile the entire android source code just for a recovery image? Dec 30 03:47:27 please Dec 30 03:47:40 bynarie: wrong channel Dec 30 03:47:50 JesusFreke: ah, right. thanks :) Dec 30 03:48:00 how so bankai_au, this is android development channel Dec 30 03:48:03 ? Dec 30 03:48:13 *sigh* we need a bot for this Dec 30 03:48:18 bynarie: app development :) Dec 30 03:48:19 read the MOTD, it's "android application development" :) Dec 30 03:48:30 so no one knows the answer Dec 30 03:48:31 ? Dec 30 03:48:44 _probably_ you want #android-root. seems likely that the skills overlap. Dec 30 03:48:49 ok Dec 30 03:48:54 thanks groxx Dec 30 03:50:57 groxx, well it is a camera app. so they have to have a camera right? Dec 30 03:52:54 bilb_ono: yeah, that probably makes sense then. accidentally requiring a camera for an optional feature is pretty easy to do though. Dec 30 03:56:56 groxx, I have this: and it says 0 supported devices Dec 30 03:57:32 actually I also have this: which might be interferring with it? Dec 30 03:59:05 bilb_ono: yeah, sorry. Jesus Freke was right - required=false goes on the feature (unless you do require it), not the permission Dec 30 04:00:31 bilb_ono: by the look of https://developer.android.com/guide/topics/manifest/uses-feature-element.html you want permission.CAMERA and hardware.camera. try that? Dec 30 04:03:40 Eclipse ADT lives on! https://projects.eclipse.org/projects/tools.andmore Dec 30 04:05:37 groxx nice find Dec 30 04:05:44 but this worries me "A fork of Google's ADT (Android Development Tools) plugins for Eclipse. These will be maintained and updated separately from Google's code line, which is anticipated will not be actively improved as Google moves toward Android Studio." Dec 30 04:06:12 i think maybe they should just donate ownership the code to eclipse foundation Dec 30 04:07:21 Quick question about navigation fragments: Take Google Music, for example. The navigation fragment that slides out has the Username at the top with their picture. Is there a specific way to do that, or do I need to create that by hand (ie. turn one of the menu items into that style)? Dec 30 04:07:43 Like in this image: http://androidspin.com/wp-content/uploads/2014/10/Google-Play-Music-6.png Dec 30 04:08:14 t0astt http://www.android4devs.com/2014/12/how-to-make-material-design-navigation-drawer.html Dec 30 04:09:41 yea of course its by hand ... surprised google doesn't just limit themselves to View and you do everything yourself Dec 30 04:10:16 Thanks for the link g00s Dec 30 04:11:07 yw Dec 30 04:14:28 btw, has anyone else noticed nav drawers getting "stuck"at something like 8dp when they start coming out of the edge of the screen? Dec 30 04:15:03 groxx i haven't Dec 30 04:15:50 groxx, that was just happening to me in the emulator Dec 30 04:15:54 I can never reliably reproduce it, but it seems to happen to me in every drawer-using app ever (including mine, where I'm not doing anything fancy) Dec 30 04:16:16 I can reliably reproduce it Dec 30 04:16:19 I can't tell if it's a "feature", or if there's a smudge on my screen, or if I'm just going crazy Dec 30 04:16:23 groxx: hold your finger at the edge, watch it peep's to 8dp Dec 30 04:16:35 groxx: its standard behaviour Dec 30 04:16:45 Napalm: yeah, about that distance. but then if you drag to the right, sometimes it doesn't go any further. Dec 30 04:17:12 groxx: if it gets stuck, its because you have custom motion event handling thats not performing correctly Dec 30 04:18:23 doesn't seem to be related to any of my code, it happens even when I have _no_ touch handling code in the window (aside from system stuff, like what drives the drawer) Dec 30 04:18:47 t0astt: how do you repro? I keep trying to touch along the edge, but it mostly doesn't work. Dec 30 04:34:41 hm. first time I've seen wiki-junk on github: https://github.com/ReactiveX/RxAndroid/wiki Dec 30 04:42:36 anyone have experience with the oneplus one phone? Dec 30 04:48:45 lilVaratep: some Dec 30 04:48:54 how was it compared to the nexus 5? Dec 30 04:49:04 bigger. Dec 30 04:49:07 much bigger. Dec 30 04:54:40 the tech news said it had the same screen as the iPhone6+ and apple hogged them all , so that's why the one plus was hard to get because of limited supplies Dec 30 04:55:04 samsung screen ? Dec 30 04:55:15 I guess Dec 30 04:55:36 if that's what the iPhone6+ screen is Dec 30 04:55:49 the gorilla glass Dec 30 04:55:57 exact same as 5s isn’t it? Dec 30 04:56:49 except on the iPhone 6+ it does some weird downscaling that causes artifacts like double lines when you zoom in Dec 30 04:58:04 all iphones are exactly the same come on.. this is android channel Dec 30 04:58:52 heh Dec 30 04:59:02 i’m a die-hard apple fan but i’m starting to lose faith Dec 30 04:59:04 nuh, only some bend Dec 30 04:59:08 at least in the mobile aspect Dec 30 04:59:29 when i resume my cocos2dx android app something texture related is crashing in the c code. the symbols are only like one method deep in the adb log though. is there a way to pull a stack dump or maybe at runtime print a stack trace or something? Dec 30 04:59:36 right now im deciding between oneplus one (stock cyanogen) or nexus 5 Dec 30 04:59:37 lilVaratep: why are you losing faith? Dec 30 04:59:50 the only reason i hate apple products like ipads, iphones etc.. is because of the "security" is rediculous Dec 30 04:59:50 shmooz: the whole ordeal with the 6 and 6+ bends. and how it' Dec 30 05:00:03 and how it’s the exact same phone. no new features. specs aren’t that great either Dec 30 05:00:32 iphones have basically no customization to them whatsoever and they all look the same Dec 30 05:00:35 apple software is amazing, though Dec 30 05:00:44 groxx: deleted. Dec 30 05:01:05 im a die hard android/linux fan.. always will be Dec 30 05:01:59 anyone chime in on if i should get the oneplus one or nexus 5? Dec 30 05:02:01 i would THINK that iOS is some sort of unix kernel considering osx is unix Dec 30 05:02:14 lilVaratep, i have nexus 5 Dec 30 05:02:29 its a great device Dec 30 05:02:45 plenty of roms Dec 30 05:02:52 i'd think ios is a xnu kernel, since osx is. Dec 30 05:03:11 lilVaratep: get the One Plus, the company are fools but the hardware is the best for the price Dec 30 05:03:22 shmooz: yeah i have 24hours to decide if i want the sandstone 64gb black Dec 30 05:04:04 it was voted the phone of 2014 by twit.tv Dec 30 05:04:07 what is xnu, a rip off of gnu? Dec 30 05:04:13 same acronym basically Dec 30 05:04:58 http://opensource.apple.com/source/xnu/xnu-2782.1.97/ Dec 30 05:05:28 haha i was just browsin the source Dec 30 05:05:51 lilVaratep: let me decide for you, yes you want the black 64GB one Dec 30 05:06:00 hehe :D Dec 30 05:06:15 hopefully i don’t start using it as my main device... Dec 30 05:06:20 there goes my imessage :( Dec 30 05:06:54 they say it has the longest battery of any other phone this year, but it's not replacable Dec 30 05:07:02 like 20 hours Dec 30 05:07:11 lilVaratep, id go with one plus just based off of specs alone.. and pricew Dec 30 05:07:13 price* Dec 30 05:07:19 yeah thanks guys Dec 30 05:07:29 now i have to hold off on buying $300 worth of protein bars Dec 30 05:07:30 :D Dec 30 05:07:53 the z3 compact has a battery life of like 2 days Dec 30 05:07:56 does it come stock with CM? Dec 30 05:08:01 bynarie: i think it does Dec 30 05:08:11 nice Dec 30 05:08:12 but this is like 20 hours of full use Dec 30 05:08:13 is it possible to install lollipop? Dec 30 05:08:25 like playing video and video games Dec 30 05:08:51 lilVaratep, you can flash a 5.0 rom Dec 30 05:09:10 paranoid android has one Dec 30 05:10:03 im not sure about a vanilla lollipop build Dec 30 05:10:06 does CM have lollipop UI? Dec 30 05:10:22 lilVaratep, cm does not, as of know, have a lollipop UI Dec 30 05:10:24 lilVaratep: they said they'd update it soon Dec 30 05:10:24 that’s all i care about pretty much. material design is becoming my latest obsession Dec 30 05:10:35 when CM12 is released, it will be based of lollipop Dec 30 05:11:06 i would assume you could easily install some theme packs that are material Dec 30 05:11:08 lilVaratep: you probably have to wait a few months for lollipop on CM Dec 30 05:11:27 hmm there seems to be a guide already http://oneplus.wonderhowto.com/how-to/update-your-oneplus-one-lollipop-today-0158620/ Dec 30 05:11:50 hmm, cool Dec 30 05:12:09 I'm having trouble passing extras through my intents... intent.putExtra("com.myname.Kyoto.NAME", user.getName()); and then in my Activity that receives the intent, I have fbName = intent.getStringExtra("com.myname.Kyoto.NAME"); however it can't resolve the symbol "NAME". Any ideas? Dec 30 05:12:10 although it’s probably bound to have bugs, right? Dec 30 05:12:12 lilVaratep, looks like an unofficial CM12 build Dec 30 05:12:16 I guess I don't know everything after all Dec 30 05:12:47 lilVaratep, what type of phone do you have right now? Dec 30 05:13:28 bynarie: iphone 5s Dec 30 05:13:39 i’m spoiled by imessage Dec 30 05:13:45 yea thats right.. is it rooted? Dec 30 05:13:51 nope Dec 30 05:13:52 or "jailbroken" Dec 30 05:14:02 lilVaratep: do you do any app programming ? Dec 30 05:14:03 last jailbroken phone i had was 3gs Dec 30 05:14:11 shmooz: yes i’m an ios dev Dec 30 05:14:18 currently working on a social networking app for my work Dec 30 05:14:18 oh cool Dec 30 05:14:23 ive heard jailbroken devices are really customizablew Dec 30 05:14:51 bynarie: heh i’m not one to jailbreak anymore. i like to stay up-to-date with apple software Dec 30 05:15:00 yea thats cool Dec 30 05:15:31 we should partner with iOS devs to port our apps to apple and port their app to android Dec 30 05:16:02 i dont think apple would like that much Dec 30 05:16:14 nvm, fixed my problem. I needed to create a field with the content :P Dec 30 05:16:49 lilVaratep, what language is ios dev in? obj c? Dec 30 05:16:57 objc and swift Dec 30 05:17:29 what exactly is objective c? is it similiar to C? Dec 30 05:17:33 I was looking at some of that code it's like from another planet Dec 30 05:17:40 yea same here Dec 30 05:17:50 lots of square brackets Dec 30 05:18:00 lol Dec 30 05:18:09 haha! LOL Dec 30 05:18:09 objective c makes java look succinct Dec 30 05:18:35 well.. the syntax itself is very similar.. the way its used is different Dec 30 05:18:47 i write a lot of class platform mobile stuff and have to write some platform level hookup code... objective c is a little goofy but a good ide helps a lot. Dec 30 05:19:12 the only thing i dislike more is windows' c++/cli stuff Dec 30 05:19:29 sqpat, amen to that brother... c++/cli is bullshit Dec 30 05:19:37 objective c is the result of trying to make smalltalk appeal to c developers :P Dec 30 05:19:44 it can do a lot but i dont understand the concurrency syntax at all Dec 30 05:20:03 well i do now but 2 days ago i didnt, lol Dec 30 05:20:18 lewellyn: the idea looks good, but the code makes my stomach sick Dec 30 05:20:23 usually you can use c# instead, but when you can't you can't Dec 30 05:20:35 shmooz: learn smalltalk and you'll hate it for different reasons! Dec 30 05:20:40 it seems like MS tried to go in and modify c++ to somethin totally different.. its not TRUE c++ IMO Dec 30 05:20:59 i do like c# tho, for windows programming Dec 30 05:21:09 very easy to understand and read Dec 30 05:21:17 then again i write c++ 03 Dec 30 05:21:37 because its the lowest common denominator of the platforms i target Dec 30 05:21:43 thats from like 1990 isnt it Dec 30 05:22:00 2003 i think? Dec 30 05:22:08 oh ok.. i have no idea Dec 30 05:22:11 bynarie: because they kept their eyes on Java when developing C# Dec 30 05:22:12 i mean i use nothing from std besides map and vector basically Dec 30 05:22:14 and string Dec 30 05:22:52 and tried to make it similar but less annoying in some ways Dec 30 05:22:57 shmooz, java and c# SYNTAX are basically interchangable.. the apis arent, but the actual syntax is Dec 30 05:23:05 so i agree Dec 30 05:23:22 yeah and QNX too Dec 30 05:23:41 bynarie: apparently oneplus two is releasing next year. now i dunno about the oneplus one :( http://www.digitaltrends.com/mobile/oneplus-two-phone-and-wearable-news/ Dec 30 05:23:42 i always thought qnx was an os Dec 30 05:23:55 it's an RTOS Dec 30 05:23:57 it might be, or the basis for one, i dont totally know Dec 30 05:24:16 I used to run QNX on my laptop in the 90's Dec 30 05:25:04 it was used for robotics and cars and space shuttle and things like that Dec 30 05:25:42 lilVaratep, but who knows when it will actually launch Dec 30 05:25:48 and then BB bought them and I supposed modified it to go on their mobile devices Dec 30 05:25:50 aug-sept so pretty late Dec 30 05:26:09 is java still being used for android development? or are most ppl moving to html5 now Dec 30 05:26:50 java is still the main way here Dec 30 05:26:51 lilVaratep, java and xml Dec 30 05:27:15 the only time i’ve done android development was at a hackathon and it was awful trying to set up the environment and all that Dec 30 05:27:40 really? im a total newb and i set it up easy Dec 30 05:28:14 How do apps like Facebook or Twitter listen for incoming messages? Websockets or some other technology? Dec 30 05:28:26 lilVaratep: in 48 hours from now we expect you to have installed your IDE and written your hello world, OR ELSE! Dec 30 05:28:36 lol Dec 30 05:28:43 shmooz: i already did hello world :D Dec 30 05:28:59 but i think trying out android dev again coming from ios will be a lot easier Dec 30 05:29:09 since i have a better understanding of how things connect and work in mobile development Dec 30 05:29:19 the thing that confused me at first, coming from c#/VS background, was the connection between the xml/java.. like events Dec 30 05:29:30 i was expecting to double click a button and be taken to an event handler Dec 30 05:29:50 g00s, yeah I saw Dec 30 05:29:56 any recommended resources for android development? Dec 30 05:30:08 other than the developer website... Dec 30 05:30:22 google Dec 30 05:30:29 books Dec 30 05:30:44 people Dec 30 05:30:48 waste time here Dec 30 05:31:02 ^ that works too Dec 30 05:31:34 is there a package manager for android like xcode’s cocoapods? Dec 30 05:31:41 im still trying to make a basic flashlight and cant get it to work.. i even downloaded a sample app with source code, compiled fine, ran fine, just didnt light up the LED Dec 30 05:31:52 lilVaratep, yes its called "packagemanager" Dec 30 05:31:55 literally Dec 30 05:31:59 lilVaratep: jars are self-contained artifacts and you can fetch them from artifact repositories like maven central. Dec 30 05:32:03 lilVaratep: think of a simple app you want to do , and set a deadline and google how to do it piece by piece Dec 30 05:32:23 tools like Maven and Gradle have this functionality built in Dec 30 05:33:24 JakeWharton: ah, thanks for deleting them. Dec 30 05:34:22 gradle looks closer to what i want than maven Dec 30 05:34:31 although they both seem more complicated than cocoapods Dec 30 05:34:57 cocoapods is a single tool Dec 30 05:35:04 Gradle and Maven are an entire build system Dec 30 05:35:12 so yes they will be conceptually more complex Dec 30 05:35:21 you can get a lot out of them, though Dec 30 05:35:35 shit i feel like a damn fool!! i thought you meant packagemanager as in an API Dec 30 05:35:37 haha! Dec 30 05:35:42 my bad Dec 30 05:37:01 so… did i confuse you guys Dec 30 05:37:01 bynarie: you were thinking SDK manager ? Dec 30 05:37:15 cocoapods is a dependency manager Dec 30 05:37:24 no, i was thinking he was asking about an API, or library for android dev... Dec 30 05:37:25 so i can pull libraries in that other people have created Dec 30 05:37:30 no, i was not confused Dec 30 05:37:37 i was lol Dec 30 05:37:43 gradle and maven both offer dependency management and resolution as a feature Dec 30 05:37:57 but like you observed it's one feature of A LOT Dec 30 05:38:06 yes... gradle usually resolves dependencies automatically Dec 30 05:41:29 I'm Back \ ( ^_^ ) / Dec 30 05:42:07 ᕙ(⇀‸↼‶)ᕗ Dec 30 05:43:04 what’s the most common android version to target currently? Dec 30 05:43:20 5.0 Dec 30 05:43:34 aren’t majority of phones still on kit kat? Dec 30 05:43:40 yes but you should always be targeting the latest version Dec 30 05:43:53 did you mean the minimum version to support? Dec 30 05:43:59 so older versions will be able to use that 5.0? and yes minimum version Dec 30 05:44:05 ah. target has a very specific meaning Dec 30 05:44:13 minimum should probably be API 15 or 16 Dec 30 05:44:32 if you are starting a brand new app 16 is safe Dec 30 05:44:45 i dont get why they just don’t reference them by their versions instead of api’s :( Dec 30 05:44:52 i use minimum 4.0 (ICS) i forget which api it is Dec 30 05:45:08 api15 is ICS Dec 30 05:45:12 there ya go Dec 30 05:46:04 lilVaratep: unfortunately a single numbered version can have multiple APIs (4.0=14, 4.0.4=15) and a single named version can have multiple numbered versions (4.1, 4.2, 4.3 = Jelly Bean) Dec 30 05:46:33 ICS is 14 and 15 Dec 30 05:46:45 there's no need to target ICS for a new app Dec 30 05:46:49 lilVaratep: read about the history of android and how it evolved a little Dec 30 05:47:00 er, support* Dec 30 05:47:19 lilVaratep, im pretty sure less than 1% are on lollipop Dec 30 05:47:39 probably not anymore (holidays, upgrade cycles) Dec 30 05:48:05 hopefully it crossed the 1% marker Dec 30 05:48:38 true Dec 30 05:49:04 i have to assume it at least crossed 0.1% and will make it to the platform dashboard on next refresh Dec 30 05:49:10 JakeWharton, what version are on right now? Dec 30 05:49:13 5.0 Dec 30 05:49:16 .1 Dec 30 05:49:36 i just got the nexus 9 so its runnin 5 on that, but im still on kitkat with my n5 Dec 30 05:49:45 why? update that thing! Dec 30 05:49:52 im waiting on CM12 Dec 30 05:50:18 well im actually using multirom so i do have a 5.0 rom, but its not my main OS Dec 30 05:53:27 JakeWharton, do you know if its possible to mount usb OTG without a special app on lollipop? Dec 30 05:53:35 i do not Dec 30 05:53:41 i cant figure it outr Dec 30 05:55:41 should adb logs pick up fprintf to stderr in a jni'd c lib Dec 30 06:00:17 I've been downloading android source all day Dec 30 06:00:18 what fun :D Dec 30 06:00:32 what’s so good about cm though? Dec 30 06:00:42 as in what’s the biggest advantages Dec 30 06:01:41 lilVaratep: open source, and has support for many devices Dec 30 06:01:51 no bloatware.. Dec 30 06:02:11 it's mostly stock-ish android. i.e. no touchwiz or anything like that, of course Dec 30 06:02:27 are sony phones fine for dev? Dec 30 06:02:37 it has quite a few customizations, but it still mostly has the feel of stock android. Dec 30 06:02:39 i usually use my main phone as a dev device and i was considering getting one Dec 30 06:03:09 any device should be fine for developing on Dec 30 06:03:25 im always afraid ill buy a phone on accident that makes development mode a pain to enable or something. Dec 30 06:03:56 sqpat: unless you buy a phone with Android 2.1, you should be fine :P Dec 30 06:04:03 the phone must have adb - otherwise it wouldn't pass CTS (afaik..) Dec 30 06:06:05 I have a phone with Android 2.1 and it can't even use Youtube anymore lol Dec 30 06:06:23 hmm i think i had 2.2 on my atrix Dec 30 06:06:32 atrix was such a good phone, except they never upgraded the firmware Dec 30 06:06:42 there was a cm 4.0 around, but it didnt support the fingerprint thing Dec 30 06:06:52 they mightve upgraded to 2.3 Dec 30 06:07:14 i dont think i even want a spec upgrade of my htc one. its fine. i just want the legit 1-2 day battery. Dec 30 06:07:34 my Sony Xperia Z2 lasts 1-2 days easily Dec 30 06:07:46 yeah i was looking at the z3 compact. i also want a smaller screen. Dec 30 06:07:57 yeah the Z2/Z3 is *huge* Dec 30 06:07:57 "compact" is already bigger than i want Dec 30 06:08:07 My wife has the Z1 compact, that's a nice size Dec 30 06:08:13 htc one is a 4.7" screen? and my thumb cant reach the corners. Dec 30 06:08:37 z3 compact is a nice size Dec 30 06:08:39 i think the z3 compact is 4.6 and the new htc one mini is the same Dec 30 06:08:57 so 4.7" is considered small, which almost makes me want to try an iphone for once because theyre small Dec 30 06:08:59 the Z1 compact was only 4.3 Dec 30 06:09:06 4.3 would be great Dec 30 06:09:12 but i dont want to downgrade either Dec 30 06:09:33 downgrade from ? Dec 30 06:09:38 iphone is the same size... Dec 30 06:09:39 htc one Dec 30 06:09:59 5s Dec 30 06:10:05 if i were to go that route Dec 30 06:10:29 sqpat: the HTC One (no extras no Ls no whatevertheufkcs) ? Dec 30 06:10:33 yes Dec 30 06:10:46 i think ill just wait a while, but the htc one is 2 yrs old almost and the battery's kinda not what it used to be Dec 30 06:10:58 sqpat: besides the resolution, the Z1 Compact isn't much of a downgrade Dec 30 06:11:01 i use this thing a ton as a hot spot too Dec 30 06:11:12 so whatever i get needs to have solid radios hopefully Dec 30 06:11:42 Yeah, I always hate those liquid radios Dec 30 06:11:47 going from a HTC One to a Z1 Compact seems like an ugprade to me Dec 30 06:11:48 they never stay in place Dec 30 06:11:59 i dont think tmobile has a z1 compact either now that i look into it Dec 30 06:11:59 Don't even get me started on those gas ones Dec 30 06:12:28 sqpat: not looking at buying one outright ? Dec 30 06:12:29 like i think its compatible but it wont use the good bands Dec 30 06:12:33 i would buy one outright Dec 30 06:12:48 but i want it to support whatever LTE bands tmobile supports, doesnt that require special hardware? Dec 30 06:12:55 and thus a carrier specific version Dec 30 06:13:04 no Dec 30 06:13:04 sqpat: depends on the bands Dec 30 06:13:05 i could be totally wrong Dec 30 06:16:09 some bands, not all it seems Dec 30 06:16:16 SONY should round the corners of their z phones like the iPhone does, I wonder if apple would take them to court Dec 30 06:19:55 hmmm Dec 30 06:19:58 im getting java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView$LayoutManager.onMeasure(android.support.v7.widget.RecyclerView$Recycler, android.support.v7.widget.RecyclerView$State, int, int)' on a null object reference Dec 30 06:20:09 by just putting a recyclerview on the layout Dec 30 06:20:27 with both match_parent Dec 30 06:26:16 how long are android devices usually supported? 2 years? Dec 30 06:26:44 nowadays longer i think? Dec 30 06:26:58 like i think theyve generalized their processes a bit now that things get supported longer Dec 30 06:27:14 Hey guys. I just published my first app but it's taking a really long time to show up in the play store. It's been about two hours and it's still not there. Is this normal? Dec 30 06:27:23 could be 12 hours Dec 30 06:27:23 yes Dec 30 06:27:34 Oh wow ok. Thank you Dec 30 06:27:34 dauntless2425: Congratulations! Dec 30 06:27:43 and yes, congrats Dec 30 06:27:46 Yay thanks Dec 30 06:27:48 dauntless2425: sure beats apple's 2+ weeks :P Dec 30 06:28:08 Ill send you guys the link when its up Dec 30 06:28:16 dauntless2425: Sounds, great. Dec 30 06:28:32 What? two weeks? That's ridiculous Dec 30 06:28:45 they test the app a lot more thoroughly Dec 30 06:28:52 they also check the libraries you use Dec 30 06:28:57 it doesn't lend well to agile or "shit shit that doesn't work quite right, gotta fix asap" Dec 30 06:28:58 how well the app flows, etc Dec 30 06:28:59 Oh wow Dec 30 06:29:08 UI is also a factor Dec 30 06:29:18 have you guys begun using material design yet? Dec 30 06:29:24 They're control freaks Dec 30 06:30:27 I was thinking that not a lot of devices are gonna be running lollipop for the first six months or so. Dec 30 06:31:11 same as ICS, OEMs have to port their shit to the new style and ruin it before issuing updated. Dec 30 06:31:17 updates Dec 30 06:32:51 What do you guys think about material design and flat ui in general? Getting stale and overdone or is it still fresh? Dec 30 06:33:48 material definitely isn't flat Dec 30 06:33:51 which is good Dec 30 06:34:51 Looks pretty flat to me. Although those animations and transitions are super sweet! Dec 30 06:36:01 yes the widgets are not embossed or engraved Dec 30 06:36:43 depth and elevation are first-class concepts Dec 30 06:36:55 unless you are referring to the flatness of individual components Dec 30 06:38:22 I think it makes my design job much easier. Just make flat vectors. Dec 30 06:39:38 Its up its up! Dec 30 06:39:49 Dauntless2425: I find material design annoying. Dec 30 06:40:39 i love material design Dec 30 06:40:45 https://play.google.com/store/apps/details?id=com.lodenrogue.quicklock Dec 30 06:40:51 Yayayayayay! Dec 30 06:40:52 that’s in fact the reason why i’m wanting to get into android development Dec 30 06:41:28 dauntless2425: i should give it 5 stars and write a review LOL Dec 30 06:41:54 Yes that would be amazing! Dec 30 06:43:18 hmm i cant find it on my device Dec 30 06:44:09 oh wow i can install from my computer?! Dec 30 06:44:10 damn apple Dec 30 06:44:14 i mean google Dec 30 06:44:49 The link i posted doesnt work? Dec 30 06:46:43 what does this app do? Dec 30 06:47:07 lol Dec 30 06:47:21 g00s: sup Dec 30 06:47:34 hey thepoosh working hard :) Dec 30 06:47:41 It toggles auto rotate right from your notifications tray. Dec 30 06:47:47 you or me? Dec 30 06:47:49 thepoosh hows it going there ? Dec 30 06:47:58 lol yeah, you never see me working hard haha Dec 30 06:47:59 insane Dec 30 06:48:00 Many devices dont have a quick way of doing that Dec 30 06:48:03 almost over Dec 30 06:48:08 this month is killing me Dec 30 06:48:29 thepoosh deadline ? Dec 30 06:48:41 yeah, on Nov 27th Dec 30 06:48:42 dauntless2425: congrats! Dec 30 06:48:59 thepoosh thats past :| Dec 30 06:49:02 our bosses came over and told us that we didn't live up to our commitments Dec 30 06:49:09 ooh shit Dec 30 06:49:12 Thank you! Dec 30 06:49:14 and that we need to hustle up Dec 30 06:49:17 dauntless2425: android devices don’t have a way to quickly lock orientation? Dec 30 06:49:26 and do this quarter's worth of work in one month Dec 30 06:49:39 dauntless2425: now make one that leaves your screen on for a user defined amount of time, a lot of them don't let you go over 30 minutes Dec 30 06:49:44 so I have about 220 hours of work until now Dec 30 06:49:47 registered Dec 30 06:49:55 Many of them dont have it. Dec 30 06:49:57 thepoosh sounds like slave labor - startups, typical shit, extract the most aount of capital with least amount of labor Dec 30 06:50:18 g00s: usually I work 8:30-17:30 Dec 30 06:50:20 Schmooz thats a cool idea Dec 30 06:50:20 thepoosh can i ask you this? is it worth it? is the app worth it ? Dec 30 06:50:23 get to see my kids Dec 30 06:50:31 Material design sucks. It's a sham. I can't believe that turned out to be the highlight of Google I/O. Dec 30 06:50:34 doesn't sound worth it to me Dec 30 06:50:39 I think it'll do much good Dec 30 06:50:41 I don't know why developer expectations are so low. Dec 30 06:50:43 and pass quickly Dec 30 06:50:49 plus I have stock options Dec 30 06:50:55 that might be worth a lot one day Dec 30 06:50:59 dauntless2425: I thought you could do it , in the same style with the notification Dec 30 06:51:17 Do what? Dec 30 06:51:22 arcanine69: i actually like material design :( even trying to implement it in my web designs now Dec 30 06:51:34 arcanine69: why are you saying this? Dec 30 06:51:34 There is NO case at ALL where design should be the same or be 'uniform' to everyone else. If all the apps are made out of design, they would all look the same. Dec 30 06:51:57 material design* Dec 30 06:52:04 Arcanine69 its in the play store! Dec 30 06:52:20 Dauntless2425: I know man, I'm about to download it. Congratulations. Dec 30 06:52:35 Yay. Thank you. Dec 30 06:52:53 thepoosh so what do you think went wrong, that your ceo / boss would say that ? Dec 30 06:53:00 whats the root cause, of the slip etc Dec 30 06:53:01 Let me know if that link works. Dec 30 06:53:20 g00s: we just closed a 20M$ round of funding, people were cocky Dec 30 06:53:31 our product team was sitting on their asses Dec 30 06:53:39 we waisted much time Dec 30 06:53:46 thepoosh: what company is this? Dec 30 06:53:51 oh Dec 30 06:53:53 glide Dec 30 06:53:56 well then ... Dec 30 06:53:59 yeah Dec 30 06:54:49 Does anyone know if it's possible to use a text file in the Android.mk (NDK) i'm hitting the windows command line limit and using LOCAL_SHORT_COMMANDS is extremely slow, compiling took longer than an hour ( i canceld it because this speed is ridiculous ) Dec 30 06:54:54 dauntless2425: installing Dec 30 06:55:15 Yay. Thanks! So the link works? Dec 30 06:55:28 yes Dec 30 06:55:37 you have to give them some time to make it live Dec 30 06:55:40 Sweet. Social media post time! Dec 30 06:55:44 it's live in the Israeli store Dec 30 06:55:50 wait! Dec 30 06:55:53 Awesome. Dec 30 06:56:01 give it 48 hours Dec 30 06:56:12 before you kick in social media Dec 30 06:56:12 I see it now actually Dec 30 06:56:20 Oh ok Dec 30 06:57:45 thepoosh whats the business plan ? " It’s totally FREE!" has me sceptical already Dec 30 06:57:53 lol Dec 30 06:58:17 it's a communication app, so it's trying to fight the bug guys such as whatsapp etc. Dec 30 06:59:03 there is some money to be found in foundation enterprises but mostly users == money Dec 30 06:59:56 btw twitter still hasn't figured out how to make money, so don't feel bad :) Dec 30 07:00:42 there is really only one way i can see these communication tools making a profit : sell the information to somebody else Dec 30 07:00:50 I don't, and twitter is worth a few billions Dec 30 07:00:51 that is, if they are free Dec 30 07:01:04 well not entirely Dec 30 07:01:20 http://money.cnn.com/2014/11/14/news/companies/twitter-junk-rating/ Dec 30 07:01:40 if you are sold to a big player such as google of facebook, they have their own services to make a profit off the knowledge Dec 30 07:01:54 "Twitter is working aggressively to expand its user base and revenue, but S&P still doesn't expect the social media firm to post positive cash flows until 2016. Dec 30 07:02:25 wow Dec 30 07:02:26 as elon said, we were told by now we'd have flying cars and all we got was 160 characters Dec 30 07:02:30 Why don't they just use ads on their site? Dec 30 07:02:44 wlon musk? Dec 30 07:02:47 *elon Dec 30 07:02:53 yes Dec 30 07:03:03 i think i like him Dec 30 07:03:03 i feel old Dec 30 07:03:07 not sure though Dec 30 07:03:10 sqpat: ? Dec 30 07:03:12 i understand facebook advertising quite well Dec 30 07:03:17 but twitter feels way past me Dec 30 07:03:28 how old are you? Dec 30 07:03:33 i understand the fb business model, it feels solid, i have worked with it Dec 30 07:03:35 27 Dec 30 07:03:41 older than Jimmy Kimmle? Dec 30 07:03:45 nope Dec 30 07:03:50 if not, then fuck you! you're not too old Dec 30 07:03:58 i have an fb account only because i use it for development Dec 30 07:04:03 otherwise i wouldnt even use it, lol Dec 30 07:04:09 weirdo Dec 30 07:04:19 When you think of a company, it largely depends on the team/CEO (the guy making the decisions) that you are paired with. Jack Dorsey. He has a good track record of failing to generate ROI. Dec 30 07:04:20 yea im actually very introverted Dec 30 07:04:47 wait Dec 30 07:04:54 Facebook is pretty solid though. They can make very good decisions. Dec 30 07:04:57 hasnt dorsey been out of twitter forever Dec 30 07:05:04 Hi Dec 30 07:05:10 niru: Yo. Dec 30 07:05:20 square seems like garbage relative to its valuation Dec 30 07:05:21 thepoosh but i'm still confused, how is Glide more than just a missing feature of some other video conferencing tool ? Dec 30 07:05:24 can someone let me know how to handle BitmapFactory Exceptions Dec 30 07:05:48 g00s: the niche is completely different Dec 30 07:05:48 I am getting FileNotFoundException and NullPointerException Dec 30 07:06:03 niru: what is the code you're running? Dec 30 07:06:25 g00s: I am in charge of making the android app, thank god our CEO can sell anything to anyone Dec 30 07:06:30 he has a dream Dec 30 07:06:36 wtf is it ? Dec 30 07:06:40 and I heard it numerous times Dec 30 07:06:53 and I believe in it even though i don't remember what it is Dec 30 07:06:55 :D Dec 30 07:07:00 haha Dec 30 07:07:01 (that was a joke) Dec 30 07:07:04 lol Dec 30 07:07:43 anywho, it's a conversation based app like whatsapp, that allows live streaming with 1 second latency Dec 30 07:08:02 thepoosh: here it is https://paste.ee/p/ayvel Dec 30 07:08:25 niru: what is this line? Customlistadapter.java:46 Dec 30 07:08:26 thepoosh if its liek whatsapp, how is it different ? Dec 30 07:08:41 thepoosh: though this error never comes until and unless the data is completely downloaded from my server Dec 30 07:08:47 whatsapp is asynchronous by definition Dec 30 07:09:16 thepoosh: I pasted that line at the bottom of the same paste Dec 30 07:09:17 so, if you didn't finish downloading the image, how will you scale it?! Dec 30 07:09:39 thepoosh: yes you are correct so how to catch such exception Dec 30 07:10:03 make sure you download the image, cat_image[position[ == null Dec 30 07:11:07 anyone try paranoid android yet? Dec 30 07:11:50 I'm too paranoid to try it Dec 30 07:11:52 once, on 2.3 Dec 30 07:12:04 lol Dec 30 07:12:12 the dad joke master shmooz Dec 30 07:12:14 here I am, brain the size of a planet... Dec 30 07:12:57 Leeds: was looking for you yesterday! Dec 30 07:13:01 I have a song for you Dec 30 07:13:08 oh yes? Dec 30 07:13:13 just a sec Dec 30 07:13:37 Leeds: http://youtu.be/I-3kA1lfdSo Dec 30 07:14:58 thepoosh a love song for Leeds , how sweet :) Dec 30 07:15:07 I do like him a lot Dec 30 07:15:08 Lol Dec 30 07:15:29 g00s: it's a band from Israel that do folk and classic rock cuvers Dec 30 07:15:33 nice Dec 30 07:15:44 they had a show where they did covers with famous singers from israel Dec 30 07:15:58 this girl (Marina Maximilian-Blooming) is very good Dec 30 07:16:18 i really want to seal the deal on the 1+1 phone, but i’m worried about it having issues since it’s not from a known manufacturer Dec 30 07:16:22 she was 2nd place in the israeli version of American Idle Dec 30 07:16:33 ITYM Idol :) Dec 30 07:16:44 ITYM? Dec 30 07:17:00 I Think You Mean Dec 30 07:17:16 American Idle would be a competition to see who could stay sitting in front of the TV for longest Dec 30 07:17:24 haha Dec 30 07:18:04 LOLLLL Dec 30 07:18:16 yes Dec 30 07:18:19 i think Leeds should be a judge Dec 30 07:18:42 American waiting-on-the-side-for-something-to-happen Dec 30 07:19:09 any thoughts on the 1+1 and reliability? i’m not in the android loop so i dunno if there’s anything wrong with it Dec 30 07:19:21 lilVaratep: you should check on xda Dec 30 07:19:23 lilVaratep: this really isn't the channel for that Dec 30 07:19:32 try #android Dec 30 07:22:31 Thanks Yishai Dec 30 07:23:10 dauntless2425: no probs Dec 30 07:25:39 Does anyone know if it's possible to include a txt file in a make file for android? Dec 30 07:29:45 thepoosh did you learn good stuff from the google consultant ? Dec 30 07:30:12 hmmm, some tweaks to building layouts but that's because of this Fing deadline Dec 30 07:30:23 the plan is to learn from him a lot after this push Dec 30 07:33:24 dauntless2425: What will your next app be? Dec 30 07:33:29 dauntless2425 : ) Dec 30 07:34:13 a similar one that leaves the screen on for a user defined time ;) Dec 30 07:34:44 Haha yeah shmooz is gonna pay big bucks for that one. Dec 30 07:35:09 scmooz? Dec 30 07:35:17 ah a user heh Dec 30 07:35:22 actually my friend kept complaining that his tablet doesn't let him let it stay on for more than 30 mins Dec 30 07:35:37 android is pretty bad for coders imo Dec 30 07:35:38 and I was going to write a widget for him, but I like your notification idea better now Dec 30 07:35:38 I was dabbling with messaging APIs so maybe a messenger app is in the works. Dec 30 07:35:44 needs more powerful tools for UI Dec 30 07:36:02 Designing ui is like putting lipstick on a pig Dec 30 07:36:14 Lmao Dec 30 07:36:47 Pifon you own an iPhone don't you? Dec 30 07:36:55 heh i actually do Dec 30 07:36:57 hah Dec 30 07:37:05 but i code android apps Dec 30 07:37:07 :D Dec 30 07:37:15 worst combination :P Dec 30 07:37:57 http://www.androiduipatterns.com/2011/11/cautionary-example-of-bad-design.html Dec 30 07:38:28 http://www.androiduipatterns.com/2012/05/common-mistakes-in-porting-ios-apps-to.html Dec 30 07:38:32 this :D Dec 30 07:40:51 so it turns out that room I stayed in retails for 3k/night Dec 30 07:41:28 3k of what Dec 30 07:41:36 3k ruples Dec 30 07:41:42 ;) Dec 30 07:41:46 or yens Dec 30 07:42:16 we normally stay in 8k-10k Yen rooms :) Dec 30 07:42:33 Leeds: is that 40$ a night? Dec 30 07:42:34 Oh that's like 10 dollars Dec 30 07:42:37 that's pretty expensinve ! Dec 30 07:42:38 Lol Dec 30 07:42:44 if you ask me Dec 30 07:43:06 Y10,000 is about US$83 Dec 30 07:43:15 that's why Dec 30 07:43:16 usd Dec 30 07:43:29 hi all Dec 30 07:43:32 who uses anything but usd in usa Dec 30 07:43:47 3k per night ? Dec 30 07:43:57 is everything made of gold ? Dec 30 07:44:23 and instead of water there's jack daniels in sink? Dec 30 07:44:42 stripper poles in the shower... Dec 30 07:45:18 welcome to android dev Dec 30 07:45:24 lol Dec 30 07:45:44 Only if it glitters it's made if gold Dec 30 07:45:49 Of* Dec 30 07:46:02 http://www.palms.com/luxe-collection Dec 30 07:46:54 seems legit Dec 30 07:47:17 i'm guessing pfn got the hot pink suite Dec 30 07:47:30 yes, it was free Dec 30 07:47:45 "Live it up in your very own custom Barbie pad." Dec 30 07:48:05 is the galaxy s2 still a good phone to test development with? Dec 30 07:48:31 I don't care what color it is for the price of free Dec 30 07:48:44 android studio is just released by google Dec 30 07:49:00 I can't use android studio Dec 30 07:49:02 anybody is using it? Dec 30 07:49:11 yes Dec 30 07:49:14 i was in the hardwood suite last week but meh Dec 30 07:49:18 not impressed Dec 30 07:49:27 I don't have internet on my work computer so the whole gradle thing kills me Dec 30 07:49:33 I installed yesteday Dec 30 07:49:51 dauntless2425: you're taking the piss, right? Dec 30 07:50:11 dauntless2425, me too, can't use gradle/maven Dec 30 07:50:12 dauntless2425, a Nexus mirror fixes that Dec 30 07:50:20 I run the tv sample project today Dec 30 07:50:52 What does taking the piss mean? Dec 30 07:50:56 I try to run on my phone 4.03 Dec 30 07:51:16 the sample project is Android 5.0 Dec 30 07:51:42 the failure info is as: local path: C:\Documents and Settings\Administrator\AndroidStudioProjects\MyApplication\app\build\outputs\apk\app-debug.apk Dec 30 07:51:43 remote path: /data/local/tmp/com.example.administrator.myapplication Dec 30 07:51:43 Installing com.example.administrator.myapplication Dec 30 07:51:43 DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.administrator.myapplication" Dec 30 07:51:43 pkg: /data/local/tmp/com.example.administrator.myapplication Dec 30 07:51:44 Failure [INSTALL_FAILED_OLDER_SDK] Dec 30 07:51:52 linuxdog: pastebin :p Dec 30 07:52:06 how can i fix the problem Dec 30 07:52:11 pfn, Nexus mirror? Dec 30 07:52:14 meow Dec 30 07:52:31 somebody can help me Dec 30 07:52:33 ? Dec 30 07:52:38 help!!! Dec 30 07:52:41 linuxdog: use the emulator Dec 30 07:53:14 linuxdog: or target 4.03 Dec 30 07:53:15 linuxdog: show your build.gradl Dec 30 07:53:16 e Dec 30 07:53:28 I run the studio in xp as VM guest os Dec 30 07:53:39 the emultor cannot be run as ok Dec 30 07:53:42 doesnt matter Dec 30 07:53:44 lol why would you do that Dec 30 07:53:47 show build.gradle Dec 30 07:53:50 drinfernoo, yes, a Nexus proxy Dec 30 07:53:52 that sounds horrible Dec 30 07:54:27 linuxdog: so you're running Linux, with XP in a VM for development? Dec 30 07:54:35 "I run my emulator inside an xp vm that runs a linux vm that runs a macosx vm that a remote desktop client that accesses an instance of android running in the cloud in poland" Dec 30 07:54:36 yes!!! Dec 30 07:54:45 why??? Dec 30 07:54:49 right? Dec 30 07:54:49 lol Dec 30 07:55:03 lol, why in poland ? Dec 30 07:55:13 gordon_: because thats where clouds are born Dec 30 07:55:21 lol :D Dec 30 07:55:25 what do you mean by that? how does that help with not being able to gradle? Dec 30 07:55:38 Lol Dec 30 07:55:39 drinfernoo: did your mother gradle you as a child? Dec 30 07:55:45 MJCD: as polish person, I laughed ;) Dec 30 07:55:49 apparently :( Dec 30 07:55:55 Cradle Dec 30 07:56:04 I basically know that it need android 5.0 os system Dec 30 07:56:07 gordon_: ty, ty Dec 30 07:56:07 from gradle to crave Dec 30 07:56:09 I do it all for the poles Dec 30 07:56:20 drinfernoo, to allow for no Internet usage Dec 30 07:56:44 k Dec 30 07:56:44 why did you capitalize Internet? Dec 30 07:56:46 linuxdog: will you pastebin that build.gradle file or not ? Dec 30 07:56:46 lol Dec 30 07:56:49 Are you talking about a person named Internet? Dec 30 07:56:50 xD Dec 30 07:57:04 I can internet, just not maven Dec 30 07:57:04 or I can go back to watch ben heck's show :> Dec 30 07:57:14 I will be trying the install the lower stuff in android stuidio Dec 30 07:57:19 ben heck kinda sucks Dec 30 07:57:23 :( Dec 30 07:57:24 linuxdog: why are you running XP in a VM for AS? Dec 30 07:57:40 Leeds: I can only assume he's high on acid Dec 30 07:57:47 MJCD: I like watching it Dec 30 07:57:47 because he can Dec 30 07:57:58 it's for electronic noobs as me ! Dec 30 07:58:00 because he's a dog. and dogs like to get things put in their things Dec 30 07:58:11 My pc is very strong, can do that I thought Dec 30 07:58:28 linuxdog: but *why* Dec 30 07:58:29 lol Dec 30 07:58:33 what a weirdly *wrong* answer Dec 30 07:58:35 and your pc is strong? Dec 30 07:58:41 how much can it bench? Dec 30 07:58:56 its not strong unless it can benchpress its wife 10 times Dec 30 07:59:16 my host os is Ubuntu with 2 nics and work as a router in my office Dec 30 07:59:30 yo dawg I herd you like vm so I put vm inside a vim so you can virtualize while u virtualize Dec 30 07:59:37 that seems completely unrelated to what he is asking you linuxdog Dec 30 07:59:37 lol Dec 30 07:59:49 if you dont know why you're doing it, just say that Dec 30 07:59:50 MJCD: I like ben heck show also Dec 30 07:59:51 and let us laugh at you Dec 30 07:59:54 On the other hand i am really farmilar with the VM setup Dec 30 08:00:00 Napalm: you probably also like reefer Dec 30 08:00:05 thus your opinions are invalid Dec 30 08:00:06 nope Dec 30 08:00:13 MJCD: dogs doesnt know what they are doing Dec 30 08:00:15 thats what all the reefer addicts say Dec 30 08:00:29 http://s.mlkshk-cdn.com/r/97VP Dec 30 08:00:35 MJCD: and thus you've proven your own conclusion with yourself Dec 30 08:00:41 sorry linuxdog I had to :) Dec 30 08:00:42 no offence Dec 30 08:00:55 linuxdog: which VM do you use ? Dec 30 08:01:09 vmware Dec 30 08:01:19 I use JVM Dec 30 08:01:23 it should be fine Dec 30 08:01:25 ;) Dec 30 08:01:40 vmware 11 Dec 30 08:02:01 so actually, no reason at all Dec 30 08:02:02 shmooz: I dont think it works like that Dec 30 08:02:04 but well Dec 30 08:02:13 argh this freaking android hotspot Dec 30 08:02:15 needs to not drop out every 2 minutes Dec 30 08:02:19 please and thankyou Dec 30 08:02:35 MJCD: mine works fine Dec 30 08:03:13 Yeah tbh its the 3g network around here Dec 30 08:04:26 Anyway thanks for your guys to response to me Dec 30 08:04:33 lol linuxdog Dec 30 08:04:48 linuxdog: it doesnt resolve your problem but ok Dec 30 08:05:02 cheers! Dec 30 08:05:09 lol Dec 30 08:05:12 lol Dec 30 08:05:14 ololo Dec 30 08:05:21 it reminds me of my company Dec 30 08:05:47 put more libs, put more features and dont clean put :D Dec 30 08:05:55 OK, so here's a good one: if I want to install maven, in order to manually pull from maven central, on my android device, can I do that? its available for Linux systems, but I don't really know if I can include it on my path variable :/ Dec 30 08:06:17 why do ypu need maven ? Dec 30 08:06:30 ah it's a quote Dec 30 08:06:32 sorry Dec 30 08:06:32 the only thing I know of that involves the word maven Dec 30 08:06:38 is the phrase "sexual maven" Dec 30 08:07:19 drinfernoo: ugh... that person doesnt know what maven does, clearly Dec 30 08:07:28 reminds me of.... Dec 30 08:07:57 "that person" Dec 30 08:07:57 lol Dec 30 08:08:03 well, I can't use any libraries that are distributed via gradle/maven because I use AIDE Dec 30 08:08:04 :3 Dec 30 08:08:04 your English is adorable Dec 30 08:08:08 I just wanna pinch your cheeks Dec 30 08:08:14 MJCD: thank you ;3 Dec 30 08:08:37 should I address him 'that THING' next time? ;D Dec 30 08:08:44 there was a Jewish web directory called Maven... it's still there, "Est. 1994"! :D Dec 30 08:09:23 cool, the search box gives a VBScript error :D Dec 30 08:10:05 Leeds: Maven == מבין Dec 30 08:10:18 which is the jewish word for "understand" Dec 30 08:10:23 *hebrew Dec 30 08:10:32 in a yiddish accent Dec 30 08:10:37 er, yes, I know? Dec 30 08:10:52 oh god Dec 30 08:10:59 oh damn! Dec 30 08:11:03 are you all jews? Dec 30 08:11:07 + ? Dec 30 08:11:08 Is this #jewdom Dec 30 08:11:15 MJCD: we control the world Dec 30 08:11:16 #Jewdroid? Dec 30 08:11:20 hahah Dec 30 08:11:20 it's true, we do Dec 30 08:11:23 you should've known that by now Dec 30 08:11:24 chit. Dec 30 08:11:28 lol Dec 30 08:11:28 look!!! Dec 30 08:12:04 /\ <----- ILLUMINATI Dec 30 08:12:08 hahha Dec 30 08:12:14 android got taken over by kommies and jews Dec 30 08:12:30 who's a communist? Dec 30 08:12:36 Jewtube.com Dec 30 08:12:37 https://c2.staticflickr.com/2/1078/718933691_1b96fe6dee.jpg Dec 30 08:12:38 AS is Dec 30 08:12:40 Google is! Dec 30 08:12:44 IntelliJ IDEA is Russian Dec 30 08:12:46 so many yanks in here .. Dec 30 08:12:49 It's an actual site Dec 30 08:12:53 open source is communism Dec 30 08:12:59 gordon_: LOL Dec 30 08:14:15 I'm pretty sure we control Google and Facebook, but not Apple or Amazon, so... Dec 30 08:14:33 when I say 'we' - I don't mean thepoosh and I in person :) Dec 30 08:15:01 That's raaacist Dec 30 08:15:03 google has Sergey and facebook has Zukerburg Dec 30 08:15:11 MJCD: it's ok, he's jewish Dec 30 08:15:12 Leeds you could control American Idol Dec 30 08:15:31 nobody can control American Idol Dec 30 08:15:37 it is the pinacle of democratic process Dec 30 08:15:42 do not test them. Dec 30 08:15:47 they will destroy your whole life. Dec 30 08:15:48 lol Dec 30 08:15:56 thepoosh: according to wikipedia, we can claim Larry too, technically... also, I'm sort of assuming arubin Dec 30 08:16:09 you leave Larry out of this! Dec 30 08:16:48 lol Dec 30 08:17:00 well, coffee time Dec 30 08:17:07 Nescafe.......OMG! ILLUMINATI Dec 30 08:17:18 that's true though, Nestle Dec 30 08:17:50 time to wear my fake yamaka and shmooz my way up the latter Dec 30 08:18:18 it's be nice if you could spell it right Dec 30 08:18:49 ok yeah schmooz I know , but I'm lazy Dec 30 08:19:00 oops schmooze Dec 30 08:19:12 yarmulke Dec 30 08:19:23 shmooz: he meant 'ladder', duh Dec 30 08:19:24 oh that Dec 30 08:19:25 whatever that thing is Dec 30 08:19:27 you double Yiddish fail Dec 30 08:19:53 I found this http://stackoverflow.com/questions/26007146/how-to-use-libraries-in-aide and this https://plus.google.com/100811170724158927013/posts/U152KvGySFT, but I don't really get what either of them are saying :/ Dec 30 08:20:00 yes ladder now get off my back Dec 30 08:20:27 they're saying not to use aide Dec 30 08:20:33 I always got 100% in all my spelling tests in school Dec 30 08:21:44 I'm reading all this and it makes me happy Dec 30 08:22:01 well it does sound like Yamaha so I figured ... Dec 30 08:22:16 http://youtu.be/DPLDLFRRaco Dec 30 08:22:28 Shmooz did you get a chance to try out my app? Dec 30 08:22:46 dauntless2425: I have no need for it Dec 30 08:23:04 pfn: actually, what they're saying is that they got it working, but it doesn't really make sense Dec 30 08:23:10 Ah ok. Well you can still download it just to give it 5 stars. Dec 30 08:23:17 :) Dec 30 08:23:31 I can read, but if I don't understand what I'm reading it doesn't really help :) Dec 30 08:23:40 dauntless2425: ok I'll do it in a bit Dec 30 08:23:57 Thanks! i really appreciate it. Dec 30 08:24:20 oh no actually no i can't do it sorry Dec 30 08:24:31 got my playstore disabled for now Dec 30 08:25:27 I'm cool with manually using maven, but I can't seem to set it up right Dec 30 08:26:44 Oh no why is that? Dec 30 08:27:48 to stop it from updating stuff, because I'm testing my app with where it is right now Dec 30 08:28:11 and I don't want it going from kitkat to lollipop just yet Dec 30 08:28:44 I'm even cool with cloning projects, and adding them as library projects, but I can't figure that out either Dec 30 08:28:59 so I disabled playstore and anything else I could disable basically Dec 30 08:30:57 Oh ok Dec 30 08:36:02 can I use gradle to make an .aar from a project, and then include it from a local repository? Dec 30 08:37:15 git clone, build.gradle -> .aar, include via local repository? Dec 30 08:49:41 hi dear androiders Dec 30 08:50:43 i have hit some use case of retrofit which crashed my app, i can't reproduce it but it leads me to not trusting that retrofit handles all problems... so we are thinking to move to volley. a strong point about volley for me is that it is documented in the android website. Dec 30 08:50:46 why? Dec 30 08:51:04 you have told us nothing to help you Dec 30 08:51:21 JakeWharton: oh hello :) Dec 30 08:51:53 JakeWharton: don't get me wrong i really don't want to make the switch Dec 30 08:52:04 switching doesn't bother me at all Dec 30 08:52:10 the lack of identifying an actual problem bothers me Dec 30 08:52:17 JakeWharton: me too Dec 30 08:52:58 JakeWharton: i can not reproduce that bug but i do have that log i posted on github(leviyehonatan) and that exception wont propgate into the failure async response Dec 30 08:54:01 ohh mmmyyyy Dec 30 08:54:02 JakeWharton: my suspicion is that because that the exception happens on another thread it is not thrown properly, is that a valid assumption? Dec 30 08:54:27 no, the entire thing is in a try/catch Dec 30 08:56:10 we are talking about the code in CallbackRunnable, right? Dec 30 08:56:45 JakeWharton: and the actual network call is obtainResponse() right? Dec 30 08:57:23 JakeWharton: so the catch is on retrofit error, what if a new exception is introduced? Dec 30 08:57:38 JakeWharton: do you think it mattered if i was running 1.7? Dec 30 08:57:46 no Dec 30 08:57:53 if there's a new exception the app should crash Dec 30 08:57:58 IOExceptions are wrapped Dec 30 08:59:36 i cannot reproduce the behavior Dec 30 08:59:51 that exception that crashed the app was java.net.UnknownHostException, it is wrapped by this ---- ERROR Dec 30 09:00:11 is ---- ERROR means it was deteceted? is it a Log.d from your code? Dec 30 09:01:10 that is retrofit's logging which you have to opt-in to, yes Dec 30 09:01:35 JakeWharton: does it mean that the exception was cought? where is that in your code? Dec 30 09:01:45 RestAdapter Dec 30 09:02:20 JakeWharton: actually that code comes in the stack in okhttp.... Dec 30 09:02:43 it doesn't matter it's the same exception originating at the same call site Dec 30 09:04:52 yes i have created an example such as you just posted as well Dec 30 09:05:13 JakeWharton: call site meaning thread? Dec 30 09:06:43 I just mean it's running through the same code paths being a Callback-based request Dec 30 09:07:04 JakeWharton: so whats your insight about that strange call stack of the error? Dec 30 09:07:13 what's strange about it? Dec 30 09:08:18 that it did crash and did not generate a RetrofitError which would be returned to that failure() method Dec 30 09:10:05 i cannot reproduce that behavior nor can I see how it would be possible in the code Dec 30 09:10:36 the whole block is not only wrapped in a try/catch(IOException) but also a catch(Throwable) so that the thread cannot throw anything Dec 30 09:11:25 in fact, the fact that it was logged guarantees that the exception was caught and wrapped in a RetrofitError Dec 30 09:22:15 JakeWharton: first line is the log from okhttp, but the second one is an actual exception that was not caught Dec 30 09:22:59 both lines are clearly Retrofit as evidenced by the log tag Dec 30 09:24:13 here is the code which logs, exactly in that format: https://github.com/square/retrofit/blob/ed1122ae27c0503e3182e9a7d817097b7febcebb/retrofit/src/main/java/retrofit/RestAdapter.java#L494-L501 Dec 30 09:26:37 JakeWharton: wow... that realy closes it :) Dec 30 09:28:55 http://hydra-media.cursecdn.com/dota2.gamepedia.com/8/82/Axe_kill_13.mp3 Dec 30 09:29:15 Odaym: ? Dec 30 09:35:23 AXE KILLS YOU! Dec 30 09:35:26 oh sorry Dec 30 09:35:46 just enjoy these voice snippets Dec 30 09:36:20 JakeWharton: thats the time to thank you and say i like retrofit Dec 30 09:36:29 i would never leave it!! Dec 30 09:36:35 haha Dec 30 09:36:41 well i'm glad it's of use to you Dec 30 09:39:30 Hello! I enable fullscreen mode using true in theme. On tablets with android <= 19 api level navigationbar is visible (and it is ok for me) and it shifts content up. But on android 5.0 navigationbar overlaps content. How to achieve shift behaviour on android 5.0? Dec 30 09:40:39 I don't want use paddings Dec 30 09:40:47 xgearx: why? Dec 30 09:41:01 because it is bad fix Dec 30 09:41:35 for my applications it is not acceptable Dec 30 09:41:57 so just hide the toolbar Dec 30 09:42:37 it can cause issues Dec 30 09:43:13 i want to leave navigation bar and leave behaviour like on pre 5.0 android Dec 30 09:46:11 60dp Dec 30 09:46:13 that is the size Dec 30 09:46:37 I'm trying to hide indicators in an expandablelistview for empty groups. As described in this question: http://stackoverflow.com/questions/4145090/expandablelistview-hide-indicator-for-groups-with-no-children Dec 30 09:47:07 But when using state_empty="true" I also remove the indicator for collapsed groups Dec 30 09:50:08 Anyone got experience with this ? Dec 30 10:00:44 thepoosh: when i set targetSdk to 19 - everything is ok Dec 30 10:00:52 wtf?! Dec 30 10:01:01 why is your targetSdk not 21?! Dec 30 10:01:12 my target is 21 Dec 30 10:01:21 I'm confused Dec 30 10:01:34 and i found issue with navigation bar Dec 30 10:01:35 so this happens only in targetSdk=21 Dec 30 10:01:39 that i described Dec 30 10:01:44 yes Dec 30 10:01:50 only with target 21 Dec 30 10:03:01 But i searched info here http://developer.android.com/reference/android/os/Build.VERSION_CODES.html#LOLLIPOP and here http://developer.android.com/about/versions/android-5.0.html Dec 30 10:03:19 and haven't found something related to my problem Dec 30 10:06:12 Hi all. Does somebody know a lib which can do this: take a picture from a person and remove background Dec 30 10:08:46 nopee Dec 30 10:13:04 man, styles Dec 30 10:13:08 there should be a book about styles Dec 30 10:26:36 Greetings humans. Dec 30 10:29:58 sup Dec 30 10:30:13 hey, can I get the "R.id.elementName" from a list adapter? Dec 30 10:30:34 like for example this showcaseview library, I am using it and I need to show a coach mark on the 3rd item in a listview Dec 30 10:31:18 the code for doing this will be triggered from the activity, and setting the target view of the showcase to be "listview.getAdapter().getItemId(3)" doesn't seem to cut it, it throws null Dec 30 10:31:36 how can I get the kind of reference int that it's looking for, from the adapter Dec 30 10:32:17 if I write that code inside the adapter, I get the showcase to show over the very first item of the listview, because there is no way for me to find out which item exactly I want, because they dont have id's Dec 30 10:32:47 even if I place it inside if (position == 3), the setting of the showcase on the target is still going to be the id of the element in the viewholder, not the i'th element that I want Dec 30 10:33:01 I give you $5 if you read that Dec 30 10:33:02 haha Dec 30 10:34:07 with performItemClick on teh listview, I can get the reference to the view I need (the exact one) with a simple getView(3, null, null). or even getItemIdAt(3) Dec 30 10:34:35 yet this ...intelligent guy who wrote Showcase, i've been fixing his crappy functionality for like 5 days Dec 30 10:34:50 You're not making any sense Dec 30 10:35:26 I think it's the way he is handling what Im giving that's going wrong, let me see what he takes as param in the target constructor Dec 30 10:35:47 I am trying to temporarily stop google play services on my tablet, but after tapping force stop it restarts by itself. Dec 30 10:35:50 ah, here we go Dec 30 10:35:55 public ViewTarget(int viewId, Activity activity) { Dec 30 10:35:55 mView = activity.findViewById(viewId); Dec 30 10:35:56 } Dec 30 10:35:58 oops! Dec 30 10:36:04 How can I gain control over this situation ? Dec 30 10:36:09 anybody there could help me with retrofit api ? Dec 30 10:36:11 Google thinks its god. Dec 30 10:36:15 sorry, I just meant that meat line. he looks for the view inside the activity not inside where I want him to look. ok simple enough Dec 30 10:36:19 Google is god. Dec 30 10:36:32 http://www.thechurchofgoogle.org/ Dec 30 10:36:46 lol Dec 30 10:37:45 When I tap disable It asks if I want to replace the app with the factory version, I just want to disable it ! Dec 30 10:38:16 well you can't Dec 30 10:38:25 seems obvious Dec 30 10:42:58 Looks like I finally got it stopped somehow. Dec 30 10:43:04 middle finga to google. Dec 30 10:43:27 man you spend so much time working with methods that you never really read about Dec 30 10:44:25 like for me, getChildAt, getView, getItem are all the same circle of things Dec 30 10:44:26 lol Dec 30 10:45:41 If you don't know the difference, then you're gonna have a bad time Dec 30 10:45:52 Odaym: you would inflate the view of the xml from within getView() and then load the widgets from there by id Dec 30 10:46:43 well NOW i know them exactly what they do and how to use them, but not after circulating between them to get what I want Dec 30 10:46:54 Im sure like 9 out of 10 devs do this, trial and error without reading docs Dec 30 10:46:57 sad Dec 30 10:47:49 whatever you say Dec 30 10:49:05 yea I've done the studies, most people do this Dec 30 10:49:07 haha, no Dec 30 10:51:18 guys I would like to develop an app Waze Like ... The core of application will be a map with users collaboration... There's some idea of how to start? Should I use Html5 and after deploy to Android or use Native Android Java? Dec 30 10:52:01 first sentence should be the channel topic Dec 30 10:52:14 "guys I would like to develop an app Waze Like ..." Dec 30 10:52:51 i read it three times and still don't understand what that sentence means Dec 30 10:54:04 that's the beauty of it Dec 30 10:54:05 sry heh... do you know the Waze? Dec 30 10:55:22 ok I got the exact element I wanted Dec 30 10:55:28 whatever it is is irrelevant... HTML apps are crap, go native Dec 30 10:55:42 if I do a request pull for that guy of Showcase, there are like at least 6 big things that I fixed Dec 30 10:55:48 I dont know how people were using it Dec 30 10:56:08 pull request Dec 30 10:56:35 bankai_au: to build a map app should I use Google Maps? Dec 30 10:56:46 yes Dec 30 10:57:20 ok thanks, do u know a good tutorial ? Dec 30 10:57:51 https://developers.google.com/maps/documentation/android/ Dec 30 10:58:45 Have any of you ever experienced adb backup hanging on certain apk backups ? Dec 30 10:58:50 I mean like forever. Dec 30 11:05:28 i'm having issue, please help... Dec 30 11:06:13 medical emergency type of issues? Dec 30 11:06:21 trying to update my project on android studio with svn but not working... Dec 30 11:06:44 svn e155007 is not working copy directory Dec 30 11:08:32 well ... is it ? Dec 30 11:09:25 did you delete the directory and the whole .svn in the process? Dec 30 11:13:27 ohhhh Dec 30 11:13:30 that will hurt Dec 30 11:14:29 No, i don't... Dec 30 11:14:59 Whenever i try to update, it'll says .. No versioned directories to update was found Dec 30 11:15:14 then it can't find the .svn folder Dec 30 11:15:23 or whatever svn uses when you do "git init" :P Dec 30 11:16:20 So, what can i do, already have new commit from my colleague and i need to update my code to have a current working app Dec 30 11:16:33 pull from him Dec 30 11:17:14 if you have changes that you made before you ran into this situation, you're going to have to find that folder that makes projects become repositories (whatever SVN creates when you initialise a new repository in your root project) Dec 30 11:17:39 oh you can't pull from him, he doesn't have the whole repo does he Dec 30 11:18:26 Yes, i can pull from him and even i done that, but after pulling.. the file structure change compare to what i have before... Dec 30 11:18:54 my build.gradle change and my library arrange can be recongnise Dec 30 11:19:06 of course it's going to change Dec 30 11:19:10 cause it's his Dec 30 11:19:14 and he doesn't have what you had Dec 30 11:19:21 it's how SVN works that's the problem in this case Dec 30 11:19:49 everyone has something different and the MAIN THING is on somewhere central, I think this is how it works if it's centralised Dec 30 11:19:51 can i upload new file for him to merge again or what can i do.. Dec 30 11:20:07 you can give him manually what you need to make his version look like what you had Dec 30 11:20:18 and then pull from him what he added Dec 30 11:20:28 or pull from him the whole thing after he has added what you gave him manually Dec 30 11:21:09 you really need to use git Dec 30 11:21:27 dont understand how people don't consider git a religion yet Dec 30 11:22:02 uhmmm... actually, i use git because of my partner, he suggested svn Dec 30 11:22:24 you should shoot him in the face Dec 30 11:23:11 I dont even know what SVN does or how it works, but I mean why would you choose something different than what everybody knows and everybody can help with, git community is humongous Dec 30 11:23:23 so SVN might be amazing, no idea Dec 30 11:23:45 lol Dec 30 11:24:12 hackable, SVN does not have a separate local status like Git does Dec 30 11:24:26 when you do "svn update" it will update your local copy to whatever the server state is Dec 30 11:24:35 and when you commit it will immediately change state on server Dec 30 11:24:46 so you'll have to take that into account. Dec 30 11:24:54 yea where's the server version Dec 30 11:25:01 since its centralized, where do you keep the mothership Dec 30 11:25:04 Mavrik: yeah i understand.. Dec 30 11:25:19 oh, you havent pushed to the mothership in a long time Dec 30 11:25:24 the challenge i was having is updating my project to the online version Dec 30 11:25:36 whenever i try to update.. it give error.. No versioned directories to update was found Dec 30 11:25:52 which mean there's no svn file in the directory Dec 30 11:26:13 if you pushed there, doesnt that repo on the mothership have that svn file? Dec 30 11:26:20 hackable, does AS even support SVN? Dec 30 11:26:25 does "svn update" in terminal work? Dec 30 11:26:34 thepoosh: so, i am back again Dec 30 11:26:51 direct issue is not in target Dec 30 11:26:53 sdk Dec 30 11:27:07 but in Material Dec 30 11:27:37 Odaym, i use apache-subversion to upload the file to svn server Dec 30 11:27:58 i think thats the reason why he was unable to find the svn in the project Dec 30 11:28:23 ah so it pushes your stuff without your project being aware that it's in fact being treated as an SVN repo? Dec 30 11:28:40 Yes.. that's the probelm! Dec 30 11:28:47 then dont do the update from where you're doing it Dec 30 11:29:00 do it from where you usually do it (that thing you usually do doesnt rely on the file you say is missing) Dec 30 11:29:06 So, how to fix navigation bar overlapping content while in fullscreen mode? Dec 30 11:29:09 oh okay... so where can i do it.. Dec 30 11:29:16 where do you do it usually? Dec 30 11:29:18 remember all my code is in brown now Dec 30 11:29:27 last time you did it? how did you do it/ Dec 30 11:29:36 i did it from VCS in android studio Dec 30 11:29:58 -> Import Version control Dec 30 11:30:00 and right now the same thing is giving an error? Dec 30 11:30:17 ->import into subversion Dec 30 11:30:22 yes dear Dec 30 11:30:42 i check my file and i can't find anything related to svn there... sad Dec 30 11:30:45 well something changed then! Dec 30 11:30:57 it's impossible to be this way and everything was fine and now something is lost Dec 30 11:31:24 i think the apache-subversion i use make it worse Dec 30 11:31:47 normally, without using apache-subversion, what can i use and how can i upload to svn?? Dec 30 11:31:52 if you're not doing it the way that an SVN tutorial would tell you how to do it, you can't look for fixes that have to do with the normal way Dec 30 11:32:01 when should i use handler vs thread.run()? Dec 30 11:32:16 cause you dont even have teh basic file that this SVN software uses to realize you are a repository Dec 30 11:32:22 so how do you expect it to update you Dec 30 11:32:33 let it talk to apache-subversion and give it the update Dec 30 11:32:47 just as you let apache-subversion talk to SVN and give it the push Dec 30 11:33:14 How can i do that dear Dec 30 11:33:51 well I dont know, I havent used either of those. but if you can push something through apache-subversion, I expect that you can use it to pull something back of course Dec 30 11:34:05 cause to push something with it, it means that it realizes that this directory is tracked (is a repo) Dec 30 11:34:24 Whenever i try to update from VCS, it will ask for the Depth Dec 30 11:34:43 what's that Dec 30 11:34:45 ask me if i want to enable force update Dec 30 11:35:02 ask to enable update administrative information Dec 30 11:35:13 and also to enable ignore Externals Dec 30 11:35:25 how about you try the commandline? Dec 30 11:36:03 well Dec 30 11:36:13 aep: okay.. put me through.. just to make this work and for the project to realize is file Dec 30 11:36:18 you can force update but that means that you get what is given to you and you dont get any merges from what you have already Dec 30 11:36:25 everything is overwritten by what's online Dec 30 11:36:37 and if you are using this thing correctly, you must always keep the online updated Dec 30 11:36:57 if the online is updated, do force update Dec 30 11:37:41 but hope i'll be able to have my file structure the way its Dec 30 11:38:23 whose file structure is online...? Dec 30 11:38:32 some third party pushes to the online? isn't it you who pushes there? Dec 30 11:38:48 no, mine offline Dec 30 11:38:57 whose code is that online then?... Dec 30 11:39:53 the one online is mine, and my partner alredy merge new codes.. but what i'm after is to update and have have the new code, i want my project structure to remain the same Dec 30 11:40:15 does the project structure online change everytime one of you pushes? Dec 30 11:40:30 isn't it the same project structure for both of you because you are both working on 1 project? Dec 30 11:41:58 Yes.. its but when i pull the code online, the one my partner work on.. the project structure changes.. Dec 30 11:42:05 why?.. Dec 30 11:42:09 only some paths will change Dec 30 11:42:11 where SDK is Dec 30 11:42:19 like 2 lines maybe Dec 30 11:42:39 sdk path shouldn't be checked in Dec 30 11:42:51 if you have to go through changing all of those stuff everytime you pull, just because your friend pushed his, then this is a problem and shouldnt be added to the repo for tracking Dec 30 11:42:51 no, my module, Gradle Scripts and my build.gradle Dec 30 11:43:25 then just copy your offline repo, save it Dec 30 11:43:28 after i pull, my build.gradle now is empty Dec 30 11:43:32 pull and update them manually Dec 30 11:44:24 Thanks.. Dec 30 11:45:06 what.. Dec 30 11:45:22 why didn't you save it, you were just saying that it will be changed, you still do it without saving yours? Dec 30 11:45:38 hoping that magically it will be sorted between the pull and the merge? Dec 30 11:46:05 well, i think i should do it again... Dec 30 11:46:20 upload it now without apache-version Dec 30 11:46:27 maybe using Tortoise Dec 30 11:46:50 by doing that, i think the project will be aware Dec 30 11:46:52 but wouldn't you be uploading the version that already exists on the server? cause you just got that version, you want to push it to the server again? Dec 30 11:47:20 you just need to add a new origin (your username) Dec 30 11:47:27 yes.. i'll start over again and ask my partner to re - merge Dec 30 11:48:11 also punch him Dec 30 11:48:26 Smile.. why? Dec 30 11:48:45 anybody could help me ? http://stackoverflow.com/questions/27704912/retrofit-nullpointerexception-with-response-object Dec 30 11:49:05 cause he influenced you to use svn Dec 30 11:49:09 while you already know git Dec 30 11:49:56 fernandopaiva, your object for deserialization is wrong Dec 30 11:50:15 fernandopaiva, Retrofit will try to look for a field named "Usuario" inside "Usuario" java class Dec 30 11:50:33 because that's how your JSON is structured - it's an object that contains an object. Dec 30 11:51:37 objception Dec 30 11:52:26 Mavrik, how can I solve it ? Dec 30 11:52:30 (also having your API in a local language is a nasty habit) Dec 30 11:52:52 if I return a JsonElement does works ? Dec 30 11:52:52 fernandopaiva, either change your JSON to contain "nome", etc. directly Dec 30 11:53:17 fernandopaiva, or add a proxy object that just contains "Usuario" field of "Usuario" type and use that as retrofit return Dec 30 12:04:21 Mavrik, a proxy object ? Dec 30 12:04:38 how can I do it ? Dec 30 12:06:23 Odamy: when importing using svn.. what do i need to select for Depth? Dec 30 12:53:33 jesus ExpandableListView sucks Dec 30 13:13:49 I have a class ListData.java that extends Application and has a function that gives Context of Main Application, how to get this function 'getContext()' inside another class? http://paste.ubuntu.com/9645352/ Dec 30 13:16:53 You really shouldn't be doing that :/ Dec 30 13:24:00 Mavrik, but it works and I figured out how to call a function from another class. :) Dec 30 14:17:04 i need info about wear watch face api, it's right here, or there is a specific room? Dec 30 14:37:10 If you had to do something like this: http://postimg.org/image/dxyhx5hvn/ , where txt a localized string, how would you provice that resource? Localized pngs or just the badge and a rotated TextView? Dec 30 14:38:00 smaller image: http://postimg.org/image/bnrl7rayl/ Dec 30 14:38:54 it must be possible to get that badge over different imageviews so it has to be seperate Dec 30 14:44:40 thepoosh: Hey, thanks for your help (and the link) yesterday. Dec 30 14:51:15 danijoo, localized pngs would take up a bit more space than rotating a textview and using different strings.xml files which I suppose you're already using anyway Dec 30 14:52:04 So if rotating the textview gives you the desired effect I would personally go for that option, with the pngs however you're guaranteed the text is in the right spot on the badge Dec 30 14:52:39 Regardless of the font used on the device Dec 30 14:55:45 yeah. I just thought it might be difficult to get it positioned correctly. Dec 30 14:56:05 (didnt tried yet, im only designing a user experience atm) Dec 30 14:57:34 but I may can create a custom textview out of it, and use the badge as a 9.png background. This should make it easy to scale it properly and rotate the text together with the badge Dec 30 15:03:52 skrite: np Dec 30 15:29:54 I have a viewpager with a FragmentPagerAdapter. I have some buttons inside the fragment on the first page (position 0) of the viewpager. When I click that button I want to do a FragmentTransaction and replace the fragment in position 0 with another fragment. I can't find any clean solutions and it seems crazy to me that Android does not have built Dec 30 15:29:55 in way to handle this. Dec 30 15:31:00 MartialLaw: try calling getActivity or send in some context when creating it Dec 30 15:31:11 what??? Dec 30 15:31:17 is it also android studio help channel? Dec 30 15:31:30 Hi! there is a way to implement callbacks between activitys? Dec 30 15:31:40 aranax: Intents? Dec 30 15:31:42 aranax Intent? Dec 30 15:31:43 thepoosh: I wanted a clean, short answer but damn dude. Dec 30 15:31:55 not sure how that helps at all Dec 30 15:31:59 sorry Dec 30 15:32:10 have you worked with a viewpager before? Dec 30 15:32:24 ((MyActivity)getActivity().doSomething() Dec 30 15:32:33 ((MyActivity)getActivity()).doSomething() Dec 30 15:32:38 lol ok. anyone else understand what im talking about? Dec 30 15:32:38 MartialLaw: make a method do switch fragment in your activity. and then this ^ Dec 30 15:33:06 yes but the problem lies in position 0. it will not allow me to switch fragments in position 0 for some reason. that's my problem Dec 30 15:33:18 thepoosh, danijoo do you have a link about that? Dec 30 15:33:22 MartialLaw: change the viewpager adapter for that Dec 30 15:33:30 and do notifydatasetchanged Dec 30 15:33:34 i doo Dec 30 15:33:40 hold on Dec 30 15:33:48 let me tweak around a bit more Dec 30 15:33:49 aranax: http://developer.android.com/guide/components/intents-filters.html Dec 30 15:33:57 I only found using putExtra but only carry primitive data Dec 30 15:34:12 I want to send a interface Dec 30 15:34:26 MartialLaw: are you changing fragments and notifydatasetchanged but nothing happens? Dec 30 15:34:27 MartialLaw: conceptually, the adapter should only be in charge of showing information from the dataset, the activity should control the flow Dec 30 15:34:34 so getActivity is the correct way to go Dec 30 15:35:00 why does the emulator display the Nexus android os, instead of the app that needs the test, in the android studio, when run initialized. it worked once, don't know why not now? Dec 30 15:35:08 thepoosh, thx Dec 30 15:35:12 np Dec 30 15:35:55 yeah i don't think you guys really understand. has anyone tried to switch to a child fragment in a viewpager before? it's more difficult then calling fragmenttransactions Dec 30 15:36:07 the answer is yes Dec 30 15:36:53 MartialLaw: im doing this all the time. Dec 30 15:37:26 maybe you should tell us more exactly what you do and what is not working. means: show some code Dec 30 15:38:32 MartialLaw: http://developer.android.com/reference/android/support/v4/view/ViewPager.html#setCurrentItem(int, boolean) Dec 30 15:39:48 so I have a fragment in position 0 in my viewpager. I have a button there or something, whatever it is. when i click it i call this on an interface method which talks to the FragmentPagerAdapter. that method is supposed to remove the fragment at position 0 (the current fragment) and add a new one... it does nothing Dec 30 15:40:25 you want to switch the Fragment itself? Dec 30 15:40:32 or page to a different one? Dec 30 15:41:24 switch the fragment! Dec 30 15:41:54 i have 3 pages. each page has a fragment. im in page 1...i click a button in page 1, the fragment inside page 1 should be replaced... like any normal fragmenttransaction Dec 30 15:48:07 MartialLaw: maybe this is your problem? http://stackoverflow.com/questions/7263291/viewpager-pageradapter-not-updating-the-view Dec 30 15:48:34 you have to override getItemPosition Dec 30 15:49:29 MartialLaw: that should be done from the activity since you're changing the dataset of the adapter Dec 30 16:02:21 Hello. Project has no errors in it, but when I try to run it a msg says "Your project contains error(s), fix them blabla", and then the typical error red cross appears on the root folder of my project (and ONLY there, in no other file where I could look for an error) Dec 30 16:02:41 using Eclipse, already tried restarting it Dec 30 16:03:17 Lorenz9: what does your "problems" tab say? Dec 30 16:03:43 probably implies an error with resource generation, but it's been ages since i've used eclipse Dec 30 16:03:56 Nothing about my current project. Also I'm kind of new so I right click the project and go Run as -> Android application. In case I'm doing that wrong? Dec 30 16:04:17 I've already ran other applications in my AVD btw. Dec 30 16:04:37 hello Dec 30 16:04:46 anybody who can help me Dec 30 16:05:23 sherlock_regus: ask a question Dec 30 16:05:38 Lorenz9: there is a tab on the bottom in Eclipse called "problems" Dec 30 16:05:41 click on it Dec 30 16:05:49 yes, I answered your question Dec 30 16:05:56 "Nothing about my current project. " Dec 30 16:06:01 so i figured out its impossible to change the fragment in position 0 in a viewpager Dec 30 16:06:07 there must be some issue Dec 30 16:06:40 Absolutely all errors are from my /sandbox project, a project I'm not using. The project I'm trying to run is called SeekBar Dec 30 16:07:05 I have a fairly fast android device, but want to make sure my app runs decently on a slower device Dec 30 16:07:16 can I purposefully slow down my app somehow Dec 30 16:07:43 johnflux: try running it through an emulator - you can't get much slower than that! Dec 30 16:09:03 thepoosh: I'm getting you a screenshot, one second. Dec 30 16:09:28 http://i.imgur.com/KLng16o.png This appears. After the message a red cross appears on my SeekBar folder, which magically eventually disappears Dec 30 16:09:32 Lorenz9: is the sandbox project open in eclipse? try closing it - it may be trying to compile that too? Dec 30 16:09:59 i guess ill just put it in the layout and have the view as invisible Dec 30 16:10:05 send a screenshot of the problems tag Dec 30 16:10:07 thanks android.. fucking google Dec 30 16:10:08 Open as in the taps at the top of the screen? There's only the .java of SeekBar and its manifest. Dec 30 16:10:35 can't they think of something so simple? why do you need 2,000 more lines of code to do something simple? Dec 30 16:11:23 MartialLaw: because you're trying to do something that is counter design Dec 30 16:11:33 Lorenz9: open as in open in the project explorer on the left - if it's showing, right click and click lose project Dec 30 16:11:37 *close Dec 30 16:12:39 Closed Sandbox. Still get the error, here's the screenshot you asked me for: http://i.imgur.com/qoTYeoI.png Dec 30 16:13:11 100% Sandbox. Warnings are from yet another project and also sandbox Dec 30 16:13:20 Lorenz9: I have no idea what's written there Dec 30 16:13:24 why not english?! Dec 30 16:13:34 I have it in english, but some errors appear in spanish for some reason ;_; Dec 30 16:13:41 Anyawys it says that I shouldn't use -- in the comments Dec 30 16:14:11 so don't Dec 30 16:14:49 Lorenz9: anyway, you might have an xml naming issue in your res folder Dec 30 16:14:51 Those are errors from another project, why would I want to solve them? Dec 30 16:15:08 which is the most common reason for not building R file Dec 30 16:15:34 Wait, an error appeared now, it says that my AndroidManifest is missing Dec 30 16:15:36 are all your filenames {a-z,_}? Dec 30 16:15:40 thepoosh: but how could it be counter design? i mean it's something that you SHOULD be allowed to do Dec 30 16:15:46 NO Dec 30 16:15:46 (But it obviously isn't, as you can see in the screenshot) Dec 30 16:16:01 an adapter dataset should be changed only via the controller Dec 30 16:16:05 aka parent Dec 30 16:16:48 pager should be changing positions of what's being shown not the dataset Dec 30 16:17:00 Now the error disappeared again, thepoosh . Dec 30 16:17:18 I try to run again, I get an error again, but it doesn't appear in the problems tab. Dec 30 16:17:27 This is so random, I don't even... Dec 30 16:17:45 Lorenz9: try cleaning the project Dec 30 16:17:50 or deleting the gen folder Dec 30 16:19:08 Cleaning worked, thanks! I'll have to check what cleaning does for next time I need it. Dec 30 16:19:37 np Dec 30 16:20:32 hey folks. i'm writing my first android and iphone app now. it's simple and similar to like a grocery list application in terms of interface and use. i am very used to using ruby; and a bit rusty in Java; and even more so in C. No experience with objective c. whats the best way to write code so I don't have to end up writing two entire separate applications? it seems from research the optoins are: 1) write as muc Dec 30 16:20:32 h in c or c++, 2) write in java and use googles tools or robovm to compiloe objective c, 3) use a cross platform library. 4) other choice? what would you go with? Dec 30 16:21:54 so many options, so little advices Dec 30 16:22:14 arooni-mobile: only my opinion but i'd write both apps from scratch. both platforms have their own intricacies and design patterns and you'll learn a lot more about both platforms doing it that way Dec 30 16:22:42 that, and it really irks me when i see an android app that is blatantly an iOS port! Dec 30 16:23:05 like iOS blue bar and back buttons at the top Dec 30 16:23:53 well that means i have to learn objective c right Dec 30 16:25:52 arooni-mobile: yes, thats the trade off for a better understanding of the platform Dec 30 16:26:11 yeah Dec 30 16:26:13 as i say, just my opinion - I do this stuff for fun, no time pressures, so I can take my time Dec 30 16:26:18 don't use the google java objective c translation Dec 30 16:26:27 it can translate a little, but it won't get you far Dec 30 16:26:29 how much longer would it take Dec 30 16:26:38 wouldnt it be better to write as much as possible in c/c++ Dec 30 16:26:39 and you will need objective c understanding to write the app anyway Dec 30 16:26:56 and write wrappers for the UI layers? Dec 30 16:27:12 I suggest writing from scratch Dec 30 16:27:39 write in java Dec 30 16:27:43 then write again in objective c? Dec 30 16:27:49 i mean it seems like i'm doing the same thing twice Dec 30 16:30:56 arooni-mobile: you are, but both platforms have different ways of doing it. if you use android code to create an iOS app, it will never feel like and iOS app (and vice versa) Dec 30 16:31:29 well Dec 30 16:31:30 the only way to make two apps feel completely at home in their platform is to write them that way Dec 30 16:31:33 if i write in c/c++ Dec 30 16:31:49 then write the UI layer in the native language Dec 30 16:31:55 wouldnt that be the way to go? Dec 30 16:32:01 sharing the meat of the code in one comon code base Dec 30 16:32:12 that would make sense - but make sure your draw the line at the correct point Dec 30 16:32:44 you really only want to share the basics - something that can be represented by basic objects Dec 30 16:33:09 when you start getting into adapters and android-specific libraries you should rewrite these for iOS Dec 30 16:34:10 so what about stuff like storing to the database, making a web service call, sending json data, etc Dec 30 16:34:13 is that stuff that could be shared Dec 30 16:35:01 arooni-mobile: if you're gonna write your app in C, you're gonna have a baaad time Dec 30 16:35:19 i'm not a strong c programmer Dec 30 16:35:26 i'd prefer to write stuff like that in java Dec 30 16:35:27 Perhaps sometimes UI differences have more profound implications than the simply cosmetic. Dec 30 16:35:29 but i worry when i do the iphone app Dec 30 16:35:33 i will have to do everything from scratch Dec 30 16:35:50 I.e, there is a different way of thinking about doing things on different platforms. Dec 30 16:36:11 Not that, I am an expert. Just speculating. Dec 30 16:37:44 SO the "meat" of the code to be shared might need to be quite flexible. Dec 30 16:38:25 And the difficulty of implementing and maintaining that flexibility might rival parallel development. Dec 30 16:38:57 Which all goes back to g_steinert comment about where to "draw the line" Dec 30 16:41:00 Another way to view it is not to think of it as coding for different platforms, but rather, for different types of users with different expectations. Dec 30 16:42:10 my genymotion vd doesn't start Dec 30 16:42:18 mices: sucks for you Dec 30 16:42:27 tried pressing the power button Dec 30 16:42:42 mices, did you plug in the power cord? Dec 30 16:42:52 FlipBill: genymotion is a simulator Dec 30 16:42:56 on virtualBox Dec 30 16:43:01 not an actual device Dec 30 16:43:07 thepoosh, I meant the virtual power cord Dec 30 16:43:13 thepoosh: i didn't start virtual box Dec 30 16:43:20 i just started genymotion Dec 30 16:43:34 mices: genymotion runs on virtualBox Dec 30 16:43:42 and it runs it automatically Dec 30 16:43:58 so then why did the installation make an start menu item for genymotion Dec 30 16:44:29 it's running standalone it just doesn't do anything ha ha Dec 30 16:44:37 not even good for show Dec 30 16:45:17 so if i wanna try running under vm i should close the genymotion instance that's running first? Dec 30 16:47:05 i'm gonna shut down gm and restart under vbox Dec 30 16:49:12 i exited genymotion and started vbox, it shows the android device running Dec 30 16:49:22 so what should i do to see it? Dec 30 16:55:49 needed to correct network settings in vm, making some progress now Dec 30 16:56:45 getting endless "untracked pid exited" messages in vbox vm window Dec 30 17:10:38 Hey guys, quick question about getView in a BaseClass Dec 30 17:10:50 Does it get called for the number of values in the data set? Dec 30 17:11:16 EX: If an array has 3 values to put into a listview, does getView get called 3 times? Dec 30 17:19:12 no Dec 30 17:19:19 it gets called once for each visible item Dec 30 17:20:11 Each item in the array? Dec 30 17:20:28 No, as pfn said, each visible item on screen + each cached item Dec 30 17:20:41 it might even get called multiple times if view is being redrawn/invalidated/datasetchanged Dec 30 17:20:46 if you have 1000000 items, is every item visible Dec 30 17:20:54 Yes Dec 30 17:20:58 Well no Dec 30 17:21:01 You have to scroll Dec 30 17:21:04 so, you have 1000000 items on your screen at once? Dec 30 17:21:11 no Dec 30 17:21:21 and there's your answer Dec 30 17:21:35 so how does it know how many times to be called Dec 30 17:21:59 think about it? Dec 30 17:22:04 the answer's pretty obvious Dec 30 17:22:13 it calls it as many times as needed to draw your view Dec 30 17:22:46 So if there are 3 items in the array Dec 30 17:22:57 it will get called 3 times Dec 30 17:23:20 >= 3 times Dec 30 17:23:41 if those 3 items can fit on the screen, yes Dec 30 17:24:07 so it starts at position 0 Dec 30 17:24:11 then does ++ Dec 30 17:24:17 until there are no more items to display Dec 30 17:25:35 drose379, something lke that, except that it starts at current scroll position not 0 ;) Dec 30 17:25:45 and does bunch of caching magic Dec 30 17:26:29 ohh, so int position is not the Array position Dec 30 17:27:32 And so if this method is called more then once it uses View convert view Dec 30 17:27:59 You should watch https://www.youtube.com/watch?v=wDBM6wVEO70 Dec 30 17:28:09 even if it is only called once, use convertView Dec 30 17:28:30 Well its not up to me if convertView is used Dec 30 17:28:39 its up to the setAdapter method, right> Dec 30 17:28:40 SimonVT: great video Dec 30 17:28:41 ?* Dec 30 17:29:20 evanc: The best Dec 30 17:29:35 it's amazing that it's still the go-to almost 5 years later Dec 30 17:29:35 Should be updated to RecyclerView Dec 30 17:29:53 Same exact content, just replace class/method names Dec 30 17:30:03 SimonVT: should dub over it, haha Dec 30 17:30:09 Or annotations Dec 30 17:30:12 what's that video? Dec 30 17:32:07 All the listview documentation you need Dec 30 17:32:19 lol yeah I'm watching it Dec 30 17:44:55 i have an activity, shortcut and widget picker in my app (not self designed). If i pick an activity or a shortcut on a API17 device it uses a light theme and i dont know why. the widget picker has a dark theme so has everything else in my app......any advice? Dec 30 18:07:33 this is how i pick an activity: http://pastebin.com/UFPbbiNL but the listview that is showing up has a light theme, while everything else in my app uses a dark-theme like supposed to. How can i make it using a dark theme too? Dec 30 18:21:33 so there is 100% no way to do a fragmenttransaction on the fragment in position 0 in a viewpager.. this was confirmed, impossible. so Google has some work cut out of for them.. stupid fucking design. Dec 30 18:22:07 i managed to do it using tabhost but i cant have it swipe unless i want to write an hour more code and major instability Dec 30 18:28:34 Does Android Studio have an option to sync projects online Dec 30 18:28:49 Like with bitbucket, svn or like bitbucket or something Dec 30 18:29:05 *github Dec 30 18:33:18 is using instanceof a performance hit? I have this crazy data model where if a value is < 0 its a model specific NULL value, otherwise its a string Dec 30 18:33:42 so i have to test it everywhere and Im concerned about performance of reflection Dec 30 18:34:28 like -5 = Not Known, -10= Not Available, -25 = Not Applicable, OR "ABC123" Dec 30 18:35:07 andreyonadam, yes Dec 30 18:35:28 and there are plugins for almost every source control and hosted system available Dec 30 18:35:45 the github issue integration + git flow = heaven Dec 30 18:35:49 regreddit: That's great. Saves time. Dec 30 18:35:54 tons Dec 30 18:36:04 you can work on issues and close then right from AS Dec 30 18:36:23 Yeah. I tried using a client to do the same thing in eclipse but it would detect all files as changed for some reason and would give me so many things that I didn't need to keep. Dec 30 18:36:24 regreddit: What makes you think that the 'instanceof' operator is slow? I've read that it's very fast. Dec 30 18:36:43 TacticalJoke, it was a question, not an assumption Dec 30 18:36:48 so thats great Dec 30 18:37:19 I think SO has a few threads about this. Dec 30 18:37:19 for some reason my head told me that reflection could possibly be slow, so i figured i should ask Dec 30 18:37:46 andreyonadam, if you install AS you will never touch eclipse again Dec 30 18:37:47 I think the kind of reflection that is slow is way more elaborate than a mere type check. Dec 30 18:38:19 regreddit: Do you really need to be using 'instanceof', though? That's usually a bad idea (for code readability and changeability). Dec 30 18:38:31 For example, could you use the Null Object pattern? Dec 30 18:38:57 well, I can cast it to int and then test if < 0, but that looks even clunkier Dec 30 18:39:06 i have not seen the Null Object pattern Dec 30 18:39:10 regreddit: Yeah I just got it. I haven't actually touched android development for like a year. When I backed up my eclipse workspace all I did was drag and drop the workspace. I remembered whenever I came back to android development I would have a problem importing the existing projects. With AS it wasn't problem and I was able to import all the projects individually. Dec 30 18:39:23 i'll check that out Dec 30 18:41:23 That pattern might or might not apply in your case; it's hard to say (I suggested it only as an example). Dec 30 18:41:47 i have coded myself into a small corner of hell based on a set of state specific validation rules that my app has to abide by Dec 30 18:42:04 state = US state Dec 30 18:42:20 What data is it validating? Dec 30 18:42:35 My app has an address field, with cty, state, and county Dec 30 18:42:48 and Alabama requires those to be FIPS codes Dec 30 18:43:12 which is an antiquated data standard for geocoding locations Dec 30 18:43:20 that used to be used by the US Census Dec 30 18:43:49 to have a decent user experience AND enforcethe standard Dec 30 18:44:08 i need to present autocompletes that rapidble filter their adapters based on sibling lists Dec 30 18:44:27 so if a user selects alabama, i have to quickly filter county and city to the lists in AL Dec 30 18:44:28 etc Dec 30 18:45:03 BUT is a user select 'unknown' for county, then city is only filtered by state, etc Dec 30 18:45:09 its become a huge PITA Dec 30 18:45:23 Where does this come in: "-5 = Not Known, -10= Not Available, -25 = Not Applicable, OR "ABC123"" Dec 30 18:45:55 so if the user does not know the county, he may put 'Unknown' which is -5 Dec 30 18:46:15 Why is that -5? Just curious. Dec 30 18:46:32 thats a national data standard Dec 30 18:46:34 Ah. Dec 30 18:46:36 i dont have a choice Dec 30 18:46:42 xml based Dec 30 18:47:00 So are you constructing a subclass depending on whether we have -5, -10, or whatever? Dec 30 18:47:10 And then using 'instanceof' later to see which subclass we're working with? Dec 30 18:48:05 well, sort of. whn i get a model from the serverr, i need to populate those fields based on lookups i do locally in an SQLite db Dec 30 18:48:47 and if say state is "01", and county is "01256" and city "50000" Dec 30 18:49:14 then the user could change the county to 'Unknown' and i need to 'do the right things' Dec 30 18:49:42 i have a setAdater() tied to an event listener on each widget Dec 30 18:50:07 so when any of them change i can refilter the oterh widgets' adapters Dec 30 18:50:19 but it has lots of logic paths Dec 30 18:50:47 like if they change state to anoterh state, but county is still set to a county in the previous state's list, etc Dec 30 18:50:54 it is sucking the life out of me :) Dec 30 18:51:51 compounded by the fact my entire UI is dynamically built, so I don't know the data types of any of this data ahead of time Dec 30 18:52:24 i serve 50 states' UIs natively, using a schema that the app downloads on startup Dec 30 18:53:48 I'm mocking it up using spinners right now, but city and county actually need to be Autocompletes Dec 30 18:54:36 and my insistence that the UX be good is making me obsess over this Dec 30 18:55:30 Im just a little guy so my UX is way more important to me than to my competitors. Its all I have :) Dec 30 18:56:58 So where are you using 'instanceof'? Dec 30 18:57:59 Yeah, UX is what it's all about. Gotta got that right. (Android apps so often let people down here, IMO.( Dec 30 18:58:00 ) * Dec 30 18:58:44 regreddit i dont understand that reasoning. UX costs money too Dec 30 18:58:47 everything costs money Dec 30 18:58:50 (or time) Dec 30 18:59:34 I took it to mean that his competitors already have the users, while he has to win people over with an amazing UX. Dec 30 19:00:32 depends on how sticky their products are Dec 30 19:02:14 correct Dec 30 19:02:19 they are quite sticky Dec 30 19:02:37 so big guys like Siemes, GE, etc abuse their customers with horrible UX Dec 30 19:04:42 TacticalJoke, so when i setup my Layout, before populating the Cities list, i have to get the value from say the state model property Dec 30 19:05:19 and if its an int < 0 I dont select by that value in the SQL query, etc Dec 30 19:07:20 so i have to test it in a lot of places, and the data type of the 'widget' is a generic Dec 30 19:08:30 So, in various places, you're asking some object what its int value is and then doing processing based on that? Dec 30 19:08:54 (Or, I guess, presenting UI stuff based on that.) Dec 30 19:10:01 right Dec 30 19:10:24 in all my onChange listeners, etc Dec 30 19:11:28 so im now wrapping all my accesses in if (value instanceof String){}, etc Dec 30 19:13:23 hello, I am just getting used to using the Async task helper. I would like to modify the action bar of the activity once onExecuteComplete() is called Dec 30 19:13:27 I can not seem to find an example of this. How should I get a handle on the activity which started the thread? Dec 30 19:14:44 regreddit: Can't you create a class hierarchy for all that? FooValue, BarValue, etc. Dec 30 19:15:01 It might not be perfect, but it seems less bad than having something like an Object and checking whether it's a String or something. Dec 30 19:15:06 i'm trying to troubleshoot genymotion but the preview in virtual box is too small i can't read it Dec 30 19:15:44 yeah, NULL is a class that is common across the entire dataset, so I probably need to extract that into a class Dec 30 19:17:26 Pinkamena_D: Are you talking about AsyncTask and onPostExecute? Dec 30 19:20:33 anyone that wasn't here last night that knows how to run maven directly without gradle? Dec 30 19:20:48 yes Dec 30 19:22:30 Has anyone had their hands on Google fit API yet? I'm wondering if you can read the history written by other apps. Dec 30 19:23:52 Pinkamena_D: Couldn't you just say "getActionBar()" in onPostExecute? Dec 30 19:24:02 Assuming the AsyncTask is an inner class of the Activity. Dec 30 19:26:29 sorry for asking again, not gettting this to work: how i pick an activity: http://pastebin.com/UFPbbiNL but the listview that is showing up has a light theme, Dec 30 19:26:30 while everything else in my app uses a dark-theme like supposed to. How can i make it using a dark theme too? Dec 30 19:28:00 (on API 17 only, on API 18 it is all dark) Dec 30 19:29:14 since I'm coding on mobile, I can't use maven, but I really want to use libraries :/ Dec 30 19:29:31 yo guys is there a good oauth workflow or package for android Dec 30 19:29:38 i know with ruby there's omniauth Dec 30 19:30:39 adkins: you can create a style.xml file that defines the overall theme or the listview theme Dec 30 19:33:15 shmooz: thank you, but can you explain why this is happening? i pick a widget like this: http://pastebin.com/ee3pL21s and its using a dark theme....why is picking the activity light and this one dark? Dec 30 19:33:45 how is an aar created? Dec 30 19:34:04 TacticalJoke, asynctask is a separate file, and I have been trying to use an interface to accomplish this Dec 30 19:34:23 I want to do: git clone -> build aar -> include from local reporting Dec 30 19:34:26 repo* Dec 30 19:34:26 this answer, for example: http://stackoverflow.com/questions/12575068/how-to-get-the-result-of-onpostexecute-to-main-activity-because-asynctask-is-a Dec 30 19:34:37 seems incomplete and I always get a nullpointerexception Dec 30 19:36:09 Pinkamena_D: Can you post your code? Dec 30 19:37:15 Oh, I see. See this comment: "for all those who are getting null pointer pass your interface to your asyncTask class constructor then assign it to a variable and then call processfinish() on that variable." Dec 30 19:37:26 He never actually sets 'delegate'. Dec 30 19:37:49 Wait, he does. In MainActivity.onCreate. Dec 30 19:38:14 Though it's not really good form to use a public field like that. Better to have a public method (or to pass it in the constructor). Dec 30 19:39:21 Is there any straight up api support for sliding up/down the actionbar to give more screen realestate? Dec 30 19:39:39 I'm only seeing stuff messing with ScrollListeners Dec 30 19:40:01 so in the parent activity, trying to instantiate the Async task like that asks for the asynsResponse as argument Dec 30 19:40:17 Yeah. Dec 30 19:40:21 And you can pass 'this'. Dec 30 19:42:24 ahh, I think that was the part I was missing! thank you very much. Dec 30 19:42:39 I prefer to use a public method in such cases. I have something like "setListener(Listener listener) { this.listener = listener; }" and "clearListener() { listener = null; }", the latter being called in Activity.onDestroy (or whichever is most appropriate for the context). Dec 30 19:42:53 TacticalJoke: onstop / onstart Dec 30 19:44:23 lasserix_: I think it depends on the situation. In my app, for example, I don't want to remove the listener in onStop. I'm happy for stuff to actually happen in the background (until onDestroy, if that is called {and if it's not then everything is going down anyway}). Dec 30 19:44:53 as long as you restart in onstart better use resources, since you don't need listeners when activity is in background Dec 30 19:48:48 lasserix_: Aren't there cases where onStop has been called and then a download has finished and the UI is updated? Dec 30 19:49:11 (Where the update is visible when the user comes back to the activity.) Dec 30 19:49:21 then onstart would have been called Dec 30 19:49:35 onstop -> activityy is in background (thus i believe) no updates to UI can occur Dec 30 19:50:32 anyways you wouldn't update UI after onstop has been called, proper code would do something like check the download completion in onstart and update the UI then Dec 30 19:50:56 I have a really long string that I need to look at, but it's over the logcat buffersize Dec 30 19:50:56 how can I read it otherwise? Dec 30 19:50:57 I need to send it to my PC Dec 30 19:51:04 ollien you can write it out to a file Dec 30 19:51:13 or copy it to clipboard Dec 30 19:51:18 lasserix_: Clipboard might be too small Dec 30 19:51:20 Alternatively, you can paginate it before sending it to LogCat. (There are examples on SO.) Dec 30 19:51:23 dump it into a textview Dec 30 19:51:33 email it to yourself? Dec 30 19:51:39 and file IO might be my only option, but I was trying to avoid it Dec 30 19:51:49 hm, email via intents might work Dec 30 19:51:51 I could try that Dec 30 19:51:52 thanks Dec 30 19:52:19 ollien: is it just a long line, or is it bigger than the logcat buffers (~200kb+)? Dec 30 19:52:31 groxx: both of those Dec 30 19:52:37 lasserix_: If TextView.setText is called after onStop (from some code that is posted to the message queue), is that call simply ineffective? Dec 30 19:52:47 (For example.) Dec 30 19:52:48 it's a long line thats larger than the buffer size Dec 30 19:52:54 *that's Dec 30 19:53:18 TacticalJoke: not sure, but that activity's looper wouldn't be in main at that time since it is in the background? Dec 30 19:53:18 ollien: Also look at this: http://stackoverflow.com/questions/7606077/how-to-display-long-messages-in-logcat Dec 30 19:53:40 There might be a better SO answer; that was just the first I found. Dec 30 19:53:42 TacticalJoke: Hm, that could also work. Thanks. I'll try that next Dec 30 19:53:48 fun. probably save it to a file then, tbh. it's not hard, and you can easily get at it via adb. Dec 30 19:53:57 groxx: yeah, I just would like to avoid file IO if I can Dec 30 19:54:13 TacticalJoke: that also sounds like a context memory leak Dec 30 19:54:34 since you've retained reference to an activity context (to update the UI) after onStop has beenc alled Dec 30 19:55:30 yo guys Dec 30 19:55:32 Hmm, maybe. But if it's letting go of the reference in onDestroy then I wonder whether there's technically a leak. Dec 30 19:56:03 the activity is still "leaked" by other means before onDestroy, it's fine Dec 30 19:56:33 changes won't be saved in your instance state bundle, but that might be fine Dec 30 19:57:11 yeah Dec 30 19:57:18 hence no reason to update ui from after onstop Dec 30 19:58:41 it's more likely to be wasteful, at the very least, yeah. start/stop is a good place to put most things. especially since onDestroy gets called so late in the lifecycle - easier to make lifecycle mistakes. Dec 30 19:58:50 can i emulate "env vars" in other languages w/ android java? basically, like im making requests to our backend i want to use a certain URL as the base url for requests (ex: baseUrl + '/users/' + id) when developing our android app and a different url when actual users are using it Dec 30 19:59:25 Ah, good point. Dec 30 19:59:36 so we can get different API responses, i can talk to the dev server when developing new features and production server when actuall ppl use the app Dec 30 19:59:40 maybe some build process for this? Dec 30 19:59:44 tejas-manohar, there's no environment variables on Android Dec 30 20:00:03 tejas-manohar, but you have BuildConfig class which has DEBUG set to true when you have a debug build Dec 30 20:00:10 Mavrik: o ok Dec 30 20:00:17 you can do a lot of stuff with gradle tho Dec 30 20:00:18 tejas-manohar, or you can use release/debug product flavors to create different code for debug and release builds Dec 30 20:00:27 o ok cool Dec 30 20:00:33 tejas-manohar, e.g. you have a "Urls" class which has different constants for debug and release build Dec 30 20:01:06 tejas-manohar: if you're using Android Studio / Gradle there's a way to inject fields into BuildConfig, and/or I'd recommend using two flavors for internal / production builds. Dec 30 20:03:02 And if you're not using Gradle in such environment, you should. Dec 30 20:03:26 How can i prevent an Android Service from being restarted when i close the foreground app that opened it? Dec 30 20:03:41 startService before binding Dec 30 20:03:49 then you have to manually stop it as well Dec 30 20:04:11 thank you Dec 30 20:06:01 Is it worth the extra effort to get my app on the Amazon App store in addition to the play store, and are there other Android download platforms I should consider? Dec 30 20:10:05 parceable plugin generator is cool Dec 30 20:10:20 qkzoo1978: how much extra effort? if it's tiny: probably. there are quite a few Kindle Fires out there. Dec 30 20:10:54 qkzoo1978, depends, if you're not using Google Services, then probably yes Dec 30 20:10:59 if you are... to hell with Amazon. Dec 30 20:11:27 Personally, I can't believe how much worse Amazon's store is than Google's or Apple's. it's terrible. an _amazing_ amount of work went into making it that bad. Dec 30 20:11:43 qkzoo1978: Honestly, and this is more out of personal bias, I wouldn't put my app on Amazon. I don't like the way they treat devs Dec 30 20:12:10 I just need to add in and support Amazon Maps insteadd of Google Maps, and probably the same when I implement GAs. Dec 30 20:14:05 their developer console is confusing as hell. Dec 30 20:14:32 amazon's store looked pretty solid last i checked Dec 30 20:14:49 google is good now but a long time ago they were easily the worst Dec 30 20:15:15 never used location though Dec 30 20:16:22 Are there other distribution platforms I should consider besides Play and Ama?zon for a free/paid app Dec 30 20:16:44 android app? Dec 30 20:17:01 yes Dec 30 20:17:02 if you cant do apple then i guess not Dec 30 20:17:06 amazon gets you blackberry devices for free. Dec 30 20:17:17 none of the other secondary markets like samsung are any good Dec 30 20:17:20 nook used to be okay Dec 30 20:17:34 if its a paid app it might be worth it Dec 30 20:18:15 Itss a transportation app, so I guess that illiminate Nook. Dec 30 20:18:27 k Dec 30 20:19:15 Do you guys see adequate download rates off sites like xda? Dec 30 20:20:37 good for promo Dec 30 20:22:25 How about Paid reviews, do they tend to have a good ROI? Dec 30 20:24:20 pretty much everything has bad roi in small amounts Dec 30 20:24:28 well if its a paid market then i dont know. Dec 30 20:25:00 but generally things are priced so that its profitable to run a campaign if you know what youre doing and you get to chart because of your campaign Dec 30 20:25:18 sometimes thats not even enough Dec 30 20:25:37 Hmm. Dec 30 20:25:52 Thats disheartening Dec 30 20:26:16 it helps to have a lot of other apps and cross promotion Dec 30 20:26:26 and to build that network over time Dec 30 20:27:04 Ya, right now I only have one decent app on the store, and nobody knows its there. Dec 30 20:29:09 I ssubmitted the appp for review to 15+ sites free sites, hoping for even a small mention, but never heard back on anything, that was a month or two ago. Dec 30 20:30:33 lasserix_, as i understand from your answer if no one binds to a service, it will be terminated at some time? Dec 30 20:31:17 no Dec 30 20:31:20 err Dec 30 20:31:40 binding to a service without calling startService first will cause it to stopself when last client unbinds Dec 30 20:32:00 but calling startService before binding will always require explicit call to stopService for service to stop Dec 30 20:32:05 it won't magically stop on its own Dec 30 20:33:26 Do I need to inform users if I implement Google Anaylitics, or allow them to turn it off? Dec 30 20:47:38 Amazon's app store is a PITA for sure Dec 30 20:47:48 but I do put my app there Dec 30 20:49:44 regreddit, they take care of all taxes? Dec 30 20:51:46 EPG, I don't know my app is free Dec 30 20:52:18 isn't Amazon store US only? Dec 30 20:52:37 no I dont think so Dec 30 20:53:06 you have to pick all the locales your app has/targets, so I assume it is available in other places Dec 30 20:53:27 but i don't know that Dec 30 20:53:28 there's also an amazon app store in Germany but I don't know to which Amazon it belongs Dec 30 20:54:14 I'm wondering how eaxactly Google will be handling the new EU VAT laws Dec 30 20:54:37 Google doesn't handle VAT, so they won't give a crap :P Dec 30 20:54:51 next year they have to in EU Dec 30 20:55:01 Ugh, no :) Dec 30 20:55:22 uhm, sure Dec 30 20:55:31 You either misunderstand the EU directive, or how Play store taxation works :) Dec 30 20:55:37 But no, Google will not "handle" anything Dec 30 20:55:39 You will ;) Dec 30 20:56:15 you don't sell in EU, do you? Dec 30 20:56:37 I indeed do. Dec 30 20:57:00 you should've received the mail, too Dec 30 20:57:04 but you can also check their help pages Dec 30 20:57:29 EPG, again. Dec 30 20:57:49 EPG, VAT is something that's handled by the developer and Google just passes-through invoices Dec 30 20:57:58 the burden of VAT registration and reporting is on the seller side Dec 30 20:58:09 Mavrik, read this: https://support.google.com/googleplay/android-developer/answer/138000?hl=en Dec 30 20:58:14 Google charged proper local VAT up until now as well so for them it changes NOTHING. Dec 30 20:58:27 You as a seller will have to handle the changes as the receipient if invoices as well. Dec 30 20:58:40 could you read it and discuss later? Dec 30 20:58:44 EPG, I did. Dec 30 20:59:27 And it states what I said - they charge proper local VAT already. Dec 30 20:59:40 (And you'll notice that if you're buying stuff from different EU countries.) Dec 30 20:59:58 But you'll still receive invoices for each purchase which means you'll have to handle booking as a company yourself as well. Dec 30 21:00:01 "[...] Google will be responsible for determining, charging, and remitting VAT [...]" Dec 30 21:00:36 I don't know about your situation but for me that's a change Dec 30 21:00:52 currently I don't charge VAT in EU because I'm a small business in Germany Dec 30 21:01:09 *sigh* Dec 30 21:01:13 You're obviously not listening. Dec 30 21:01:50 I just want the $$$ Dec 30 21:02:02 hwrdprkns, who doesn't ;) Dec 30 21:08:52 Mavrik, I can't follow you but maybe you'll find this page and the linked pdfs helpful: http://ec.europa.eu/taxation_customs/taxation/vat/how_vat_works/telecom/index_en.htm Dec 30 21:09:03 If determining, charging and remitting VAT is not "handling anything", then I don't know what is Dec 30 21:11:04 SimonVT, the issue is that you as a company have to actually report and pay that VAT to a correct country or to a local intermediary Dec 30 21:11:18 Google can't do that for you - they will charge the proper amount yes Dec 30 21:11:39 But then you'll have to bookkeep and pay the VAT (or not) and report it to your local tax office (or target country tax office) yourself Dec 30 21:11:41 Mavrik, this changes next year Dec 30 21:11:49 since Google gives the invoice in your name, not theirs Dec 30 21:12:18 you'll find more info in the practical guid linked above Dec 30 21:12:21 From the help page, it sounds like they'll send the money to the right place Dec 30 21:12:31 "Google will send VAT for EU customers’ digital content purchases to the appropriate authority" Dec 30 21:12:50 it's a question of the appearance of the app store, control of the developer regarding orders etc. Dec 30 21:12:58 gah Dec 30 21:13:11 Yes. I've managed to miss that sentence twice. Dec 30 21:13:27 Yay then. Dec 30 21:13:29 Mavrik: okay, but what about me? I'm not VAT registered so do not charge, or claim back VAT Dec 30 21:13:32 Sorry EPG :/ Dec 30 21:13:39 no problem Dec 30 21:14:10 (I had to go through this dance for some other stuff I sell and I missed this part of Play store change) Dec 30 21:14:17 maybe i'm missing the point though, I don't currently sell anything in the play store anyway :P Dec 30 21:14:39 g_steinert, uhhhh... you'll have to check how laws handle a person selling to a person :/ Dec 30 21:14:59 VAT laws are such a mes Dec 30 21:15:08 I doubt there's a way around paying VAT Dec 30 21:32:54 hey all Dec 30 21:33:53 good evening Dec 30 21:48:11 The example after the "How to Leak a Thread" section in the following has to be wrong: http://www.androiddesignpatterns.com/2013/04/activitys-threads-memory-leaks.html Dec 30 21:48:17 Surely that boolean has to be marked 'volatile'. Dec 30 21:48:42 Nah Dec 30 21:48:59 lasserix_: If it's not marked as volatile then the value can be cached and the variable might never be read again. Dec 30 21:49:11 In other words, that thread will always see 'mRunning' as true. Dec 30 21:49:33 Usually only a problem when there is high read access (hence the caching) with a single thread its not usually a problem, takes multiple threads Dec 30 21:49:34 (Maybe. Or maybe not. It could go either way.) Dec 30 21:50:00 I remember that in .NET you *had* to use 'volatile' here. No choice. Is Java different? Dec 30 21:50:11 Like, if you didn't use 'volatile' you were simply doing it wrong. Dec 30 21:50:27 hardware dependent i belive Dec 30 21:50:42 or that could be for atomic Dec 30 21:50:52 Does anyone know how to get the cache dir in ProviderTestCase2? Dec 30 21:51:17 I am trying getMockContext().getCacheDir() but internally it is returning NPE Dec 30 21:52:01 ie. the getCacheDir() call is entered, so PTC2 has finished its setup. Dec 30 21:53:32 Hi :) Dec 30 21:55:56 Q: Is is possible to get two events from default clock application, when alarm start ringing and when its snooze ? Dec 30 21:57:11 This suggests that mRunning should be volatile: http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.3.1.4 Dec 30 21:57:20 The third example. Dec 30 21:58:33 got my google cardboard today Dec 30 22:00:44 pfn, gz :) Dec 30 22:00:51 do you want to develop for it? Dec 30 22:05:58 when an android app is built, is there any way to access a unique build-id? Dec 30 22:06:19 I'm looking for some way to tie proguard mapping.txt files to a particular build of an app Dec 30 22:06:34 and I can't rely on the user updating the version in AndroidManifest Dec 30 22:07:18 Hmm, this suggests we should use a WeakReference when holding onto some UI thing in a background thread: http://android-developers.blogspot.co.uk/2010/07/multithreading-for-performance.html Dec 30 22:07:31 It's not enough to set the reference held in the background thread to null in Activity.onStop or whatever? Dec 30 22:21:28 I also don't understand why that code checks whether imageViewReference is null. How could imageViewReference ever be null in that code? Dec 30 22:22:15 when your asynctask ends you may no longer have a UI Dec 30 22:22:44 bankai_au: But nothing can set imageViewReference to null, surely. Dec 30 22:24:23 To be honest, I don't like the idea of using WeakReference, anyway. I don't see what advantage that has over using a strong reference and setting things to null ourselves. Dec 30 22:25:16 Maybe doing things manually might mean that references are held for slightly longer (when the background thread hasn't yet seen that it's been set to null {and therefore the garbage collector can't collect it yet}), but I'm not sure. Dec 30 22:27:51 Even so, that has to be such a small amount of time if we're doing things right (actually stopping downloads, or whatever). Dec 30 22:28:42 WeakReferences simplify usage Dec 30 22:28:59 Fire-and-forget vs lifecycle management Dec 30 22:30:31 If my "downloader" class already has a method like the following, is setting the reference to null (instead of using a WeakReference and letting the garbage collector set the inner referent to null) just as good? "public void stopDownload() { client.stopDownload(); listener = null; }" Dec 30 22:31:19 Or perhaps reversing the order of those two statements. Dec 30 22:31:25 it doesn't matter Dec 30 22:31:37 and having a weakreference doesn't matter Dec 30 22:32:00 What do you mean? Dec 30 22:32:10 1, don't hold onto ui stuff from a background thread Dec 30 22:32:21 2, removing your listener at any time is good enough for gc Dec 30 22:32:32 the order of the 2 lines you pasted make no difference Dec 30 22:32:49 Q: any clue how to get clock alarm events ? Dec 30 22:33:01 clock alarm? Dec 30 22:33:22 pfn: We might need to hold onto an Activity (or similar) in a background thread (perhaps via the Listener pattern). Dec 30 22:33:22 yes, wakeup Dec 30 22:33:33 the clock app has its own app specific broadcasts Dec 30 22:33:41 alarm manager is different Dec 30 22:33:50 TacticalJoke, then release it at the appropriate time Dec 30 22:34:14 but is it accessible somehow for other applications ? Dec 30 22:34:25 what are you asking Dec 30 22:34:28 alarm manager, or clock Dec 30 22:34:35 read the aosp source and see, for the latter Dec 30 22:34:48 the idea is when I set the clock alarm and go sleep and then when he will wake me up then I need cath this event Dec 30 22:35:10 Will control some bluetooth devices and will turn on my lamps at house Dec 30 22:35:21 read the aosp source and see Dec 30 22:35:39 oems all bundle their own clock app which behave differently Dec 30 22:36:08 pfn: Right. But I'm asking whether that's as good as using a WeakReference. I'm not sure, because I think there are some cases where setting the reference to null might not be effective for a long time: when the background thread keeps running for ages and doesn't yet see that the reference is null. In that case, I think the GC will not collect the object. It'll think "the background Dec 30 22:36:08 thread has a reference to it". Dec 30 22:36:27 it's almost never good to use a weakreference Dec 30 22:36:41 it just leads to pain and suffering, and oftentimes, bringing bad dead objects Dec 30 22:36:57 s/bad/back Dec 30 22:39:10 It makes no difference if you null it out or you use a WeakReference.. as long as it doesn't live longer than your activity, if that's what it'd keep alive Dec 30 22:40:22 Okay. The other thing I'm not sure about is whether the reference should be set to null in Activity.onStop or, earlier, in Activity.onSaveInstanceState. Dec 30 22:40:56 The Activity isn't going away until after onDestroy Dec 30 22:42:05 Yeah. I guess I was worried about this sequence: onSaveInstanceState --> download finishes and UI is updated --> onStop/onDestroy Dec 30 22:42:37 I think those UI updates could end up being a waste since the save-instance-state thing has already happened. Dec 30 22:45:14 It is staggering to find out just how many places a user in your app can crash it by switching away and coming back to it after it was killed Dec 30 22:45:41 Yeah. I'm trying to avoid complexity as much as possible for such reasons. :) Dec 30 22:45:47 Complexity really is our enemy. Dec 30 22:48:12 Do i have to always reset layoutparams when adding/remvoeing views? Dec 30 22:48:37 TacticalJoke: shouldn't you just cancel the download? Dec 30 22:48:54 or dump it into a cache folder, and check to see if its there when you start again Dec 30 22:49:24 If we're rotating the screen or something, I'll keep the download going. If they're backing out of the Activity, I guess I should cancel the download. Dec 30 22:49:37 In both cases, though, I need to set that listener reference to null. Dec 30 22:49:43 Let's say my main activity shows list of data. If theres no data it jumps to another activity that lets add data. If no data was added, where should the back and up buttons return to? Dec 30 22:50:28 TacticalJoke: personally, I avoid weakrefs for things like that. I grok the reason they're recommended, but it's a non-issue if you're managing the lifecycle correctly, and you should _definitely_ be managing the lifecycle correctly. they can simplify some things, but in cases like this they just hide coding errors. plus it's basically guaranteed to cause Dec 30 22:50:29 wasted effort, since the activity can be destroyed and not GC'd for a long time, and you'll still be running the task / updating the non-existent UI. Dec 30 22:50:33 skulltower: Do they see that they're "jumping to" the next Activity? Dec 30 22:50:54 TacticalJoke, no it's a animation-less jump Dec 30 22:51:30 groxx: True. Hadn't considered that last point. Dec 30 22:51:46 I do like the idea of doing it all manually, since, as you say, we need to be on top of that regardless. Dec 30 22:52:21 I have one thread which is pretty much "while (running) { call a method in the NDK; check a variable; call a different method in the ndk }". No locks or anything. Yet I have another thread which is quite simply not running at all, it feels like thread starvation, but once I start pausing and stepping threads in the debugger, they each run as they should. Is there something which would cause Java to not schedule threads? Dec 30 22:52:34 skulltower: So, to the user, it's as if they never go to the "empty" Activity at all? They simply go to the "add data" Activity. Dec 30 22:52:54 Wait a second... can only one thread call into the NDK at a time? Dec 30 22:53:08 If so, I would be tempted to say that back and up should not go to the "empty" Activity. Dec 30 22:53:08 TacticalJoke, That's right if the list is empty. If it's not empty you can see the list and optionally go to the data-adding-activity Dec 30 22:53:52 TacticalJoke, so, if the list is empty, the main activity shouldn't exist to the user? As in up disabled, and back quites the app? Dec 30 22:55:04 Hmm. Actually, I'm not sure I stand by that answer. This might be undesirable in some cases. I think it may depend on the app. Dec 30 22:55:09 What kind of app is it, if I can ask? Dec 30 22:55:40 skulltower: osunds like that would frustrate your users Dec 30 22:56:10 an activity should not be empty and displayed, display something like no data or whatever, but always let users know whats up and don't give them anything that would frustrate them Dec 30 22:56:12 I mean, the simplest case sounds like this: show the "empty list" screen and allow them to click "Add" or whatever. But maybe that's undesirable. Dec 30 22:56:56 I just thought that since an empty list has no functionality, it shouldn't be shown at all. Dec 30 22:57:28 skulltower: In case it's relevant, ListView has an "empty view" property. Dec 30 22:57:29 another way tto think of it is, does this activity feel broken? Dec 30 22:57:42 You could show a TextView with a "no items" kind of message by use of that. Dec 30 22:58:21 TacticalJoke, yes I know, I'm just wondering if I should show it at all. Maybe I can save user the trouble and just move to add a new item if the list is empty xD Dec 30 22:59:04 I don't know your app, but I can think of some cases where that would just be confusing/annoying. Dec 30 22:59:34 TacticalJoke, well I'm talking in general. Could you provide some examples? Dec 30 23:00:03 Imagine a to-do list app. It'd be confusing if, upon opening it, it went straight to the "Add New Item" screen. Dec 30 23:00:17 lol ok Dec 30 23:01:05 Thanks, sometimes it's hard to see something obvious ^^ Dec 30 23:06:51 groxx: Do you think it makes sense to set the listener (the Activity or whatever) to null in onSaveInstanceState rather than onStop/onDestroy for the reason you mentioned earlier (the fact that any UI updates after onSaveInstanceState could simply be ignored)? Dec 30 23:07:59 TacticalJoke: tbh I don't know. I haven't sat down and figured out the details of when oSIS is called. in _theory_ I think no, since it could be called "at any time", but in practice it might make sense? Dec 30 23:08:19 is there any way to get an md5sum of the apk of the running android app? Dec 30 23:08:21 Okay. I'll do some fiddling and try to figure something out. :) Dec 30 23:08:26 (at runtime) Dec 30 23:09:20 TacticalJoke: in general it feels like it's unlikely to not be paired with onStop / onPause (in gingerbread), so it doesn't make a difference, but onStart / onStop is essentially designed for this, so they're probably more correct. but stuff like fragment transactions happening after oSIS is a real pain, so ¯\_(ツ)_/¯ Dec 30 23:09:51 Okay. lol Dec 30 23:11:34 TacticalJoke: also, in at least support-fragments, I think there's a synchronous line of code when transitioning from "in running state" to "onStop" that includes "onSaveInstanceState". So if you're doing anything async, it can't happen "between" save and stop, because no messages are processed. I'm nowhere _near_ certain of that for activities / other Dec 30 23:11:34 fragments though, especially across OS versions. Dec 30 23:12:23 but it has been a while since I've read that code, and it's big and complex. I could be misremembering. Dec 30 23:12:51 Ah, okay. Interesting. Thanks. Dec 30 23:12:56 Yeah, I might end up reading the code. Dec 30 23:13:11 Always the case with Android. lol Dec 30 23:17:51 How's everyone doing? Dec 30 23:18:03 Getting a crash w/o a stacktrace anyone know why this would be? Dec 30 23:18:27 lasserix_: You using AS? Dec 30 23:18:44 Not bad, Radther. Tired after all this holiday stuff. Dec 30 23:19:01 Yeah Dec 30 23:19:04 too much grog, that's your problem Dec 30 23:19:08 or not enough ? Dec 30 23:19:09 TacticalJoke: Holiday's are certainly tiring. Dec 30 23:19:14 :) Dec 30 23:19:46 lasserix_: Try restarting AS then, I had a problem like that and for some reason restarting helped. Not the best solution but yeah. Dec 30 23:19:50 TacticalJoke hey Dec 30 23:19:57 I'm hosting a NYE party at my place tomorrow, and it's stressful thinking about it. Dec 30 23:20:03 Hey, drose379. Dec 30 23:20:07 an* Dec 30 23:20:18 I was just about to ask a listView question Dec 30 23:20:32 I was worried about that. lol Dec 30 23:20:40 Cardviews look worse than the old cardlib with the support library on pre-lollipop Dec 30 23:20:51 the entire selectedItemBackground doesn't have rounded corners Dec 30 23:20:55 and doesn't match the area of the card at all Dec 30 23:21:02 haha, this one might be easy TacticalJoke Dec 30 23:21:19 *might* Dec 30 23:21:27 Being the keyword there. Dec 30 23:21:41 Im gonna go for it: Dec 30 23:22:06 I understand this code, but I dont know if I fully understand where the views are added to the listView that is being returned Dec 30 23:22:19 http://pastie.org/9805855 Dec 30 23:22:22 Note that it's ListView. You gotta get into Java mentality. Dec 30 23:23:14 drose379, ListView uses the views that the Adapter creates. Dec 30 23:23:18 The listview gets the views when you do return layouyView. Dec 30 23:23:22 drose379: the getView Dec 30 23:23:34 each getView returns a "row" Dec 30 23:23:37 its returning layoutView Dec 30 23:23:48 drose379: You can't see the code where the view gets added to the ListView. Dec 30 23:23:50 but wheer are the listViews being placed on top of the layoutView Dec 30 23:24:00 It's the ListView itself that does it. It calls yourAdapter.getView. Dec 30 23:24:08 drose379: also you can override the return type of getItem to be whatever element you datastructure is isntead of making your own get Dec 30 23:24:56 so when im returning listView what am I actually returning Dec 30 23:24:56 drose379: If a ListView needs to show eight children, it calls getView eight times. It then places the result into its visible list. Dec 30 23:25:11 It then calls getView every time the user scrolls and a new item needs to be displayed. Dec 30 23:25:24 but getView returns listView Dec 30 23:25:27 No. Dec 30 23:25:38 It returned an item that will go into a ListView. Dec 30 23:25:38 It does Dec 30 23:25:45 I meant layoutView Dec 30 23:25:46 It returns a list item which gets put into a listview Dec 30 23:26:14 drose379: listview is a model, that is it just presents UI... the adapter is the bridge between your data and the listview... by implementing getView you pair each row (the layout your return) to the "currentItem" Dec 30 23:27:01 I got that part Dec 30 23:27:08 Im saying that getView is returning layoutView Dec 30 23:27:17 drose379: Your layoutView is just the root element of your single_layout.xml. I'm guessing it's a LinearLayout or RelativeLayout. Dec 30 23:27:28 Every item in your ListView has one of your layoutView things. Dec 30 23:27:34 layoutview is each row of the list, as TacticalJokeif you have 8 items getView will be called 8 times Dec 30 23:27:55 Where are the values getting assigned to the layoutView Dec 30 23:28:07 in the .setText right? Dec 30 23:28:23 Yes Dec 30 23:28:54 ah, got it. Dec 30 23:28:58 drose379: and as I said your call get just use getITem but change the return type Dec 30 23:29:10 I used an inner class, is that ok? Dec 30 23:29:23 lasserix_ im gettin there next, gotta completly get the basics first\ Dec 30 23:29:35 For some reason ListViews are kinda confusing me Dec 30 23:29:37 An inner class for your adapter? Dec 30 23:30:09 drose379: sure Dec 30 23:30:17 You're extending ArrayAdapter. ;o Dec 30 23:30:20 After all that the other day. Dec 30 23:30:29 extend baseadapter Dec 30 23:30:33 haha, I know Dec 30 23:30:37 TacticalJoke Dec 30 23:30:38 I went through that with him for like two hours, lasserix_. :D Dec 30 23:31:05 Just practicing both way TactialJoke Dec 30 23:31:12 both ways* Dec 30 23:31:31 Nobody tell him about RecyclerViews... Dec 30 23:31:36 Note that your getView method is suboptimal right now. Dec 30 23:31:37 xD Dec 30 23:31:40 Heared those are the new things Dec 30 23:31:41 It calls findViewById too many times. Dec 30 23:31:43 RecyclerViews Dec 30 23:31:45 Though I'm not sure you're ready for the solution. Dec 30 23:31:53 So maybe I shouldn't say anything. I dunno. Dec 30 23:32:12 Hows it call findView too many times? Dec 30 23:32:20 It's probably not a big deal at all. Dec 30 23:32:22 TacticalJoke: I'd like to here this solution? Dec 30 23:32:27 hear* Dec 30 23:32:29 Radther: The ViewHolder thing (or similar). Dec 30 23:32:36 Ohh yeah. Dec 30 23:32:42 Thought there was something I was missing. Dec 30 23:32:44 drose379: Ideally, you'd call findViewById only when recycledView is null. Dec 30 23:33:01 I am kinda confused about the recycledView thing tooo Dec 30 23:33:10 Because findViewById isn't hugely fast, and getView is called a lot (*loads* of times if a big list is scrolled quickly, for example). Dec 30 23:33:20 Does that mean like the second time getView is called, it will already have the view Dec 30 23:33:24 However, in your case, it's probably not a big deal at all. Dec 30 23:33:29 so itll use the old one and add to it Dec 30 23:33:42 When a list item goes of the screen the view is moved to the bottom and reused for performance. Dec 30 23:34:28 drose379: Generally, what happens is this: Let's say that your screen size is such that your ListView can show eight items at once. It'll allocate around eight or so views. Then, when you scroll, it'll not create a new view: it'll reuse one of the existing ones. Dec 30 23:34:31 This is for performance. Dec 30 23:34:42 Okay, Radther had already answered. lol Dec 30 23:35:00 Makes sense Dec 30 23:35:21 I have a pretthy good grip on the listViews now but I want to add an imageView to each list item Dec 30 23:35:24 ListView is virtualised in this way. It doesn't create 1,000 views for 1,000 items. Maybe it'll create 15 in total. Dec 30 23:35:28 Those 15 will serve 1,000 items. Dec 30 23:35:29 One thing I will add is that it if it was 8 views on screen it might make 10 that are off screen for that they are ready for when scrolling starts. Dec 30 23:35:50 One extra on the bottom and top. Dec 30 23:36:59 Time to add images Dec 30 23:37:05 drose379: There is a great video on ListViews. Dec 30 23:37:11 By the Android people. Dec 30 23:37:16 The world of listviews one Dec 30 23:37:26 This: http://youtu.be/wDBM6wVEO70 Dec 30 23:37:27 Yeah. Dec 30 23:37:41 Thanks Dec 30 23:37:54 Is android just a library on top of the java language? Dec 30 23:37:55 He talks about what I mentioned: the findViewById-being-called-too-many-times thing. Dec 30 23:38:09 Right Dec 30 23:38:15 android is "java-like" ;) Dec 30 23:38:30 Its not java? Dec 30 23:38:42 sort of yes, sort of no Dec 30 23:38:46 I think that Android contains an unofficial JRE implementation (called Apache Harmony). Dec 30 23:38:55 And it builds upon that. Dec 30 23:39:23 So learning java and android at teh same time prob wouldnt work Dec 30 23:40:05 Well, what we're using for Android is practially Java 7 (both language and JRE, I think). Dec 30 23:40:05 in android we have about 90% of the standard java classes/methods, i'd say, so for the most part you'll be ok Dec 30 23:40:32 Ok cool Dec 30 23:40:42 Yeah, I don't see any harm in learning Java and Android at the same time. The only thing is this: Java 8 is quite different from what Android is using. Dec 30 23:40:51 Java 8 has lambdas, for example. Dec 30 23:40:57 The hell are lambdas Dec 30 23:41:04 Ive heard that word being tossed around Dec 30 23:41:05 hey hey ... we have lambdas... sorta... Dec 30 23:41:06 radioactive code Dec 30 23:41:16 They're basically anonymous functions. Dec 30 23:41:32 kind of like ternary operation but more generalized Dec 30 23:41:47 Are they useful Dec 30 23:42:03 yes! Dec 30 23:42:18 Yeah, they're the basis of functional programming, I think. Some code can be really concise with lambdas. Dec 30 23:42:19 especially with rx, right g00s ? haha Dec 30 23:43:24 if I want animation like swing on android, what tool should I use? Dec 30 23:46:17 retrolambda allows you to use lambda syntax on android Dec 30 23:46:18 it's nice Dec 30 23:46:20 everyone should use it Dec 30 23:46:20 Here's an example of how a lambda might be used for Android: button.setOnClickListener((View v) -> { textView.setText("Hi."); }); Dec 30 23:46:34 pfn: but you said everyone should use scala :/ Dec 30 23:46:38 Though that's not the best example. There are way nicer things. Dec 30 23:46:40 extraneous View, parens and wrong syntax Dec 30 23:46:59 button.setOnClickListener(v -> textView.setText("...")) Dec 30 23:47:00 Oh, can we avoid all that? Nice. Dec 30 23:47:15 bankai_au, some people just don't have the brain capacity for it ;-) Dec 30 23:48:00 alright my configuration is working Dec 30 23:48:01 pfn: Do you think that functional programming is just better than declarative (or whatever it's called)? Dec 30 23:48:04 TacticalJoke, yes, the type can be inferred Dec 30 23:48:06 imperative Dec 30 23:48:07 what a pain in the ass to make Dec 30 23:48:13 it has its ups and downs Dec 30 23:48:19 Oh yeah, imperative. lol Dec 30 23:48:21 Been so long. Dec 30 23:49:08 bankai_au, in any case, I make my sbt plugin work for everyone, retrolambda is supported, even Dec 30 23:49:56 TacticalJoke, FP doesn't /really/ make sense in android because of the nature of its event loop Dec 30 23:50:08 and how the apis are full of side-effects everywhere Dec 30 23:50:16 the only real benefit you get on android is syntax Dec 30 23:50:21 I see. Dec 30 23:50:45 side-effects, weakly typed resources, nulls, just about everything that's negative Dec 30 23:51:55 you can make much of your internal logic pure, though Dec 30 23:52:07 it's just there's a lot of android api interface code that can't be pure Dec 30 23:55:17 another plane crash, how sad... Dec 30 23:55:44 been two in as many days Dec 30 23:55:55 2? I mean the airasia Dec 30 23:56:06 yeah there's taht one and another one in AU Dec 30 23:56:20 wow, that's really sad Dec 30 23:56:27 I thought 2014 was supposed to be the safest year of air travel Dec 30 23:56:29 it sounds pretty bad Dec 30 23:56:46 Years not over yet... Dec 30 23:57:54 It is really bad though. Dec 31 00:01:48 do even some of the heavier 3d android games use android ui to code them? or what language do they use? Dec 31 00:02:40 most are probably opengl Dec 31 00:04:09 I am designing some views for my app. What I'd like to do is have the user login with Facebook in one view, and then once they are logged in replace that view with a view that prompts them to verify an email address. When I am designing this with the Andoid Studio GUI, I am not able to overlap the views (I'd like them to go to the same spot). Is this possible? Or should I hide the individual elements in the view and reuse it? Dec 31 00:06:08 t0astt: Is there any reason you don't want to use fragments? Dec 31 00:06:15 t0astt: you can either progress to a new fragment (might be easier) or scrap your views and replace them with new ones Dec 31 00:11:04 If I use a fragment, could you guys help me with it? Last time I tried to follow the Facebook SDK instructions for setting up a Facebook Login, I had a HORRIBLE time. I eventually just gave up and copied someone elses code and edited it from there... Like, could I pastebin you my code and you show me where to edit or something? Dec 31 00:12:17 Has anyone here dealt with testing ContentProviders that use file storage? Dec 31 00:29:41 I wonder whether we'll officially get lambda support anytime soon. Dec 31 00:30:46 t0astt: re overlapping views: most layouts intentionally prevent that, because it's not usually what you want. An easy way to get around that is to use a FrameLayout - you can use FrameLayout's layout_gravity to 'float' views around with margins and padding, and the child-views won't "do anything" to avoid each other. Dec 31 00:31:35 TacticalJoke: I'm hoping Jack/Jill will eventually add something like retrolambda :| Dec 31 00:31:52 Is RelativeLayout good for overlapping views? Seems to work from what I've seen. Dec 31 00:33:32 framelayout and relativelayout both make it easy to overlap views Dec 31 00:33:38 it can, yeah. You largely still use the equivalent of gravity (alignParentTop == layout_gravity="top", etc), but it can also do stuff like "put these two at the top, next to each other", which isn't really doable with just a framelayout. Dec 31 00:33:49 retrolambda is already easy to add into existing builds Dec 31 00:33:57 there are gradle, maven, and sbt plugins that all integrate it for android Dec 31 00:34:05 pfn: but will it work with Jack and Jill? Dec 31 00:34:15 does it matter? don't use jack/jill Dec 31 00:34:20 :) Dec 31 00:34:25 there's no reason to use it Dec 31 00:34:33 unless google adds features that make it compelling Dec 31 00:34:45 jack/jill cannot be allowed to break existing bytecode compatibility, due to the nature of android Dec 31 00:35:12 so, because of that, there's no reason to even think about it until it does have that killer feature Dec 31 00:35:26 not yet anyway, yeah. but eventually they'll probably say (╯°□°)╯︵ javac, and shift to JJ primarily. Dec 31 00:35:29 Hey guys, just fixed all the last minute bugs and published my first app. phew... Now I wait. Dec 31 00:35:49 groxx, regardless, it cannot completely replace javac Dec 31 00:35:54 why not? Dec 31 00:35:57 Eclipse does Dec 31 00:36:00 groxx, unless google gives the finger to every single java library in existence Dec 31 00:36:04 yeah, and eclipse sucks Dec 31 00:36:18 anyone that builds using eclipse is a dumbass :p Dec 31 00:36:24 Eclipse hardly gives the finger to every single java library in existence though. Dec 31 00:36:38 and that's the same for eclipse, it doesn't completely replace javac Dec 31 00:36:45 it only replaces it for the purpose of development in ide Dec 31 00:37:45 reimplementing javac doesn't seem much crazier than, say, reimplementing JVM. though multiple JVMs exist. Dec 31 00:38:01 right, so what is the value-add in just re-implementing javac? Dec 31 00:38:06 no killer feature yet Dec 31 00:38:11 no reason to use it Dec 31 00:38:15 did you really just say value-add? Dec 31 00:38:15 other than to QA for google Dec 31 00:39:48 Hmm. Isn't it the case that using a non-static inner AsyncTask is *always* a bad idea? Dec 31 00:39:58 Given that it will always hold a reference to the Activity. Dec 31 00:40:11 s/inner/nested/ Dec 31 00:40:36 why use AsyncTask in 2014? Dec 31 00:40:53 I don't use it. I just see so many people talking about it on SO. Dec 31 00:41:17 I see loads of people using inner (non-static nested) AsyncTasks, and that seems like a memory leak waiting to happen to me. Dec 31 00:41:25 it's not a memory leak Dec 31 00:41:33 asynctask finishes, memory is released Dec 31 00:41:35 problem solved Dec 31 00:41:44 If it finishes, yeah. Dec 31 00:41:44 it's only a leak for people who misuse asynctask to loop forever Dec 31 00:41:56 its about weak reference Dec 31 00:41:57 an asynctask should never be something that doesn't finish Dec 31 00:42:05 I mean "if it finishes in time". Dec 31 00:42:12 who cares if it doesn't finish in time Dec 31 00:42:18 You could rotate over and over and get an OutOfMemory thingy with a lot of the code I see. Dec 31 00:42:20 leaking memory for N amount of time is not an issue Dec 31 00:42:58 and rotating over and over in a short period of time resulting in a crash would be extremely low on the totem pole to worry about Dec 31 00:43:23 That's just bad code, though. Dec 31 00:43:25 if you have to worry about that, you better not have any more pressing features to implement first Dec 31 00:43:28 worst-case scenario for asynctask like that is probably network requests, since it can actually take a good chunk of time. and if you're not properly canceling it / deduplicating it after rotation, you're sorta opting into that problem. Dec 31 00:44:29 I only just realised Google had their own fork of Square's Dagger... Dec 31 00:44:31 but even network requests typically time out in like 30 seconds. unless you're duplicating a ton of data in your activity, and rotating like mad, you're probably not going to out-of-memory in most cases. Dec 31 00:45:18 in any case Dec 31 00:45:18 True. But I feel like we should say "Never use a non-static nested AsyncTask". It seems, to me, to be a really bad practice. Dec 31 00:45:22 ignore asynctask, it's garbage Dec 31 00:45:31 as for non-static, doesn't really matter Dec 31 00:45:39 unless your asynctask is poorly written to never exit Dec 31 00:45:49 or takes much too long Dec 31 00:46:03 barbs: where'd you see that ? Dec 31 00:46:06 default behavior is to run serially anyway Dec 31 00:46:24 bankai_au: https://github.com/google/dagger Dec 31 00:46:26 dagger 2.0 is maintained by google Dec 31 00:46:36 as I understand it Dec 31 00:47:03 yeah looks like 2.0, in pre-alpha atm Dec 31 00:47:04 Google and Square seem to be overlapping quite a lot. Dec 31 00:47:43 Maybe that's inaccurate. But Google seems to be using Square stuff quite a bit. Dec 31 00:48:35 good to know Dec 31 00:50:05 this is awesome: https://github.com/wasabeef/awesome-android-ui Dec 31 00:51:24 barbs: what are you doing over there? trawling github for handy libs? Dec 31 00:51:39 i saw that RippleEffect yesterday, looks nice Dec 31 00:51:58 haha, I seem to be easily distracted today, guess it is New Years Eve after all :) Dec 31 00:52:33 It's crazy to think that someone born in 2000 is 14 (and may soon be 15). Dec 31 00:53:13 barbs, https://github.com/lightSky/MaterialDesignCenter Dec 31 00:53:39 i really really like that circular-progress-button Dec 31 00:54:27 gdrc: also very nice! Dec 31 00:54:31 barbs: that's quite the list of screenshots. interesting. Dec 31 00:55:07 I love how they took the time to make gifs to demonstrate each one. Infinitely useful! Dec 31 00:56:59 is there a java shortcut/hack for if (thisString == null && thatString == null)? Dec 31 00:57:14 like if (thisString && thatString)? Dec 31 00:58:32 Don't think so, regreddit. The best-case scenario is sometimes using the Null Object pattern to avoid null checks entirely. That might not work in your case, though. Dec 31 00:58:38 no Dec 31 00:58:43 Uhm, any reason why my Android STudio would all of a sudden stop showing any log information? Dec 31 00:58:50 Like, my Log.i's aren't showing up anymore Dec 31 00:59:02 Nothing is showng up, not even emulator gpu errors Dec 31 00:59:15 Did you change your filter from Verbose to something like Error? Dec 31 00:59:15 I get that occasionally. I think that restarting adb fixes it (but I can't remember for sure). Dec 31 00:59:37 I changed my filters and no luck... I jsut reopened AS and it's working again Dec 31 00:59:43 Yay Dec 31 00:59:49 TacticalJoke, i still need to go read about Null Object pattern - tahst the second time i've seen you type it :) Dec 31 00:59:51 woooooot Dec 31 01:00:29 regreddit: or make a helper. boolean allNull(Object... args) { for (Object o : args) if (o != null) return false; return true; } Dec 31 01:00:34 i have to click off my app in the devices list and back on it to make the log start again Dec 31 01:00:51 sometimes Dec 31 01:01:16 That's a handy idea. Dec 31 01:01:30 i need to force myself to learn some of the less used java constructs Dec 31 01:01:31 yeah, AS's logcat is awful and buggy :( try the "restart logcat" button on the left edge, it sometimes works. Dec 31 01:01:39 liek variable number of args Dec 31 01:01:45 or try something else, pidcat is a nice alternative. Dec 31 01:02:33 groxx: pidcat looks awesome, thanks for that! Dec 31 01:02:54 regreddit: The Null Object pattern involves "null" subclasses whose methods do nothing. So, instead of stuff like "if (foo != null) { foo.bar(); }" you simply say "foo.bar();". If it's Null, then "bar" does nothing. Dec 31 01:03:12 Non-null subclasses actually do stuff. Dec 31 01:03:34 oooh Dec 31 01:03:37 It doesn't always apply, though, unfortunately. One example is UI stuff. Dec 31 01:03:49 so just handle the null case in the object method itself Dec 31 01:03:58 interesting Dec 31 01:04:06 Yeah. You have to prepare in advance by creating "null" versions where appropriate. Dec 31 01:04:11 right Dec 31 01:04:24 Stuff like Customer (RealCustomer, NullCustomer). Dec 31 01:04:26 though it can be a single instance Dec 31 01:04:29 Where Customer is the parent. Dec 31 01:04:40 (globally, that is) Dec 31 01:07:16 This is a nice, concise overview: http://refactoring.com/catalog/introduceNullObject.html Dec 31 01:07:29 He actually uses "customer". I must've remembered that from the book. :) Dec 31 01:08:16 never saw that button before groxx, thanks! Dec 31 01:10:40 Has anyone here written Android tests before? Dec 31 01:11:04 Instrumentation tests? Dec 31 01:11:10 Yeah Dec 31 01:11:19 Not quite instrumentation tho Dec 31 01:11:25 I'm trying to write a ContentProvider test Dec 31 01:11:52 But I've been having problems, and I've narrowed it down to the fact that AndroidTestCase.getContext() is returning null. Dec 31 01:11:59 And I don't know why. Dec 31 01:12:15 (I can't even find the source for AndroidTestCase) Dec 31 01:13:11 https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/test/AndroidTestCase.java Dec 31 01:13:19 Just google "android googlesource ". Dec 31 01:13:31 t0astt: heh, I only just discovered it yesterday :) Dec 31 01:13:34 I was looking in the github mirror, and couldn't find it Dec 31 01:13:47 Strange that it is in core, rather than testRunner, but that explains it Dec 31 01:14:03 Thanks. Dec 31 01:14:30 Sometimes I have to manually change the branch to 'master' when I do this (but it's rarely a big deal). Dec 31 01:15:07 Okay, it seems that I need to call setContext()? Dec 31 01:15:37 Should I need to do that? Dec 31 01:17:45 I can't find anything in the (frankly abysmal) Android testing documentation that mentions that. Dec 31 01:18:28 In some cases, unfortunately, the code is about the only documentation. Dec 31 01:18:45 I don't know anything about the topic in question, so I can't help here. ;| Dec 31 01:19:23 And here I was thinking I was a poor developer for not writing Android tests. Dec 31 01:21:12 Personally, I keep things really simple by running all my tests on the JVM. Dec 31 01:21:17 Though I don't test everything in my app. Dec 31 01:22:05 * str4d is trying to write tests to debug the ContentProvider impl, which is only half-working Dec 31 01:24:00 str4d: you can probably test the database independently of the content provider (as in before, to know its all working, then you can probe the wrapper) Dec 31 01:24:43 It's not a database. The ContentProvider is wrapping javamail email attachments Dec 31 01:25:01 str4d: ohh, umm there's something you need to do about getContext if you search SO for that you'll find it Dec 31 01:25:10 its a workaround, you have to use another test case type Dec 31 01:25:14 or do the trick in the SO post Dec 31 01:26:26 Looking at the code, it seems like ProviderTestCase would be fine, because it uses InstrumentedTestCase instead of AndroidTestCase, but it was deprecated in API 3 Dec 31 01:29:34 Everything I can find on SO is using setContext() to wrap an IsolatedContext or RenamingDelegatingContext around the already-set context (fetched via getContext() ) Dec 31 01:29:55 It all seems to assume that the test runner itself calls setContext() first, but that isn't happening here. Dec 31 01:31:05 Oh! I wonder if it is the JUnit4 issue Dec 31 01:31:55 https://code.google.com/p/android-test-kit/wiki/AndroidJUnitRunnerUserGuide says that for ActivityInstrumentationTestCase2 you need to inject the instrumentation yourself now. Maybe for ProviderTestCase2 I need to inject the context myself? Dec 31 01:33:34 Hello. I've been looking around for a reason why this is happening and I'm lost here: Android Studio 1.0.2 on windows 7 will not successfully install or launch my app on my device. Usb debugging is enabled. Adb shows the device as compatible with a serial number, etc. I am using the Samsung ADB drivers that were downloaded today. Can anyone guess what's wrong? Dec 31 01:33:56 Do I need to sign the application? Google's developer course doesn't say this is necessary Dec 31 01:34:56 Yeah, I think this is it Dec 31 01:35:58 InstrumentationTestRunner internally uses AndroidTestRunner, which has a setContextIfAndroidTestCase() method. Dec 31 01:36:59 hesperaux: it should be signing by default with a debug key that should be generated for you. what error do you get when you `adb install file.apk` with the apk that was built by Studio? Dec 31 01:41:51 TacticalJoke, lasserix_: The fix is to add "setContext(InstrumentationRegistry.getTargetContext());" to setUp() when using AndroidJUnitRunner. Dec 31 01:42:07 Wait, not in setUp, in the constructor Dec 31 01:44:18 let me get into that groxx. one sec groxx Dec 31 01:48:07 groxx, ok, it shows me the upload speed, then a blank line, then a new prompt Dec 31 01:48:13 the app is not actually installed on my device Dec 31 01:48:40 i'm using the apk at \app\build\outputs\apk\apk-debug.apk Dec 31 01:49:43 str4d: Glad you fixed it. :) Dec 31 01:51:02 I wonder whether I should implement the HTML tag in my app. Dec 31 01:51:03 hesperaux: interesting. definitely sounds off... Dec 31 01:51:12 yeah, i really can't figure this out Dec 31 01:51:17 about to test it on another note 2 Dec 31 01:51:36 hesperaux: if you `adb shell pm list packages`, do you see your app's package in there anywhere? Dec 31 01:51:50 TacticalJoke: yes. also / Dec 31 01:52:16 uhh, i see nothing in there. it doesn't return anything Dec 31 01:52:35 hesperaux: `adb logcat`? Dec 31 01:52:56 tons of output Dec 31 01:53:04 so something at least works. hm. Dec 31 01:54:24 see if you can see any errors from the install process in logcat? also: have you used this device successfully in the past, or your computer, or neither? Dec 31 01:55:21 used it in the past with the same rom installed. only apps have had updates. I have reinstalled windows and have used the phone for debug on multiple computers - it no longer works right on my laptop either. Dec 31 01:55:41 hesperaux: same app, or a different one? Dec 31 01:55:50 different app Dec 31 01:55:56 and i used to use eclipse for it Dec 31 01:56:11 however, i did make a simple app using studio and it was debugging fine Dec 31 01:56:27 funky. Dec 31 01:56:31 indeed Dec 31 01:56:52 this other note 2 doesn't have the right minSdk Dec 31 01:56:58 let me lower that and try it on this one Dec 31 01:57:09 i really suspect my phone is the culprit. it has been sucky lately Dec 31 01:58:00 maybe try a few magical incantations? `adb kill-server` then try installing again. or reboot the phone, since it seems to me like it _might_ be caused by a bug in the phone's end (ignores some commands, but not others, so I _mostly_ doubt it's the adb on windows) Dec 31 01:58:04 where can you chang ethe minsdk again? Dec 31 01:58:19 hesperaux: in android studio, it's in the app's build.gradle file Dec 31 01:58:42 ok thanks. i'm still really new to A.S. Dec 31 01:58:55 it's a big change, yeah :) Dec 31 01:59:46 ah, another test for adb: can you push and pull normal files? Dec 31 02:00:08 works fine on this other note 2, which is a completely stock rom (recently OTA'd) Dec 31 02:00:23 it's only my note 2, which has a modified stock rom, that fails Dec 31 02:00:57 :( does seem to imply it's likely that phone/rom. Dec 31 02:01:04 tried rebooting the phone? Dec 31 02:01:51 i'll try that right now Dec 31 02:02:26 I feel better knowing it's my phone Dec 31 02:02:35 that's better than it being a wonky install of the tools Dec 31 02:02:51 i need to redo this phone anyway Dec 31 02:03:58 Say that an app has a couple of pins (one per user) on a map. If I want to implement a simple chat-function so these users can chat realtime, i.e. possibility to send a text msg that will be shown for all these users. Think of it like an IRC-chat window. Which technique is preferred to use? Dec 31 02:06:57 mEck0: websockets Dec 31 02:07:42 groxx, it's still broken after a reboot Dec 31 02:07:43 JakeWharton: can you recommend a specific tutorial or resource where I can read more? Dec 31 02:07:57 still no packages installed according to adb, and the app won't install Dec 31 02:08:22 hesperaux: weird. don't suppose `adb shell pm` says anything? Dec 31 02:08:48 groxx, yep. nothing at all Dec 31 02:11:15 hesperaux: I'd guess that the pm (package manager) service is having issues, but that's all I can really say. beyond my knowledge :/ probably related to the rom, maybe there's some google results / an IRC room / maybe #android-root knows something? Dec 31 02:12:09 yeah Dec 31 02:12:14 thanks for your help Dec 31 02:13:11 good luck! Dec 31 02:13:41 thanks Dec 31 02:31:49 Hello **** ENDING LOGGING AT Wed Dec 31 02:59:58 2014