**** BEGIN LOGGING AT Mon Dec 28 02:59:59 2015 Dec 28 03:01:18 thats kinda awesome Dec 28 03:01:33 I'll have to try it out Dec 28 03:01:42 also wondering if there are any good apps for driving Dec 28 03:02:11 you're not supposed to use your phone... I know. I try to be as hands free as possible Dec 28 03:14:28 The best phone app for driving is the lock screen Dec 28 03:15:19 hm Dec 28 03:15:46 any idea why final LongSparseArray userLongSparseArray = new LongSparseArray<>(); this returns null in unit test ? Dec 28 03:19:30 "this returns null"? Dec 28 03:20:04 I mean that line of code Dec 28 03:20:17 where I use 'new' but object is still null Dec 28 03:20:26 That line of code doesn't return anything, it assigns a field Dec 28 03:20:41 and I'm pretty sure that field is non null after Dec 28 03:21:27 yes, that variable to be exact Dec 28 03:21:38 AS says it's null Dec 28 03:21:53 I very much doubt it, you are probably reading your test wrong Dec 28 03:22:08 I'm debugging it Dec 28 03:22:11 or shadowing it, or who knows what else since you didn't post any code Dec 28 03:23:20 CedricBeust: http://wstaw.org/m/2015/12/28/Screen_Shot_2015-12-28_at_12.22.34_PM.png Dec 28 03:23:24 just as proof ;) Dec 28 03:24:27 I don't know where you're breaking, but I agree that display from IDEA is confusing Dec 28 03:24:38 put a break point on the for, see what the field is then Dec 28 03:24:57 I'm breaking not in 'return' Dec 28 03:25:12 I don't know what that means based on your snipper Dec 28 03:25:19 just break on the for, see what your field is then Dec 28 03:25:42 I guarantee you it wil be nonnull Dec 28 03:26:12 strange Dec 28 03:26:23 it still says it's null Dec 28 03:26:35 but I can invoke 'put' on it Dec 28 03:26:39 Now that is very strange (and I'm a bit skeptical :)) Dec 28 03:27:32 But I'll grant you that your screenshot is puzzling Dec 28 03:28:47 the same code works, when I change LongSparseArray to HashMap Dec 28 03:29:01 is it because LongSparseArray is android class ? Dec 28 03:29:28 Very much doubt it Dec 28 03:30:07 The code in the screenshot is 100% correct Java Dec 28 03:30:41 fishy Dec 28 03:30:49 btw - this code works Dec 28 03:31:15 only it becomes weird in test Dec 28 03:31:24 So it's just Android Studio showing bogus values? What is the debugger showing? Maybe it's the "display value in the editors" part that's glitched Dec 28 03:34:33 unfortunetly no, it return null... Dec 28 03:34:37 *returns Dec 28 03:37:01 I will change it to Map and see the result Dec 28 03:41:49 it is impossible to be null Dec 28 03:41:51 period Dec 28 03:42:20 only way it can be null is if you haven't executed that line of code yet Dec 28 03:46:50 changed it to hashmap Dec 28 03:46:51 works Dec 28 03:54:18 the same goes for android's Pair class Dec 28 03:54:39 changed it to my implementation, and now test passes Dec 28 03:54:46 hey guys, may i know how do i get the filtered audio and output as a .wav file? Dec 28 03:55:40 i have already filtered the audio using bandpass filter (iir) and when i press the "play" button, i can hear the filtered audio, but when i go to the /wav file saved in my directory , i hear the original audio instead of the filtered audio Dec 28 03:55:56 this is my code (http://pastebin.com/U6Kep882) , i put the code under the method "PlayWaveFile" Dec 28 03:56:49 sorry I havent dont anything with wav files Dec 28 03:57:43 okay, thanks gordon :0 Dec 28 03:57:46 :) Dec 28 03:58:32 s/dont/done Dec 28 04:01:37 the problem isn't that it's null Dec 28 04:01:44 it's that it threw an exception Dec 28 04:01:52 and your tests didn't report it Dec 28 04:02:09 all android classes throw runtime exception on the jvm Dec 28 04:02:28 unless you properly setup robolectric or mockable android.jar Dec 28 04:03:00 so, if the debugger said your ctor returned null, there was an exception that didn't get reported Dec 28 04:06:12 seems so Dec 28 04:06:27 I was thinking the same thing but.. Dec 28 04:07:06 I also have " unitTests.returnDefaultValues = true" Dec 28 04:07:12 in my gradle file Dec 28 04:12:21 perhaps that's what's fucking it up Dec 28 04:12:57 why didn't you say so to begin with Dec 28 04:13:56 let's try then Dec 28 04:15:38 no, it doesn't work when I uncomment this Dec 28 04:15:47 of course it doesn't Dec 28 04:15:52 it throws exception Dec 28 04:16:07 well, yes, exception is there Dec 28 04:16:20 there's implementation of pair in support v4 Dec 28 04:16:22 i will use it Dec 28 04:16:43 you should not use ANY framework classes in unit tests Dec 28 04:17:10 yes, you're right Dec 28 04:17:16 unless you have a mocked implementation Dec 28 04:17:32 and since it's presenter, it's bad Dec 28 04:18:05 I would use guava, but I will move to kotlin I guess Dec 28 04:21:08 why does this even matter Dec 28 04:39:10 pfn: I dont want to put whole guava and then replacing it everywhere Dec 28 04:41:31 i want to have a listview that displays items from an API call that returns json objects. i’m not sure what to google or what’s the Android Way for this. Dec 28 04:41:57 ghostmoth: there are a lot of way of doing this Dec 28 04:42:20 with okhttp, with retrofit, with volley Dec 28 04:42:24 with async task Dec 28 04:42:39 i’ve been using okhttp Dec 28 04:42:49 so i can grab the list of items Dec 28 04:42:49 ghostmoth look at the google iosched project on github Dec 28 04:45:16 are there any tutorial sources out there that are more complete than the android ones? i feel like those are sparse and end very early. Dec 28 04:45:48 if you already have the list of items what is your question? Dec 28 04:46:28 i guess i don’t understand how listviews, adaptors, and activities/ui work together Dec 28 04:46:57 i’m a new android dev who can work with existing apps, but building one on my own has revealed so much basic stuff i don’t understand. Dec 28 04:47:19 i would highly recommend signing up for the free trial at teamtreehouse and doing the weather app. They go over literally everything you just mentioned Dec 28 04:47:31 awesome, thank you orbyt_ Dec 28 04:47:51 Do any of you guys use VIM keybindings in Android Studio/IntelliJ? Dec 28 04:48:21 * Leeds uses vim keybindings in vim Dec 28 04:49:32 i do liuwenhao Dec 28 04:49:38 Leeds, in your opinion do you think it's worth learning vim if I'm only going to use it in AS? Dec 28 04:49:48 nah, probably not Dec 28 04:50:05 i’d check out some vim tutorials to see if you like it, but it just comes down to whatever you like best Dec 28 04:51:48 Do you feel like you're a lot faster with vim than a normal non-vim user would be inside the IDE? Or is it just a comfort thing Dec 28 04:52:07 i think maybe i’m faster than some people and not others. it really comes down to comfort. Dec 28 04:52:20 vim is considerably faster Dec 28 04:52:37 moving to arrow keys constantly is counter productive Dec 28 04:52:38 in the beginning, i found vim fun the same way i find driving a manual transmission fun, it was just satisfying and new. now that i’m used to it, i hate not having it around. Dec 28 04:52:52 but i’ve seen lots of amazing developers not use it, of course Dec 28 04:53:22 only people remotely similarly amazing use emacs Dec 28 04:54:52 but then the chords on emacs sucks Dec 28 04:55:08 spacemacs sounds pretty neat Dec 28 05:01:04 http://reddit.com/r/androiddev/comments/3yg597/adb_wifi_not_working_on_nexus_6p_or_maybe_it_is/cydepft Dec 28 05:01:07 lol Dec 28 05:08:01 hehe http://i.imgur.com/LanJ5jP.jpg Dec 28 05:14:41 Is there a way to avoid a laggy spinner in a ProgressDialog? Mine just seems to lag, although it works.. It just doesn't look right Dec 28 05:15:43 laggy spinners ... hm, that would be on Page 319, Volume 2 of "Laggy Android Things" Dec 28 05:17:10 lol Dec 28 05:17:13 wow Dec 28 05:20:59 Does it lag on emulator? Or device as well Dec 28 05:21:53 nothing lags for me Dec 28 05:21:59 Device, haven't tried the emulator yet (rarely use the emulator) Dec 28 05:22:16 If you are doing something resource intensive on the UI thread you need to move it off the UI thread into the background to keep your UI (spinner) smooth Dec 28 05:22:29 i.e. network calls, parsing, whatever Dec 28 05:22:36 What's everyone working on? Dec 28 05:22:51 Trying not to smash my computer out of JSON frustration :) Dec 28 05:23:15 It starts in one activity, does a bunch of shit, then once onResume in the new activity is called, if the ProgressDialog is showing, it dismisses it Dec 28 05:23:52 do you have your "does a bunch of shit" part running in a background thread? or the UI thread Dec 28 05:25:51 I have everything I can in AsyncTask objects Dec 28 05:28:36 I'm basically waiting for it to show a ListView before I dismiss the progressdialog Dec 28 05:30:05 I just decided that I'm going to develop an android app so... We'll see how this goes. Dec 28 05:30:26 zenware: life Dec 28 05:30:43 jsav: You are keeping the spinner/animation on the UI thread though correct? If that's not the problem you would have to post code because anything else would just be guessing Dec 28 05:31:10 Good luck zenware, it's not easy but it's fun :) Dec 28 05:31:31 liuwenhao: yup.. is there a way to move the spinning animation to another thread? That would likely solve all of my problems Dec 28 05:32:00 You should keep it on the UI thread because that way it gets priority over all your background tasks Dec 28 05:32:16 It could be a device specific thing too. I would try testing it on emulator or another device if you can Dec 28 05:32:41 I'll give the emulator a shot, and I'll try it on my girlfriend's Nexus 5 tomorrow Dec 28 05:32:46 I'm using a Nexus 6 Dec 28 05:33:20 I will say though.. learning how to use AsyncTask helped speed up everything else immensely Dec 28 05:34:08 Are you using a library for the dialog? Try https://github.com/afollestad/material-dialogs if you aren't using it already. I've never had a problem with it (but then again my apps don't do anything CPU intensive) Dec 28 05:34:53 Thanks liuwenhao, I spent around six days learning hello-world-ish stuff and how the gradle build system and everything works. Dec 28 05:35:32 Zenware: If you haven't already, set up Genymotion (the best Android emulator) and check out Slidenerds starting with Android programming tutorials/videos on Youtube. They are very good Dec 28 05:35:43 liuwenhao: nope, just basic android ProgressDialog Dec 28 05:36:21 It might be something I'll just have to live with Dec 28 05:36:22 jsav: try that lib, even if it doesn't fix the lag it is much nicer to work with than the default implementation Dec 28 05:36:28 I'm using a live device to debug Dec 28 05:36:43 sorry if i asked the question again but I got disconnected and not sure if my question got answered Dec 28 05:36:47 anyone knows how to output a .wav file with the filtered audio? Dec 28 05:36:53 I have already coded the bandpass filter(iir) and when I pressed on the "Play" button , I can hear the filtered audio However when I go and listen to the .wav file saved to my sdcard, it plays the original audio. Dec 28 05:36:59 Just to add on, I have to do a bandpass filter of 18k-20k and have put the code under the "PlayWaveFile" method This is my code (http://pastebin.com/U6Kep882) Thanks for the advices! Dec 28 05:37:10 either way liuwenhao thanks for the input! Dec 28 05:46:47 I'm using Android Studio behind a proxy, how do I setup Gradle for this configuration so I can compile a project. Dec 28 05:48:10 factor, The proxy isn't allowing gradle requests to be made? Dec 28 05:48:57 Hello everyone. Dec 28 05:49:10 zenware: I get an error on compile "connection timed out: If you are behind an HTTP proxy configure for this. Dec 28 05:49:26 I have a question. Does google play store track adb installs and uninstalls as well? Do they affect the overall ranking of the app? Dec 28 05:50:55 I know that the Android SDK Tools has some kind of proxy configuration and I know that in the context of Android Projects Gradle routes downloads through the SDK Manager. At least from my few hours of expeirence... Dec 28 05:51:24 ok Dec 28 05:51:31 KajuAlien: it only tracks installs handled through Google Play; but if you uninstall it from a device it doesn't matter how you uninstalled it Dec 28 05:51:46 At least as far as I know Dec 28 05:52:20 So the uninstalls do get tracked and affect the app rating in the store? Dec 28 05:58:41 They can probably determine differences between debug and production application uninstalls, so it's unlikely that development will affect your application rating. Dec 28 06:03:56 they don't track that way Dec 28 06:04:12 the install isn't counted unless it's done in play store Dec 28 06:05:39 it only goes down when a previously counted device checks into play and it no longer has the app Dec 28 06:12:09 Does anyone have recommendations for like when an Activity or Fragment should be used? Or perhaps some documentation that mentions advice? Dec 28 06:29:21 Leeds do you use google drive app by any chance? Dec 28 06:59:13 Alright thanks everyone! See ya later! Dec 28 06:59:16 g00s: occasionally Dec 28 07:01:23 Leeds quick favor, if you open the app up, and press the info (i) on a file, does it (a) pop up a new activity or (2) slide a drawer in from the left, and if #2 does it extend 100% of the width screen Dec 28 07:01:48 slide from the right, rather Dec 28 07:01:58 slides in, full width Dec 28 07:02:02 on my phone, at least Dec 28 07:02:24 ok thanks. hm, i have nav drawer, android:width=match_parent and its like 90% of the width Dec 28 07:04:03 g00s: if your using a drawerlayout thats the default behavior Dec 28 07:04:26 orbyt_ yeah ... unless you set negative margin :D Dec 28 07:04:29 http://stackoverflow.com/questions/16754305/full-width-navigation-drawer Dec 28 07:04:39 thats lame though, i'll leave it at 80% or whatever Dec 28 07:05:06 I have a library project that I'm thinking about open sourcing under GPL. Would I be breaking my own license if I used my own library in a closed source app? Dec 28 07:06:33 Probably. Don't use the GPL anyway, it's dumb. Plenty of actually useful licenses around. Dec 28 07:07:57 surf2b1: (i'm not a lawyer), but if you owned all the copyright for the library, you can cross license it... GPL for public, seperate license for yourself that allows any use Dec 28 07:09:59 jbit, would I need to disclose that separate license on GitHub? (I understand any advice I get here is not from a lawyer :P) Thanks Dec 28 07:10:01 For example, Qt do this... The open source version is LGPL which is somewhat restrictive, but you can pay them money and get a more permissive license Dec 28 07:10:24 surf2b1: i don't think so, no. Dec 28 07:10:48 Use the GPL for your software and you're guaranteed nobody will touch it, especially not corporations. Dec 28 07:10:52 CedricBeust, I don't like GPL either. haha.. even though I'm thinking of using it. Dec 28 07:11:14 again, this is assuming you own all the copyright and IP for the code in question... if your code includes parts from other GPL codebases, this won't work Dec 28 07:11:28 jbit, I do Dec 28 07:11:39 and if people contribute code to your github, you may not be able to use their contributions in your "commercial codebase" Dec 28 07:11:47 since their contributions will be licensed under GPL Dec 28 07:11:49 hmm.. yeah Dec 28 07:15:35 CedricBeust, what are your plans for kobalt. Will we all be building our apps with it in 5 years or is it more of a personal project you're working on? Dec 28 07:15:52 also, i agree with CedricBeust. I generally flat out refuse to use LGPL/GPL libraries and such these days. It's just too much hassle if i ever want to release it Dec 28 07:16:26 surf2b1: It's both. I hope it will be useful and also a personal project Dec 28 07:20:50 GPL for libraries has always been an aggressive move, because that's where the viral thing really comes into effect... Dec 28 07:24:53 Leeds, "viral thing" ? Dec 28 07:25:14 surf2b1: GPL library can only be used by GPL app Dec 28 07:36:58 That's what scares everyone about it Dec 28 07:37:27 It forces everything to be public and people are afraid of sharing code. Dec 28 07:37:59 Somehow they think they hold ownership over knowledge and that keeping it a secret somehow keeps them safe or profitable. Dec 28 07:38:08 It's silly and archaic. Dec 28 07:38:17 It's the reality Dec 28 07:39:56 For libraries, I like MPL. Dec 28 07:40:06 Or apache, of course. Dec 28 07:48:05 Hi. I have a PreferenceFragment which uses addPreferencesFromResource(). How can i view/edit a StringSet in the PreferenceFragment? Dec 28 07:48:29 The StringSet is a set of URI strings Dec 28 07:55:16 some things should be GPL Dec 28 07:58:05 surf2b1, if someone sends you a patch to your code under GPL license, then anything that code touches is GPL Dec 28 08:18:40 hey,i need to use horizontal recyclerview but it seems i cant use wrap_content for height. Any tips to use height wrap content ? Dec 28 08:21:53 too less info Dec 28 08:25:47 gordon_: for instance; there are n photos, i need to show them in a recylerview that is located bottom of screen, Dec 28 08:26:13 btw anyway our designer sent a new template, so i don't need this xD thnx Dec 28 08:26:20 ... Dec 28 09:06:16 Hi all, any one able to help with this? http://pastebin.com/YFn6nFRS Dec 28 09:09:46 Akayllin, probably your textview is not yet available since you are calling it on the second line after the onCreate Dec 28 09:10:13 usually setContentView(...) is called before doing any findBiewById Dec 28 09:11:43 that might be it. forgot to call that. testing now Dec 28 09:12:38 it works. thanks :) stupid error Dec 28 09:13:08 :) Dec 28 09:20:09 For some reason the dialog isn't very wide? is there a good way to make it take up like 90% of the screen width? Dec 28 09:22:00 use a linearlayout as root with match_parent for width Dec 28 09:23:39 it has that Dec 28 09:25:52 i was able to to it programmatically using window and layout parameters. i wonder why the xml settings didnt work though it should be no different :\ Dec 28 09:26:34 Hi All, I am new to java and android, I am working with Parcelable.Creator and according to docs its public static interface, Does java allows "." in interface names?? Dec 28 09:27:10 or is it something which i misunderstood Dec 28 09:34:59 Akayllin, i use this for an 'almost' fullscreen dialog with scrolling: https://pastee.org/cv3nc Dec 28 09:37:23 rajatarora, java doesnt allow . in interface/class names the interface name is just Parcelable Dec 28 09:38:26 Yeah that's what i read . is not allowed in interface/class but still i am not getting what is Parcelable.Creator Dec 28 09:39:12 Is Creator nested interface inside Parcelable? Dec 28 09:43:02 yes Dec 28 09:45:30 okay now a new odd one :\ edit text box has a maxLenth attribute of 50. if i type 50 characters and then continue to type, it will no longer backspace.. like no more characters will appear, but my edit text box is basically stuck frozen now and unable to be changed Dec 28 09:45:37 this ever happen to anyone? Dec 28 11:30:53 hi Dec 28 11:31:17 what's error -103? is it insufficient storage?, Dec 28 12:12:04 hello everyone Dec 28 12:12:25 the channel topic says Android application development — where is a channel where porting Android is discussed? Dec 28 12:12:36 I need some help with bootloaders and stuff Dec 28 12:13:43 #android Dec 28 12:13:56 @android-root Dec 28 12:14:03 thanks Dec 28 13:18:34 is there a significant difference between developing for "android tv" and regular android connected to a tv? Dec 28 13:21:17 hi Dec 28 13:21:55 I issued android sdk a while ago, and it was stalled and I can't close it. what to do? Dec 28 13:22:12 can't find its pid either Dec 28 13:22:14 Kartagis: what? Dec 28 13:22:35 thepoosh: the command android sdk Dec 28 13:22:56 what!?| Dec 28 13:23:11 I'm trying to kill it Dec 28 13:23:28 it doesn't die Dec 28 13:23:36 nor does it finish Dec 28 13:23:48 stalled at 99% Dec 28 13:26:30 http://imagebin.ca/v/2RVbUYDICYvm <--- at this stage Dec 28 13:30:10 Hello, anyone ever used ArcGIS library for android? I need help Dec 28 13:49:09 I've got the line in config.xml and I get exit code 8 when I try to build. any ideas? Dec 28 14:51:38 Hi, Is it possible to set a visibility listener on a custom view ? Dec 28 14:51:41 Thx anticipately Dec 28 14:57:58 so i have in my manifest. what could be the reason for me receiving Permission failure: android.permission.CAMERA ? Dec 28 14:58:13 a work around is to go in the application's permissions and manually enable camera Dec 28 14:58:23 but i thought it should ask the user whether he wants to enable camera Dec 28 14:59:07 if you are on marshmallow it would ask for it when you first use it in your app Dec 28 14:59:18 im on very latest Dec 28 14:59:20 in case of deny you need to 'catch' it and do something Dec 28 14:59:36 and it never asks me on first use Dec 28 14:59:44 i just created a new emulator and this was the very first run Dec 28 15:00:07 i noticed this happening on a device where i ran the application for the first time Dec 28 15:00:14 i also* Dec 28 15:00:48 if you check in the app manager, is the permission granted for the camera? Dec 28 15:01:17 I found the same result when I ran an application that was targeted on version M. I used this documentation: Dec 28 15:01:17 http://developer.android.com/training/permissions/requesting.html Dec 28 15:01:46 The documentation helped me resolve the issue Dec 28 15:01:47 ktwo: exactly, it isn't and i can enable it Dec 28 15:01:54 but i want the app to ask the user to enable it Dec 28 15:02:01 is there a significant difference between developing for "android tv" and other android based set top boxes that aren't android tv (for example specifically fire tv) Dec 28 15:02:03 i dont want to expect the user to go in the app manager to enable camera Dec 28 15:02:09 thats just a bad experience Dec 28 15:02:24 DrBenway, try to deinstall the app and reinstall, and see if it pops up maybe you denied it once accidentally Dec 28 15:02:34 ktwo: this was the very first install Dec 28 15:02:59 let me check what nohe427 said Dec 28 15:03:07 might be an android 6 issue Dec 28 15:08:20 catphish: androidtv is a specific api and set of capabilities, the other boxes are just random, no real way to know what's available on any particular box Dec 28 15:11:34 Leeds: thanks, that makes sense, it looks like the default exampe app on android studio *does* work with the fire tv, though i had to force the minimum API down from 21 to 17 Dec 28 15:11:52 everyone here using Android Studio 2 already? Dec 28 15:12:22 Im still using Androd Studio Beta Dec 28 15:13:02 DrBenway, this should only be an issue if your target version of the SDK is at 23. If the target SDK is set to version 22, you should avoid this issue. It is a safety feature of version M. Dec 28 15:13:26 my targetsdk is 23 Dec 28 15:13:35 won't having a targetsdk of 22 be a problem for 23 devices? Dec 28 15:14:24 This would be just to check that it is a permissions issue. After checking, you could bump it back up to 23 and then implement what I sent in the documentation Dec 28 15:14:43 i read the page and it looks like it Dec 28 15:14:50 but sure, i'll test against 22 Dec 28 15:15:21 Yeah, that's what I found when trying to implement a location permission in my application. I was running into all sorts of crazy issues and a colleague sent me a stack overflow resource Dec 28 15:16:28 I hope that helps! Dec 28 15:17:42 interesting... now it didn't even ask me for permission Dec 28 15:17:48 and it seems to not fail due to permission denied Dec 28 15:18:01 (im on the emulator and my laptop's camera is open) Dec 28 15:18:32 i'm not getting a preview feed but this camera api is so rubbish that i'm not surprised Dec 28 15:20:03 yeah... running opengl application in an emulator doesn't look too fun Dec 28 15:28:30 Hi guys I just downloaded the Android Studio documentation so I can view it offline, anyone know where the documentation folder is, I'm using Mac OS, thanks! Dec 28 15:33:31 http://imgur.com/8wJtvrc -__- Dec 28 15:34:03 thanks! Dec 28 15:34:33 AndroidNewb, i think the "android studio" doc is online, see the help menu Dec 28 15:35:01 ok, thanks! :) Dec 28 15:35:05 otherwise, it's where you downloaded it lol Dec 28 15:39:44 i really don't understand android API versions. why am i able to create an android tv application (min api 21), then change the min api to 17, and it works on an api17 device? is this because the android 17 device just happens to have backported some APIs Dec 28 15:39:55 it seems very messy Dec 28 15:52:15 it means you didn't use any api newer than 17 Dec 28 15:53:00 or you testing code coverage on 17 is lacking Dec 28 15:59:32 catphish : The minSdkVersion designates the minimum version of Android required to install your application. If you are still able to run your application on an Android version 17 device while having have it designed for a newer android device version, this would mean that you are not necessarily using features introduced in the newer API versions, or you are using the support library which is allowing you to use these newer features in previous ver Dec 28 16:00:41 or you simply haven't hit cases where you use 21 apis during testing Dec 28 16:01:30 Pretty sure the app store wont let you download an app with a higher minSdk then your running Dec 28 16:02:35 that's not what he said Dec 28 16:03:18 ah I only saw nohe427's message Dec 28 16:03:35 I believe what I meant is that if you have specified android:minSdkVersion to 17 and android:targetSdkVersion to 21, you can still install it on an android 17 device. I see how I might have some confusion in what I said Dec 28 16:20:01 Is there something special I need to do to have my gradle wrapper script look in the directory it is in for the root build.gradle? Dec 28 16:21:28 Currently I have a project with a root directory, and then a directory within it that has my gradlew/build.gradle/settings.gradle, and Travis CI is failing to build when executing from any directory above the one containing the gradlew Dec 28 16:22:35 "./gradleproject/gradlew clean" does not work, but "./gradlew clean" does Dec 28 16:23:20 If it is failing specifically within Travis CI, I had to add this line to get it to compile: before_install: - chmod +x gradlew Dec 28 16:24:06 yeah I've gotten it executable with chmod, it's failing locally as well Dec 28 16:24:54 --info shows it's looking for a root build.gradle in the overall repo directory rather than in the gradleproject directory where the gradle wrapper is Dec 28 16:25:38 works fine while in the gradleproject directory though Dec 28 16:26:29 Best unit test failure ever: junit.framework.AssertionFailedError: expected: but was: Dec 28 16:26:30 ... Dec 28 16:29:59 ha, is that the toString representation or something? Dec 28 16:30:02 ah, charsequence/spannable error Dec 28 16:30:03 yeah Dec 28 16:39:48 woo figured it out Dec 28 16:39:50 "-p, --project-dir Specifies the start directory for Gradle. Defaults to current directory." Dec 28 16:40:38 just had to pass -p /path/to/gradleproject/ as a parameter, and it quit looking in the current directory for a non-existent build.gradle Dec 28 17:46:27 ugh, I wish preferences had a way to store directly as integral values instead of just strings, so annoying Dec 28 17:50:04 yeah, bug for that has been in tracker for years Dec 28 17:51:11 hmm, can i use a ValueAnimator for the color of a solid in an oval shape that's used s a drawable? Dec 28 18:09:07 hello ya'll Dec 28 18:09:28 I'm implementing file upload functionality for a profile image with retrofit Dec 28 18:09:39 had some questions Dec 28 18:10:16 past tense is a good tense in that case.. Dec 28 18:10:31 android does not come with built in file manager (marshmallow has one but it's hidden in storage) Dec 28 18:10:55 so does anyone have suggestions for a good library that has a built in file manager for choosing image files to upload Dec 28 18:11:14 Why do you need a file manager Dec 28 18:11:28 Request a picked image of a MIME type and let user use their native UI to choose an image. Dec 28 18:11:47 It'll launch the builtin gallery app which has photos the user cares about in one place Dec 28 18:12:05 mavrik can you direct me to a code example of this Dec 28 18:19:24 if I wanted to allow the user to choose outside of photo gallery I would need a filemanager Dec 28 18:20:24 hmm, what's a good approach for showing a snackbar for deletion when it crosses activity boundaries... such a pain... Dec 28 18:21:11 delete action occurs in an edit fragment contained in a detail activity, upon deletion, get kicked out of the detail activity into the master activity Dec 28 18:21:37 lexton, why? Dec 28 18:21:48 if the user has a filebrowser installed he can use it. Dec 28 18:21:54 ugh, installing on the device seems to have got stuck.. Dec 28 18:22:04 It's not your responsitbility, let OS handle it. Dec 28 18:22:27 ./zipalign: error while loading shared libraries: libc++.so: cannot open shared object file: No such file or directory what package do I need? Dec 28 18:22:29 ditto Mavrik Dec 28 18:22:39 Kartagis, linux 32bit userspace Dec 28 18:22:54 Mavrik just looking for a code example of how to allow the user to upload a profile image Dec 28 18:23:22 then launch the picker intent for images Dec 28 18:23:29 and upload the resulting content urio Dec 28 18:24:21 hmm, restarting adb and reconnecting no help.. need to restart device? Dec 28 18:29:23 gnah, something is really toast. awesome.. Dec 28 18:33:43 can we flash rom with fastboot flash rom.zip? Dec 28 18:40:59 unknown api level my butt! Dec 28 19:17:54 can anyone recommend a guide for transitioning an ANT project to Gradle? Dec 28 19:47:41 pfn, the focus losting after sending a message in annoying Dec 28 19:47:41 meh, valueanimator doesn't animate smoothly for me, here. must be missing something. oh well, tomorrow is another day Dec 28 19:47:42 gdrc, turn off hide keyboard--are you on marshmallow? Dec 28 19:48:44 hehe Dec 28 19:48:45 I think I produced like 50 crash reports for qicr this weekend :) Dec 28 19:48:45 Mavrik, did you? hmm, let me see Dec 28 19:48:54 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.irc.lite/1f39b721c0492c6193dc688269509ebd2bee6460 Dec 28 19:48:55 Yeah, it tends to crash on startup a few times and then it's ok. Too lazy to check logs tho. Dec 28 19:48:58 hmm, yeah, I've seen that reported a few times, not sure what causes it Dec 28 19:49:22 Yup, that sounds about right. Dec 28 19:49:52 It looks like a race condition - it's always on application startup and it's fine after I reopen it a few times. Dec 28 19:49:53 must be missing a notifyDataSetChanged somewhere, but it's not obvious (and I've been spending some time giving some love to keepshare) Dec 28 19:51:43 no Dec 28 19:52:01 gdrc, I guess it's a regression then Dec 28 19:52:36 pfn, the keyboard doesn't hide, just the edittext losing the focus Dec 28 19:53:04 Yeah, change the setting for keyboard hide and it's fine. Dec 28 19:54:13 I don't want to hide the keyboard Dec 28 19:56:23 ... Dec 28 20:00:12 gdrc, and you wantt o disable the setting Dec 28 20:00:50 no Dec 28 20:00:58 Oh yes it works, good Dec 28 20:01:16 but yeah, it's a regression if it occurs thanks for letting me know Dec 28 20:02:03 hi all Dec 28 20:02:14 have everyone a simple example für gcm? Dec 28 20:02:31 anyway I'm on 5.1.1 s6 if you need to know Dec 28 20:06:37 Hi, I built a UI, and I got one EditText working inside a LinearLayout. I then added a second LinearLayout inside that and two items. They display on the custom UI editor fine. When I go to run it though, the two items don't show up and only the first item shows. Any ideas? Dec 28 20:08:03 thebishop: You shouldn't have to do much, Android Studio can do it for you Dec 28 20:08:45 aindriu: You have a nested linearlayout with two child items and you say its not showing up? Dec 28 20:08:49 yiati, my project is fairly elaborate, with significant native code relying on complicated dependencies with their own complicated build systems Dec 28 20:09:01 yiati, so letting a machine take care of it is really not an option Dec 28 20:09:02 orbyt_: YES Dec 28 20:09:16 aindriu: cant really answer without seeing your code Dec 28 20:10:45 http://pastebin.com/vaTKZKi5 Dec 28 20:10:45 thebishop: Back in the day I just read through http://tools.android.com/tech-docs/new-build-system/user-guide once and referenced it whenever I got stuck. Probably best to not try to even make comparisons, and just start from scratch Dec 28 20:11:03 yiati, ok thats great info, thanks Dec 28 20:17:36 aindriu: what is the problem your having? They both show up fine Dec 28 20:17:57 add backgrounds to both the edittext and linearlayout and see for yourself Dec 28 20:18:29 aindriu: http://developer.android.com/tools/help/hierarchy-viewer.html is a great tool Dec 28 20:18:50 ok thanks Dec 28 20:35:22 its still not showing the items when i compile it and run on my tablet Dec 28 20:38:41 aindriu: Did you use the hierachy-viewer Dec 28 20:39:08 Did you add backgrounds to both the edittext and linearlayout? Dec 28 20:41:28 ok hold on Dec 28 21:06:23 how do i get the hierarchy-viewer running? When I run the app on my tablet, the whole layout is different Dec 28 21:07:52 hi ,how can I load tall images like 9gag efficiently ?? Dec 28 21:11:26 what is a 9gag tall image Dec 28 21:12:13 aindriu: Any part of http://developer.android.com/tools/help/hierarchy-viewer.html that you aren't seeing/familiar with? Dec 28 21:12:40 image with huge height Dec 28 21:12:51 says unable to get server protocol and other stuff Dec 28 21:13:09 TarekMA: Break it up into tiles, and render them with an adapter Dec 28 21:13:26 TarekMA: Basically don't load the entire image into memory at once Dec 28 21:14:28 yiati: yes I will tile them but what if user want to zoom in ? Dec 28 21:14:34 TarekMA: Ah yeah, you can only run it on emulator and such Dec 28 21:15:34 yiati: hierarchy-viewer ? Dec 28 21:16:07 wrong person Dec 28 21:17:24 aindriu: You can only run hierarchy viewer on emulator and such Dec 28 21:17:44 TarekMA: If you want zoom then you need to implement it by hand with touch gesture listeners Dec 28 21:17:48 You can use hierarchy viewer with a real device Dec 28 21:18:21 jamespullar: Probably, not sure how though. I usually just use an emulator since it's the least trouble Dec 28 21:18:45 It works the same. I use both just about every day Dec 28 21:19:25 yiati: so I will make recycleview or listview and put the tiles in it ? Dec 28 21:19:26 jamespullar: Is your actual device unlocked though? Dec 28 21:19:55 Yes the screen is unlocked. If are you referring to something else? Dec 28 21:20:26 unlocked bootloader Dec 28 21:21:08 Nope stock device Dec 28 21:22:56 jamespullar: http://stackoverflow.com/questions/7801427/hierarchy-is-not-working-for-my-device Dec 28 21:23:38 Ah just use ddms instead Dec 28 21:25:05 jamespullar: ? ddms is a separate tool Dec 28 21:25:20 And provides hierarchy viewing Dec 28 21:25:41 Mavrik, gdrc: 0.8.3 should fix both issues Dec 28 21:25:42 No, hierarchy viewer is a separate tool Dec 28 21:26:30 yiati: yes, ddms contains hierarchy viewer along with other tools Dec 28 21:27:05 haha, no ddms does not contain hierarchy viewer. Hierarchy viewer is a separate tool Dec 28 21:27:58 developer.android.com/performance/hierarchy-viewer/index.html Dec 28 21:28:32 Use ddms to get hierarchy viewer, works no problem Dec 28 21:29:18 jamespullar: That link is a 404 Dec 28 21:29:41 Hey all! Android beginner here. I've been trying to create an onclick listener for a button on a cardview (Im using this library : https://github.com/florent37/MaterialViewPager) But im just not able to figure it out. I've been at this for a week now.. I know how to do this for listviews and normal non-recyclerview based apps.. i think ive already read all SO questions reg this. Any pointers would be really welcome :) Dec 28 21:30:19 yiati: http://developer.android.com/tools/performance/hierarchy-viewer/index.html Dec 28 21:30:27 Had it wrong Dec 28 21:30:42 tertpo: any code? Dec 28 21:31:31 hmm, I need a good fingerprint accepted animation... Dec 28 21:31:33 jamespullar: Maybe you are talking about uiautomator Dec 28 21:31:56 uiautomator dump that ddms tool has Dec 28 21:32:06 which is also useful Dec 28 21:32:14 hmm, probably a levellist drawable should do my bidding, just surround the fingerprint icon with a circle Dec 28 21:32:40 Then maybe I'm confused, you want am xml dump of the view hierarchy right? Dec 28 21:32:46 What is a good way to view/edit a StringSet in a PreferenceFragment? Is it possible to do it through the XML file? Dec 28 21:34:11 Ashiren: so basically i kept trying with my own codebase and i ditched all that and forked the sample app to try it out. First i added an onclick to this file (https://github.com/florent37/MaterialViewPager/blob/master/sample/src/main/java/com/github/florent37/materialviewpager/sample/MainActivity.java) and i kept trying to add the listener to many files.. but i kept getting errors. after a lot of trying, i figured out that it wor Dec 28 21:34:12 https://github.com/florent37/MaterialViewPager/blob/master/sample/src/main/java/com/github/florent37/materialviewpager/sample/TestRecyclerViewAdapter.java Dec 28 21:41:26 So my modified file is here: http://pastebin.com/nBY8mmQe (Ive marked the modifications) This was based on SO answers.. Dec 28 21:43:21 Here im trying to figure out onclick for the card as a whole.. after that i thought ill figure out the button on the card.. Dec 28 21:43:36 i've just seen that libcore (master) seems to have started using openjdk implementation for java* classes. any info on that? Dec 28 21:44:49 bitkiller, reference? looks like harmony still Dec 28 21:45:14 if anyone could suggest any pointer i would be really grateful.. im really struggling with this :( is there any docs i can read.. or some way i can figure out this whole cardview thing.. and recyclerviews.. Dec 28 21:48:44 pfn, https://android.googlesource.com/platform/libcore.git/+/6c0e55c2bbd4cf2798d6642a259f9983f69c979e Dec 28 21:49:06 i was looking for the ArrayList implementation in master but couldn't find Dec 28 21:49:30 the message is a bit suspect, and i may be reading too much in it Dec 28 21:50:07 and i probably am, given that afaik openjdk is gpl Dec 28 21:50:13 * pfn shrugs Dec 28 21:51:49 tertpo: what exactly is your question Dec 28 21:55:16 orbyt_: Could you help me set an onclick event handler to a button inside a cardview? Dec 28 21:58:07 tertpo: inside a recyclerview correct? You can set a click listener in the adapters onCreateViewholder() or onBindViewholder by accessing it through the viewholder, eg: holder.button.setOnclick() Dec 28 21:59:51 can you access other applications caches? Dec 28 21:59:57 or files Dec 28 22:02:17 orbyt_: holder.button.setOnclick() => Is it something like this: holder.itemView.findViewById()? Dec 28 22:03:18 tertpo: no, you would use findViewById() when creating the viewholder. Post your recyclerviews adapter class Dec 28 22:05:15 http://pastebin.com/nBY8mmQe Dec 28 22:05:17 pfn, well, found the files. they are in the ojluni directory Dec 28 22:08:19 tertpo: in your Viewholder, see how you have a reference to the cardview? Do the same for the button. Dec 28 22:08:40 when is vbox going to offer a tabbed display for its vms? Dec 28 22:08:51 so i can have ONE window for every vm i have running Dec 28 22:09:32 87% Dec 28 22:10:24 some mysterious commit messages like "Change dependency from libart -> libopenjdkjvm" Dec 28 22:14:17 orbyt_: But im not able to override the function with the ViewHolder parameter type, it works only when I use RecyclerView.ViewHolder parameter type Dec 28 22:14:35 so the ViewHolder class itself is rendered useless Dec 28 22:14:53 tertpo: how so Dec 28 22:15:18 so i tried typecasting RecyclerView.ViewHolder parameter to ViewHolder, so that i dont get the Override error Dec 28 22:15:26 but that crashes the app Dec 28 22:16:33 vigilancer: If I use 'RecyclerView.ViewHolder' as the type of the first parameter in Line 79, then ViewHolder class that was defined in Line 69 is not used at all, right? Dec 28 22:16:53 It even says so in AndroidStudio Dec 28 22:17:15 tertpo: sorry just joined. please post snippet again Dec 28 22:18:05 http://pastebin.com/nBY8mmQe Dec 28 22:20:59 tertpo: onBindViewHolder do not belong to ViewHolder Dec 28 22:21:26 it's defined in RecyclerView.Adapter Dec 28 22:22:07 tertpo: I thought you was talking like in general. "ViewHolder so useless") Dec 28 22:23:08 :) Im trying to make ViewHolder (the class I defined) as the first parameter type (since it extends RecyclerView.ViewHolder) but I just cant :( Dec 28 22:26:28 Literally can't even. Dec 28 22:28:30 Change `extends RecyclerView.Adapter` to `extends RecyclerView.Adapter`. Dec 28 22:28:40 tertpo: public class TestRecyclerViewAdapter extends RecyclerView.Adapter { Dec 28 22:28:50 ah yeah Dec 28 22:31:43 Is there any way to use a wildcard or something with the buildToolsVersion in build.gradle? Dec 28 22:32:20 I’d like to avoid forcing everyone to install exactly the single version I’m developing with, but I don’t see a way to do that. Dec 28 22:34:50 duboisj: + Dec 28 22:35:02 duboisj: 1.5.+ Dec 28 22:36:28 duboisj: 22.+. but don't do this Dec 28 22:36:57 vigilancer: don’t do which? (rely on such a recent version?) Dec 28 22:38:21 vigilancer: I get “invalid revision” Dec 28 22:38:23 duboisj: ah, only buildTools. I guess it's ok. Just in general it's a safe choice to declare exactly version Dec 28 22:38:39 I am using a HttpURLConnection and when I do .getResponseCode() my application just crashes Dec 28 22:39:04 aindriu: logs girls' best friends Dec 28 22:39:26 the logs dont work, there is too much spam Dec 28 22:39:37 vigilancer: ninja! it worked. now, how do I set click listener for the button Dec 28 22:39:45 aindriu: It's easy to filter it. It's also essential to learn how to filter it. Dec 28 22:39:51 changing the vm type from windows to linux does not solve the problem Dec 28 22:39:53 You can't do serious Android programming without using LogCat. Dec 28 22:39:55 tertpo: TacticalJoke was first) Dec 28 22:40:02 as soon as the vm boots the window is shrunk down vertically Dec 28 22:40:03 i tried holder.cardView.findViewById(R.id.button).setOnClickListener() Dec 28 22:40:06 but not horizontally Dec 28 22:40:25 aindriu> are you using all this within a authenticator? Dec 28 22:40:26 do I need to set my application permission to access internet? Dec 28 22:40:34 aindriu: exceptions in logs are pretty easy to find Dec 28 22:40:48 i swa a message in the slit window, something about unknown medium Dec 28 22:40:49 or something Dec 28 22:40:51 aindriu: definetly Dec 28 22:40:54 aindriu> yes. Dec 28 22:40:58 if the window were full size i would have been able to read it Dec 28 22:41:02 oh thats whats wrong then Dec 28 22:41:08 Yes thanks TacticalJoke :) Dec 28 22:41:19 none of the formats I’ve tried for wildcards in buildToolsVersion work. Dec 28 22:41:47 If you really think it’s there I’m curious, but it doesn’t look supported to me. Dec 28 22:41:49 yea. when the machine reboots the window is reset to upper left of my display, with the tible bar off the top of the display and the window shrunk down to [====] this big Dec 28 22:41:55 only on windows guests Dec 28 22:42:08 java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.support.v7.widget.CardView.findViewById(int)' on a null object reference Dec 28 22:42:12 i have to alt click the window to drag it back into the display Dec 28 22:42:17 tertpo: whats wrong with findById().setOnClick ? Dec 28 22:42:27 argh wrong channel Dec 28 22:42:35 tertpo> show trace please Dec 28 22:43:16 tertpo: where are you setting listener? Dec 28 22:43:42 inside onBindViewHolder Dec 28 22:44:52 tertpo: what is null? cardView or findView ? Dec 28 22:44:54 Stacktrace: http://pastebin.com/cyQxfXQD Dec 28 22:49:19 tertpo: CardView.findViewById(int)' on a null object reference Dec 28 22:49:28 so you cardview null Dec 28 22:49:41 Yeah i just checked.. cardview is null Dec 28 22:50:12 tertpo: are you sure about com.github.florent37.materialviewpager.R.id.list_item ? Dec 28 22:53:13 Anyone hear when google cloud test lab comeing out? Dec 28 22:54:13 vigilancer: Im just checking that.. I think it should be R.id.card_view Dec 28 22:56:10 Nope, im getting compile time errors for cardview. i also tried getting the actual button - that is also failing with the same error : Error:(73, 100) error: cannot find symbol variable card_view |and| Error:(74, 95) error: cannot find symbol variable button Dec 28 23:00:05 also, i tried ditching all of this and trying: holder.itemView.findViewById(R.id.button).setOnClickListener() and I get this: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnClickListener(android.view.View$OnClickListener)' on a null object reference Dec 28 23:02:55 does android studio still have that settings.gradle bug still going? Imported a project to the newest version and am getting cannot resolve method when I know the methods have been created in the proper areas Dec 28 23:03:59 exit Dec 28 23:15:14 wb Dec 28 23:16:01 Hello everyone... some odd activity. I am running an Ubuntu machine. On it, I powered up a Virtual Machine with Virtual Studio. After which I launched (on the Ubuntu machine) Android Studio. If I try to power up an Android Device it fails. An error stating that a problem with the KVM has happened. Dec 28 23:16:21 Don't know if this is useful for "debugging"... or if it's not even a bug. Just want to mention it... might... help somehow. Dec 28 23:24:02 knob: I assume you actually mean "Virtual Box", instead of "Virtual Studio". Dec 28 23:25:20 knob: Assuming that's true, running the android emulator requires KVM, and the drivers required for VirtualBox cannot be loaded at the same time as KVM. The following should help: http://www.dedoimedo.com/computers/kvm-virtualbox.html . Dec 28 23:30:35 when I try and download a URL with HTTPURLConnection, I get status 200 but there is no content in the buffer. why is that? Dec 28 23:34:06 aindriu> wont you help us out by posting code please ^_^ Dec 28 23:45:09 davidmichaelkarr, you're 100% right. It was "Virtual Box" where I wrongly stated "Virtual Studio". That link helps! Thank you! Dec 29 00:29:20 bitkiller oh you meant https://news.ycombinator.com/item?id=10803775 Dec 29 00:38:34 g00s, "has been settled out of court" - non-sense, i think Dec 29 00:49:16 hi all Dec 29 01:31:36 huh, what's the idiomatic replacement to overriding notifyDataSetChanged in recyclerview.adapter? Dec 29 01:33:21 hi all Dec 29 01:33:36 i want build an projekt in android studio but i became an error Dec 29 01:33:43 Error:(27, 0) Supplied String module notation 'libs/gcm.jar' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'. Open File Dec 29 01:33:47 what must i do? Dec 29 01:34:40 I guess registerAdapterDataObserver Dec 29 01:40:15 no one an idea? Dec 29 02:57:26 slow night **** ENDING LOGGING AT Tue Dec 29 02:59:58 2015