**** BEGIN LOGGING AT Thu Apr 14 02:59:58 2016 Apr 14 04:04:34 tricknology so it sounds like your peripheral then Apr 14 04:04:44 yeha man.. Apr 14 04:05:14 and.. I found out that this feature that is broken.. that i’ve been going back and forth with them about for 2 weeks.. works on an older device.. Apr 14 04:05:20 (ragequit) Apr 14 04:06:39 java.util.stream is in N preview 2 Apr 14 04:07:54 does that mean that I don’t have to break stuff up into packets anymore? Apr 14 04:20:48 I made a new project with dagger2, trying out MVP - so far it is SO sick. But my project doesn't run: error: cannot find symbol class DaggerObjectGraph, Apr 14 04:20:51 also: Error:Execution failed for task ':app:compileDebugJavaWithJavac'. > java.lang.NoSuchMethodError: com.google.common.collect.ImmutableSetMultimap$Builder.putAll(Ljava/lang/Iterable;)Lcom/google/common/collect/ImmutableSetMultimap$Builder; Apr 14 04:21:23 I'm using dagger 2.3 if that helps; I've never had this problem after building twice Apr 14 04:42:01 Hey guys, if I use for loop like this, for(ScanResult scanResult : wifilist) is there a way I can access the scanResult outside of the loop? Apr 14 04:43:09 Downgraded to 2.2 and it works.. Apr 14 04:43:48 Demon_Jester: You'll need to save the value in a variable declared outside the loop, but it will have the value last assigned to that variable (the last item in the list) Apr 14 04:44:04 Demon_Jester: this is a weird pattern, though. What are you trying to do? Apr 14 04:45:30 explodes: well, I am comparing wifiResults to list of mac address, and save them to a hashmap when it finds one, but I have my filteredlist.put(scanResult.SSID,scanResult.BSSID) , and can't do filteredlist.get(scanResult.SSID) Apr 14 04:45:48 outside of the loop. Apr 14 04:47:19 That's because that variable isn't available outside the loop.. Apr 14 04:47:30 let me type something up for you Apr 14 04:47:46 but if i do, you have to let me explain to you why it works the way it does Apr 14 04:47:47 deal? Apr 14 04:49:29 explodes: yeah that is fine. Apr 14 04:50:40 ttp://pastebin.com/BTXQjfZY Apr 14 04:50:45 http://pastebin.com/BTXQjfZY Apr 14 04:51:15 This saves all of the matches in your filtered list Map. Apr 14 04:51:39 If you want to "use scanResult", you'll need to iterate over your filteredlist Apr 14 04:52:10 filterdlist is a map of SSID to BSSID's, and NOT a map of SSIDs to ScanResults. Apr 14 04:52:47 Alternatively, after line 5, you could add the code: doSomethingWithMatch(scanResult) Apr 14 04:53:15 doSomethingWithMatch would be the function you write to use the match, noting that it could be called multiple times Apr 14 04:53:45 If it should only be called once, "break" after the call to doSomethingWithMatch(scanResult) Apr 14 04:54:19 If you want to store all of the matches, and then do something with the FIRST match, save the first match in a variable in your loop. Apr 14 04:55:21 http://pastebin.com/L71n2GD8 Apr 14 04:55:28 explodes: that is similar to my code I have now. Apr 14 04:56:33 Anyone know if, with Retrofit2 and RxJava, if Single>'s will ever emit onError in its subscriber? Or it is always wrapped in a result Apr 14 04:56:50 explodes: thanks for the help, thing is I want to use hash.get(object) when I actually click on item in the listview (I also have it display the filtered wifi in listview). Apr 14 04:58:08 explodes: it might be easier if I show you my code, and see what I am doing wrong. Apr 14 04:58:53 when you click the item in the list view, you'll know which index you're clicking. you can use that index to get the data from the backing list of data items Apr 14 04:59:01 you can then do something with that data item Apr 14 05:00:04 explodes: at times my adapter doesn't align with my list view, if I clicked on first item, it will give me different data from another wifi result. Apr 14 05:01:45 when your data changes, you should notify your list view that the data has changed: notifyDatasetChanged() Apr 14 05:02:16 I do, but it still doesn't work at times. Apr 14 05:02:37 As an alternative, you can set a tag on the view item Apr 14 05:02:44 use that tag to look up your data Apr 14 05:02:57 Or, you can even set the data in the tag itself. Apr 14 05:03:10 explodes: example? a tag? Apr 14 05:03:12 item.setTag(wifiThingOrWhatever) Apr 14 05:03:20 oh Apr 14 05:03:24 when you're updating your view Apr 14 05:14:21 what is the correct way to specify dexOptions { dexInProcess = true } } Apr 14 05:14:28 i get a DSL error Apr 14 05:19:38 g00s: You have one opening { and two closing } Apr 14 05:19:56 uh, that was a type Apr 14 05:19:58 *typo Apr 14 05:20:23 dexOptions { Apr 14 05:20:23 dexInProcess = true Apr 14 05:20:24 } Apr 14 05:21:58 man instant run is terrible Apr 14 05:22:10 g00s: Yes. Apr 14 05:22:10 i dont think its done the right thing 50% of the time Apr 14 05:22:19 g00s: 50% is generous,. Apr 14 05:22:27 I think it did the right thing, MAYBE once. Apr 14 05:22:55 the rest of the times you end up with your changes not taking effect, making for a very confused programmer. Apr 14 05:23:02 i just pushed a build, and the exception was 'can't convert toolbar to XXX' ids got messed up, etc Apr 14 05:23:21 g00s: Yeah, I always turn it off Apr 14 05:23:29 loke its like google.com "are you feeling lucky" Apr 14 05:23:37 no i am not feeling lucky Apr 14 05:23:54 Several times I've had the setting automagically turned back to on, making me waste at least an hour of debugging before I reliased by change wasn't actually seen by the emulator. Apr 14 05:24:06 lol that sucks Apr 14 05:24:14 i think the AS previews lost that preference Apr 14 05:24:45 g00s: Yeah, I just checked and the option is still off for me :)-) Apr 14 05:25:06 g00s: You should listen to the episode of Android Developers Backstage where they were talking about instantrun Apr 14 05:25:22 i think, instead of instant run, i would have preferred that google got debug / edit / compile on par with eclipse in 2011 Apr 14 05:25:36 i mean, i'm still building and then finding errors during build Apr 14 05:25:46 I think it's this one: http://androidbackstage.blogspot.sg/2016/01/episode-42-tool-time.html Apr 14 05:25:51 that should have been highlighted in the editor **i had open** Apr 14 05:26:46 g00s: I have always used IDEA for Android (even before AS was even conceived). It used to be the best Android development experience. Fast, and the best developer tool (and none of that crap you just mentioned) Apr 14 05:26:52 Then... Gradle came... Apr 14 05:27:14 :'( Apr 14 05:27:17 With Gradle, pure in-process builds in IDEA were no longer possible. Apr 14 05:27:59 And setting up a build enviornment without Gradle is hell, unfortunately. In most cases you can't even _find_ the Jar files you need because documentation just says "add this to the gradle file", and that's the extend of the documentation. Apr 14 05:28:12 lol Apr 14 05:28:42 I'd argue that most of the issues Android developers experience with their tooling is caused by the existence of Gradle. Apr 14 05:31:28 loke but we got to specify maven coordinates for download ! Apr 14 05:31:33 :D Apr 14 05:31:41 g00s: Yay! Apr 14 05:32:06 That's what my workflow was missing. More maven Apr 14 05:32:29 loke i think another part of the problem is the android build pipeline seems very complicated to me, with resource merging and other stuff Apr 14 05:32:51 its like sausage being used to make sausage Apr 14 05:32:53 g00s: That too. Apr 14 05:35:46 problem is we are not even beta, but alpha testers Apr 14 05:36:07 so we don't get to have something stable and robust Apr 14 05:37:03 loke i'm reading release notes for AS 2.1 beta ... they fixed some bugs in instant run Apr 14 05:37:15 but why the hell don't they do that for 2.0.0 stable ? Apr 14 05:37:30 Well, beta for what? I mean, Android development with IDEA was pretty awesome a few years back. Then they adapter IDEA for AS, and the result turned out to be _worse_. Apr 14 05:37:44 man, it's the worst IDE I ever used, AS Apr 14 05:37:56 http://tools.android.com/recent/androidstudio21betaavailable Apr 14 05:38:10 yup, already updated, already few "report to google" click click Apr 14 05:38:12 "the release is nearly identical to the 2.0 stable release from last week, but with a few extra bug fixes and some tweaks to Instant Run performance." Apr 14 05:38:12 adq: IDEA is the best IDE, period. Everything AS has added on top of it is utter shite. Apr 14 05:38:29 i don't want to switch to a fucking preview to get bug fixes for stable Apr 14 05:38:48 that's what i did since a year g00s Apr 14 05:39:04 rarely i had to re-use the `"'stable'"` one Apr 14 05:40:35 Same here. Apr 14 05:44:00 AS the worst... Apr 14 05:57:00 Does dagger still generate Dagger______ prefixed classes? Apr 14 06:03:35 guys i need help Apr 14 06:03:54 i cannot connect my device to my laptop using USB Apr 14 06:04:03 so i am connect over wifi Apr 14 06:04:25 i can see my device on adb devices Apr 14 06:04:50 but somehow i cannot run "adb reverse tcp:8081 tcp:8081" Apr 14 06:05:19 it produced error "error: more than one device/emulator" Apr 14 06:05:36 even though i only have one device connected Apr 14 06:06:00 rowan7: yes Apr 14 06:06:10 i tried to specify using -s option, but it is same Apr 14 06:06:21 what should i do ? Apr 14 06:08:02 My RxJava schedulers are overriden in my tests to use Schedulers.immediate() Apr 14 06:08:29 Deep in the stack trace it looks like a sleep action was created to execute at timestamp 1460613897378, or Fri, 05 Jan 48255 10:36:18 GMT Apr 14 06:10:15 Looks like something was scheduled periodically, so it probably isn't my observable, but my test is just hanging Apr 14 06:10:53 Thanks JakeWharton. For some reason Android Studio is not recognizing those Dagger___ classes or the object graph. I do have the android-apt plugin as well as dagger and dagger-compiler as depenancies in my gradle file Apr 14 06:11:04 I'll keep working on figuring it out Apr 14 06:11:15 http://pastebin.com/1iv10qin Apr 14 06:11:58 JakeWharton! Since I have you here, with retrofit, will a Single> always call onSuccess? Apr 14 06:12:15 (the return type of a retrofit endpoint) Apr 14 06:12:44 rowan7: you need to compile for them to be generated. try cntl/cmd+F9 Apr 14 06:12:45 explodes, he is very helpful, and on here frequently :) Apr 14 06:12:57 JakeWharton, I'll give that a go Apr 14 06:13:20 e.g., create interace, annotate with @Component, compile, reference DaggerMyComponent Apr 14 06:13:36 explodes: I don't remember. The tests will show. Apr 14 06:13:51 https://github.com/square/retrofit/blob/master/retrofit-adapters/rxjava/src/test/java/retrofit2/adapter/rxjava/SingleTest.java Apr 14 06:14:08 Nice, thanks Apr 14 06:14:11 looks like yes Apr 14 06:14:15 JakeWharton, That worked! Thanks for the help Apr 14 06:15:25 please help ! i cannot run adb reverse http://sprunge.us/JRbd Apr 14 06:17:21 suppose you have a whole ton of retrofit endpoints Apr 14 06:17:40 how do you organize this? Apr 14 06:18:09 logically Apr 14 06:18:26 can't use multiple interfaces, so I just sort by // COURSE // USER // WHATEVER Apr 14 06:18:35 we organize the code by feature and its a mess to have all of these services scattered everywhere Apr 14 06:18:37 you could have multiple services, however Apr 14 06:18:57 we organize based on remote service Apr 14 06:19:06 ex, I have an Authorized service and a generic Service Apr 14 06:45:03 guy i need assistance http://sprunge.us/JRbd Apr 14 06:48:27 Hmmm. In a presenter, for example, "doLogin()" is it better for the View to pass in username/password, or for the view to have methods to getUsername/getPassword? Apr 14 06:48:49 sipolan: you're generally going to get more answers if you actually ask a question rather than just pasting a link Apr 14 06:48:58 My hunch is that you'd just want to pass those values in, especially since they're so specific to login, and required for login to work Apr 14 06:49:39 That's a dumb question, I'm just tired; gonna doLogin(username,pass) and go to bed Apr 14 06:53:12 ok i'm sorry. i want to reverse port 8081 from my device to my computer, so i run "adb -s 192.168.120.130:5555 reverse tcp:8081 tcp:8081" but error with "error: more than one device/emulator" Apr 14 06:53:33 but there is only one device that connected to adb Apr 14 06:53:45 what should i do / Apr 14 07:01:44 what adb devices show Apr 14 07:02:42 I am using Recyclerview to load data I see that when clicked on one item few other items in the recycler view are also getting affected. Can someone let me know how can I resolve this issue? Apr 14 07:05:26 Ashiren: only this line "192.168.120.130:5555 device" Apr 14 07:08:54 oO Apr 14 07:09:38 dunno Apr 14 07:09:50 sDurgam: affected how? what do you mean Apr 14 07:10:00 so, it seems like PendingIntent.FLAG_UPDATE_CURRENT doesn't return an intent even though i know for a fact there is already one Apr 14 07:10:12 very weird Apr 14 07:10:56 @Ashiren: I have a Donwload option that changes to Downloading when I click on it for each item. When I click on first item I see that Download option is changed to Downloading for some other items as well. Apr 14 07:11:25 after you scroll? Apr 14 07:12:00 @Ashiren: yes Apr 14 07:12:29 well recyclerView as name states recycles the same items Apr 14 07:13:10 in onBindViewHolder you have to set the view to their "defaults" Apr 14 07:13:22 Ashiren: why won't you fix my issues?! Apr 14 07:13:30 what's up? Apr 14 07:13:33 because i dont know Apr 14 07:13:34 sky Apr 14 07:13:48 ph myy Apr 14 07:13:51 *oh Apr 14 07:14:10 PendingIntent.FLAG_UPDATE_CURRENT is just some constant, it doesnt "return" :O Apr 14 07:14:19 @Ashiren: defaults? I have defined click handler in onBindViewHolder. Apr 14 07:14:43 Ashiren: when using PendingIntent.getSomething with that flag, it should return the existing intent if it's there Apr 14 07:14:49 and I know for a fact i have it Apr 14 07:14:50 i meant, if you have i.e. checkbox in row and click on one of them, when you scroll down some other checkbox will be affected Apr 14 07:15:17 yes @Ashiren Apr 14 07:15:27 during onBindViewHolder you have to check for change and manually setChecked to true or false Apr 14 07:15:53 sDurgam: and that click doesnt affect somehow the views? Apr 14 07:17:15 @Ashiren: How do I check for for change. I am using a boolen variable but the behaviour is the same. Yes onclick changes the text of the text view. Apr 14 07:17:36 "Flag indicating that if the described PendingIntent already exists, then keep it but replace its extra data with what is in this new Intent" Apr 14 07:18:24 thepoosh: maybe it didnt exist in the first place? or i dont know, i didnt see the code :v Apr 14 07:18:50 it does Apr 14 07:18:51 sDurgam: the adapter has the list of items right? and on click you change that item somehow? Apr 14 07:18:57 i know it does Apr 14 07:19:12 yes @Ashiren Apr 14 07:20:01 sDurgam: so you have set the views according to the item again Apr 14 07:21:12 Ashiren: https://gist.github.com/yishai-glide/1a22d773bb7145827cd4ca42b5713a1a Apr 14 07:21:21 this is my code (sort of) Apr 14 07:21:35 and I see the last log being written back to back Apr 14 07:21:46 @Ashiren: I tried that in onClick event Apr 14 07:22:19 and since it's synchronized, there is no way they are being called in the same time Apr 14 07:22:21 and onBindViewHolder? Apr 14 07:23:19 @Ashiren: not onBindViewHolder. Thank you I am adding that now to see if that changes things. Apr 14 07:24:26 thepoosh: um youre keeping static context in application? :O Apr 14 07:24:32 When I do BaseAdapter.notifyDatasetChanged, shouldn't my UI update? I am doing this and my UI does not change according to the values in the adapter. Apr 14 07:24:33 anyone have a good article, blog, read, video anything on writting effective tests for android? Apr 14 07:25:27 What kind of tests? Apr 14 07:26:02 Hi. How to create notification which periodically plays sound until user reads it? Apr 14 07:26:17 Should I use AlarmManager for that? Apr 14 07:26:18 gullash don't that's annoying as fuck Apr 14 07:26:38 Ping_2_Ur_Pong: but if that's important? Apr 14 07:26:59 Ping_2_Ur_Pong: for example a driver is waiting outside Apr 14 07:27:03 did someone die? Is there house on fire? Are you notifying them their child has been raped? Apr 14 07:27:49 yea, that's not that important. Setup a single unique ring but a perpetual message would make me first turn off notifications for you app, second probably uninstall it. Apr 14 07:31:19 Ping_2_Ur_Pong: I see the point. But what if it's the requirement? Apr 14 07:31:44 talk to whoever made the requirement and get them to understand its a bad idea which is going to cause a backlash from users. Apr 14 07:32:08 @Ashiren: Now it is setting the one with Downloading text to Download. But I think I got an idea on how to work on this. Thank you. Apr 14 07:32:38 guliash: http://stackoverflow.com/questions/4441334/how-to-play-an-android-notification-sound Apr 14 07:33:49 fuck has anyone looked at android-topeka its friggin beautiful Apr 14 07:36:02 Ashiren: it seems like the issue is different Apr 14 07:37:51 i know. just those statics are meh :) Apr 14 07:38:01 i dont know how to help you :~ Apr 14 08:07:26 For analytics demographics is there a minimum amount of users that we need to start seeing data? It's been more than 24h even than 72h, updated the tracking code, enabled the area and no luck Apr 14 08:08:20 it may take a day Apr 14 08:08:43 there is also real-time graphs which show current activities Apr 14 08:08:55 squ: right but its been more than a day :$ Apr 14 08:08:59 it's been 3 heh Apr 14 08:09:16 something is wrong Apr 14 08:09:36 check the real-time graphs Apr 14 08:09:51 squ: we do get realtime graphics and sessions and everything, just not demographic data Apr 14 08:09:56 demographic + interest Apr 14 08:10:12 if real time is working then IDs are setup Apr 14 08:10:39 what if you are not reporting demographics Apr 14 08:11:33 or they are hidden deep under complex structure of categories Apr 14 08:12:28 well this is the gist squ https://gist.github.com/anonymous/3542741c83e2e96d8b16db97481e0efe Apr 14 08:12:44 we dont have any categories or anything\ Apr 14 08:13:02 I see, check them out Apr 14 08:13:51 if your app collects age data, you may report it manually, you get it? Apr 14 08:16:32 squ yeah but it doesnt, i thought it would be collecting it by now Apr 14 08:16:35 through google's network Apr 14 08:17:03 what ‘it’ Apr 14 08:17:19 provided paste doesn't report anything Apr 14 08:17:51 how does google know what data your app collects :) Apr 14 08:18:06 unless you specifically report it Apr 14 08:19:02 squ: according to google with that snippet it should already report it Apr 14 08:19:06 through it's network Apr 14 08:19:13 report what Apr 14 08:19:18 demographic information Apr 14 08:19:24 oh go away dude Apr 14 08:19:56 https://support.google.com/analytics/answer/2819948?hl=en Apr 14 08:20:41 appreciate the attempt at helping Apr 14 08:21:46 Heya Apr 14 08:22:04 i'm looking for resources on how to design apps, i really suck at it at the moment :( Apr 14 08:22:47 resco_nl: http://pttrns.com Apr 14 08:22:57 Hi all. I created a module for my custom views and added two ttfs in the asests in that module. Is this a good idea or is it better to place the ttf's in the android application module? Apr 14 08:27:35 I want to detect extra fling distance that was not consumed by Recyclerview. Is there any way to detect it? Apr 14 08:28:34 Like while flinging down, the recyclerview scroll position will come to 0 and stop right there. Apr 14 08:28:52 I want to detect how much extra distance it could have moved. Apr 14 08:36:53 squ, how's that a tutorial or guide? :o Apr 14 08:37:18 you didn't asked specific question, okey Apr 14 08:38:02 captain Ruyter would be very unhappy of you Apr 14 08:39:09 "resources on how to design apps" isn't that synonymous for tutorials/guides etc? Apr 14 08:41:47 https://www.google.com/search?q=android+design Apr 14 08:41:52 first link Apr 14 09:04:12 squ, google's own tutorials suck... :( Apr 14 09:04:59 never been good in webdesign either, so i guess it's only natural i don't get it :( Apr 14 09:31:26 resco_nl: no it is called work Apr 14 09:33:16 ‘learning’ is synonym Apr 14 09:43:37 does anyone happen to know why "ping" suddenly started working on android? Apr 14 09:56:10 hello. Apr 14 09:56:24 good morning Apr 14 09:56:28 what is the minimum api level I can support if I use google maps? Apr 14 09:56:32 in my app Apr 14 09:57:02 I am planning to use api level 16 Apr 14 09:57:17 i believe it was 8 or 9 Apr 14 09:57:27 so youre safe Apr 14 09:58:39 thanks Ashiren Apr 14 10:16:10 anyone here experienced with retrofit, how can i post a byte[] ? Apr 14 10:25:03 hello Apr 14 10:31:42 AlexandruM: hi Apr 14 10:42:53 Is AlarmManager.setInexactRepeating working on Android M? Apr 14 10:43:10 in doze mode Apr 14 10:43:25 it's inexact, like it says, so yes :) Apr 14 10:47:24 anyone have ideas whats wrong wrong with android's http auth verification? I keep getting 401 status code response Apr 14 10:48:30 code http://pastebin.com/jYN41be7 Apr 14 10:51:19 you're missing a space in the header Apr 14 10:53:29 "Authorization: Basic " + stripNewLines(base64(username+":"+password)) // pretty much Apr 14 10:54:40 "Basic " + Base64.encodeToString(authStr.getBytes(), Base64.NO_WRAP) Apr 14 10:54:48 thats the issue Apr 14 10:55:00 I dont have Base64.NO_WRAP for some reason Apr 14 10:55:15 well... Apr 14 10:55:29 "Basic " + Base64.encodeToString(authStr.getBytes(), Base64.DEFAULT).replace("\n", "") Apr 14 10:55:53 but you need the space after "Basic" Apr 14 10:55:59 I dont have encodeTostring either Apr 14 10:56:00 I use encodeBase64 Apr 14 10:56:45 but... but... android.util.Base64 doesn't have such method Apr 14 10:56:59 so what Base64 to use? Apr 14 10:57:02 I use it from util :( Apr 14 10:57:19 http://developer.android.com/reference/android/util/Base64.html Apr 14 10:57:47 I see that its android.util.Base64 Apr 14 10:57:52 so I dont get why I dont have NO_WRAP? Apr 14 10:58:08 apache commons Base64 has encodeBase64 Apr 14 10:58:11 so you're using that probably Apr 14 10:58:18 import org.apache.commons.codec.binary.Base64; Apr 14 10:58:19 heh yeah Apr 14 10:58:20 :O Apr 14 10:59:12 byte[] bytesEncoded = Base64.encodeToString(authStr.getBytes(), Base64.NO_WRAP); Apr 14 10:59:15 now I get error for this line Apr 14 10:59:27 because it returns a String, not a byte[] Apr 14 10:59:56 hmm, still getting 401 :( Apr 14 11:00:04 did you add the space after "Basic" Apr 14 11:00:14 ("Basic ", not "Basic") Apr 14 11:00:41 http://pastebin.com/KY1b61uj Apr 14 11:02:17 authStr is username:password form? Apr 14 11:03:09 yes Apr 14 11:03:25 oh it's there on the paste, silly me Apr 14 11:03:33 I even have Original string for a manual check Apr 14 11:03:39 creds are correct Apr 14 11:03:44 protocol is http Apr 14 11:03:49 I don't get what could get wrong Apr 14 11:04:55 I can't recall basic auth but did it require the server first the server to make the challenge for auth? Apr 14 11:05:36 hy guys, is there an intent-filter that i can use to detect the keyboard being open? Apr 14 11:08:06 apparently not Apr 14 11:09:13 Ill check what sends java and what my browser via wireshark, sec Apr 14 11:09:15 skin1980, I don't think so Apr 14 11:09:34 StephenS, that would be my suggestion Apr 14 11:09:44 Zharf: so i have to use a service and some code to detect that? Apr 14 11:09:46 might be some weird encoding or some such Apr 14 11:13:45 getBytes returns the string bytes in utf8 on android Apr 14 11:20:59 skin1980, I'm not even sure how you'd do it in a service, most keyboard detection tricks depend on a view resize or something Apr 14 11:21:15 Zharf, hmm for some reason I dont see username field in wireshark when sending via java Apr 14 11:21:16 :O Apr 14 11:21:19 what on Earth? Apr 14 11:21:34 works fine with browser Apr 14 11:23:07 it's been so long since I used plain old httpurlconnection... it's a bit weird and I generally prefer to use some library like retrofit to do all that for me :p Apr 14 11:23:10 but Apr 14 11:24:39 hey guys. i have a problem with tabbed activity. i made a custom view for tabs. so i have an imageBUtton and textView positioned properly in the tab. when i click on picture, i made the event handler which load proper fragment. but i don't see that shadow highlight when i tap on the picture. Apr 14 11:24:55 do anyone know what is the trick here? Apr 14 11:26:27 Zharf, btw when I do creds sending via browser, I do see username but not password, is that normal? Apr 14 11:28:11 apparently I used androidhttpclient in the last thing I used basic auth in ... 3 years ago Apr 14 11:28:52 but it's deprecated... Apr 14 11:30:39 Zharf: HttpUrlConnection is depreated Apr 14 11:30:41 i think Apr 14 11:30:45 wait, no Apr 14 11:30:48 HttpClient Apr 14 11:30:49 is Apr 14 11:30:52 yep Apr 14 11:31:32 weird Apr 14 11:31:55 StephenS, volley uses HttpURLConnection.addRequestProperty for headers Apr 14 11:33:29 so maybe try that Apr 14 11:34:02 I did Apr 14 11:34:07 I get for Authorization header basic enZvbmltaXI6MTIz Apr 14 11:34:10 @Ashiren I fixed my bug with recyclerview the way you suggested and it is working fine. Thank you. Apr 14 11:35:26 StephenS, is that base64 the same as with browser then Apr 14 11:35:48 ? Apr 14 11:36:14 if you look at the request with wireshark you should see the same headers Apr 14 11:36:36 do anyone know something about tabbed activity? :D Apr 14 11:37:23 i have some detailed question... but honestly i am not sure if i will get the answer .. maybe i screwed the way of doing it already :D Apr 14 11:37:25 Zharf, yeah I dont Apr 14 11:37:34 I dont see username in Auth header when I do java send Apr 14 11:38:07 when I do it with browser Authorization: Digest username=\"myuser\", realm=\"www.host.... Apr 14 11:38:25 Digest isn't basic auth.. Apr 14 11:38:35 so what I see is, that android/java somehow sends only basic and some weird encoded file Apr 14 11:38:38 what it is? Apr 14 11:39:33 it's a different sort of authentication method :) Apr 14 11:39:36 similar but different Apr 14 11:39:43 try using curl to test the basic auth Apr 14 11:40:26 curl -v yoururl -H "Authorization: Basic base64" Apr 14 11:40:39 I need to send base64? Apr 14 11:41:09 well, you want to implement basic auth, right? Apr 14 11:41:45 this doesnt work, so site is not basic Apr 14 11:41:54 I just encoded user:pass and its not passing Apr 14 11:42:20 so this site is using digest, how can I auth with digest? Apr 14 11:46:27 digest is 1. do http request without auth header 2. get back nonce value and realm 3. do md5(md5(username:realm:password):nonce:md5(httpmethod:requestpath)) Apr 14 11:46:31 or something like that Apr 14 11:46:39 you should probably use a library that handles it for you Apr 14 11:46:51 https://en.wikipedia.org/wiki/Digest_access_authentication Apr 14 11:48:29 ok, so android/java got some lib which does all that? Apr 14 11:48:32 so I can add it in gradle? Apr 14 11:50:44 https://github.com/rburgst/okhttp-digest maybe Apr 14 11:58:18 Where do I find the source for an older version of AOSP? Apr 14 12:17:18 quick Java question, can I apply a value to a string in my activity when it's created and have that string use that value if the user returns to that activity? I now I can achieve this with SharedPreferences, but thought it might be a better way? Or will changing activity clear the string from it's assigned value? Apr 14 12:19:06 if activity isnt destroyed its variables remain Apr 14 12:19:22 also you could save them and load them in savedInstanceState Bundle Apr 14 12:20:28 Ashiren: good idea. That might work, they are url's that picasso use to load images. So normally I would need to make a network request to get the url's everytime I enter the screen so Picasso can fetch the images from cache. Apr 14 12:22:02 Zharf, thats full of errors, got any other? Apr 14 12:27:01 StephenS, http://stackoverflow.com/a/9484808/857853 or http://stackoverflow.com/a/24672339/857853 maybe Apr 14 12:30:46 how to lcoalize layout Apr 14 12:30:50 pfn, [error] foo/android:.::buildTypes is undefined. what did I do wrong Apr 14 12:31:25 is it possible to localize the layouts on button click? Apr 14 12:33:15 i have a list item with check box at left which i want to switch to right when user tap on language change option Apr 14 12:33:57 rather thn playing with invisible and visible of views is it possible to achieve this with RTL support.. Apr 14 12:35:03 I have installed new AS 2.0. in order to have faster building times and - instead of 3-4s / build I am observing 20s Apr 14 12:35:27 none of them examples work Zharf :( Apr 14 12:36:07 must say that all cores are at 100% during build - unlike with 1.5.1 Apr 14 12:36:55 anybody with same problem - is there something I should do to speed it up? Apr 14 12:39:37 turn of instant run? Apr 14 12:39:45 as it isnt so instant apparently Apr 14 12:42:59 Ashiren, is it Build, Execution, Deployment -> Build Tools -> Compiler -> Configure on demand? Apr 14 12:43:02 or something else? Apr 14 12:43:08 eeyup Apr 14 12:43:49 http://pastebin.com/9BqsLXru shouldn't this keep populating the next ImageView in the array as long as the loop keep returning url's from the url array? I can't see where I might've missed Apr 14 12:44:35 Ashiren, thank you - it was it... Apr 14 13:19:06 anybody have experience with espresso + proguard? we're trying to run espresso unit tests on an emulator in debug mode, but we're over the dex limit, so we need to minify Apr 14 13:19:21 but proguard throws a ton of errors due to missing classes Apr 14 13:19:38 I am trying to catch something (windows - AS logcat) in logcat but amout of output is larger than logcat is capable of. Therefore I have switched to linux and used std logcat command Apr 14 13:19:39 adb logcat *:V | grep "com.appname" Apr 14 13:20:27 problem is that output on linux and windows differ - i have larger output on windows Apr 14 13:21:26 what could it be causing? Apr 14 13:21:53 app has been build with gradle release -> debuggable set to true Apr 14 13:38:42 I'm trying to iterate through a list of URLS: http://pastebin.com/SaXEuBe2 and let picasso load the url data into an array of ImageViews , I logged the url's and they return a value, but Picasso isn't loading the images to the screen. Anyone got some idea? Apr 14 13:41:09 pfn, well, I got protify working, I guess, seems like the rebuilds are only slightly faster than with gradle, about half a minute so far, where gradle does about 30-45s ish Apr 14 13:41:28 not rebuilds, incremental builds Apr 14 13:42:44 Zharf, eh? no way... Apr 14 13:42:53 pastebin a log? Apr 14 13:45:15 you mean not using protify? Apr 14 13:45:56 yeah, that's about right, protify should be about 15 seconds or less for a big app Apr 14 13:46:32 http://0379ed2e844048d5.paste.se/ Apr 14 13:50:07 that's strange, can you type `eval sys.props("sbt.task.timings") = "true" ` Apr 14 13:50:21 and protify once again Apr 14 13:50:48 if it's in dex, I have an optimization that I haven't released yet Apr 14 13:51:42 (pastebin the output please) Apr 14 13:53:03 hello. anyone know why I just started a new empty project, and the memory monitor says I have memory allocation 32 mb? Apr 14 13:53:25 When I do BaseAdapter.notifyDatasetChanged, shouldn't my UI update? I am doing this and my UI does not change according to the values in the adapter. Do you know of any weird issues with BaseAdapter here? Apr 14 13:54:12 molikto: but its free eh? Apr 14 13:54:25 there are no weird issues with base adapter, barq Apr 14 13:54:29 its probably default heapsize then Apr 14 13:54:29 @Ashiren no, it is allocated. Apr 14 13:54:55 it's free Apr 14 13:55:50 @Ashiren if I do memory usage. private dirty, pss total is all small, but heap alloc is big Apr 14 13:56:18 but if I run the app in a 4.x phone, the memory usage is mall Apr 14 14:16:20 Any videos on my android 6 phone (moto X play) retrieved through ContentResolver/MediaStore.Video.Media come back with GPS LATITUDE and LONGITUDE equal to zero. Works on an older android device. Anybody got any clues? Apr 14 14:20:06 android:layout_marginLeft="-10dp" android:layout_marginStart="-10dp" not working in RTL Apr 14 14:20:28 pfn, http://8ca9d3f4798b5233.paste.se/ Apr 14 14:23:07 Zharf, yeah, all the time is in dex, 1.6.0 has an optimization for that Apr 14 14:23:56 Zharf: xcuse me again, is there a way to add an option in the android contextual menu ( long press on a text field ) Apr 14 14:24:03 as far as yu kno Apr 14 14:24:05 know Apr 14 14:25:17 I'm not sure what components you've limited yourself into but yes, you can at least write your own long press handler and do whatever... Apr 14 14:25:27 (also, the videos I put on there definitely have non-zero lat/long, I've checked with `ffprobe`) Apr 14 14:26:04 Zharf, so weird that it's so slow for you though, not on ssd? Apr 14 14:26:19 on ssd Apr 14 14:27:08 strange, only slowness in the dex task before I optimized it was copying class files around to their proper destination Apr 14 14:27:37 Hello Apr 14 14:28:58 It seems like the CrystaX NDK's log function won't output to logcat, does anyone have a clue about this? Apr 14 14:29:44 Zharf: I would use it for every app installed like whatsapp... when i long click on the text field Apr 14 14:29:58 maybe this isn't possible Apr 14 14:30:02 right? Apr 14 14:30:09 not possible Apr 14 14:30:18 thank you pfn Apr 14 14:30:24 marshmallow has apis for selected text though Apr 14 14:30:43 ok Apr 14 14:30:46 thanks again Apr 14 14:31:37 Zharf, how many class files do you have? find appModule/target/android/intermediates/dex -type f | wc -l Apr 14 14:31:45 I think is the right path Apr 14 14:32:15 2681 Apr 14 14:32:33 Hi i want to know any developer can help me out with a prob with google play developer there no chat on for 3 days? Apr 14 14:33:15 ? Apr 14 14:34:25 Zharf, hmm, not enough to justify 20 seconds... I'd ask you to jvisualvm it and take a snapshot profile for me, but that's too much Apr 14 14:34:25 Hey pfn and Zharf Apr 14 14:34:48 yo Apr 14 14:35:43 Hey Zharf how are you Apr 14 14:36:42 as a finn I'm currently weirded out by the question Apr 14 14:36:45 ;) Apr 14 14:37:00 ok Apr 14 14:37:33 I just have prob with my gogole play developer console and no support online for 3 days. Apr 14 14:38:41 Zharf,Understand my question now:D Apr 14 14:39:39 what's your question? Apr 14 14:40:41 20cm Apr 14 14:41:16 Zharf,Will i want to setup my app in the google develper console and i want to know do i need to put a apk first or can i setup my store setting before i get the apk done? Apr 14 14:42:09 Zharf,Sorry i just new:) Apr 14 14:42:30 you can make a draft store listing without an apk, but I think that you'll need an apk before you can publish it Apr 14 14:43:10 yep, you need an APK before you can publish Apr 14 14:43:17 oh Apr 14 14:43:22 I said Apr 14 14:43:24 you can make a draft store listing without an apk, but I think that you'll need an apk before you can publish it Apr 14 14:43:39 That what i want to know:) Apr 14 14:45:11 Zharf,Cool i want to make a draft of my app before i can get my apk down. Apr 14 14:45:20 thanks for the help. Apr 14 14:50:18 Where can I find EditText's default style? Apr 14 14:52:10 styles.xml Apr 14 14:52:50 and themes.xml Apr 14 14:53:50 barq But I mean more specific stuff, as in the line's height and shit like that Apr 14 14:54:07 I also tried the minsdk 21 thing earlier today, didn't have any effect on the build times Apr 14 14:55:57 Zharf, maybe update build tools version Apr 14 14:56:17 23.0.3 isn't new enough? :) Apr 14 14:56:32 or downgrade as. the case may be Apr 14 14:56:36 :) Apr 14 14:56:40 dex shouldn't be so slow Apr 14 14:56:42 off work -> Apr 14 14:57:00 I don't understand the reason... Apr 14 14:58:37 Zharf, oh yeah dex max heap Apr 14 14:58:49 Zharf, set it to 2g Apr 14 15:01:36 Zharf, possibly try more Apr 14 15:04:49 What is the point of using any of the new libraries when apparently we should be using the appcompat library? Apr 14 15:05:20 pfn, I'll try to remember tomorrow Apr 14 15:05:40 I’m a bit conflicted over whether I should have all of my activities and stuff be the AppCompat version instead of the normal ones Apr 14 15:06:33 nothing to be conflicted over Apr 14 15:06:41 unless your app is minSdkVersion 21 Apr 14 15:07:24 Zharf, how did you setup the sbt build? sounds like you didn't use the gradle importer? Apr 14 15:07:53 (curious about the buildTypes error) Apr 14 15:08:05 pfn: Wait, that still doesn’t make any sense. So should I be using them or not? Apr 14 15:08:15 I tried to follow the gradle based instructions in your readme.md Apr 14 15:08:56 JamEngulfer, only if you're not at least minSdkVersion 21 Apr 14 15:10:00 Is there a quick way to add density folders to copying a copy of each of the images that is in the densityless /drawable folder to the other folders. lint is yelling "Found bitmap drawable ... in densityless folder" and the prospect of copying 50 seperate images to multiple different directories doesn't seem pleasant Apr 14 15:10:04 I don’t understand the significance of having minSdkVersion be 21 Apr 14 15:10:25 everything in appcompat is available in 21+ Apr 14 15:10:32 Does that exclude a large amount of potential userbase? Apr 14 15:11:03 JamEngulfer, see android platform dashboards and decide for yourself Apr 14 15:11:15 generally, I start at min 21 for new projects Apr 14 15:12:42 Oh great, so there’s 33% on KitKat, 4.4 or 19. Because it has to be even more confusing with versioning… Apr 14 15:13:08 hello :o Apr 14 15:15:27 So should I just say “screw you” to everyone on KitKat and before? Apr 14 15:17:16 where can I learn android from programmers? Apr 14 15:17:20 JamEngulfer, o.O why :< Apr 14 15:18:28 * Ping_2_Ur_Pong tries very hard not to be a curmudegeon and say something dickie Apr 14 15:18:54 Because I have no idea what versions I should be supporting. The v4 compat library version of UI exists, but there’s also seemingly identical UI elements that aren’t from the library. So why would the non-compat versions exist at all, if everyone’s just going to be expected to use the compat library Apr 14 15:19:18 * Ping_2_Ur_Pong can't help it Apr 14 15:20:02 JamEngulfer: that's a stupid question. Are you required to hold your fork in your right hand? How about should everyone be required to use Bose headphones? Apr 14 15:20:41 should always use support-v4 Apr 14 15:20:58 it has a suite of common libraries that run on api4+ Apr 14 15:20:59 but you are not required to is the point. Apr 14 15:21:01 THIS IS WHY I AM ASKING Apr 14 15:21:09 and most are not included in framework Apr 14 15:21:14 WHY should I somehow know the answer!? Apr 14 15:21:37 Why would it be a stupid question? Apr 14 15:21:40 choose what works best for you, the general rule is always use appcompat Apr 14 15:21:42 "why would the non-compat versions exist at all" <- Never thought about it. Anyone know why? Apr 14 15:21:58 pduin: because they were made before appcompat Apr 14 15:22:38 Again, the whole “choose what’s best for you” and “use your own judgement” isn’t helpful. I’m asking because I *can’t* make that judgement and I don’t *know* what’s best for me Apr 14 15:23:05 we literally just said, you should generally always use appcompat Apr 14 15:23:14 it says that in the documentation Apr 14 15:23:24 all things being equal always use appcompat Apr 14 15:23:45 Yeah, ok. It still doesn’t help that the other versions exist Apr 14 15:23:51 I can't think of any major downsides of using appcompat, except for accidentally including the wrong classes sometimes. Apr 14 15:23:55 why do you care? Apr 14 15:24:13 JamEngulfer, already told you, use min 21 and support v4 Apr 14 15:24:15 done Apr 14 15:24:16 Because I wanted to make the correct decision before writing an entire project? Apr 14 15:24:18 JamEngulfer: the only issue you ever run into, is you might auto-import the wrong version Apr 14 15:24:20 Yes, I get it Apr 14 15:24:33 JamEngulfer: seriously dude, its not that big of a thing. Apr 14 15:24:47 Yeah, but how do I know that? Apr 14 15:25:02 I have 0 prior knowlege of this. You know all about it, it’s obvious to you Apr 14 15:25:18 You shouldn't probably start with RTFM. Apr 14 15:25:31 What? Apr 14 15:26:09 So you’re saying I *shouldn’t* read the manual? Apr 14 15:26:11 JamEngulfer, this is the easiest suggestion to start: use whatever will work for your phone, grow from there Apr 14 15:26:33 http://developer.android.com/reference/packages.html <-- read the fucking manual Apr 14 15:26:50 Yeah, I know what RTFM means, you don’t have to be rude about it either Apr 14 15:26:50 should* Apr 14 15:27:02 you're going on about a silly question Apr 14 15:27:07 its quite annoying at this point Apr 14 15:27:18 Dude Apr 14 15:27:57 JamEngulfer as pfn mentioned, minSdk=21 + support (v7) which depends on v4 anyhow; appcompat is not needed and has bugs Apr 14 15:27:58 * Ping_2_Ur_Pong tried not to be a moody person today Apr 14 15:28:47 JamEngulfer but ... there are a few cases where things in the design support lib, for example, depend on a theme attribute defined in appcompat so ymmv Apr 14 15:28:52 The reason I’m here asking is because I read the documentation and it said to use v4, but nothing really explained why. So I came to ask for advice Apr 14 15:29:46 g00s: ymmv??? Apr 14 15:29:52 JamEngulfer i'd start minSdk=21 and then when done with the project, decide how far you want to go back Apr 14 15:29:56 I got advice, but I also got “that's a stupid question. Are you required to hold your fork in your right hand?” Apr 14 15:30:18 Saying that is just rude and unhelpful, especially to someone asking for help Apr 14 15:30:37 you have to have thick skin around here JamEngulfer :D Apr 14 15:30:55 you can hang out in #java for practice :D Apr 14 15:31:04 ^^ lol Apr 14 15:31:23 JamEngulfer: software engineering isn't about someone holding your hand. You are asking people to walk you through step by step. That usually never happens. Use your best judgement means take into consideration what you know and consider what's best. Apr 14 15:31:24 heyo Apr 14 15:31:30 Wat Apr 14 15:31:59 What part of answering that question involved ‘hand holding’ Apr 14 15:32:20 * Ping_2_Ur_Pong goes back to what he was doing Apr 14 15:32:29 yeah everybody take a breather Apr 14 15:32:37 next question ! Apr 14 15:32:51 wtf does ymmv mean? Apr 14 15:32:59 Your mileage may very Apr 14 15:33:00 JamEngulfer: pm me your question. Apr 14 15:33:03 ohhh Apr 14 15:33:05 Ping_2_Ur_Pong you can google that, what do you want hand holding ? Apr 14 15:33:09 XD Apr 14 15:33:18 g00s: you damn right I do! Apr 14 15:33:23 * Ping_2_Ur_Pong expects it now Apr 14 15:33:30 pay for handholding Apr 14 15:33:52 * Ping_2_Ur_Pong only has love and adjulation to pay with... Apr 14 15:34:05 and as you can tell neither are very nice... bit tainted tbh Apr 14 15:44:36 there's a support-v7? Apr 14 15:44:45 only v14 I thought Apr 14 15:51:10 hi Apr 14 15:51:43 i have a webview with link to facebook.com and twitter , how i can open facebook or twitter when link is clicked in webview? Apr 14 15:52:49 t0th_-_, set the link handler to default and it should use hte system uri handler. I don't remember the API though so you'll have to google a bit Apr 14 15:53:10 t0th_-_, (or set it to use the system handler, soemthing like that). You can set the URI handler for a webview, in any case. Apr 14 15:54:50 has anyone used Dagger at all? Apr 14 15:55:17 I have Apr 14 15:56:18 I'm running into a problem where the dagger build fails and cannot find the module components in the project Apr 14 15:58:06 by module components I mean the interface where I have defined the component annotations for the modules that provide the object to inject Apr 14 16:04:21 Is the source code for 23.3.0 RecylerView released anywhere? Apr 14 16:05:17 looking at https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/v7/recyclerview/src/android/support/v7/widget/RecyclerView.java but it doesn't match 23.3.0 Apr 14 16:08:10 harsukh, post code and errors Apr 14 16:13:45 hi guys i have a problem with mpAndroidChart, i can't resize the columns of barChart with multi dataset Apr 14 16:13:59 someone who uses mpAndroidChart can help me Apr 14 16:15:35 nuxusr i usually just decompile in AS Apr 14 16:16:37 or 'goto implementation' Apr 14 16:17:07 g00s: yeah that works fine. I can see the method going that route but was hoping to see some git history Apr 14 16:17:23 doesn't show up anywhere in a google search yet so it must not be released yet Apr 14 16:18:28 users are crashing on 23.3.0 in void assertLayoutStep(int accepted) {} but before i log a bug I was hoping to figure out more about it Apr 14 16:27:28 Anyone heard the rumors of Android moving to Swift? Apr 14 16:28:58 i did Apr 14 16:29:00 BS Apr 14 16:33:37 if it ever happened i wouldn't be able to stop laughing Apr 14 16:38:18 Hello guys, I'm having a problem trying to pass a custom ArrayList to an intent. The type of arrayList implements parcelable, and I get this: Class not found when unmarshalling. Any idea what's going on? Thanks Apr 14 16:46:16 hi Apr 14 16:49:59 i have problem Apr 14 16:50:05 https://i.imgsafe.org/2627c32.png Apr 14 16:50:50 we need more than “It broke; fix it" Apr 14 16:51:21 how can fix that? Apr 14 16:51:39 tell us what’s happening, and what should be happening, for one Apr 14 16:51:55 just dumping some code and expecting us to tell you what’s wrong is extremely rude Apr 14 16:52:07 also we can't see the error message in that screenshot Apr 14 16:57:17 i create hello project when i want export that give me this error https://i.imgsafe.org/d5f1dbf.png Apr 14 16:59:17 help me Apr 14 16:59:31 are there every body here? Apr 14 17:00:38 homa_: are you new to android development? you might want to try Android Studio instead of eclipse Apr 14 17:01:04 why ? Apr 14 17:01:20 you'll probably find more support Apr 14 17:01:41 it looks like you have resource name collisions Apr 14 17:01:58 probably two copies of the v7 support lib is my guess Apr 14 17:02:10 since your have your own copy of the source included in your project Apr 14 17:02:12 Is toolbar in the support lib or material design lib? Apr 14 17:04:34 eghdk: support Apr 14 17:04:51 v7 Apr 14 17:06:28 then i should install android studio Apr 14 17:07:08 homa_: are you trying to build a project that someone else made? probably just stick with what they made it in. If you're trying to build something new and you're just getting started then I'd start with Android Studio if I were you Apr 14 17:07:21 nuxusr: What if I don't need to target v7? Can I use a higher library? Apr 14 17:08:44 where can i learn android Apr 14 17:10:06 eghdk: It lives in v7. The higher libraries just mean that is the min version it will support Apr 14 17:10:27 nuxusr: So it doesn't live anywhere else? interesting Apr 14 17:10:37 eghdk: yep Apr 14 17:13:05 nuxusr: Is there an easy breakdown of what lib introduces what? I was convinced material design lib was the one that held toolbar. I know the support libs docs exist but they seem out of date. Apr 14 17:13:24 For example for design lib it says "design components and patterns for app developers to build upon, such as navigation drawers, floating action buttons (FAB), snackbars, and tabs." but doesn't it support new stuff like cards and stuff Apr 14 17:15:29 I just use the developer reference docs Apr 14 17:15:35 so http://developer.android.com/reference/android/support/design/widget/AppBarLayout.html Apr 14 17:15:44 anything under the design/ package will be in design Apr 14 17:16:23 or if you import them into android studio you can expand the jars to what is where Apr 14 17:18:29 hi i cannot access a file on the sdcard located at /storage/sdcard1/file.bin (4.2.2) . WRITE_EXTERNAL permission is ok ; the only weird thing that i noticed is that the ls gives me this output : d---rwxr-x system sdcard_rw 1969-12-31 13:00 sdcard1 Apr 14 17:18:41 the creattion date time is weird Apr 14 17:20:00 Anyone know how I can find out what application is receiving bluetooth commands? (ie. I hit play and normally music starts, but there is an app that seems to get stuck that hijacks the bluetooth buttons) Apr 14 17:20:25 nuxusr: Makes sense to me. Thanks for that. Apr 14 17:22:55 Hello Apr 14 17:31:07 wtf is wrong with freenode Apr 14 17:35:08 I have a LinearLayout with several children. Its a list with a heading and bullet point items Apr 14 17:35:21 well looks like a list, no listview involved Apr 14 17:35:34 can I make talkback read the whole thing as one item? Apr 14 17:36:04 are the bullet points dynamically generated? Apr 14 17:38:15 Hey, can I create ImageViews like this: http://pastebin.com/gqmpArQg ? I want the imageViews to be the different instances of the helper class to get some OOP structure Apr 14 17:38:57 i’m guessing ImageHandler is the helper class? Apr 14 17:39:53 and are the imageviews added in the layout? Apr 14 17:40:01 clear Apr 14 17:40:15 s73v3r: yes Apr 14 17:40:31 On second view, the ImageViews will probably be null there Apr 14 17:40:41 But is there a way of achieving what I'm talking about? Apr 14 17:40:47 here’s the thing: ImageHandler is not an ImageView Apr 14 17:41:32 ugh, why does AndroidSdkHandler.getSdkManager take 5 seconds... Apr 14 17:41:33 what you would probably want to do is load the imageviews from the layout, and then give them to the ImageHandler Apr 14 17:41:39 s73v3r: no it's in xml Apr 14 17:41:46 with focusable=false Apr 14 17:41:48 s73v3r: yes exactly. How do I do that? Apr 14 17:42:10 the ImageViews is added in XML yes Apr 14 17:42:15 RustyShackleford: I meant the text in the bullet points. Is that all dynamically generated, or is it static text? Apr 14 17:42:25 also static text Apr 14 17:42:33 why not just make it one big TextView? Apr 14 17:42:54 that could work i guess Apr 14 17:42:56 Bernzel_: How do you do what? Apr 14 17:43:11 except i'd have to do some rewriting unfortunately Apr 14 17:43:17 s73v3r: "what you would probably want to do is load the imageviews from the layout, and then give them to the ImageHandler" Apr 14 17:43:29 how do I "give" them to the Handler? Apr 14 17:43:43 Bernzel_: same way you’d give anything to anything. you pass it in Apr 14 17:43:56 Prefereably in the constructor, but you could also expose a setter Apr 14 17:45:26 s73v3r: "image1 = handler.get(0).getImage();" after image1 has been created from XML ? It's the only thing that pops into my mind Apr 14 17:45:39 no Apr 14 17:45:49 how much programming experience do you have? Apr 14 17:46:10 Feels like overencapsulation Apr 14 17:46:47 Bernzel_: That ImageView inside the handler is going to be null, because you never gave it an ImageView Apr 14 17:47:15 If you have the ImageViews loaded from XML, then you’re going to want to pass them in the constructor of the ImageHandler Apr 14 17:47:52 down where you have new ImageHandler(), you would change the constructor to take an ImageView as a parameter Apr 14 17:47:58 Bernzel_: Looks like you're trying to "own the seams". I would try this approach: https://gist.github.com/MarkyC/22c550bba6d2672ad20833f776d784ef Apr 14 17:48:04 s73v3r: It's the XML part that is confusing me, I haven't worked with it before. But I get what you mean now. Hold on. Apr 14 17:48:22 you need to learn that. It’s a HUGE part of Android Apr 14 17:49:00 Bernzel_: In that gist, you call it like ImageHandler.loadImage(getContext() /* or getActivity(), or this */, findViewById(R.id.myImageView), "/path/to/image"); Apr 14 17:49:02 or use a DSL where you don't have to use the xml Apr 14 17:49:24 even if you’re eventually going to do that, you still should know how the XML works under the hood Apr 14 17:50:06 anko has such a dsl Apr 14 17:51:49 hello, why onClickListner on RelativeLayout not working? Apr 14 17:52:18 is there something else I need to do to prevent talkback from selecting these bulletpoints? Apr 14 17:52:33 Does anyone know if Activity animations via overridePendingTransition is depracted or "shouldn't be used"? Just asking because I know activity transitions are a thing since like Android 5.0 and don't want to learn them if they're not used. Apr 14 17:52:39 i'm using android:focusable="false" Apr 14 17:52:56 RustyShackleford, read the accessibility docs Apr 14 17:54:25 MarkyC: Got it! Perfect, now I can atleast see a wider connection between the XML and Java part. Just one question, why would you make it static? I can't see the benefit of it Apr 14 17:54:56 Bernzel_: static = no state; state = harder to reason about Apr 14 17:55:16 Picasso is already all static, and you're owning the seam around it, so it seemed fitting Apr 14 17:55:22 Since Java doesn’t let you have free functions, the closest we can get is static Apr 14 17:56:06 Oh yes , thanks Apr 14 17:58:09 hey guys, i have this problem, when i attach handler (View.OnClickListener) to a RelativeLayout, this is not called on Click Apr 14 17:58:21 someone know the reason? Apr 14 17:59:53 * MarkyC looks into his crystal ball Apr 14 18:00:09 SuperStep: post code please Apr 14 18:00:32 post your XML with the RelativeLayout, too Apr 14 18:00:36 ok one mom i paste it Apr 14 18:00:53 did you set the attribute in the XML to make that RelativeLayout touchable? Apr 14 18:01:52 is it possible to test ADA in the emulator? Apr 14 18:01:56 er, accessibility? Apr 14 18:02:09 deploying to a device on my work computer is a big hassle Apr 14 18:03:17 ok so Apr 14 18:03:25 this is the xml: http://pastebin.com/4gxtHjnW Apr 14 18:03:35 this is the java: http://pastebin.com/ehwjiSSE Apr 14 18:04:31 somewhere i do TheElement.imageButton.setOnClickListener(...) and not is called Apr 14 18:07:37 ok im stupid Apr 14 18:08:04 i set handler on class Apr 14 18:10:25 D: Apr 14 18:14:05 So everything after finish() is called in an activity gets run? What about async stuff Apr 14 18:19:30 I have a class that subclasses ViewGroup and maintains the state of two views. When I swap it out with the image placeholder view I was using before, it simply refuses to display and I'm not sure exactly why. Here's my code: http://mysticpaste.com/view/8GrwiNVbVQ;jsessionid=nzae2n9f0i21dj7stabcmk4q?2 Apr 14 18:26:32 Ok, I run an async network task after an actiivty is finished, and get the result via eventbus, but I unsubscribe from the bus when activity is destroyed, so I never get the result... Apr 14 18:26:34 Hmm Apr 14 18:26:56 I guess I could run the task in a backgrond thread, do it synchronously, then just handle the result in the background thread also Apr 14 18:31:37 you missed the key part of your problem: The activity is finished Apr 14 18:31:46 Yes s73v3r Apr 14 18:32:00 you’re not going to be able to get the result if the activity is finished. Apr 14 18:32:14 Thats why I need to move it to a background thread task Apr 14 18:32:28 and how is the finished activity going to get the result then? Apr 14 18:32:40 The finished activity doesnt actually need the result Apr 14 18:32:48 I just need to use the result to alter the local DB Apr 14 18:33:12 Situation: Im backing something up, if it successfully backs up, ok, but if it doesnt, I add it to a local queue Apr 14 18:34:12 That make sense s73v3r ? Apr 14 18:34:29 it does, i guess Apr 14 18:34:46 Cool Apr 14 18:35:08 Prob gonna use a runnable Apr 14 18:35:25 or an IntentService. Apr 14 18:35:37 What would be the dif? Apr 14 18:35:39 might be better that way, cause then you don’t have to hold on to the activity Apr 14 18:36:12 Yeah thats true, but I static runnable inner class would not hold onto the activity either Apr 14 18:36:15 a* Apr 14 18:36:28 but then it’s not reusable Apr 14 18:36:43 True ok yeah Apr 14 18:36:53 IntentService runs in background right? Apr 14 18:37:11 yes Apr 14 18:37:17 Hmm, cool Apr 14 18:38:09 Thanks s73v3r Apr 14 19:01:58 Isn't a Captalize method in TextUtil class ? Apr 14 19:13:50 wviana: String.toUppercase() ? or something like that Apr 14 19:14:45 toUpperCase does the whole string, not capitalization Apr 14 19:21:22 pfn: So is there something already in Android Lib to do it? Or should I write a method to id, or use Apache String Utils ? Apr 14 19:22:09 look in textutil Apr 14 19:29:47 hi Apr 14 19:30:06 can i create a link inside my webiew to open a share dialog of android? Apr 14 19:37:37 Hi guys! I have rather a fundamental question about Services... Since by default sevices run on th main thread, in the most cases we either use IntentService or create some worker thread(s) manually in th Service to not block the UI. My question is when it might be in handy to NOT run Service's stuff in a separate thread and rather use it with its default behavior? Apr 14 19:38:37 can i create a link inside my webiew to open a share dialog of android? Apr 14 19:41:58 AlexBerdnikov: when you expect it not to block Apr 14 19:42:19 AlexBerdnikov: Well an IntentService is just a subclass of Service. An IntentService is capable of stopping itself, whereas a Service needs to manually be stopped. To directly answer your question, theres not alot of reasons to purposely block ur ui thread Apr 14 19:42:20 AlexBerdnikov: that's not very often, but if you're just keeping simple state Apr 14 19:43:18 http://hyperboleandahalf.blogspot.fi/2010/04/alot-is-better-than-you-at-everything.html \o/ Apr 14 19:43:57 AlexBerdnikov: in a sense the same rules as in an activity apply, only the lifecycle is different Apr 14 19:44:13 I mean, you don't run every single thing in an activity in an asynctask either Apr 14 19:45:08 activity is kinda different because things are directly triggered by the user through touchlisteners Apr 14 19:45:18 services generally have no ui Apr 14 19:45:31 Thats not what he meant Apr 14 19:46:40 I just recieved "Clamp target GC heap from 131MB to 128MB" when taking a photo from the gallery and putting it on the screen. Might this be caused by the image being to large for the heap to handle? Apr 14 19:47:14 Bernzel_, did you get oom? Apr 14 19:47:32 Zharf: nope Apr 14 19:47:35 just that message Apr 14 19:53:40 Bernzel_, well, I'd be concerned Apr 14 19:54:03 Bernzel_, http://developer.android.com/training/displaying-bitmaps/index.html did you follow that Apr 14 19:59:24 from what i understand, the improved adb protocol is only available for new emus, is that correct ? Apr 14 20:05:56 If I do an ndk-build with experimental gradle 0.6.0-alpha1 I get the error: Gradle version 2.9 is required. Current version is 2.8. However on http://tools.android.com/tech-docs/new-build-system/gradle-experimental it says 0.6.0-alpha1 requires 2.8?! Apr 14 20:07:39 then obviously, it's wrong Apr 14 20:10:04 Zharf: It's ought to be bitmap related atleast? Apr 14 20:10:05 also ndk-build on gradle experimenal? Apr 14 20:10:07 Does not compute. Apr 14 20:10:38 It does for me Apr 14 20:11:00 can i create a link inside my webiew to open a share dialog of android? Apr 14 20:14:55 Mavrik: How do you build ndk projects? Apr 14 20:29:49 barq with his bare hands! Apr 14 20:31:11 hi there, how can i distribute 3 buttons next to each other evenly? so they have same distance left and right? Apr 14 20:32:55 sponge-tmp http://cyrilmottier.com/2014/11/17/grid-spacing-on-android/ Apr 14 20:33:41 g00s_: thx, will read Apr 14 20:36:06 AS 2 is not autocompleting anything in XML on the root node of the file Apr 14 21:21:40 do you know if I can install talkback on an android emulator? Apr 14 21:22:32 RustyShackleford, probably need google API for that Apr 14 21:22:40 and I tried it, it got annoying real fast Apr 14 21:22:53 like to the point that I had hard time switching it off Apr 14 21:22:54 ... Apr 14 21:23:34 the google-api image Apr 14 21:25:48 I do have the google api image Apr 14 21:26:10 well with my work computer, I have to create a build, upload to a build site, download it onto a device and install Apr 14 21:26:16 very annoying compile cycle Apr 14 21:29:47 why can’t you just plug the device into the computer? Apr 14 21:54:36 Hi guys, i just finished my app, test it in debug mode and works perfect, but in release mode crash just a few seconds started Apr 14 21:54:52 check the logs Apr 14 21:55:01 miapp.iu.onCreateView(Unknown Source) Apr 14 21:55:18 but that class iu i dont recognize it from my app Apr 14 21:55:33 do you have ProGuard on? Apr 14 21:55:42 yes Apr 14 21:57:02 do i have to turn off ProGuard? Apr 14 21:58:19 no, but the reason you don’t recognize the class is because ProGuard minified it Apr 14 21:58:37 there is a way to translate back into your actual names, but I forget what it is Apr 14 21:59:26 you map it using a txt file thats generated Apr 14 21:59:40 anyways, it’s possible that one of the classes/methods you needed was being stripped by ProGuard Apr 14 22:00:06 I'm trying to test ada by using the emulator's dpad Apr 14 22:00:14 is there a way to highlight the UI item that is selected? Apr 14 22:00:14 the txt is generated automatically Apr 14 22:00:17 ? Apr 14 22:00:21 orbyt Apr 14 22:00:45 ? Apr 14 22:01:00 yes, but what you need to do is just exclude all your projects files from proguard Apr 14 22:02:06 done Apr 14 22:02:15 what now? Apr 14 22:02:34 you could try running it ;) Apr 14 22:04:01 runs fine Apr 14 22:04:14 and now how can i make it work with proguard Apr 14 22:06:23 With MVP and RecyclerView clicks, do I want to send the click to my presenter, and the presenter then does whatever it needs to, even if it is sendind back to the activity that an item was clicked? Apr 14 22:06:55 seems like that's the smart move Apr 14 22:09:04 your activity shouldnt be handling the clicks Apr 14 22:09:24 well, let me rephrase that, it should receive the clicks and simply pass them to the presenter Apr 14 22:21:12 ok. cool Apr 14 22:21:14 What do you mean orbyt_ Apr 14 22:21:30 Oh, didnt see prior convo Apr 14 22:21:56 orbyt_: In my presenter, I have this function that my activity calls when Submit is clicked: public void doLogin(@NonNull CharSequence username, @NonNull CharSequence password) Apr 14 22:22:15 orbyt_: Should I pass in username/password, or should my Activity have getUsername()/getPassword() Apr 14 22:23:09 Activity really being an interface describing Activity Apr 14 22:25:50 And finally, doLogin() should have the view close the keyboard if it is open, should my presenter call closeKeyboard() on the activity? -- essentially this amounts to asking, "should all logic be refactored into the presenter" Apr 14 22:26:38 Im just wondering explodes .. what are you doing? Apr 14 22:26:44 practicing MVP Apr 14 22:27:00 I always though the activity is the presenter Apr 14 22:27:55 explodes: Yes, all logic is taken out of the view (in this case your activity). Apr 14 22:28:05 ok cool Apr 14 22:28:08 I like that idea... how is it set up? Apr 14 22:28:48 Hows what setup? Mvp? Apr 14 22:28:53 Yep Apr 14 22:28:58 If I wanna take logic out of my activity Apr 14 22:30:06 Theres tons of good tutorials that go over the concepts. Personally I like using a library such as Nucleus/Mosby instead of rolling my own. Apr 14 22:30:36 Interesting Apr 14 22:32:02 Yea, I'm just practicing right now- I agree that libraries will be great but I like the practice I'm getting Apr 14 22:32:14 How are you setting it up explodes Apr 14 22:32:17 Which one is better for you, Nucleus or Mosby? Apr 14 22:32:42 Mmm, I can share with you the repo I have Apr 14 22:32:48 I'll be glad to explain it Apr 14 22:32:54 But I want to make these changes first Apr 14 22:34:05 explodes: can I give you my email Apr 14 22:34:28 explodes: There fairly different, but I would recommend a decent familiarity with RxJava when trying Nucleus. Currently using Mosby tho. Apr 14 22:35:28 drose379: I'm connected to IRC 24/7 Apr 14 22:35:37 Sounds good Apr 14 22:35:47 (raspberry pi running weechat! I just jack in with ssh from anywhere in the world) Apr 14 22:36:01 hahah awesome Apr 14 22:40:17 Rewriting an app...It plays a sound for 25 min, with a progress bar, then breaks for 5 mins, then plays the sounds for another 25 mins, etc... Apr 14 22:40:21 so we're using multiple resource sourcesets in this project Apr 14 22:40:43 res/layout/directoryName/layouts Apr 14 22:40:54 res/values/directoryName/values Apr 14 22:40:57 and so on Apr 14 22:41:05 Currently, I have CountDownTimer that after 25 mins, calls another Timer for 5 mins, which itself calls the previous Timer. Apr 14 22:41:12 There a better way? Apr 14 22:41:22 And RustyShackleford thanks for slicing my question -.- Apr 14 22:41:24 when I edit something in xml, android tools don't detect the changed files in an incremental build Apr 14 22:41:36 you snooze you loose :p Apr 14 22:41:53 lol Apr 14 22:42:20 I think alarms are preferable to timers Apr 14 22:42:37 Doing a pomodoro app orbyt_ ? Apr 14 22:42:48 NoirAvlaa: Unfortunately no Apr 14 22:44:21 RustyShackleford: I'm assuming you mean an AlarmManager? I need to update a progress bar while the sound is playing with the time left Apr 14 22:44:47 if I want to get resources from my project through mock, how do I do so? Or is there another way to go about this. I am trying to write unit tests and I seem to be hitting a wall where context is highly needed and can't test anything without providing it. Apr 14 22:45:42 * Ping_2_Ur_Pong has just hit the wall on understanding why MVC is shit for testing on Android. Apr 14 22:46:28 * Ping_2_Ur_Pong wonders how he never saw it before. Apr 14 22:47:48 orbyt_: gotcha. It was a shot in the dark Apr 14 22:48:08 try rxjava haha. I saw a timer example on youtube Apr 14 22:48:11 RustyShackleford: Yea I dont see a way to get the remaining time using it Apr 14 22:48:36 RustyShackleford: yea ill look into it Apr 14 22:49:33 if you don't already use rx, its probably easier to do it a different way Apr 14 22:50:09 RustyShackleford: No I do, I just didn't really consider it an option for this Apr 14 22:51:51 thoughts on mockito? Apr 14 22:51:53 hey guys, I'm having some trouble unmarshalling parcelables from an intent, could anyone help me? Apr 14 22:54:22 orbyt_: sorta of a hack I think. But I think it would work well for keeping track of time remaining Apr 14 22:54:58 orbyt_: would you say your question again, I missed it and am trying to understand context. Apr 14 22:56:01 Ping_2_Ur_Pong: Basically im rewriting an app that plays a sound for 25 mins, with a progress bar thats shows the time remaining, then after the 25 mins it takes a 5 min break, then does 25 mins again. Apr 14 22:56:29 I was using a 2 CountDownTimers that start each other when the previous finished, but its buggy and feels hacky. Apr 14 22:57:07 hmm.. Apr 14 22:58:13 first thing that pops into my head when I read that is thread and onpostdelayed Apr 14 22:58:25 haven't thought through how good or bad that would be yet. Apr 14 23:00:11 Hmm, not sure if that would work, as I need the remaining time to update the bar Apr 14 23:00:26 woo joined the right channel on the first try Apr 14 23:00:41 is there a tool I can use to edit my app's SharedPreferences somehow Apr 14 23:01:30 remainingTime = totalTime - timeElapsed; Apr 14 23:01:47 drose379: check PM Apr 14 23:02:01 ohh yea, can't touch the other thread from your thread. hmm... Apr 14 23:02:08 main thread* Apr 14 23:02:19 runOnUiThread Apr 14 23:02:34 that's what I was looking for Apr 14 23:02:36 but regardless, would rather hack away with CountDownTimer than use a bunch of handlers Apr 14 23:02:53 hmm... Apr 14 23:16:14 orbyt_: no matter how you do it, you'll need a way to update your progress bar from time to time Apr 14 23:16:30 I currently update it every second Apr 14 23:16:46 A HandlerThread could solve all of your problems in a very clean way Apr 14 23:17:00 Not sure if you're worried about saving/restoring state, but it could be done, too Apr 14 23:17:17 Though I've never restored HandlerThread state like this before Apr 14 23:17:46 http://tools.android.com/recent/androidstudio21beta2available Apr 14 23:34:30 http://dpaste.com/3TSTCT1 What can I do to align the first TextView down the middle of the screen. Apr 14 23:34:51 If I put layout_height = match_parent it hides the graph Apr 14 23:36:03 layout_gravity="center" Apr 14 23:36:15 What would you guys recommend using for Unit Testing? Mockito? Apr 14 23:36:56 markyosullivan: I am running into that right now, for now Instrumentation test JUNIT4 works perfects, its when you need application resources that it becomes more complicated Apr 14 23:38:14 private static final int PROGRESS = 0x1; Apr 14 23:38:25 ugh... what's that do? Apr 14 23:38:42 Ping_2_Ur_Pong, It aligns it horizontally i tried center_vertical but same thing Apr 14 23:38:47 something else I need to change Apr 14 23:39:06 Ping_2_Ur_Pong: what you mean application resources? I was recommended to use Mockito but I've no real experience of Unit Testing Apr 14 23:41:02 neredsenvy: your xml says your linearlayout's orientation is vertical, which would cause layout_gravity=center to center align your view inside its parent Apr 14 23:41:24 neredsenvy: try gravity on your linearlayout and set it to center Apr 14 23:42:51 I removed layout_gravity="centre" from TextView and put it in LinearLayout however same thing Apr 14 23:42:54 markyosullivan: do you need resources in your application, images, strings, dimens, what about anything that comes from context. All that is essentially android becomes a PITA to test, you can do normal tests on Java logic straight forward with JUNIT, but to test android specifics you have to jump through a couple hoops and spin around and say you love android. Apr 14 23:43:33 neredsenvy: I didn't say put layout_gravity in your linearlayout, I said gravity Apr 14 23:44:21 sec ill try it Apr 14 23:44:47 xD it aligned horizontally Apr 14 23:45:04 ill try center_vertical Apr 14 23:45:29 nope that just moved it to the left : // Apr 14 23:45:31 god, wtf has google done in builder 2.0.0, it takes like 5-10 seconds to initiate the sdk manager now... Apr 14 23:46:09 Ping_2_Ur_Pong: I think my entire app is using Android resources of some sort. I'm looking at the docs atm, says this: "Android Instrumentation Tests and Unit Tests", so under the androidTest folder, that isn't Unit Tests? Apr 14 23:46:28 correct Apr 14 23:46:38 instead of androidTest it will be test Apr 14 23:46:55 markyosullivan: article I am reading right now. http://martinfowler.com/articles/mocksArentStubs.html Apr 14 23:46:56 but in test you will not have access to anything android (including Log.d) Apr 14 23:48:31 explodes: So essentially I'm sticking to androidTest because I'm using Android resources? Apr 14 23:48:37 Ping_2_Ur_Pong: Thanks for the link Apr 14 23:48:51 markyosullivan: likely. Apr 14 23:49:14 markyosullivan: but yes, if you want to use those resources, you'll need to use androidTests Apr 14 23:55:21 Okay, thanks explodes! Is Instrumented tests which are ran within the androidTest folder, are they considered Unit Tests still because small units are created and individually tested? Apr 14 23:57:11 They're InstrumentationTests Apr 14 23:57:21 UnitTests are even smaller Apr 14 23:57:52 The Instrumentation part means that it requires some kind of emulation or device support Apr 14 23:57:56 (I think) Apr 14 23:59:15 Any decent books on Android Unit testing btw? Something I should really be doing but aren't atm (I imagine like most Android devs) Apr 15 00:00:51 explodes: Ah, so because it uses Android resources it needs an emulator or device? Makes sense! For some reason, I can run ApplicationTest but can't run ExampleUnitTest. It's not giving me an option to run it, is there any libraries which need to be installed to get it up and running? Apr 15 00:01:01 Can anyone recommend a good read on learning how to work with graphs algorithmically? Apr 15 00:01:21 markyosullivan: paste ExampleUnitTest.java Apr 15 00:01:35 NoirAvlaa: I'm only doing it for my University project but if it's worthwhile I might try and start doing it for future projects Apr 15 00:01:47 explodes: How you want me to paste it? Gist? Apr 15 00:01:51 explodes all types, chart, pie, bar etc? or just a small subsection? Apr 15 00:03:33 Hello everyone Apr 15 00:04:19 Vertex/Edge graphs, iteration, recursion, and simplification Apr 15 00:04:30 markyosullivan: pastebin please Apr 15 00:04:36 Guys, can you explain how Android Studio 2.0 became so slow with building? Apr 15 00:05:04 loredan13: the first build will be slower, the subsequent builds will be faster Apr 15 00:05:11 if you clean, you'll get a slow build Apr 15 00:05:13 explodes: http://pastebin.com/Uthkz5wa Apr 15 00:05:32 The same project 1.4 assembled in a couple of minutes, 2.0 gives 30 minutes Apr 15 00:05:42 explodes: Was looking at this - https://codelabs.developers.google.com/codelabs/android-testing/#0 Apr 15 00:05:50 Not much help as it's using MVP which I haven't used in my app Apr 15 00:06:13 Its ok Apr 15 00:06:34 You'll need to specify a test runner on your testcase if you're using Junit4 in androidTest Apr 15 00:06:43 Junit3 is the default Apr 15 00:06:47 It's easy Apr 15 00:06:48 explodes sedgewick has a book on graph , i think its Volume 2 Apr 15 00:06:53 Let me get some tools markyosullivan Apr 15 00:08:47 markyosullivan: also, that test can be a unit test. Apr 15 00:09:02 markyosullivan: but for the sake of getting it working in android tests, let me help you get started Apr 15 00:09:23 markyosullivan: I wish someone helped me with this stuff, it was a pain. but now it is working. Apr 15 00:09:59 explodes: I think what I need is both Unit Tests and Instrumentated Tests, if I have a couple of each I'm sure my Uni will be happy (at least I hope) Apr 15 00:11:09 markyosullivan: here's the changes you need to make to your androidTests, build.gradle, and Run Configuration: http://pastebin.com/dcwxciS1 Apr 15 00:12:18 explodes: Just realised that there's build variants on the left hand side of AS, switched that and ExampleUnitTest is available for me to run Apr 15 00:15:25 explodes: Where do you specify in the configuration to use android.support.test.runner.AndroidJUnit4 as the test runner? Apr 15 00:16:16 under defaultConfig Apr 15 00:17:20 I forgot when AS added the ability to have both tests and androidTests active, but that will be important Apr 15 00:18:26 What version of AS added that? Apr 15 00:18:33 I'm still rocking 1.5 atm Apr 15 00:20:36 I think it's a 2.0 thing Apr 15 00:22:02 It's 7 days until project submission, not going to upgrade incase something goes wrong, would be my worst nightmare Apr 15 00:22:15 so I'll upgrade once I hand in this project and then see what's new :) Apr 15 00:22:21 Cool! Apr 15 00:24:27 explodes: You sure you haven't installed a library other than what was in the pastebin? It's not recognising the AndroidJUnit4 class Apr 15 00:24:37 'Cannot resolve symbol' Apr 15 00:25:39 oh Apr 15 00:26:15 What version of the android support library are you using? Apr 15 00:26:44 add these deps: http://pastebin.com/HHFC3RD9 Apr 15 00:27:03 If you get something like a version mismatch error or something, let me know. Apr 15 00:27:29 compile 'com.android.support:support-v4:23.1.1' Apr 15 00:27:51 Got that in atm but I'm pretty sure I changed my code around and don't need it, not using v4 classes any more Apr 15 00:29:00 explodes: Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.3.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details Apr 15 00:30:24 Yea nice Apr 15 00:30:42 Ok add this line: androidTestCompile 'com.android.support:support-v4:23.1.1' Apr 15 00:30:51 That should solve it Apr 15 00:32:58 Who's got 2 thumbs and is a pastebin pro user now? This guy Apr 15 00:33:13 explodes: fan of Silicon Valley? :D Apr 15 00:33:21 Still getting that error message, weird Apr 15 00:33:33 of course! Apr 15 00:33:43 oh whoops Apr 15 00:33:51 androidTestCompile 'com.android.support:support-v4:23.3.0' Apr 15 00:34:08 you're overriding the dependency in one of the other androidTestCompile dependencies Apr 15 00:34:26 you need the regular compile dependency version to match with androidTestCompile Apr 15 00:34:49 Alright man, I should do something more than sit on IRC all day Apr 15 00:35:06 Gonna bounce. If you want, you can leave a /query and I'll get back to you later Apr 15 00:35:13 good luck! Apr 15 00:35:18 explodes: yeah that's it, thanks! Apr 15 00:50:09 Anyone use MVP architechture in their applications? Apr 15 00:56:54 I did once Apr 15 00:56:59 still waiting to see if it pays off Apr 15 00:57:22 Trying to see if I understand it Apr 15 00:57:28 So the Activity is the view Apr 15 00:57:33 missingno: do you test...? Apr 15 00:57:52 Then you have the presenter with interacts with the view and the model Apr 15 00:57:57 Model class has all the logic? Apr 15 00:57:59 on occasion Apr 15 00:58:00 http://i.imgur.com/y7Hm9.jpg Apr 15 00:58:24 fat models is one way to do it drose379 Apr 15 00:58:30 lol Apr 15 00:58:35 What do you mean missingno Apr 15 00:58:36 drose379: Read this: http://hannesdorfmann.com/mosby/mvp/ Apr 15 00:58:37 although I stuck most of my logic in the presenter Apr 15 00:58:53 Inst logic in the model though Apr 15 00:59:34 also: https://vimeo.com/43612849 Apr 15 00:59:52 not mvp^ specifically but alot of good tips. Apr 15 01:00:14 I have an app built, but seeing mvp makes me want to try it out Apr 15 01:00:23 My current build doesnt really follow a solid structure Apr 15 01:01:24 orbyt_: I have a question though, you have to pass an instance of the Activity to the presenter class right? Apr 15 01:06:14 drose379: Yea you can have an interface that the view implements and then pass that to the presenter when creating your presenter Apr 15 01:06:37 Those links I gave you go over just about everything Apr 15 01:06:42 Ok but what if the activity ends though, wont there be a memory leak because the presenter still exists and holds reference to the Activity Apr 15 01:09:05 Does that make sense orbyt_ Apr 15 01:10:15 drose379: Yes. I'm not sure how you would handle it rolling your own implementation, which is why I prefer using a lib for this, as its all extracted away. Apr 15 01:10:42 abstracted* Apr 15 01:10:43 orbyt_: I guess you could do presenter.view = null in onDestroy or something Apr 15 01:11:00 That way it doesnt reference the activity anymore, no leak Apr 15 01:12:42 Pretty much a subscribe/unsubscribe from the presenter type of thing Apr 15 01:13:15 brb Apr 15 01:14:42 Would that make sense orbyt_ Apr 15 01:16:52 Not really, no. The guy who made Nucleus made a few comments about this subject. I'm not sure how its handled internally but usually the Presenter is kept alive. Apr 15 01:17:56 Hmm well it would stay alive, just not hold reference to the dead activity anymore Apr 15 01:18:38 I would assume so. Apr 15 01:19:02 Might try it, would take all the ugly logic out of my view Apr 15 01:19:45 So each activity would get its own package? With components needed Apr 15 01:19:50 Model, Presenter, Interface Apr 15 01:20:13 I package by feature, so usually ya Apr 15 01:20:43 is a typical recyclerview with an array of data, an adapter, some viewholder etc.. MVP-like? Apr 15 01:20:53 Hmm, thinks this is worth implementing in an existing project? Apr 15 01:29:10 I think its worth a shot Apr 15 01:30:16 I am confused. I could have sworn that my InstrumentationTestCase in the unit test suite ran correctly yesterday and had failing tests. But it seems that the tests all "run", but they all pass without actually being executed. Apr 15 01:31:40 how do I get access (or is it even possible) to get access to a context or resources in an android unit test? Apr 15 02:01:40 Anyone got any good resources for Unit Testing in Android Apr 15 02:01:56 Feel like the Unit Tests I'm writing are pretty pointless Apr 15 02:04:59 they generally are Apr 15 02:06:37 pfn you use mvp? Apr 15 02:08:03 no Apr 15 02:09:02 Why? Apr 15 02:09:18 Seems like seperating business logic from the view is a great idea Apr 15 02:09:30 because there's no reason to specifically call it such Apr 15 02:09:44 Hmm what do you mean Apr 15 02:10:03 modularize logic, done Apr 15 02:10:30 logic in the view? Apr 15 02:10:40 put it wherever makes sense Apr 15 02:10:57 MVP makes sense no? Apr 15 02:11:12 don't know, not worth seeing what it's about Apr 15 02:11:20 Alright Apr 15 02:12:37 meh, looks like Windows 10 took away the ability to treat it as an a2dp sink **** ENDING LOGGING AT Fri Apr 15 02:59:58 2016