**** BEGIN LOGGING AT Sat Apr 25 02:59:59 2015 Apr 25 03:00:41 Guess I'll ask here. I'm trying to get inter app communication working, but bindService returns false, and onBind never gets called. I'm working in eclipse. Any ideas? Apr 25 03:00:41 you need to be identified to join the dev channel iirc Apr 25 03:00:55 sorry about the copy-paste trash Apr 25 03:09:34 meh, i wish i didn't have to pay another $25 to xfer app from 1 account to the other :( now i have 2 developer accounts Apr 25 03:13:36 soooo this channel is pretty dead. Is there a better one? Apr 25 03:14:24 ravenreborn: #android? Apr 25 03:14:33 V_V k Apr 25 03:14:58 its friday evening, so yeah it gets quiet for the weekend Apr 25 03:15:10 ravenreborn: or maybe ask in #java debugging advice Apr 25 03:15:56 for debugging advice* Apr 25 03:16:33 <_genuser_> g00s: are you implying that nerds party too? Apr 25 03:17:09 everybody needs a break from fighting against android all week :) Apr 25 03:18:08 <_genuser_> heh. I'm also taking a little break and testin gout my new mxl v250 mic that I just bought Apr 25 03:18:39 <_genuser_> so much better than the 910 that I have. Well not better, better suited for recording acoustic Apr 25 03:19:33 not familiar with that one, actually haven't played in a while. i miked my amps with sm57s Apr 25 03:19:43 but those were boogie cabs Apr 25 03:20:55 my 12 string i just put through a bbe482 and that went into the mixer Apr 25 03:21:33 maybe through some TC stuff if i wanted some reverb/chorus Apr 25 03:22:36 _genuser_ are you using a compressor ? Apr 25 03:23:58 i basically sold all my rack gear as i was convinced it was all going to wind up as an iPad app eventually Apr 25 03:31:58 widgets are hard Apr 25 03:32:22 I just want to update it every 15 seconds or so Apr 25 03:33:32 alarmManager.setInexactRepeating(AlarmManager.RTC, System.currentTimeMillis(), context.getResources().getInteger(R.integer.widget_update_period_millis), pendingIntent); Apr 25 03:33:38 that alarm never seems to fire... Apr 25 03:34:46 R.integer.widget_update_period_millis = 5000 Apr 25 03:35:20 make sure your pending intent is unique Apr 25 03:35:45 what exactly makes it unique? Apr 25 03:35:52 google pending intent unique Apr 25 03:36:00 you add like the hash of the uri or something Apr 25 03:38:40 <_genuser_> g00s: oooh bbe? shmancy! I just plug it into an m-audio interface. Apr 25 03:38:57 <_genuser_> g00s: I used to have an ART tube preamp but it burnt out and I haven't bought another. Apr 25 03:39:35 <_genuser_> the rack stuff is hard to collect unless you have a studio with dedicated space and you can keep it up to date. AND you use it. Apr 25 03:39:57 <_genuser_> I've heard guitarists ditching pedals and going with racks, but that sounds overly complicated in being dynamic. Apr 25 03:40:25 Can ok http make a put request? Apr 25 03:42:00 pretty sure the pending intent is unique... Apr 25 03:42:04 Intent intent = new Intent(context, OneHourWidget.class).setAction(OneHourWidget.ACTION_ONE_HOUR_UPDATE); Apr 25 03:42:04 return PendingIntent.getBroadcast(context, alarm.getWidgetId(), intent, PendingIntent.FLAG_UPDATE_CURRENT); Apr 25 03:45:08 _genuser_ long time ago, i worked for ART. Apr 25 03:45:44 <_genuser_> g00s: :) so tell me what you think of the ART tube preamp. I read you can replace the tube and it should give some decent tube affect. Apr 25 03:46:09 it was long looong ago, when they were still making digital effects. i think they just basically gave up Apr 25 03:46:47 at that time their main competitor was alesis Apr 25 03:46:53 <_genuser_> I haven't ever owned a tube amp and I hear all teh guitarists rave about them. problem is you have to let one breathe and crank it up. Apr 25 03:46:59 <_genuser_> you can't do that when you live in a house with others. Apr 25 03:47:42 <_genuser_> plus you need silence, glitch free electric circuit, and tons of patience for mic'ing those. So I've moved DI'ing. Apr 25 03:48:01 <_genuser_> either DI it, or record clean and amplitube or some such it. I have some free marshal plugins. Apr 25 03:48:22 <_genuser_> but mostly, I"ve just moved to doing electronic music. And some pop stuff here and there where guitar tone won't matter. Apr 25 03:51:12 yeah, its all a pita Apr 25 03:51:38 <_genuser_> I mean you question your interest in music when other guitarists do all this and you sit back and say it's a lot of work. Apr 25 03:52:02 <_genuser_> but I think I'm over it. I enjoy both, so I mostly do electronic. But I do enjoy recording the acoustic and playing it. Apr 25 03:52:20 getting that tone you want on guitar is so elusive, yeah Apr 25 03:52:24 <_genuser_> altho, I play it like 6months nonstop and then drop it for 6mo doing hardcore coding, moving watching, etc. etc. Apr 25 03:52:50 <_genuser_> g00s: oh yeah, getting that rectifier sound or something on a solid state amp crank all teh way up to..... 1 doesn't cut it Apr 25 03:53:28 yeah i had a boogie single rectifier Apr 25 03:53:38 <_genuser_> I've really liked most of the signal processors, amp simulators, all in one units. digitech RP series, or the boss ones. Apr 25 03:54:15 <_genuser_> so I might drop 500 on some floor unit and just use that for recordings too. :) that is if I ever try to record more hardrock, etc. Apr 25 03:56:21 So then no for non root Apr 25 03:56:46 _genuser_ i'd probably wind up getting some line6 these days heh Apr 25 03:57:09 <_genuser_> g00s: yeah, I like those. small compact, combo amp, just sit there and jam out. Apr 25 03:57:42 <_genuser_> I did look into getting a 1W (maybe 5W) tube amp head and letting it really warm up and crank it to 10. And then line-out it to mixing console. Apr 25 04:00:01 I've been doing android apps for a few years now but never UI work. Now I need to do UI work :) I know how everything works but I am just ot familiar with what the best practices are Apr 25 04:00:13 I'd imagine it being something like css where you describe the layout in layout xml files Apr 25 04:00:18 then use styles to style them Apr 25 04:00:25 but I haven't seen apps take this approach Apr 25 04:00:55 <_genuser_> most app use this approach. some devs actually generate a view programmatically. Apr 25 04:00:55 anyone know of a really good sample app Apr 25 04:01:07 is it better to generate it programatically? Apr 25 04:01:25 just worried my first attempt at UI is going to look like a novice Apr 25 04:01:27 i'd rather work on content provider than UI stuff :D Apr 25 04:01:34 <_genuser_> keeping your layout in xml has one immediate advantage and that is that you can see the layout in design view before running it. Apr 25 04:01:39 g00s: yeah that's what I've been doing Apr 25 04:01:49 g00s: a lot of component, system type work Apr 25 04:02:21 in the sample apps, I see a lot of people use hardcoded integer values for margins/padding, etc. but I thought this was bad practice Apr 25 04:04:08 sleepster yeah do as much in xml as you can Apr 25 04:04:58 sleepster also read http://blog.danlew.net/2014/11/19/styles-on-android/ Apr 25 04:05:17 one question I had is that I notice in layouts, people use RelativeLayout, LinearLayout, etc. but then occasionally, there is a custom packagename someone puts in there like "com.something.SomeView" Apr 25 04:05:35 if that is the case, then that mean the packagename for LinearLayout, RelativelyLayout, etc. must be implicity Apr 25 04:05:37 implicit Apr 25 04:06:06 ex. https://github.com/emdete/tabulae/blob/master/src/main/res/layout/downloaderactivity.xml Apr 25 04:06:23 there is a project that specifies a custom view Apr 25 04:06:43 org.pyneo.maps.view.MapView is a custom class Apr 25 04:06:58 correct, that probably extends View Apr 25 04:06:59 custom view Apr 25 04:07:04 yeah Apr 25 04:07:25 <_genuser_> so needless to say neither of you have worked with gridview much then... Apr 25 04:07:48 no , sorry I haven't Apr 25 04:11:33 why did I wait so long to start using picasso, this is amazing Apr 25 04:12:03 <_genuser_> lol dingleberry Apr 25 04:12:47 hello Apr 25 04:13:16 is there some way to change the remote URL of a github repo tied to a project in android studio? Apr 25 04:14:42 hephaestus_rg: i would hope .git/config, but that's a guess Apr 25 04:15:26 yeah if it was a normal thing, i'd just do it from the CLI Apr 25 04:15:37 but i'm not sure what kind of magic android studio has Apr 25 04:15:42 that would break if i did that Apr 25 04:25:50 ok i guess doing it in the CLI didn't break anything Apr 25 04:25:52 :D Apr 25 04:31:24 anyone have suggestions for a lightweight parser library (lighter weight than antlr) .. that will work on android, something allong the lines of parboiled Apr 25 04:33:39 :'( Apr 25 04:34:10 g00s: Why not just generate it with antlr and include that source in your app? Apr 25 04:34:29 CedricBeust still requires tha antlr runtime though right ? Apr 25 04:34:34 g00s: intellij has one, but it's geared towards language plugins for IDEA. I'm not sure how general purpose the parser it produces is Apr 25 04:34:59 i think antlr depends on stringtemplate too , so both would be required Apr 25 04:35:03 https://github.com/JetBrains/Grammar-Kit Apr 25 04:35:21 JesusFreke cool thanks Apr 25 04:36:37 i loved terrance par's antlr books, those were great Apr 25 04:36:48 I'm not positive, but I don't think the string template library is required for an antlr generated parser. It's just required to generate the parser to begin with. Apr 25 04:39:13 Or rather, I don't think it's required unless you use specific features (in antlr 3. not familiar with antlr 4) Apr 25 04:40:14 The antlr-runtime jar is ~150kb, and ~100 classes Apr 25 04:40:20 dunno what the additional method count might be though :) Apr 25 04:40:42 yeah, i'm not familiar with 4 either. seems it just depends on org.abego.treelayout Apr 25 04:41:00 i thought that it had a tendancy to blow up dvm's stack in lookahead Apr 25 04:42:50 lol antlr4-runtime uses swing Apr 25 04:43:13 hahah, wth? Apr 25 04:44:12 maybe that can be fixed with some proguard-fu Apr 25 04:50:35 while (! (socket == null || socket.isClosed()) && (line = socketReader.readLine()) != null) <--- SocketException: Socket closed !? Apr 25 04:53:19 JesusFreke https://code.google.com/p/treelayout/ Apr 25 04:55:00 g00s: ah, is that what depends on swing? Apr 25 04:55:06 well i guess i could use this port https://github.com/bkiers/antlr4android Apr 25 04:55:27 it depends on that , but also has some swing stuff internally Apr 25 04:55:46 damn it, that just seems so busted Apr 25 04:56:24 i guess a proper port would s/swing/androidwidgets Apr 25 04:57:26 <_genuser_> all this for a parser? Apr 25 04:57:33 A proper port wouldn't include any dependency on a graphical library for a parser Apr 25 04:58:00 i think the tree view might be there for diagnostics, like to visualize the AST Apr 25 04:58:13 i suppose that could be useful, but ugh! Apr 25 04:58:20 Sure, put it in a separate package Apr 25 04:58:24 I mean maven package Apr 25 04:58:43 <_genuser_> no maven? android is all about gradle now... !! Apr 25 04:58:54 Still using maven packages Apr 25 04:59:26 i have to check again whether the LL(k) algorithm he uses is android friendly; it definitely doesn't have mechanical sympathy :) Apr 25 04:59:44 Is your language LL? Apr 25 05:00:55 i'm using ragel atm which is for regular languages; its good. i was thinking about making a DSL, and in that case i would just want one parser for both duties i think - not sure i haven't made the DSL yet Apr 25 05:01:39 i would do my best to eliminate ambiguities Apr 25 05:01:57 Your app will accept users typing sources in that language Apr 25 05:02:06 its been a long time since i used lex / yacc :) Apr 25 05:02:27 CedricBeust oh, its a DSL that i would include for congiguration Apr 25 05:02:31 lol Apr 25 05:02:40 <_genuser_> man, I'm just getting stuck on this gridview multiselect thing. Apr 25 05:03:08 <_genuser_> I should just code is myself, there's even examples online. but I'm still trying to see if it can be done on it out of the box. Apr 25 05:03:28 _genuser_ good thing you aren't using recyclerview :) Apr 25 05:03:38 CedricBeust have you used any parser generators lately ? Apr 25 05:03:43 i also wonder about xtext Apr 25 05:04:08 <_genuser_> g00s: why is that? Apr 25 05:04:15 see, the eclipse ecosystem has some damn nice things Apr 25 05:04:39 _genuser_ RV is tons more boilerplate, multiselect is not there, you have to do it from scratch Apr 25 05:05:38 <_genuser_> g00s: I see. I saw some sample code for it on vogella, and that guy does pretty complete tuts. Apr 25 05:05:52 <_genuser_> and you still have to do multiselect yourself on gridview, I think. so far that's my research. Apr 25 05:05:59 <_genuser_> wonder why taht wasn't provide out of the box. Apr 25 05:47:59 Is there a Maven for android? (Like for programing in aide) Apr 25 05:51:16 Why AIDE? Apr 25 05:52:19 wtf is a maven for android Apr 25 05:52:31 Someone who knows Android very well? Apr 25 05:54:19 and who use aide seriously Apr 25 06:00:37 Tactical i program with aide on my droid Apr 25 06:01:14 Why? Apr 25 06:03:31 dragorn dang its getting cold :D Apr 25 06:06:46 I am with out a computer at moment Apr 25 06:12:12 CedricBeust http://chadaustin.me/2015/04/the-long-term-problem-with-dynamically-typed-languages/ Apr 25 06:12:37 g00s: yeah I read that, agree with it Apr 25 06:14:03 I am missing something blindingly stupid, and I am not sure what it is. I loaded a new image resource and replaced ic_launcer.png with my logo. When I run the app, it does not use that logo, it uses the default android one. Apr 25 06:14:40 ic_launcer.png, eh ? Apr 25 06:14:53 *launcher Apr 25 06:15:13 android:icon="@mipmap/ic_launcher" and it's spelled right in the folder Apr 25 06:15:22 Android Studio just replaced the one that was already there Apr 25 06:17:14 Do you have an image for each density? hdpi, mdpi, xhdpi? Apr 25 06:17:25 yes Apr 25 06:17:30 Studio took care of that Apr 25 06:21:31 hmm, how did you add the image? Just pasted it in the right folder? file -> new -> image asset? Apr 25 06:21:50 file -> new -> image asset Apr 25 06:22:08 -> launcher icons Apr 25 06:22:39 hi Apr 25 06:22:57 how can I still perform bluetooth scanning and networking operation when phone is asleep ? Apr 25 06:23:05 I noticed it stops everything Apr 25 06:23:17 have you verified the images are correct by opening them in studio? Apr 25 06:23:31 zko: yes Apr 25 06:24:05 as well as viewing them on the file structure for the project, I have had studio clean the project, and checked studio's build folders Apr 25 06:24:12 the images are correct everywhere Apr 25 06:24:25 I have even tried changing to a different image just to verify it isn't the image Apr 25 06:24:41 I'm missing something simple, I know I am Apr 25 06:25:30 yeah it's most likely something simple. The same thing happened to me once, I just don't remember exactly what I did to fix it Apr 25 06:26:10 hmm, I am going to generate the signed apk and see if it does it as well Apr 25 06:26:23 have you tried restarting studio? Apr 25 06:26:47 Initially, not since swapping out the resource several more times Apr 25 06:27:52 wth, the signed apk works Apr 25 06:27:59 interesting Apr 25 06:28:19 well, partially Apr 25 06:28:24 partially? Apr 25 06:29:17 it showed the correct icon on the installer, but not on the home screen or app drawer Apr 25 06:29:32 where as before, it wasn't even showing the right icon on the uninstaller Apr 25 06:30:12 shows wrong icon when I uninstall Apr 25 06:30:19 but right icon when I install Apr 25 06:30:28 hmm, wonder if my phone is doing it Apr 25 06:31:05 try uninstalling the app and restarting your device, then see what happens Apr 25 06:34:35 zko: that did it Apr 25 06:34:37 odd Apr 25 06:38:28 that is odd Apr 25 06:41:55 I blame nova launcher Apr 25 06:45:27 g00s, the dynamic. vs static argument seems pretty obvious to me Apr 25 06:45:42 use dynamic languages for crap that will get thrown away Apr 25 06:45:59 bah even that I don't see the point Apr 25 06:46:26 well, can't beat a couple seconds throwing into a script and running it Apr 25 06:46:53 the article gave me a perspective i never thought of though; if people aren't diligent with test upkeep, and coverage falls it becomes difficult to know whether you can even refactor something safely Apr 25 06:47:21 i guess that is true for any type system, but ... Apr 25 06:47:37 g00s: It's worse than that, I wrote about it almost ten years ago: http://beust.com/weblog/2006/10/01/dynamic-language-refactoring-ide-pick-one/ Apr 25 06:48:31 yeah, i probably read that at some point , looks familiar :) Apr 25 06:48:34 test upkeep is a joke Apr 25 06:48:50 look at any large scripted system, the tests are practically non existent Apr 25 06:49:03 any system, not just scriptes Apr 25 06:53:04 the compiler takes away some of the test burden Apr 25 07:12:53 "Median Age At Google Is 29, Says Age Discrimination Lawsuit" , interesting Apr 25 07:19:11 Sounds about right Apr 25 07:19:23 Still a bit baffled by this kind of lawsuit, though Apr 25 07:20:41 errr.... how are you suing over age discrimination when the younger people really are the more talented for the work google is doing? Apr 25 07:21:34 I'm 30, and I know that there are loads of people more talented than I am that are younger than me. That's because they got started on all this at a younger age Apr 25 07:21:45 danl: That is an open question, I was just pointing out that old/young people are not a protected section so companies should be free to hire in any range that fits their business better Apr 25 07:22:13 My question was a bit rhetorical Apr 25 07:35:18 If I use minSDK = 19 do I still need to use the appcompat library? Apr 25 08:26:54 Hello! How can I run unit tests both on the development machine (which I run with "gradle test") AND on the emulator (which I run with "gradle connectedCheck") ? Apr 25 08:43:57 <_genuser_> great thing about AS? It actually respects the F3 on windows... Apr 25 08:44:04 <_genuser_> good people. Apr 25 08:46:47 developing on windows? meh Apr 25 08:52:34 <_genuser_> yep, using windows for all desktops. Apr 25 08:52:54 <_genuser_> odd, AS is running my app and compiling it but not showing _anything_ in logcat. Apr 25 08:53:42 How does proguard interact with final static strings? Apr 25 08:56:12 <_genuser_> nice using picasso with a custom handler is still going out of memory. I have to re-write custom handler logic. :) Apr 25 08:56:48 Are there any easy ways to get Maven gradles onto android devices? Apr 25 09:13:21 ronkrt: what? Apr 25 09:14:17 I'm trying to get Maven reps locally on my android but Maven Downloader is not work Apr 25 09:14:21 Working* Apr 25 09:15:19 And you want to do this in gradle? Apr 25 09:16:04 Lemme show you my options Apr 25 09:17:23 http://imgur.com/QuTvDLa Apr 25 09:17:41 If you're using gradle, you should be able to add your local repository see the userguide section 8.5 (http://gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html) Apr 25 09:18:33 I'm trying to get org.apache.maven.plugin Apr 25 09:19:04 Well, that app I've never seen before, and I have no idea what it is for :) Apr 25 09:19:09 I'm using a third party app Apr 25 09:19:15 Dismissive Apr 25 09:19:24 Downloading Apr 25 09:20:56 Description Apr 25 09:20:56 The Maven Dependency Downloader creates a local Maven repository on your tablet or smartphone. Apr 25 09:22:34 And I don't quite understand why you would want to do that. But have you tried contacting the people who made the app? Apr 25 09:24:27 I want to make the repos local because aide doesn't use remote repos Apr 25 09:24:46 I cant get a hold of them Apr 25 09:27:14 Hello Apr 25 09:27:37 I've read that android has libc in itself Apr 25 09:27:51 What's the difference b/w libc. glibc and gcc? Apr 25 09:34:43 Got it Apr 25 09:37:41 can someone help me with http://stackoverflow.com/questions/29863368/android-studio-1-1-0-setting-minifyenabled-true-causing-issues-with-app Apr 25 09:53:38 Hello Apr 25 09:53:59 Is there a possible way to stop other apps from my apps? Apr 25 09:54:25 Because I start a other app with startActivity from my app but I need to close it later... Apr 25 09:56:59 think of it in another way Apr 25 09:57:10 would you accept if another app closes your app? Apr 25 10:15:10 Hey not sure why my button click is not registering here http://stackoverflow.com/questions/29863869/cannot-get-onclickbutton-in-custom-adapter-to-respond-correctly Apr 25 10:18:48 Odaym yes, I know. But I need it... "am force-stop package" works but I can't execute it from my app or? Apr 25 10:19:10 you shouldn't be allowed to do this Apr 25 10:19:56 I don't know what you're looking for, I haven't googled, but this shouldn't be allowed to happen regardless whether you need it or don't Apr 25 10:20:15 But how can Task Killer apps kill the app? Apr 25 10:20:31 that's its job, it advertises clearly what it wants to do Apr 25 10:20:37 Lonesoldier728 setOnItemClickListener on the listview instead of onItemClick in the adapter Apr 25 10:21:18 hmm nm i reread Apr 25 10:21:25 Odaym Okay, but then I can add it also to me app or? Apr 25 10:21:41 dont know bro, but its highly dangerous to do something stealthy like that Apr 25 10:21:45 aaearon nevermind you said? Apr 25 10:21:47 you might get booted from the store fo eva! Apr 25 10:22:07 It's a private app.. So that's not the problem Apr 25 10:22:29 then why you asking man Apr 25 10:22:45 seem to know all what you need, go do it Apr 25 10:23:24 how would I select the button from the listview on selectitemlistener then Apr 25 10:23:31 <_genuser_> man, I have too many packges in my app. over organization, perhaps. Apr 25 10:23:53 Odaym But I don't know how TaskKiller apps do it... I will watch into some codes.. Apr 25 10:24:00 some codes Apr 25 10:24:01 :P Apr 25 10:24:22 get some bag of codes and throw it on the ground and start to search Apr 25 10:30:52 Maybe in Lollipop was changed something that they methods in the internet not working anymore... Apr 25 10:34:34 http://stackoverflow.com/questions/29863869/cannot-get-onclickbutton-in-custom-adapter-to-respond-correctly?noredirect=1#29863957 Does anyone understand how I write the code for the answer written here Apr 25 10:36:48 nevermind explained Apr 25 10:48:27 I am trying zxing-android/qr-encoder and I got a bitmap made from X and empty spaces, is there any online tool to convert it to PNG to try it? Apr 25 10:49:30 http://paste.ofcode.org/fQhUxGMrn35PFdEv5xfqLV here is the QR Apr 25 10:59:12 someone here who can bit about zigbee? I will build a zigbee gateway/router for testing someone who is has experience? Apr 25 12:19:11 Is it possible to run mvn clean package via terminal on android? Apr 25 12:58:55 hey guys? Apr 25 12:59:19 do you download a lot of apps of whatever function, just to get an idea of what's going on out there as far as UI trends, performance differences, etc..? Apr 25 13:00:47 Odaym there are a few free ui design programs in play store.. A good one is aide ui dev but it's $2.99 Apr 25 13:01:04 that isn't what I meant Apr 25 13:02:50 most of the times, no Odaym. But looking at competitors products make sense Apr 25 13:03:16 do you expose yourself to a lot of famous apps say from Editor's Choice apps, just to see how the "pro's" are doing things? Apr 25 13:03:20 that's more like what I meant ronkrt Apr 25 13:03:36 I did for my audio dsp synth drum machine whatever app Apr 25 13:03:50 make sense to compare to the "top" apps Apr 25 13:04:24 yes Apr 25 13:04:39 I also did it for some watchface related to android wear development Apr 25 13:06:20 Does the android os 4.4.2 have the JDK on it out of the door? Apr 25 13:06:44 no ronkrt Apr 25 13:07:11 Ok time to install Apr 25 13:07:35 I meant, there is no jdk provided with android os Apr 25 13:07:44 not sure is out of the box != out of the door Apr 25 13:07:55 out of the door :P Apr 25 13:07:56 lol Apr 25 13:08:20 I'm visualizing "out of the door" :D Apr 25 13:08:30 could be in the wall Apr 25 13:08:53 out of the door could mean like "when it ships" Apr 25 13:08:57 but still, not a valid expression Apr 25 13:08:59 downvoted Apr 25 13:11:35 Lol this is going to be epic Apr 25 13:56:46 Is there any way to get this specific of a name from the device using your app? https://i.imgur.com/cWfBIoS.png Apr 25 13:56:55 Like the Google Play Store does. Apr 25 14:11:54 list.contains(object) ... does object have to be exact on every single value Apr 25 14:12:07 or is there a way to say if the userIds match Apr 25 14:14:26 Lonesoldier728: it uses equals Apr 25 14:14:58 is there a way to check if the userids match then without looping through the list? Apr 25 14:15:11 or contains basically does that anyways so I might as well loop it Apr 25 14:15:23 you not saying what your objects arer Apr 25 14:16:08 contains loops through the list and check every element with equals() Apr 25 14:17:08 perhaps override your equals in the user object so it would check just the user id if that makes sense for you Apr 25 14:20:28 or instead you can use a hashmap maybe Apr 25 14:20:32 O(1) to pick Apr 25 14:26:25 adq: that is for get not for contains though IIRC Apr 25 14:26:40 or maybe he should use HashSet Apr 25 14:26:59 IDK, he didn't mention much details :) Apr 25 14:27:16 not sure, testing if it contains can be reduced to getting it Apr 25 14:27:29 but indeed, lack of details Apr 25 14:28:19 Hello, I'm using xamarin, what's the best way to pass variables data between layouts? Apr 25 14:33:24 What's the most modular way of doing a color chooser? I am trying with RadioGroup but there's no way to easily tint radio buttons... (something like this: http://www.clubpenguininsiders.com/wp-content/uploads/2011/06/cp-sign-up-step-1.jpg) Apr 25 14:33:47 how to apply Material design in kitkat ? Apr 25 14:37:10 indeed Apr 25 14:37:30 check https://github.com/gabrielemariotti/colorpickercollection dimitrovskif Apr 25 14:38:09 adq: Cool, I'd like the same but with a View instead of Dialog Apr 25 14:38:25 should be relatively easy Apr 25 14:38:35 maybe? Apr 25 14:40:33 Hello Apr 25 14:40:49 I should adding a widget to an app Apr 25 14:41:54 question: application can be launched by widget either drawer Apr 25 14:42:32 have I to use only app widget class in the main code? Apr 25 14:44:04 for example: http://www.tutorialspoint.com/android/android_widgets.htm Apr 25 14:44:11 appwidgetprovider Apr 25 14:48:01 hey icedp adq sorry had to step out for a moment but yeah basically I am letting a person add friends to a list but if the friend exists I do not want duplicates Apr 25 14:48:34 What changes have I to add launching application by widget and by icon in drawer? Apr 25 14:50:01 so the list contains people from before hand so now I just want to confirm that the person does not exist before inviting them, so I was gong to do a for(User eachUser: userLists) loop unless contains works... but from what the list contains to what the actual user item, there will be different fields but the userId field will be the same so I wanted to base it off that if they are equal on the userId field then not to incl Apr 25 14:50:01 ude the person Apr 25 14:50:10 how to apply Material design in kitkat ? Apr 25 14:50:31 rohit7roy what you trying to do exactly Apr 25 14:50:47 add a drawer? Apr 25 14:51:03 im trying to implement material design in my existing app Apr 25 14:51:54 and i want to runthat in my kitkat device Apr 25 14:54:13 https://developer.android.com/design/material/index.html Apr 25 14:54:20 Well look at that Apr 25 14:55:39 i've gone through tht Apr 25 14:55:58 Lonesoldier728: HashSet with userids or HashMap Apr 25 14:56:53 is that better than just looping through icedp Apr 25 14:57:11 Lonesoldier728: i've gone through tht Apr 25 14:57:33 Yeah sorry, rohit7roy I have yet to really implement it outside of the navigation drawer Apr 25 14:58:09 Lonesoldier728: practically won't matter in this case, but generally faster. Just use what makes sence, HashMap/Set will give you automatically guarantee of no duplicates Apr 25 14:58:52 can you show me an example Apr 25 14:59:00 well if you hashCode() works right, that is Apr 25 14:59:30 Lonesoldier728: ok no problem :) Apr 25 15:00:52 Lonesoldier728: HashMap users = new HashMap; users.put(user.getId(), user); users.containsKey(user.getId); Apr 25 15:00:57 I get :"Error CS0121: The call is ambiguous between the following methods or properties: 'Android.App.AlertDialog.Builder.SetMessage(int)' and 'Android.App.AlertDialog.Builder.SetMessage(string)' (CS0121) (webservicetest1)" when passing a JSON index data to setmessage Apr 25 15:01:21 Lonesoldier728: forgot the () but the gist Apr 25 15:02:12 yeah kk but that is more efficient? then for(User user: usersList) { if(user.getId().equals(other.getId) { return true}} Apr 25 15:02:17 than* Apr 25 15:02:35 could anyone help? Apr 25 15:04:29 Lonesoldier728: yes it's O(1) vs O(n) Apr 25 15:05:31 livtyler: Sounds like you need to tell it whether you're passing it an int or a String Apr 25 15:06:53 SimonVT: thank you, how to do it? I'm sending this: JsonValue json = await getnombreWS (url); AlertDialog.Builder alerta = new AlertDialog.Builder (this); alerta.SetMessage(json["nombre"]); Apr 25 15:08:42 icedp, foreach is O(n) and equals is O(1), right? Apr 25 15:09:06 livtyler: Find out how you get a String from json["nombre"].. I don't know what json library you use Apr 25 15:09:55 do you guys use android studio? or would intellij idea be good for android dev? Apr 25 15:10:02 SimonVT: using System.Json; Apr 25 15:10:41 http://pastebin.com/8qDv4F4L Apr 25 15:10:54 so the top one is more efficient than the bottom one? Apr 25 15:10:56 I have no idea what System.Java is Apr 25 15:11:02 Json Apr 25 15:11:56 adq: Managed to do it without a Dialog, had to edit their code though Apr 25 15:12:12 Hey guys.. How can i start adb in terminal emulator on my android with a unique id and start the server? Apr 25 15:12:13 adq: Thanks man, saved me! (I have a very small deadline.....) Apr 25 15:12:21 :) Apr 25 15:13:38 Lonesoldier728, are you populating the hashmap in the top one? but only checking to see if there is a match in the bottom? Apr 25 15:14:08 actually the top one populates hashmap, and then checks to see if there's a match. but bottom only checks to see if there is a match? Apr 25 15:14:09 Lonesoldier728, http://bigocheatsheet.com/ Apr 25 15:14:13 profile your code anyway Apr 25 15:14:15 yeah basically the top one is a setup once then the only calls made on Apr 25 15:14:29 each getview is the loop vs the containsKey Apr 25 15:15:11 wagonboi: yes, O(n) is the worst case. if you element is in the beginning of the array than it's O(1) =) Apr 25 15:15:46 ah i see. i would use the top one myself. cause yeah, the bottom iterates thru the entire hashmap looking for a match. while the top one just uses hashmaps O(1) lookup to see if there is a match Apr 25 15:17:37 (fyi iterator is slower than a simple for loop with an int as index and also create some allocations) Apr 25 15:17:56 I see often iterator is faster blablabla, it's not lol Apr 25 15:19:42 how does one iterate through hashmap with an index if there may be empty entries? Apr 25 15:20:28 you get the keys? Apr 25 15:20:34 Lonesoldier728: you must break from the loop in second case. in the first case you must store you data in HashMap. If you were to create it each time to look up - it won't be more efficient in any sense Apr 25 15:20:34 you don't iterate hashmap Apr 25 15:20:59 you might iterate the key of the hashmap but then this starts raising the : why hashmap? Apr 25 15:21:16 ah i see Apr 25 15:21:21 confused lol Apr 25 15:21:40 so yeah the hashmap is only created once and then iterate the key i guess Apr 25 15:21:48 as oppose to the loop Apr 25 15:21:51 icedp, i think his second loop implies that the hashmap was alrady created Apr 25 15:21:53 on the second which happens Apr 25 15:22:04 the second loop has no hashmap the list is already there Apr 25 15:22:05 document yourself more on it :) Apr 25 15:22:26 few answers on irc will not document sufficiently all these stuff Apr 25 15:22:31 Lonesoldier728, in either case, the hashmap is already created, right? the question is whether to use equals or containsKey to find a match Apr 25 15:23:04 http://developer.android.com/reference/java/util/HashMap.html check the overview Apr 25 15:23:09 adq: RE: fpr each loop. not always for (int i =0 ; i < 5; i++) { Apr 25 15:23:12 break; Apr 25 15:23:14 } Apr 25 15:23:20 adq: oops sorry. wait a sec Apr 25 15:24:01 adq: http://stackoverflow.com/a/256861/1056386 regarding for vs for each Apr 25 15:24:47 ok let me specify the list is being passed in no matter what, now for each view i can loop through the list and look for if the views id matches the list id before moving on to the next vew or... one time create a hashmap with the userid being the key, then on each view check the hashmap if it contains the key that matches the userid before moving on to the next view and doing the same thing Apr 25 15:24:50 i will, check https://www.youtube.com/watch?v=MZOf3pOAM6A&feature=youtu.be icedp Apr 25 15:24:57 i'm glad "Colt" pointed out it Apr 25 15:25:42 as it computes the limit of the array index only once. << Apr 25 15:26:00 this is why you always compute the length one time above the "for (int i = ...; Apr 25 15:26:06 even in a classic loop Apr 25 15:26:15 to avoid having the length being recomputed at each cycle Apr 25 15:27:00 but i see the point, for ppl using (for int i = ... ; i < array.size() ; ..) but then it can be avoided by what i just said above Apr 25 15:27:17 computing the length above and putting a simple variable in the condition of the loop Apr 25 15:27:27 to avoid computing the size at each cycle Apr 25 15:28:23 Lonesoldier728, if you don't have thousand of view, you should not bother with performance Apr 25 15:28:40 what array sizes are you using adq ? they must be pretty large to warrant your approach? Apr 25 15:28:55 exactly Apr 25 15:29:18 in class i've only worked with arrays <1000 i think. wondering what typical arrays sizes in the field are Apr 25 15:29:33 it'sn ot only dependent on the array sizes itself, but how many times you will do it per second too Apr 25 15:29:41 (think of a game loop, or real-time audio processing) Apr 25 15:30:17 yeah im thinking maximum it will be 100-200 users in a list Apr 25 15:30:21 so imagine your arrays < 1000, but i need to process them many times per second Apr 25 15:30:27 times per second? i thought loops only did it once? or is for concurrent applications? Apr 25 15:30:33 it's the same as if they were longer but i need to process them less time Apr 25 15:30:37 * once per iteration Apr 25 15:31:05 modulo any optimization Apr 25 15:31:06 :p Apr 25 15:31:21 so essentially doing it with the hashmap.containsKey vs for(User user: userList ... there is a difference still ? Apr 25 15:31:59 there is, but it might be insignificant if you only have few users and do that once Apr 25 15:32:22 yes Lonesoldier728 . just think like this: containsKey returns an answer right away. but user:UsersList needs to take each user and compare it Apr 25 15:33:20 adq: wow well, so Effective Java had a mistake then Apr 25 15:33:51 idk, there are so many factors Apr 25 15:34:00 it might be true in some context, and wrong in another Apr 25 15:34:13 the key is to profile to know where the bottleneck lays Apr 25 15:34:16 Might be true on the jvm Apr 25 15:34:55 the video above is excellent, it tells you basically to not trust statement about this is more performant than that Apr 25 15:34:59 and verify Apr 25 15:35:00 As he says, profile on your target platform Apr 25 15:35:08 (if it matters) Apr 25 15:35:14 indeed, if it matters :p Apr 25 15:35:15 adq: I've already enrolled in that course (few day before) :) Apr 25 15:38:32 icedp, i would love they write down about performance with more details instead of short youtube video Apr 25 15:39:27 but still, from all the videos from google devs, they are a must Apr 25 15:40:26 what course/video are you talking about? Apr 25 15:41:20 "android performance" Apr 25 15:41:41 wagonboi, https://www.youtube.com/playlist?list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE Apr 25 15:42:05 ty adq Apr 25 15:42:18 I expect to see a day "android security patterns" lol Apr 25 15:47:39 Does anyone here have experience with ButterKnife? Apr 25 15:48:21 ButterKnife fails to inject a SPECIFIC view, no matter what I try it always throws an exception. findViewById() works. All this is happening in a Fragment Apr 25 15:50:56 ButterKnife just calls findViewById as well, so you're doing something wrong Apr 25 15:51:40 SimonVT: I am using a custom view (from the library androidsvg)... Could that be the problem? Apr 25 15:52:05 If findViewById works, so will ButterKnife.. Since it just calls findViewById for you Apr 25 15:52:10 try posting some code, instead of what ifs Apr 25 15:52:14 is there any layout I can use to simulate the wassup buble chat? Apr 25 15:52:24 SimonVT: If I replace Butterknife.inject() with findViewById(R.id.thatSpecificView) it works; by the way it manages to inject all other views, it crashes on this specific one Apr 25 15:52:35 bubble* Apr 25 15:52:46 I doubt it Apr 25 15:53:05 Tried rebuilding resources, tried everything. Apr 25 15:53:16 Does anyone have a recommendation for a good tutorial on android development? I'm already familiar with programming in general, and somewhat familiar with Java. Apr 25 15:53:23 https://developer.android.com/training/index.html is a bit too narrow. It doesn't really cover much about the API Apr 25 15:54:06 SimonVT: Should I try to dump the view hierarchy? Apr 25 15:54:29 Sure, if that'll help you debug it Apr 25 15:54:43 As I said, ButterKnife calls findViewById.. That's all it does Apr 25 15:55:01 stephenmac7, read the entire dev guide Apr 25 15:55:12 stephenmac7, get much more familiar with java Apr 25 15:55:21 stephenmac7, read the book jcip Apr 25 15:55:32 Either you're not trying to find the same id, or you're not trying to find it in the same view hierarchy Apr 25 15:56:07 pfnQ: Java Concurrency in Practice? Apr 25 15:56:16 yes Apr 25 15:57:16 The _entire_ dev guide? Apr 25 15:59:11 pfnQ: Okay, I'll see what I can do. Maybe I'll have to refrain from counting this time for my job... Apr 25 16:13:23 Thanks Apr 25 16:21:44 SimonVT: This is awkward... How the hell does my view have no ID? Apr 25 16:22:00 SimonVT: I did a hierarchy dump, and yep - it does not work Apr 25 16:25:15 dimitrovskif, you didn't set one? Apr 25 16:25:36 pfnQ: Found the prob, this shitty library. Apr 25 16:26:08 I have to change the code and recompile the jar... They are calling a dumb method that's filed as bug, that's why I had a constructor without attrs - and ID is an attr. Apr 25 16:27:02 the only fix which doesn't involve changing the jar would be to re-apply AttributeSet. Is that possible? Apr 25 16:27:11 Is there any setAttributeSet? Apr 25 16:28:37 Hello. I want to close my progrom when something happens, and I am using .finish(); Here is the code: http://pastie.org/10113458#45 but I am getting a NullPointerException error when that line is executed. Apr 25 16:28:52 The highlighted line. Apr 25 16:30:55 gonna want some breaks Rashad Apr 25 16:31:07 You are right. Thanks. Apr 25 16:31:16 dimitrovskif, no, attributes can only be set at construction Apr 25 16:31:48 pfnQ: This shitty library has two constructors: ShittyClass(Context ctx){ good code } and ShittyClass(Context ctx, AttrSet set){ BAD code } Apr 25 16:32:18 pfnQ: How can I have attributes without calling the bad code? Seems there isn't a way Apr 25 16:32:19 so it doesn't call the correct super, I assume Apr 25 16:34:01 request the library maintainer fix it Apr 25 16:35:40 java.lang.NoClassDefFoundError: java.util.Objects at com.hanhuy.android.keepshare.Database$.open(Database.scala:31) Apr 25 16:35:43 damnit Apr 25 16:36:01 how'd that stupid method sneak in there Apr 25 16:36:09 hate that intellij intention Apr 25 16:36:32 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.keepshare/a3e58d60bca2ebad7690dfb8da3e5792111dcd40 Apr 25 16:37:19 pfnQ: It's fixed in some beta version, it's a known bug and it sucks and I can't use that version Apr 25 16:37:41 then don't use that library Apr 25 16:37:58 or just leave this as a blocker and work around it Apr 25 16:38:03 or Apr 25 16:41:19 pfnQ: "Due to bug you can't just use the standard jar file if you want to use SVGImageView in your layout files. The jars don't include the resources that the layout manager requires. " Apr 25 16:41:53 FML Apr 25 16:45:38 then use the right version Apr 25 16:57:36 I'm used eclipse + sdk and now I'm trying android studio Apr 25 16:58:04 I'm wondering if I uncheck the installation of sdk as it already exists on my pc Apr 25 16:59:20 would probably be best to scratch everything and start over Apr 25 17:00:30 it's ok .. the installation GUI gave me the option to choose the current SDK location :D Apr 25 17:00:33 it's nice Apr 25 17:04:28 I just hope it wont go through the same previous tedious process Apr 25 17:04:41 APIs update Apr 25 17:05:38 I want to test up testing for my Android project, however I'm finding information available generally confusing. I'm using Android Studio 1.1. The official docs only seem to talk about Eclipse + ADT, and online sources differ in how it works Apr 25 17:05:49 Can anyone point me to an up-to-date reference on how to do android tests in Android Studio? Apr 25 17:08:24 is it possible to limit whats provided in the manifest by api level? ... like suppose you were supporting pre api 10, but then added a broadcastreceiver (widget) that only works with api 14+ ... i want to prevent the widget from appearing in the list if its not supported. Apr 25 17:09:03 what is the solution to this type of problem? separate apks? Apr 25 17:10:25 not sure if manifest supports such things but at the very worst you could detect API level at runtime and just pop up an alert telling the user this is not supported Apr 25 17:11:55 yeah. that is what i was thinking. it would prevent a crash at least. ideally though i don't want the icon to even show up in the list :\ Apr 25 17:13:25 hrm. maybe its not such a big deal. two icons. one of them doesn't do anything. i think 90% of users are already running 14+ so not sure why i'm bothering Apr 25 17:15:19 Hello everyone, how long should I wait for the emulator to start before giving up? it is the first time i have started it, it is google's emulator, however it has been 38 minutes.. Apr 25 17:15:32 holy **** i'd give up by now :D Apr 25 17:15:41 yeah it is terrible! what should i do? Apr 25 17:16:00 my computer is not garbage either, it has an intel i7 quad-core processor (8 cores if you count logical ones) Apr 25 17:16:00 try genymotion. its been a good replacement for me so far. also, start time is less than 2min Apr 25 17:16:12 is it compatible with monkeyrunner and logcat, etc.? Apr 25 17:16:24 pretty sure Apr 25 17:16:36 ok, cool. I will check it out. Apr 25 17:18:16 argh! only for ubuntu or debian? >:( Apr 25 17:19:58 check the links across the top. there are binaries for mac and windows too Apr 25 17:20:20 yeah I know :( Apr 25 17:21:00 i use linux for everything that isn't skype or steam related. is setting this up on windows a pain? i might just do it honestly Apr 25 17:21:55 sean_1: fyi steam itself works Apr 25 17:22:49 icedp: yeah, it's my graphics card that poses the problem. i use a laptop that uses optimus technology. i know about bumblebee but eh... Apr 25 17:22:57 eh. its a double click operation honestly. ... but i would of course be inclined to make it work in linux first ;) Apr 25 17:24:44 icedp: i would rather separate work from play. and most games run faster on windows due to the linux ports not being as efficiently programmed, i have heard. Apr 25 17:31:24 sean_1: Install genymotion Apr 25 17:33:17 http://stackoverflow.com/questions/9680449/hide-app-widget-depending-on-api-level ... very interesting. it looks like its possible by enabling/disabling manifest items at runtime. Apr 25 17:34:40 ah. second answer is better. setting the enabled value using attributes / the resource system. Apr 25 17:37:16 Yeah, I think I am going to give up on making it work on here. The only question is how to run the cmd line tools on windows Apr 25 17:37:33 Hmm. Updated to AppCompat 22.1 and my spinners are still showing the dropdown *below* the spinner on < 21. Is this the case with everyone else? Apr 25 17:37:41 i hate the windows filesystem organisation Apr 25 17:37:46 On the plus side, the dropdown arrow is (as far as I can tell) the right colour now. Apr 25 17:37:53 and how there's spaces in almost all filenames Apr 25 17:38:10 https://twitter.com/matt_j2/status/592019621609402369 Apr 25 17:38:10 :D Apr 25 17:39:01 alright, I'll see you guys later, I hope this works out ok Apr 25 17:49:25 This entire thread is just "I haven't read the documentation": http://www.reddit.com/r/androiddev/comments/33taa6/appcompat_everything/ Apr 25 17:50:25 heh. i admit getting lazy finding stuff in docs though, stuff is spread all over the place : SO, chris' blogs, d.android.com, etc Apr 25 17:51:30 Hello Im trying to use this dependency Apr 25 17:51:38 http://satyan.github.io/sugar/ Apr 25 17:51:46 but Im not pretty sure how I should include it Apr 25 17:51:55 I kinda cant run gradle in my console Apr 25 17:51:57 pour some sugar on the app Apr 25 17:52:15 * g00s goes to find some old def leppard Apr 25 17:55:01 Ah, I'm going crazy. With recent versions of Android Studio, how am I supposed to do regular tests? Some sources say put files 'instrumentTest', other say 'androidTest' etc. So much disparity and the official docs don't even acknowledge Android Studio on this subject Apr 25 17:55:24 (ideally I'll have something that is just gradle-dependent, not AS-dependent. But should be understood by AS) Apr 25 17:56:08 happy CCaturdy Apr 25 17:56:14 Catuday Apr 25 17:56:17 oh Apr 25 17:56:20 oops Apr 25 17:56:32 meow Apr 25 17:58:17 Yeah, that's true. You have to know to look at Banes's blog and so on. Apr 25 17:58:42 Hello, what should I do in order to be able to execute gradle commands Apr 25 17:58:51 using linux, Im doing ./gradle Apr 25 17:58:59 sacrifice a virgin Apr 25 17:59:01 Ashiren: What do you mean by "regular tests"? I think 'androidTest' is the new label for instrumentation tests. Apr 25 17:59:06 and it promts to a gradle console BUT I cant run anything like compile Apr 25 17:59:58 TacticalJoke: ? Apr 25 18:00:19 As far as I remember, 'instrumentTest' was renamed to 'androidTest'. Apr 25 18:00:29 Oh. Apr 25 18:00:35 s/Ashiren/AndreasL/ Apr 25 18:01:00 Y'all are blending into one on my screen. :D Apr 25 18:01:41 :o Apr 25 18:01:55 I'm so happy my spinner down-arrows are now the correct colour. Apr 25 18:01:59 Tiny change but such a big impact. Apr 25 18:02:27 Consistency appeases our OCD overlords. Apr 25 18:03:25 And buttons no longer look awful. Apr 25 18:03:33 TacticalJoke, ok, thanks Apr 25 18:04:00 TacticalJoke, yeah, I finally found this doc: http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Testing Apr 25 18:07:45 Argh, not even that one is up-to-date :( Apr 25 18:08:09 Almost nothing is up-to-date anymore. ;| Apr 25 18:08:39 Are you wanting to do JVM tests or instrumentation tests? Apr 25 18:08:41 TacticalJoke, when you want to add tests (that run on the Android emulator, I guess) to an Android project, what do you do? Apr 25 18:08:48 instrumentation Apr 25 18:08:53 or, at least, tests that run on the Android platform Apr 25 18:08:59 AndreasL see this too https://plus.google.com/+AndroidDevelopers/posts/Asi9hzcmCJo Apr 25 18:09:39 * g00s migrating Junit3 tests to Junit4 Apr 25 18:09:40 I can't actually remember. I think it's just a case of adding an 'androidTest' under 'app/src'. Apr 25 18:09:42 g00s, oh, that's interesting! Apr 25 18:09:46 All I do is JVM tests. Apr 25 18:10:03 all i do is on device tests :D Apr 25 18:10:11 TacticalJoke, me too, for the most part. All my logic is cleanly separated. However, there are some border cases Apr 25 18:10:30 I'll probably end up using some instrumentation tests (with Espresso or something). Apr 25 18:10:32 i.e., I need some data objects to be parcelable, and I want to test these Apr 25 18:10:47 yeah, I guess we'll have to do UI tests too, at some point Apr 25 18:15:36 g00s, the only thing that's not clear with using the Testing Support Library is where to put the actual tests? Apr 25 18:15:42 are we still talking about src/androidTest ? Apr 25 18:15:56 AndreasL i think so .. i'm migrating now Apr 25 18:16:23 g00s, so i.e. src/androidTest/com.example.myapp.test/MyAppTest.java ? Apr 25 18:16:28 yeah Apr 25 18:16:52 i though, hmm this sounds too east Apr 25 18:16:55 *easy Apr 25 18:17:04 but almost missed the bottom section there "Testing Support Library Setup" Apr 25 18:17:34 Hmm, the text of my TextViews is now (since moving to AppCompat 22.1 from 21.0.3) a different colour by default. Apr 25 18:17:45 More white than gray now. Apr 25 18:17:49 yeah i noticed some weird changes too Apr 25 18:18:10 TacticalJoke i think its best to basically leave the themeing to th every end of things Apr 25 18:18:33 get the app working, and then , in a mad rush get the colors right :D Apr 25 18:18:35 Yeah, I haven't done much yet. Apr 25 18:18:49 It's mainly a case of making it look less awful because I use it all day every day. :D Apr 25 18:19:01 maybe google will pick one for me, as each appcompat seems to do a different thing :D ca't be bothered with always wondering wtf its doing Apr 25 18:19:06 Actually, it doesn't look too bad so far. Apr 25 18:19:28 TacticalJoke + Apr 25 18:19:38 if it doesn't look good you will get sick of looking at it Apr 25 18:19:47 and start feeling its mediocre Apr 25 18:19:58 yeah i guess the broken windows thing ... Apr 25 18:20:01 make it look good from the start Apr 25 18:20:08 Yeah, it looks pretty good. Apr 25 18:20:14 I just haven't put much effort into making it look good yet. Apr 25 18:20:18 empty screens is the worst, that's why Apr 25 18:20:22 when there is no content Apr 25 18:20:23 It looks neat because the UI is so simple. Apr 25 18:20:24 i disagree with that though - there is a reason for low fidelity prototypes; you can be more agile Apr 25 18:20:35 of course, but we are not that pro yet :P Apr 25 18:20:49 we go by looks, we havent seen enough apps scoring high numbers to believe that when we get to that point, it'll be fixed Apr 25 18:20:56 when things are fluid and up in the air, wasting time with theming is ... Apr 25 18:20:57 we believe if we don't do that now, the app will fail! Apr 25 18:21:00 cause noobs! Apr 25 18:21:01 :P Apr 25 18:21:11 well me at least Apr 25 18:22:52 I think I see all development incrementally. Even theming. Apr 25 18:23:11 One tiny change upon another tiny change. Makes everything easy. Apr 25 18:23:58 Though I guess we do need big steps at some times. (Even then, though, they're just a bunch of tiny steps grouped together.) Apr 25 18:24:56 The problem with the TextView-text-colour thing was that in some places I was relying on defaults. :D I'm gonna have to manually set the old default values and then see whether I wanna change stuff later. Apr 25 18:29:00 what I'm facing is finding old devices in the market Apr 25 18:29:34 Im probably going to have to order through Amazon or something, no one sells Moto G or Galaxy S3/S2 around here anymore, they treat them like cars, only the year's model is available Apr 25 18:29:40 I thin kthe reason for this TextView change is that we now have AppCompatTextView. Apr 25 18:29:47 As far as I can tell, there was no TintTextView before. Apr 25 18:30:06 i'd really like to get android up on a beaglebone black Apr 25 18:32:58 Hey everyone, so now I'm on window$ and am wondering if the SDK tools alone contain the .avd manager and monkeyrunner, or if i needed to get the IDE for that stuff Apr 25 18:33:59 just sdk tools or android studio? Apr 25 18:35:20 hello, i'm trying to emulate the 'Recent' card/list in the dialer app. is the RecyclerView suitable? if so, how do I stop the RecyclerView from taking over the scrolling? Apr 25 18:36:00 Can confirm; saying " By default, IntelliJ tolerates only 10 open tabs at a time. wat Apr 25 18:41:39 Really confusing when opening more than 10 files at once, because it silently closes the rest. Apr 25 18:43:01 g00s, do you know if the Android Testing Support Library has support in Android Studio? Apr 25 18:43:17 AndreasL sounds like it from the docs Apr 25 18:43:38 g00s, I'm struggling to get it to recognize things. It doesn't seem to have any idea of what's happening Apr 25 18:43:55 lol. almost there Apr 25 18:44:02 i do thiese things from CLI though Apr 25 18:44:50 g00s, yeah, I'm trying to do it from CLI Apr 25 18:45:11 error: cannot find symbol Apr 25 18:45:12 @RunWith(AndroidJUnit4.class) Apr 25 18:45:28 I think I've added the dependencies, imported the packages... Apr 25 18:45:41 but the docs are a little unclear as I can not find a single example that does it all, I've had to piece things together somewhat Apr 25 18:47:28 I feel as if Android docs always provide _just enough_ docs not to be sufficient :P It almost feels deliberate as I have no idea how they manage to not provide the necessary details Apr 25 18:47:37 lol this is great. 'Project sync succeeded. Open the 'messages' view to see the errors found. Apr 25 18:47:46 (y) Apr 25 18:47:54 software gore Apr 25 18:47:55 lol Apr 25 18:49:41 AndreasL: Yeah. The original instrumentation-testing guide is the worst. Apr 25 18:49:52 It's almost like it's designed to inflict pain on the reader. Apr 25 18:50:05 TacticalJoke, I've now spent more than an hour setting up basic tests for my project. This should be a < 5 minute process! Apr 25 18:50:29 Crazy. If I had done it recently, I'd give you a TL;DR. But I haven't touched instrumentation tests in a long time. Apr 25 18:54:27 i'm using AS 1.2RC2 + gralde 1.2.0 final; i have to say things haven't been this bad in a long time wrt stability and polish Apr 25 18:54:45 i'm basically having to go through the idea logs, looking at gradle exceptions to figure out whats what Apr 25 18:54:46 this blows Apr 25 18:55:11 google should just subcontract their tools to MS or something Apr 25 18:59:07 not to be a jerk, but i gotta say, i don't feel left out still using eclipse... Apr 25 18:59:30 g00s, I shudder with the thought of VS-like "makefiles" that contain a billion options and frequently accidentally change because a developer pressed a button in the UI he didn't know what did (which is quite understandable as there are a million of them without explanations) Apr 25 18:59:49 myke: Android Studio is better, though. Apr 25 18:59:55 meh Apr 25 18:59:56 i would have gone back to eclipse if they did not drop it Apr 25 18:59:58 You're holding yourself back by using Eclipse. Apr 25 19:00:03 TacticalJoke: maybe, doesn't sound like the rc2 is Apr 25 19:00:12 RC1 is fine here. Apr 25 19:00:33 Don't forget that g00s is probably doing some Gradle voodoo. :D Apr 25 19:00:34 it's not fine Apr 25 19:01:46 i'm so pissed off that i stopped reporting issue i found Apr 25 19:02:15 g00s, finally got command-line "./gradlew connectedCheck" to correctly run the tests using Android Testing Support Library. Android Studio doesn't seem to play ball though Apr 25 19:02:39 My project isn't hugely complex, but I haven't had a single problem with RC1. Apr 25 19:02:46 no need complexity Apr 25 19:02:50 the problems i have now are (1) gradle syncs still failing (2) on a cold start everything in the IDE has error markers, so i have to build and then it seems to straighten out - if there is any legitimate error stopping a build, everything still stays fucked up with legit + illegitmate error markers everywhere Apr 25 19:03:19 and from AS, clean fails - lol, the simplest thing Apr 25 19:03:29 adq: In any case, the question of Eclipse versus Android Studio is completely different from the question of the stability of the latest AS RC. Apr 25 19:03:46 idk lol Apr 25 19:03:50 it's a bit entangled Apr 25 19:04:07 forcing ppl to move away from eclipse without providing same or better Apr 25 19:04:12 i'd still use eclipse if it was officially supported too, not that ADT is flawless - but unless your doing NDK may as well use AS now Apr 25 19:04:14 is ... undescriptible Apr 25 19:04:39 look the whole profilers tools Apr 25 19:04:56 look C stuff, ndk or renderscript Apr 25 19:05:11 look .. i will stop here Apr 25 19:05:25 i guess i'm doing a rather simple app so i haven't run into problems using eclipse - yet Apr 25 19:05:54 myke: What are you using for building? Maven? Apr 25 19:07:35 If you're using Eclipse's build system, you're missing out big time. Apr 25 19:07:41 For example, depending on AppCompat is a pain. Apr 25 19:08:51 And importing JARs is sadpanda. Apr 25 19:09:42 how do I place a horizontal progressbar above the toolbar? Apr 25 19:10:15 can't easily achieve that, maybe I'm missing something Apr 25 19:11:24 icedp: Works here if I say @layout_below="@id/progress_bar" for the toolbar. Apr 25 19:11:46 I mean "android:layout_below". Apr 25 19:17:00 completely eradicated my .idea folder and now I've finally got the instrumentation tests I want working both through command line and Android Studio Apr 25 19:17:04 only took me...2 hours? wtf :( Apr 25 19:17:14 OK - converting to the test support lib requires paying attention to lots of detail so you dont inadvertently use junit3 imports instead of junit 4 Apr 25 19:17:50 but now, should i be using things like assertEquals from org.junit, or junit.framework ? (both coming from junit 4.10 jar) Apr 25 19:18:11 You're supposed to use org.junit now, I think. Apr 25 19:18:16 k thx Apr 25 19:18:33 yes, that's right Apr 25 19:18:37 Even better is AssertJ. :D Apr 25 19:18:39 junit.framework comes from both junit.jar and android.jar Apr 25 19:19:01 TacticalJoke is that another library ? Apr 25 19:19:08 where does the android sdk install the Android directory on windows? Apr 25 19:19:22 It's an assertion framework that provides stuff like this: assertThat(someNumber).isBetween(1, 5); Apr 25 19:19:30 okay what I actually want is to place horizontal progressbar on a line that separates toolbar from the content.http://www.google.com/design/spec/components/progress-activity.html#progress-activity-types-of-indicators "Query indicator on a webpage" example Apr 25 19:20:12 icedp: The problem is that ProgressBars have padding. Apr 25 19:20:14 and by above I really meant on top of it. No matter what the xml ordertoolbar is on top Apr 25 19:20:15 TacticalJoke, oh, that sounds nice. Does it integrate well with JUnit? Apr 25 19:20:19 AndreasL: Yeah. Apr 25 19:20:22 TacticalJoke, nice Apr 25 19:20:35 TacticalJoke: I've tried padding=0 Apr 25 19:20:38 icedp: I'm not sure of the best solution. There are some ideas on SO, but they're not great. Apr 25 19:20:45 god i hate windows Apr 25 19:21:04 One solution is to create our own ProgressBar kinda thing, I guess. Apr 25 19:22:08 icedp: Note that this drawable padding is separate from the padding that you can set. Apr 25 19:26:36 Maybe the solution is to use our own drawables for ProgressBars? Apr 25 19:27:06 TacticalJoke so i used to have XXX extends TestCase for Junit3, now for Junit 4 does that class need an annotation ? or just the individual methods get @Test Apr 25 19:27:15 Just @Test. Apr 25 19:27:19 k thx Apr 25 19:27:22 And no need for "test" method-name prefix. Apr 25 19:27:40 yeah Apr 25 19:28:12 I'm working with a Wordpress JSON API called "wp-json". When working with JSON, do you typically "fill out" all of the JSON objects and their properties in terms of POJOs? Apr 25 19:28:27 Or do you only create models/properties you know you'll end up using? Apr 25 19:29:33 Here's an example of one of my unit-test things: http://pastebin.com/UE7rYQ7a Apr 25 19:29:40 Really simple, but shows the simplicity of AssertJ. Apr 25 19:31:34 thanks Apr 25 19:35:51 TacticalJoke: yep, eclipse built-in (ant isn't it?), importing appcompat, and manually throwing jars into my project...everything you hate Apr 25 19:36:16 good thing i'm not a professional android developer Apr 25 19:36:19 Not sure why you'd endure that pain. :D Apr 25 19:37:00 hasn't been too painful yet Apr 25 19:37:04 Long before AS 1.0, I was in here arguing that Eclipse was better. But I now have to admit that AS takes the crown. Apr 25 19:37:29 * g00s hits TacticalJoke with large trout Apr 25 19:37:47 that's not how that works Apr 25 19:37:48 I'm like a guy who changed religions or something. Apr 25 19:37:54 * myke slaps TacticalJoke around a bit with a large trout Apr 25 19:37:55 ^^ Apr 25 19:38:00 oh ha Apr 25 19:38:01 If I ever go from Mercurial to Git, though, you can consider me insane. :D Apr 25 19:38:07 haha what Apr 25 19:38:12 people still use mercurial?? Apr 25 19:38:18 Still? Apr 25 19:38:18 this is crazy, but setting translationY to -something actually moves the drawable but not the ProgressBar bounds TacticalJoke Apr 25 19:38:26 Mercurial and Git were released within days of one another. Apr 25 19:38:38 They're equally young. Apr 25 19:38:41 i used to use subversion but pretty much entirely git now, except for a few ancient repos Apr 25 19:38:51 dont get TacticalJoke fired up about Hg, unless you want to debat this until tomorrow :D Apr 25 19:38:55 Actually, they were started within days of each other. Not sure about official releases Apr 25 19:39:01 and he needs to get his reddit client released too :D Apr 25 19:39:52 icedp: This margin thing worked for me once: http://stackoverflow.com/questions/14171471/remove-vertical-padding-from-horizontal-progressbar Apr 25 19:39:55 Though I'm not sure whether it's wise. Apr 25 19:40:43 TacticalJoke: will try that as well, but translationY works for me now. Although I'm not expecting that result Apr 25 19:41:10 icedp: I suspect that the creators of Google Chrome used their own drawable or even ProgressBar control. Apr 25 19:41:20 I'm probably gonna do that. Apr 25 19:41:21 Hello all. Apr 25 19:41:25 Hello. Apr 25 19:41:31 Right Apr 25 19:41:40 O'Sullivan is playing, Anthaas. Apr 25 19:41:40 This time Im really going to create that TypeAdapter Apr 25 19:41:46 has to be said, the examples around aren't great :/ Apr 25 19:41:54 TacticalJoke: Oooh nice Apr 25 19:42:16 Hey guys, has anyone had this problem: When I set my ImageView (with a local image) using setImageURI, for some reason the displayed image is rotated Apr 25 19:42:49 TacticalJoke if all my unit tests pass, i'm going to wonder if its like when you tried it and everything passed Apr 25 19:42:56 when they should have failed Apr 25 19:43:15 that was great , assertTrue(true, false) .. pass ! Apr 25 19:43:17 woohoo Apr 25 19:43:25 :D Apr 25 19:45:41 happyowl_: Have you tried different images? Apr 25 19:46:02 TacticalJoke: Yup, I'm taking them with the camera Apr 25 19:46:16 Thats why Apr 25 19:46:23 Oh yeah? :O Apr 25 19:46:25 The camera is stupid. Apr 25 19:47:00 Hold on let me turn up the brightness Apr 25 19:47:07 Maybe it will become smarter :D Apr 25 19:47:15 Maybe check the original images. They might have that orientation (or whatever the word is) already. Apr 25 19:47:22 Might be the worst joke I've ever heard haha Apr 25 19:47:26 hahahahha Apr 25 19:47:28 ba dum tss Apr 25 19:48:28 hmm. No tests found.[Nexus 7 - 4.4.4] FAILED No tests found. This usually means that your test classes are not in the form that your test runner expects (e.g. don't inherit from TestCase or lack @Test annotations). Apr 25 19:48:32 TacticalJoke: In the exif or something? Apr 25 19:48:43 Are they public methods? Apr 25 19:48:47 TacticalJoke yeah Apr 25 19:49:59 i got an exception because one was protected void setUp() Apr 25 19:50:13 but i fixed that, and followed the instructions exactly Apr 25 19:50:14 Hmm, maybe the test runner isn't configured correctly? Apr 25 19:52:21 There are no TypeAdapter examples of a type adapter which has objects/arrays within the main JSON object Apr 25 19:53:12 TacticalJoke: my trick works on 5.1 not on 4.1 though. damn it. looks like I'll need a drawable like you suggested Apr 25 19:55:15 was there always a $25 fee? Apr 25 19:55:24 As far as I remember. Apr 25 19:55:41 Hey Anthaas, so you think setting the image after getting it from the camera might be the issue? Apr 25 19:56:04 Because setting the ImageView from a drawable resource does work fine Apr 25 19:56:16 I haven't used the camera enough myself, especially since Camera2 (or whatever its called), but I do remember it was a pain in the ass to use. Apr 25 19:56:19 TacticalJoke i'm looking at this https://developer.android.com/tools/testing-support-library/index.html Apr 25 19:56:27 I added @RunWith(AndroidJUnit4.class) Apr 25 19:57:01 and got a little further , but i'm not using : injectInstrumentation(InstrumentationRegistry.getInstrumentation()); Apr 25 19:57:04 Ah I see Apr 25 19:57:19 because my test case is just a pojo now, it can't inherit that method Apr 25 20:02:13 g00s: Hmm, not sure. Have you seen these? https://github.com/googlesamples/android-testing/tree/master/testrunner/AndroidJunitRunnerSample/app/src/androidTest/java/com/example/android/testing/androidjunitrunnersample Apr 25 20:02:13 oh well, followed the directions. Apr 25 20:04:49 TacticalJoke my code looks like https://github.com/googlesamples/android-testing/blob/master/testrunner/AndroidJunitRunnerSample/app/src/androidTest/java/com/example/android/testing/androidjunitrunnersample/CalculatorTest.java Apr 25 20:05:36 TacticalJoke: RE: progressbar. As it happens, somebody's done it https://github.com/castorflex/SmoothProgressBar/blob/master/library/src/main/java/fr/castorflex/android/smoothprogressbar/SmoothProgressDrawable.java#L232 Apr 25 20:05:40 If you go to View > Tool Windows > Build Variants, is "Android Instrumentation Tests" selected? Apr 25 20:05:59 TacticalJoke i'm doing this from the CLI, AS causes enough grief Apr 25 20:06:16 gradle connectedAndroidTest Apr 25 20:07:15 i even made sure i had testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" Apr 25 20:07:23 in my build.gradle Apr 25 20:07:51 icedp: Ah, nice. Apr 25 20:09:28 TacticalJoke ok, so my "unit" tests, are in androidTest, and they /were/ all XXX extends TestCase previously. Now that they don't extend TestCase they are POJOs inheriting from nobody. would the tooling consider these /not/ instrument tests ? Apr 25 20:10:42 Hello, using Android Studio 1.1 on linux Apr 25 20:10:51 I want to add a dependency, sugarORM Apr 25 20:10:58 but I cant run gradle properly Apr 25 20:11:06 Regarding screenshots for the play store listing, must they be screenshots of the app only, or can they have some editing flair? For example sync for reddit has its screenshots as in a device frame with some text Apr 25 20:11:27 desmin88 i've seen plenty of additions (text, etc) Apr 25 20:12:04 desmin88 https://play.google.com/store/apps/details?id=com.glidetalk.glideapp Apr 25 20:12:27 i think they are going to be featured, so it has to be ok Apr 25 20:15:39 g00s: Hmm, not sure. Never done this. Apr 25 20:18:53 i keep seeing this in logcat Apr 25 20:18:56 D/dalvikvm(10196): DexOpt: 'Ljunit/extensions/ActiveTestSuite$1;' has an earlier definition; blocking out Apr 25 20:18:56 D/dalvikvm(10196): DexOpt: 'Ljunit/framework/Assert;' has an earlier definition; blocking out Apr 25 20:19:34 dalvikvm(10196): DexOpt: not resolving ambiguous class 'Ljunit/framework/TestSuite;' Apr 25 20:23:30 g00s: Are you adding a manual dependency to JUnit (as well as "androidTestCompile 'com.android.support.test:runner:0.2'")? Apr 25 20:23:42 yes Apr 25 20:23:55 Hmm, is that needed? Someone was asking about this the other day and as far as I remember it wasn't needed. Apr 25 20:24:09 where would it get hunit 4 from then ? Apr 25 20:24:13 *junit4 Apr 25 20:24:32 that dep pulls in junit4 and hamcrest Apr 25 20:25:13 https://github.com/googlesamples/android-testing/blob/master/testrunner/AndroidJunitRunnerSample/app/build.gradle Apr 25 20:25:19 That doesn't manually depend on JUnit. Apr 25 20:25:38 I'd definitely try removing the manual dependency. Apr 25 20:27:34 Anyone ever make a file upload with OkHttp multipart form? Apr 25 20:28:36 TacticalJoke sure they do , they are in runner's pom Apr 25 20:28:58 so i deleted that line and 'gradle dependencies' -> junit / hamcrest gone Apr 25 20:33:18 Can I convert an image file to binary and then decode it back into an image in PHP? Apr 25 20:33:25 TacticalJoke that file you linked, has it at the bottom androidTestCompile 'com.android.support.test:runner:0.2' Apr 25 20:34:11 oh sorry for the confusion, you were asking if i put in Junit explicitly. no, thats pulled in from runner - sorry Apr 25 20:35:26 alright screw this, i just wasted another 4 hours of my life playing with this garbage. off to tother things Apr 25 20:40:43 how do I check my code for bottlenecks in Android studio? Apr 25 20:42:04 Question Apr 25 20:42:37 If my JSON has an object nested within the main object, I cannot do what most examples do which is "while (!in.peek().equals(JsonToken.END_OBJECT)) { ... }" Apr 25 20:42:40 What CAN I do? Apr 25 20:43:02 aka, how do I do profiling in Android studio? Apr 25 20:43:18 paulo_: CPU tab in Alt+6 tool window. Apr 25 20:43:29 Or any tab if < AS 1.2, I guess. Apr 25 20:43:48 Anthaas: I don't use peek() at all. Apr 25 20:43:55 Even parsing complex objects-within-whatevers. Apr 25 20:44:38 I can't use nextBlah() because my Json changes Apr 25 20:44:45 Sometimes nextX won't be there. Apr 25 20:44:47 Sometimes it will Apr 25 20:44:56 You can just say "while (parser.nextToken() != JsonToken.END_OBJECT) {". Apr 25 20:45:10 Then parser.getCurrentToken(). Apr 25 20:45:21 I think that's the simplest method. Apr 25 20:46:21 {"my_bool":true, "my_nested_obj":{"other_bool":false, "string":"value"},"other_string":"string_value"} for example Apr 25 20:46:26 Two END_OBJECT tokens Apr 25 20:47:34 TacticalJoke i think this was the missing piece https://github.com/googlesamples/android-testing/blob/master/testrunner/AndroidJunitRunnerSample/app/src/androidTest/java/com/example/android/testing/androidjunitrunnersample/suite/UnitTestSuite.java Apr 25 20:47:38 trying now Apr 25 20:47:59 Anthaas: I don't see the issue. :D Apr 25 20:48:06 You're expect a certain format, right? Apr 25 20:48:20 g00s: Ah. Apr 25 20:48:24 TacticalJoke: Well, I will reach the first END_OBJECT and thus miss any data after Apr 25 20:48:33 Anthaas: My app has to deal with any number of nested objects, and my code is really simple. Apr 25 20:48:35 TacticalJoke: they're grayed out Apr 25 20:48:41 It might have 0, 1, or 22. Apr 25 20:48:50 paulo_: Gotta run your app. Apr 25 20:48:58 TacticalJoke but i'm still confused by the terminology. if i have a class that doesn't extend ***InstrumentationTest, should it still go in androidTest ? Apr 25 20:49:06 TacticalJoke: it's running Apr 25 20:49:08 I'm guessing so, g00s. Apr 25 20:49:26 paulo_: Look for the one that says "Start method tracing". Apr 25 20:49:49 TacticalJoke: Thing Im missing something - there are no examples. It seems that the first end object that is reached will cause any data after to be missed if I do that while not end_token thing Apr 25 20:50:24 As soon as you hit "my_nested_obj", you start another while (!END_OBJECT) loop. Apr 25 20:50:32 TacticalJoke: that's grayed out Apr 25 20:50:43 TacticalJoke: Ahhh Apr 25 20:53:28 Anthaas: This is the kind of stuff I do: http://pastebin.com/YKt8xGvU Apr 25 20:53:37 Parsing.whatever is just a bunch of utility methods. Apr 25 20:54:29 Note that two "!= END_OBJECT" loops. Apr 25 20:54:49 paulo_: Maybe your device and app aren't selected at the top of that tool window. Apr 25 20:55:52 So doing database operations should usually happen on a separate thread. But how does that work when you have updates that may take some time. If the user goes to a different screen before the updates finish stuff could get messed up when other database operations try to run in their threads and the original update is still happening. In this situation should one make an init screen that allows the setup to finish? Apr 25 20:57:26 TacticalJoke: Looks a LOT more simple than mine. Apr 25 20:58:11 TacticalJoke: Mine currently: http://pastebin.com/ZCQXS4vh Apr 25 21:00:51 theblang 2 ways to do this, (1) kick off async write to db in activity, but block in onStop if there are any pending writes or (2) send it to service Apr 25 21:00:52 If JsonToken is an enum (I presume it is), you don't need to use .equals(). Apr 25 21:01:02 Enum instances are singletons. Apr 25 21:01:56 Anthaas: Why are you stream-parsing? Using another method is often easier. Apr 25 21:02:08 I'm stream-parsing only because performance is critical. Apr 25 21:02:16 TacticalJoke: Using a TypeAdapter with Retrofit. Apr 25 21:02:28 theblang dont do 1 if you know, based on design, things can get held up - for example, you have part of your app running which is writing thousands of records into the db, and this pending write could wait a few seconds. so its tricky Apr 25 21:02:38 Plus, I will be using the same technique with much larger datasets soon, so performance would be nice. Apr 25 21:06:58 Anthaas: It might produce simpler code if you allow UserResponse and User to parse their own data from the JsonReader. Apr 25 21:07:11 i.e., define constructors for those which take a JsonReader. Apr 25 21:07:34 And maybe Error? Apr 25 21:07:35 TacticalJoke: Ooh, I like that idea. Apr 25 21:07:37 Yeah Apr 25 21:08:21 Well, UserResponse is the return type for Retrofit. Apr 25 21:08:30 What reader would I pass it? Apr 25 21:08:53 I cant pass it the one that UserResponse uses would it would have data within it that User shouldn't see. Apr 25 21:09:37 Oh, is UserResponse the entire thing? Apr 25 21:10:55 TacticalJoke: Yeah Apr 25 21:11:01 It contains a User object and Error object Apr 25 21:11:05 well Apr 25 21:11:08 List Apr 25 21:11:46 Its a way JakeWharton said he used to do, and have some BaseResponse to handle different types of responses too. Apr 25 21:13:27 Anyone familiar with MoPub know about marketplace review? "Your access to Marketplace is currently being reviewed." Apr 25 21:13:32 I see. I guess you could have some kind of ErrorList class that parses the entire list of Errors and makes that available (or perhaps a static method that produces a List from a JsonReader). Apr 25 21:15:13 I was thinking of just separating into methods within the userResponseTypeAdapter, could make the User, UserResponse, and Error fields global, and have the methods return the JsonReader once they are done with it Apr 25 21:19:43 Anthaas: Would something like this make sense? http://pastebin.com/HGiJLvVK Apr 25 21:19:48 Just guessing, but it was a thought that came up. :D Apr 25 21:20:13 I might've misunderstood what you're doing, though. Apr 25 21:20:47 TacticalJoke that was it, voly crap Apr 25 21:21:00 ;o Apr 25 21:21:02 TacticalJoke but really, you need to add every single class to a Suite manually now? thats lamesauce Apr 25 21:21:07 Didn't think it'd be that. Apr 25 21:23:19 And mopub wont let me archive the test ad? Apr 25 21:23:24 TacticalJoke thanks for pointing out the example, i would never have figured it out Apr 25 21:23:34 Glad you figured it out. :) Apr 25 21:24:06 i think my anxiety stemps from how closely i /don't/ firegure things out on a daily basis, because of the most esoteric and inscrutable things Apr 25 21:24:09 *stems Apr 25 21:29:23 TacticalJoke: Sorry just got back Apr 25 21:29:37 TacticalJoke: Umm, it could do. Ill PM you something now Apr 25 21:35:23 I guess, on the plus side, the craziness of Android development means that all but the most persistent are barred entry. Apr 25 21:35:28 So we are the select few! Apr 25 21:35:49 On the down side, most apps on the store suck, and that'll stay the case for a long time (forever?). Apr 25 21:38:01 al i need is Windows Phone to get to 10% just 10 freaking percent ! Apr 25 21:39:36 TacticalJoke: is it really a developing for other (mobile) platforms is easier? Apr 25 21:40:37 g00s: Will never happen :P Apr 25 21:45:35 Anthaas it looks break yeah Apr 25 21:45:46 bleak Apr 25 21:46:38 MoPub's website is pretty confusing Apr 25 21:47:16 I've added AdMob as a network, but nowhere do I see how to actually set it up and link it to my admob acct Apr 25 21:52:56 "Dan Fredinburg, a longtime Googler who headed privacy for Google X and product management for the overall privacy team, died this morning of a head injury after a 7.9 magnitude earthquake triggered an avalanche on Mount Everest." :( :( :( Apr 25 21:54:34 In total, more than 1,100 people were killed by the earthquake, including 18 Mount Everest climbers." oh no Apr 25 21:58:08 ok I see a million posts about it and trying to figure what makes most sense for now 2015... On login it seems that I cannot get rid of the backstack of the main activity Apr 25 21:58:45 even with the finish() and clear_new_task, top etc... any ideas on how to remove every view as the user logs out, including the home activity? Apr 25 21:59:01 Lonesoldier728 only idea i have is do it like iosched Apr 25 21:59:09 they have google+ login Apr 25 21:59:29 there is finishAffinity() but that does not seem to do it? Apr 25 21:59:54 if i remember, every activity extends BaseActivity - which checks to see if login. If yes, nothing. If no, it shows a dialog or floating activity Apr 25 22:00:03 pretty simple Apr 25 22:00:11 If they log out, launch login activity with clear top? Apr 25 22:00:22 no, don't do that Apr 25 22:00:34 Lonesoldier728 , see iosched Apr 25 22:00:53 I tried clear top it does not clear the main activity Apr 25 22:04:15 g00s: damn.. it makes me appreciate more that I'm alive atm and can code Apr 25 22:04:31 anyone here used the MaterialDrawer library before? https://github.com/mikepenz/MaterialDrawer Apr 25 22:05:23 what is iosched Apr 25 22:19:00 Lonesoldier,It on github i think. Apr 25 22:20:46 is there any method that accepts a 3 digit hexValue like "#0ff" and return the int value of the color? Apr 25 22:20:52 android.graphics.color.parseColor accepts 6, 8 or the name of some colors only Apr 25 22:23:34 ademarfsj: 3-digit hex colors can be converted to 6-digit by doubling each char. #0af == #00aaff Apr 25 22:24:10 anyone know - i use adb over wifi, but when i plug in the device via USB it creates a second connection. is there any way to prevent that? i just want it to charge up Apr 25 22:24:26 g00s turn off usb debugging on the device? Apr 25 22:24:56 ok cool, thanks - hopefully thats just USB :D Apr 25 22:25:29 treelzebub lol, didn't work - turned off USB and wifi Apr 25 22:26:53 g00s: hmm.. try changing USB Computer Connection to Camera (PTP) instead of Media Device (MTP) ? Apr 25 22:28:03 treelzebub i don't see that on 4.4.4 - are you using 5.0 ? Apr 25 22:28:14 g00s: revoke usb authorization won't work either I guess Apr 25 22:29:13 g00s: make udev ignore your phone or use USB-condom Apr 25 22:30:32 g00s: what kind of device are we talking about? Settings vary widely, but choosing MTP/PTP has been a feature for a very long time. Do you get any USB options in the Notification Area when you plug in? Apr 25 22:30:41 i have 2013 N7 Apr 25 22:31:10 yeah i get that notification, it just goes to Developer Settings Apr 25 22:32:22 groooxxxx Apr 25 22:34:56 g00s: Cant you just turn off "USB Debugging - Debug mode when USB is connected" ? Apr 25 22:35:19 Anthaas no, it prevents and adb connections over tcpip alsop Apr 25 22:35:28 There is a separate option for revoking USB Debugging authorisations Apr 25 22:35:52 yeah, that nukes adb tcpip authorizations too Apr 25 22:36:00 treelzebub: ty for the answer Apr 25 22:36:03 Ahhh Apr 25 22:37:20 oh well, i have MTP and PTP both disabled, and same thing - guess i'd need a usb condom or something Apr 25 22:37:36 thats a hard menu to find omg Apr 25 22:37:48 g00s: plug it into the wall :P Apr 25 22:38:14 never seen an Android device that didn't have options for MTP/PTP. I'm at a loss. Apr 25 22:38:53 yeah found that one, burried in storage / overflow menu Apr 25 22:39:09 it just didn't work ;) Apr 25 22:39:23 maybe there is something i can do on the pc side in some ini file (mac) Apr 25 22:42:11 Anyone familiar w/ MoPub know where the actual network integration is? I can add AbMob as a network, but I do not see where I can hook it up to my admob acct Apr 25 22:42:13 if all you are wanting todo is charge it, why not just plug it into a wall jack that gives a better charge than usb? Apr 25 22:42:20 If you happen to be using Genymotion, you can specify a path to a separate adb. That way you could just do $ adb kill-server on the copy of adb that's running the wired connection Apr 25 22:43:05 but really, plugging into the wall is a solid option here ;) Apr 25 22:43:08 treelzebub btw the reason it was so hard to get there - i had mtp/ptp both disabled, so you dont get that notification ... which would normally take you into Settings Apr 25 22:43:14 heh Apr 25 22:43:42 http://www.random-host.com/blogs/enable-media-device-mtp-usb-mode-android-44-kitkat-and-50-lollipop Apr 25 22:43:52 meh screw it Apr 25 23:12:45 Theming stuff is so hard to figure out sometimes. It's easy to spend 20 minutes grepping through platform/AppCompat styles.xml stuff. Apr 25 23:13:35 Wish we could inspect views for their applied values (including which attributes are applied). Apr 25 23:21:44 Poor TacticalJoke, you've been inside the styles for ages now. I feel your pain. You do know you can hold CTRL/Cmd and click r parent="{these references}" to jump to the source, right? Apr 25 23:22:10 *ignore that extraneous r up in thurr... Apr 25 23:23:06 (in Android Studio, that is. dunno what Eclipse does) Apr 25 23:24:16 Yeah, but some queries are a bit more complicated (e.g., figuring out why the latest version of AppCompat essentially gives TextViews a different default text colour). Apr 25 23:24:18 BTW, I middle-click. :D Apr 25 23:24:58 TacticalJoke: http://t.sql01.com/sc/c5d85fcd_1430004284.png ? Apr 25 23:25:03 Or rather figuring out what the old colour was, what the new colour is, what the old attribute was, and what the new attribute is. Apr 25 23:27:11 icedp: Ah, I rarely use that. Does that show the current value of android:textColor (for example), though? Apr 25 23:28:00 TacticalJoke: this is true. a headache I've never been forced to experience. Apr 25 23:37:41 TacticalJoke: don't seen so, no Apr 25 23:37:47 there should be some console command Apr 25 23:42:33 TacticalJoke if i put @SmallTest infront of the class, i can get rid of that Suite stuff Apr 25 23:43:31 Oh, weird. Apr 25 23:44:17 https://dev.twitter.com/mopub/ad-networks/admob - "You should enter this in the “Your Accounts” page." Where the fuck is this your accounts magical page Apr 25 23:45:03 is @SmallTest required then ?android.test.suitebuilder.annotation.SmallTest; Apr 25 23:45:15 oh thats the clue, part of SuiteBuilder Apr 25 23:50:00 So apparently I should be able to edit the network on its page after clicking 'edit network' but upon clicking the button, nothing happens Apr 25 23:57:37 Clicking update your network settings also does nothing. Apr 25 23:57:47 TacticalJoke those unit tests before, were those yours for ByteBuffer ? Apr 25 23:58:41 Oh, they're tests for some class I created. Apr 25 23:58:43 But I won't need it for long. Apr 25 23:58:58 It's just a ByteArrayOutputStream clone that has a getArray method for returning the original array (rather than reallocating every time). Apr 25 23:59:29 a while ago i looked at these, they were very nice http://netty.io/wiki/using-as-a-generic-library.html#wiki-h2-7 Apr 26 00:05:55 If I set android:textColor="?android/attr:textColor" on a TextView, I get a crash. That can't be wrong, right? Apr 26 00:05:58 "android.content.res.Resources$NotFoundException: Resource is not a ColorStateList (color or path): TypedValue{t=0x2/d=0x1010098 a=-1}" Apr 26 00:06:14 I can stop this crash by setting android:textColor myself, but I don't see why I should have to. Apr 26 00:06:17 I'm guessing this is an AppCompat bug. Apr 26 00:06:51 IOW, android:textColor="?android/attr:textColor" without #ff0000 crashes. Apr 26 00:07:02 "android:textColor" * Apr 26 00:08:17 This applies whether I use android.widget.TextView or android.support.v7.widget.AppCompatTextView. Apr 26 00:09:59 lol: java.lang.RuntimeException: eglSwapBuffers failed: EGL_SUCCESS Apr 26 00:10:04 Say you call MyFragment fragment = new MyFragment(). Does this invoke onAttach, onCreate, onCreateView...? Apr 26 00:10:40 AndreasL: no, why would it? Apr 26 00:10:45 all it does is make a new fragment object Apr 26 00:11:21 desmin88, so when are these objects called? Apr 26 00:11:23 functions** Apr 26 00:11:27 AndreasL: just the constructor Apr 26 00:11:33 AndreasL: it's not magic Apr 26 00:11:46 icedp, no, it's code. I'm just confused about the order of things Apr 26 00:11:54 FragmentManager calls that methods probably Apr 26 00:13:00 it's okay to be confused about Activity/Fragment lifecycle. If you are not confused you didn't get it I guess =) Apr 26 00:13:20 AndreasL: I think it's this: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/FragmentManager.java#827 Apr 26 00:14:32 I've only ever used fragments through a viewpageradapter or by inflating a layout that contains a fragment, so the lifecycle things have sort of been hidden from me, I suppose Apr 26 00:15:41 TacticalJoke, heh, thanks. Perhaps a bit low-level for me when I'm trying to grasp the high level relations though ;-) Apr 26 00:17:18 AndreasL: heres a little diagram for the fragment lifecycle Apr 26 00:17:19 http://i.imgur.com/3NtIDGK.png Apr 26 00:17:30 desmin88, thanks! Apr 26 00:18:39 I've copied IabHelper from sampled and got a bunch of exception which I can't reproduce on my phone. The ones who use in-app billing, how are you doing? Apr 26 00:19:19 Doing well, using https://github.com/anjlab/android-inapp-billing-v3 and its a breeze after some initial bullshit-figuring-out Apr 26 00:21:29 desmin88: wow API couldn't been easier. so reliable you say? Apr 26 00:21:38 yes so far Apr 26 00:35:39 So in my Fragment's onAttach(...) I initialize some data members. How do I know from my activity that it's safe to call member functions on the fragment that act on these data members? Apr 26 00:36:00 In one of my activities I have to load a SQLLite database and the UI noticeably lags when the activity is created bc of the work involved in creating the database. So now, my idea is to create a splash screen and load the database initially so that from any other activity the database can be accessed quicker. Does this approach make sense? Apr 26 00:37:13 nah Apr 26 00:37:14 AndreasL: Which fields are you initializing in Fragment.onAttach? Apr 26 00:37:34 g00s +1 Apr 26 00:37:40 Fragment.onCreate is the metaphorical constructor. A lot of normal initialization can happen there. Apr 26 00:37:49 TacticalJoke, well, I kind of wanted to initialize an array adapter that would remain for the rest of the fragment's lifetime Apr 26 00:38:18 TacticalJoke, I'm struggling with understanding how to safely call methods on the fragment from my activity without running into the problem of uninitialized members Apr 26 00:38:58 What methods is the activity calling on the fragment? Apr 26 00:40:12 Anyone have any feedback to my approach above? Apr 26 00:40:26 mendozao: bad approach Apr 26 00:40:37 desmin88, the fragment displays a list of items. The activity just calls a method that supplies the fragment with new items to show Apr 26 00:40:59 desmin88: how come? what's the alternative? Apr 26 00:41:01 AndreasL: why cant the fragment get its own items for itself Apr 26 00:41:13 mendozao: splash screens blow chunks and should only be used in the rarest of cases Apr 26 00:41:24 evaluate why your db takes so long to 'initialize' and what you can to relieve that Apr 26 00:41:47 desmin88, well, that's exactly what I'm trying to prevent. I don't want to expose access to more state than the fragment needs. Ideally I just want it to display a set of items and not care where they come from Apr 26 00:42:16 that has merit Apr 26 00:42:24 AndreasL: it makes sense to create adapter when you have an AdapterView to set it to, so onCreateView / onViewCreated Apr 26 00:42:52 if you want to do MVP or variations of it, however, you should go full ass and not half ass Apr 26 00:43:13 desmin88, ok, in what way do you suggest? Apr 26 00:43:29 many approaches Apr 26 00:43:30 read this: https://corner.squareup.com/2014/10/advocating-against-android-fragments.html Apr 26 00:44:52 CedricBeust there by any chance ? Apr 26 00:45:19 mendozao: how do you create database? use SqliteOpenHelper and it shouldn't lag Apr 26 00:45:42 icedp: yes i use SqliteOpenHelper Apr 26 00:45:43 mendozao: could take time still, so display a progress bar Apr 26 00:45:54 If we drop fragments, though, we have to figure out some way of implementing the back-stack thing. ;| Apr 26 00:46:07 why does it take so long to start up your db mendozao Apr 26 00:46:25 desmin88: that's what im not sure about Apr 26 00:46:32 paste some code or something Apr 26 00:47:35 here is my database open code: https://gist.github.com/anonymous/1fe079b1621ad2e229be Apr 26 00:48:17 your doing it all wrong Apr 26 00:48:33 Square has backstack covered: https://github.com/square/flow/ Apr 26 00:48:33 why extend SQLiteOpenHelper if your not even going to use it Apr 26 00:48:45 TacticalJoke: there is square/flow. anyway plain backstack shouldn't be hard to implement I guess Apr 26 00:48:46 TacticalJoke, could you briefly explain the back stack problem? Apr 26 00:49:20 mendozao there is nothing wrong with that; but are you doing your db operation from the main thread - causing the db to be created on the main thread ? Apr 26 00:49:32 g00s: yes on the main thread Apr 26 00:49:42 AndreasL: It's possible to use fragments in such a way that the user can press Back to go to the previous fragment. Apr 26 00:49:42 DB db = new DB((SubmitActivity)getActivity(), "DDData.data"); Apr 26 00:49:42 database = db.openDataBase(); Apr 26 00:49:44 mendozao well thats your problem Apr 26 00:49:46 It's one of the advantages of fragments. Apr 26 00:50:28 TacticalJoke: really great perspective on this from https://corner.squareup.com/2014/10/advocating-against-android-fragments.html Apr 26 00:50:31 mendozao oh, and desmin88 caught it, yeah thats not really a great SQLiteOPenHelper Apr 26 00:50:38 lol Apr 26 00:50:42 TacticalJoke, where would this make sense? Like a viewpager with multiple fragments in a wizard style? Apr 26 00:51:04 AndreasL: Yeah. Apr 26 00:51:12 TacticalJoke, I see Apr 26 00:51:15 sorry desmin88 , you were right Apr 26 00:51:22 public void onCreate(SQLiteDatabase db) {} ; public void createDataBase() { mendozao suspicious? Apr 26 00:51:34 its ok g00s i love you anyway Apr 26 00:51:40 i basically copied and pasted that db code Apr 26 00:51:44 heh Apr 26 00:51:45 lol Apr 26 00:51:53 from some shitty site i found online Apr 26 00:51:56 :/ Apr 26 00:52:07 if you dont know what your code does or why it does then how can you expect to debug it Apr 26 00:52:27 Well, the problem I'm having now is that when I want to communicate with my fragment, I have no idea what stage of its lifecycle it is in Apr 26 00:53:08 When, in the Activity life-cycle, are you trying to communicate with it? Apr 26 00:53:28 TacticalJoke, after creation I suppose (onCreate) Apr 26 00:55:16 AndreasL: I see no problem with the fragment not knowing where or why its supposed to display some items but is the activity really the best place to be doing that? Apr 26 00:55:45 Activities are already too all encompassing and with different logic for each fragment in the activity it will get complicated Apr 26 00:57:29 desmin88, well, all my application logic is happening in complete separate classes (i.e. not Android-specific). The main activity just sort of acts as a middle man between the different views/fragments. A kind of controller, if you wish. Hmm, I see your point though. Apr 26 00:58:18 you could go with something like an interface that hooks up to lifecycle methods to communicate with your implementing fragment perhaps Apr 26 00:58:23 something to decouple it Apr 26 00:58:46 desmin88, ah, I see Apr 26 00:59:15 you dont want direct activity to fragment communication imo Apr 26 00:59:17 it will get hairy Apr 26 01:00:07 desmin88, hmm. I will still need to reflect changes in other fragments. I.e. if something happens in one fragment, the data displayed by another fragment is invalidated, so in that case the activity needs to call into the fragment, not the other way around... Apr 26 01:00:58 some sort of event bus that all fragments can listen to and update accordingly? Apr 26 01:01:06 Hello guys. I was wondering how one would figure out what tags to use with logcat to track the output of the builtin "Contacts" app? Apr 26 01:01:18 desmin88, yeah. Perhaps Guava EventBus is the way to go here Apr 26 01:01:39 AndreasL: https://github.com/square/otto Apr 26 01:01:40 or. Apr 26 01:01:55 desmin88, I'm already using Guava extensively though, would be convenient... Is Otto still worth it? Apr 26 01:02:16 i dunno Apr 26 01:02:57 AndreasL: I'm curious of the details surrounding the activity's needing to provide list items to the fragment in Activity.onCreate. Apr 26 01:03:11 desmin88, yeah, I think an event bus will essentially solve all my problems. My activity implements an interface that lets me retrieve an eventbus, the fragments simply retrieves the eventbus upon attach Apr 26 01:03:24 TacticalJoke do you do this? http://osherove.com/blog/2005/4/3/naming-standards-for-unit-tests.html Apr 26 01:03:36 [UnitOfWork_StateUnderTest_ExpectedBehavior] Apr 26 01:03:43 Oh, nah. I used to, though. Apr 26 01:03:56 TacticalJoke, oh, no it doesn't need to supply it in onCreate. Just any time after onCreate Apr 26 01:03:57 I see some merit in that. Only problem is that you end up with huge identifiers (and repetition). Apr 26 01:04:39 AndreasL: I guess the fragment would be fully initialised by then. Apr 26 01:04:54 an i guess isnt a gaurentee Apr 26 01:04:55 TacticalJoke, I'd hope so, but I'm not sure if that's true Apr 26 01:05:02 fragment transactions are async Apr 26 01:05:06 exactly Apr 26 01:06:38 you can force it with a executePendingTransactions() i believe Apr 26 01:06:44 but thats not really the answer Apr 26 01:07:11 desmin88, I see now that the EventBus approach makes everything very simple, as I can use it both ways Apr 26 01:07:19 don't need callback interfaces etc. Apr 26 01:07:37 just need a single interface that provides an eventbus Apr 26 01:08:03 now just be careful you dont end with a hard-to-follow situation where events are flying everywhere and you dont know what they do Apr 26 01:08:31 desmin88, good point Apr 26 01:10:21 g00s: I also don't like that it couples the unit-test name with the method-to-tested name. Apr 26 01:10:28 So renaming a method means renaming two things. Apr 26 01:10:59 yeah Apr 26 01:11:19 i had everything as testThis testThat Apr 26 01:11:28 but now with annotations, rethinking the names Apr 26 01:11:41 almost easier to leave it testXXX :D Apr 26 01:11:47 I like to think of testing behaviour rather than methods. Stuff like (for a Calculator) "addsTwoNumbers", "multipliesTwoNumbers", etc. Apr 26 01:12:04 There's an implicit "it" or something. Apr 26 01:13:29 Some people use "should" a lot: "shouldAddTwoNumbers", "shouldMultipleTwoNumbers". But that's even worse than "test". Apr 26 01:13:40 i want to ask CedricBeust why there is no AndroidTestNGRunner , like AndroidJunitRunner + AndroidJunit4 Apr 26 01:13:56 I wonder what naming style CedricBeust uses. :) Apr 26 01:16:01 Whatever the style, I think it makes sense to see the class as a coherent unit that has a few behaviours that need to be verified. Apr 26 01:17:06 g00s: Arrange/act/assert (or given/when/then) is nice, too. :D Apr 26 01:23:19 hmm, I've been having a lot of trouble lately with Gradle (I assume it's Gradle's fault anyway, since it's a build system problem) not properly rebuilding changed files. Has anyone else had problems with that? Apr 26 01:24:31 Has anyone had issues with trying to restart the emulator? I can't do this for some reason, it never comes back. Apr 26 01:28:17 I've tried wiping user data, not sure if that's gonna do it. adb.exe isn't running when I start the emulator, either. Apr 26 01:28:43 sean_1 use genymotion Apr 26 01:29:03 g00s: alright. Since i am on windows now...I'll give it a shot. Apr 26 01:29:31 i wonder if those guys will be in trouble (Geny) Apr 26 01:29:32 sean_1: You're not restarting the emulator every time you run your app, right? Apr 26 01:29:40 I ask because a lot of people seem to do that. Apr 26 01:29:51 seems like Oracle team isn't really working on virtualbox that much, kinda of abandonedware Apr 26 01:30:38 TacticalJoke: No, I did adb stop then tried redirecting stdout and stderr, then did adb start, android logo started shimmering forever, some dumb battery-related message kept appearing forever. Apr 26 01:31:37 g00s: I told the story some time ago but maybe you weren't around Apr 26 01:32:29 CedricBeust i may have missed it, but now that they did Junit4, is there any reason why TestNG runner couldn't be easily implemented ? Apr 26 01:32:47 sean_1: I'd see whether it's in the task manager (Ctrl+Shift+Esc). Apr 26 01:32:50 Anyone been able too get jdk working on droid? Apr 26 01:33:34 In the early Android days, I was asked if TestNG would be a good fit to be the standard testing framework. I spent a few days thinking about this and I said that it would probably not be efficient enough because I wrote it for the backend, not a 2007 mobile OS Apr 26 01:33:40 So I recommended JUnit Apr 26 01:33:43 I kinda regret it now Apr 26 01:35:03 CedricBeust but couldn't you simply do the same thing as test support library and add it now, we'd have to include it using testCompile Apr 26 01:35:27 g00s: Probably, haven't looked into it Apr 26 01:35:40 i just converted my project over to junit4, so not using any of the platform supplied (android.jar) stuff baked in Apr 26 01:35:43 Is TypedArray.recycle slow? (I ask because I seem to remember someone in here saying it was, but after looking at the source I'm not sure whether to believe this.) Apr 26 01:35:52 the bottom line remains that the core of testing is JUnit, which is unfortunate Apr 26 01:36:41 Here is the source of AppCompatTextView: http://pastebin.com/Zcfeexui Apr 26 01:36:46 Notice all those TypedArray.recycle calls. Apr 26 01:36:52 so you mean there would have to be some Junit shim that ran TestNG stuff ? Apr 26 01:36:59 (I posted it because I can't find it in the official repository, for some reason.) Apr 26 01:37:03 I assume, yes Apr 26 01:37:09 oh , yeah yuck Apr 26 01:37:26 Having groups and dependencies natively would have been nice Apr 26 01:38:16 Sorry everyone my chrome crashed Apr 26 01:38:21 where were we? Apr 26 01:38:35 sean_1: Ctrl+Shift+Esc. Apr 26 01:38:35 I was going to get that...alternate android emulator Apr 26 01:38:41 Look for emulator. Apr 26 01:38:48 TacticalJoke: I did that, got rid of it Apr 26 01:38:51 doesn't do jack! Apr 26 01:39:06 i get rid of it, start again, and nothing happens. Apr 26 01:39:20 Are you waiting long enough for it to start? Apr 26 01:39:23 It takes forever here. Apr 26 01:39:32 Even with HAXM. Apr 26 01:39:42 TacticalJoke: WHich is pretty awful and I think switching to oompa loompa or whatever it's called is better Apr 26 01:39:45 I have HAXM too Apr 26 01:40:08 as long as the other emulator can do everything the google provided one can i will be fine Apr 26 01:40:23 they want me to pay that monthly fee, i hope they're not being too restrictive Apr 26 01:40:24 dont think geny needs haxm Apr 26 01:41:13 It's kind of sad that Google's own emulator is so slow, i mean it is also kind of weird too Apr 26 01:41:20 I don't understand how AppCompatTextView has different default text colour than TextView. The source shows nothing to do with text colour: http://pastebin.com/Zcfeexui Apr 26 01:41:41 Is it something weird relating to android:theme going a little further than before? Apr 26 01:43:44 CedricBeust do you have a quick link demonstrating how you name your tests ? Apr 26 01:46:10 Weird. There's LinearLayoutCompat.java. Apr 26 01:46:14 In the source JAR. Apr 26 01:47:38 yeah, that gives you dividers i think Apr 26 01:47:59 seperators Apr 26 01:48:40 TacticalJoke you dont remember back in the day, haveing manually put between things to put a seperator there Apr 26 01:48:46 heh Apr 26 01:49:07 Oh, the spacer thing? Apr 26 01:49:12 yeah Apr 26 01:49:16 1 pixel Apr 26 01:49:49 g00s: Not really, I don't have a rule, sometimes it "shouldDoThis()", other times just nouns Apr 26 01:50:07 ok thanks Apr 26 01:50:26 TacticalJoke lol, "should" :D :D :D Apr 26 01:50:42 i propose "hopefullyDoesThis" Apr 26 01:52:45 I'm not sure whether to just use android.widget.TextView instead of the AppCompat one, given that my TextViews need to be as fast as possible (and the AppCompat one has that weird stuff in the constructor). Apr 26 01:52:52 Though it doesn't seem like a forward-compatible decision. Apr 26 01:53:50 TacticalJoke: Not sure the appcompat one would be slower, I assume if there's some slowness, it's at init time only but after that, you use the fastest TextView tha makes sense for your API level Apr 26 01:54:55 Yah, it would be init time only. Apr 26 01:56:55 Do you know whether TypeArray.recycle can be slow? Apr 26 01:57:07 I see a synchronized statement, but not much else. Apr 26 02:03:22 TacticalJoke: out of curiosity, what's your minds? Apr 26 02:03:29 *minSdk Apr 26 02:04:30 15 right now. Might bump it to 16. Apr 26 02:05:39 16 Apr 26 02:06:23 if i/o brings new version, maybe 17 Apr 26 02:06:28 22 Apr 26 02:06:43 for BLE i need 19 :D Apr 26 02:12:06 a user was having trouble doing something with my app. so i sent them a video demonstrating it, they still couldn't succeed :| Apr 26 02:13:11 my min is 14 Apr 26 02:13:23 Hey guys, back again. Everything is breaking, genymotion needs some opengl thing and i've pretty much had it at this point Apr 26 02:13:30 so now i'm back on linux Apr 26 02:13:37 i just want to do my damn homework Apr 26 02:14:25 some opengl "thing?" sounds like you're in a hurry ;) Apr 26 02:14:54 Carbonflux: yeah, well, it's a driver that genymotion needs for some reason Apr 26 02:15:03 Dayum. Think I figured out why AppCompatTextView text is a different colour. Apr 26 02:15:11 although it seems like it doesn't let me use the HVQA skin, so Idon't think I can use the thing anyway Apr 26 02:15:24 I think it's because it *doesn't* do something that TextView does: public TextView(Context context, AttributeSet attrs) { this(context, attrs, com.android.internal.R.attr.textViewStyle); } Apr 26 02:15:39 public AppCompatTextView(Context context, AttributeSet attrs) { this(context, attrs, 0); } Apr 26 02:15:51 Only took me like two hours. :| Apr 26 02:16:49 HVGA*** Apr 26 02:17:08 sean_1, in windows? opengl is a graphics SDK, installed by default in linux and should be there in windows normally. Apr 26 02:17:29 Carbonflux: well it gave me an openGl error in windows so I gues it wasn't in there Apr 26 02:18:32 I think I've got Google's emulator workin on linux, maybe not though, I'm going to...WOW it works holy crap! Apr 26 02:19:16 everything works on linux :p Apr 26 02:19:22 :) Apr 26 02:20:09 well see, I switched to windows at first because I was getting problems and I'm pressed for time. But then it was such a huge PITA...once genymotion stopped working out that was the straw that broke my back Apr 26 02:20:32 the emulator on here is sooo fast hot damn, it started up within 30 seconds! Apr 26 02:20:37 being pressed for time is the worst way to solve problems ;) Apr 26 02:20:47 sean_1: genymotion works great on linux Apr 26 02:21:04 treelzebub: I use Gentoo, they provide only packages for ubuntu or debian systems. Apr 26 02:21:05 apparently so does the stock emulator, so why bother? Apr 26 02:21:19 yeah and i am *not* bothering now, woot Apr 26 02:21:21 except geny also demands some stupid accounts and such... Apr 26 02:21:21 cool, i'll check that out! Apr 26 02:21:31 ravilov: decent point Apr 26 02:21:32 :) Apr 26 02:22:51 I'm using QEMU with KVM. Much better than HXMAX or whatever it was Apr 26 02:22:57 hm, so genymotion has support for stuff the default emulator does not, like audio capture etc? Apr 26 02:23:00 Oh, man. That is so hard to trace through. This is crazy stuff. Apr 26 02:23:22 I can't see why anyone would want to use it at a glance. Apr 26 02:23:29 So TextView jumps through a thousand hoops and then sets the default textColor to colorSecondary. AppCompatTextView doesn't do this, and by default it takes textColorPrimary. Apr 26 02:23:43 Insanity. Apr 26 02:23:52 (Tracing through it is insanity.) Apr 26 02:24:19 I can see why it needs opengl tho Apr 26 02:25:15 Carbonflux: "opening audio input failed" on the normal emulator. Apr 26 02:25:20 so it does have that. Apr 26 02:25:38 ya, the emulator does not support media stuff. Apr 26 02:26:16 genymotion seems *really* nice, if you can get it going. That experience on Windows I had just now reminded me of why I stopped using it for anything that isn't games. Developing on there makes me feel like a bird with clipped wings. Apr 26 02:26:51 if you can work with gentoo you can work with windows Apr 26 02:27:10 it just sounds like you are in too much of a hurry to figure it out and letting yourself get mad at it Apr 26 02:27:21 ...basically, yeah Apr 26 02:27:25 both nvidia and amd have opengl and opencl support Apr 26 02:27:39 its sounds like you just need to install new drivers Apr 26 02:28:02 yeah. I think I'm just going to stick to working on here now though. Honestly. Apr 26 02:28:03 I am kind of amazed its not installed already unless you are running XP or something. Apr 26 02:28:10 it's Windows 8 Apr 26 02:28:14 hm Apr 26 02:28:15 it is pretty weird, I agree Apr 26 02:29:27 Trying to find the simplest implementation of SqliteOpenHelper without having to extend it using some weird code I found online (https://gist.github.com/anonymous/1fe079b1621ad2e229be) - Any suggestions on simple yet robust implementations? Apr 26 02:31:15 Also - when opening up a sqllite database, should the application be copying your database from one location to another or reading just directly from one location? Apr 26 02:31:38 mendozao: DB_PATH is not safe as it is implemented Apr 26 02:31:59 mendozao: This implementation is terrible Apr 26 02:32:23 CedricBeust: yea i didn't write that code Apr 26 02:32:35 CedricBeust: want to write my own Apr 26 02:32:35 Ignore it, most of it is completely unnecessary Apr 26 02:32:59 The simplest version is very tiny Apr 26 02:33:10 CedricBeust: got it. Do you have a snippet of a simple version? Apr 26 02:34:16 mendozao: Typically, you define the table name(s), the columns and you implement onCreate() (you can leave onUpgrade() empty initially). And that's it Apr 26 02:35:23 So, how does one go about logging activity from an app for debugging? I've got to do that for the Contacts app. Apr 26 02:35:35 I know I use logcat, but filtering has been problematic. Apr 26 02:36:19 The answer is LogCat, regardless. Apr 26 02:36:28 CedricBeust: do you need to copy the database from one location to another like the code I shared did? Apr 26 02:36:37 mendozao: Absolutely not Apr 26 02:36:56 CedricBeust: so the assets folder is a good location for it Apr 26 02:37:04 and just read it from there? Apr 26 02:37:10 Your app should pretty much not care where that .db is. The only time where I use it is when I want to pull it and review it with a browser on my computer Apr 26 02:39:06 CedricBeust: not sure i understand. Why shouldn't it care where the db is? Doesn't it need to know from what location to read it from? Apr 26 02:39:23 No, it doesn't Apr 26 02:39:42 All your operations go through that db parameter which encapsulates the database. Doesn't matter where it is Apr 26 02:40:15 hey guys! Apr 26 02:40:19 I have this code https://gist.github.com/98ad2caf431b6b0b9a42 Apr 26 02:41:06 this slide_right animation simply slide to the right both the new and old activity, until the old activity is hidden and finished Apr 26 02:41:26 it works most of the time, but sometimes the default animation for startActivity is used Apr 26 02:41:35 is it a bug? Apr 26 02:42:26 CedricBeust: not sure if i'm missing something but I don't understand Apr 26 02:43:21 mendozao: Here's a good tutorial: http://www.vogella.com/tutorials/AndroidSQLite/article.html Apr 26 02:48:30 Hey guys, how can I make the emulator stop flushing stats to disk? Apr 26 02:48:40 If I can't do this, where is the file stored in linux? Apr 26 02:51:35 any help guys? overridePendingTransition can't be that random! Apr 26 02:51:37 CedricBeust: Thanks Cedric Apr 26 02:51:41 Has anyone that uses MoPub encountered a situation where you add an ad network but you cant set it up? Trying to integrate admob but it wont let be setup things like pub. id etc. Apr 26 02:56:07 mendozao: Let me know if you have questions **** ENDING LOGGING AT Sun Apr 26 02:59:59 2015