**** BEGIN LOGGING AT Wed Oct 08 03:00:00 2014 Oct 08 03:01:40 it's just really hard to figure out the flow of this code Oct 08 03:04:42 JacobTabak ping Oct 08 03:05:20 hey Oct 08 03:06:06 did you say something to me …as I was quitting ? oh and did you help the gauges guy last night ? ;) Oct 08 03:06:42 he knows to come to you by name…I'm impressed :) Oct 08 03:07:10 i think i just linked my stackoverflow Oct 08 03:07:13 in a desperate attempt to get help Oct 08 03:07:26 but i think we've determined it's a bug in either the robolectric or android-apt plugin Oct 08 03:07:42 so im trying to run the apt plugin from source Oct 08 03:08:07 gotta love those bugs Oct 08 03:19:35 here's a great bug : BluetoothGatt.disconnect() doesn't work properly on 4.3 and lower Oct 08 03:19:47 :( Oct 08 03:20:13 g00s have you written/modified a gradle plugin? Oct 08 03:20:26 (or anyone else) Oct 08 03:21:06 JacobTabak not yet, i'm planning on writing a gradle plugin actually. it would be specific for android though and - i dunno, its a lot to learn for something i probably wouldn't use anywhere else (gradle) ... future SE / EE java projects maven is fine for me Oct 08 03:21:42 i just need to modify a few lines on an existing one and it seems like such a pain Oct 08 03:21:58 or if i was doing scala, sbt, or clojure leiningen Oct 08 03:36:33 So the biggest thing is Oct 08 03:36:46 I don't know how these files communicate with each other Oct 08 03:37:09 For example, i have an object that has a .getIntent function Oct 08 03:37:14 in one file. Oct 08 03:37:30 How do I tell another file how to access that object? Oct 08 03:37:47 i just see a lot of "extends" stuff.. Oct 08 03:38:08 Totally off-topic, but this is the most awesome video you'll ever see: http://youtu.be/yLIDnzHetKg Oct 08 03:38:11 (Bagpipe fail.) Oct 08 03:38:12 Agamemnus learn java, read d.android.com Oct 08 03:38:29 man, whats with all these intellectually lazy people today Oct 08 03:38:45 i am not going to go to the enemy's site Oct 08 03:38:48 nevar Oct 08 03:39:03 what enemy? Oct 08 03:39:10 java Oct 08 03:39:19 umm ... Oct 08 03:39:41 it's a delicate situation... Oct 08 03:39:50 you picked the wrong platform :) Oct 08 03:41:24 Agamemnus or if you don't like java, do scala or something - but you'll have to do a lot of learning and piecing things together - you still have to deal with java APIs Oct 08 03:41:52 or android ones Oct 08 03:43:17 Agamemnus embrace java, your game will become better because of it ;) Oct 08 03:44:12 is onCreate () a function that's run whenever an object is declared? Oct 08 03:44:42 just say Y or N Oct 08 03:44:46 onCreate() is not a method of object Oct 08 03:44:47 no Oct 08 03:44:55 Agamemnus the question doesn't even make sense Oct 08 03:45:02 you dont' know what you don't know Oct 08 03:45:19 yep Oct 08 03:45:21 in the taxonomy of ignorance, you're at level 3 Oct 08 03:45:56 Grr. I can't do the "adb shell" thing on one of my phones. Oct 08 03:46:03 note 2? Oct 08 03:46:11 When I say "run-as ", it says " has corrupt installation". Oct 08 03:46:15 It's a Sony Xperia M. Oct 08 03:46:18 hmm Oct 08 03:46:44 http://stackoverflow.com/questions/4873124/android-native-debug-ndk-gdb-on-htc-desire-run-as-flaw Oct 08 03:46:46 maybe Oct 08 03:46:57 http://code.google.com/p/android/issues/detail?id=16391 Oct 08 03:48:59 Thanks. Looks similar. Oct 08 03:49:02 I'm googling around. Oct 08 03:51:42 trying ot make one plugin depend on another.. Oct 08 03:51:47 gradle plugin Oct 08 04:10:55 guys my safari jigsaw puzzle app updated Oct 08 04:11:30 wait what Oct 08 04:11:37 you're making a safari jigsaw puzzle app? Oct 08 04:11:38 noooooooo Oct 08 04:12:15 me? no Oct 08 04:12:20 its just some random one i dwonloaded in the app store Oct 08 04:12:27 Oh, you mean mine Oct 08 04:12:29 i like it, its a lot of fun, but the performance is sluggish Oct 08 04:12:32 and its all webviews Oct 08 04:12:50 ho, ho, ho... Oct 08 04:13:28 JacobTabak how much faster do you think it would be using native tech rather than web ? Oct 08 04:13:55 i dont know Oct 08 04:15:36 Agamemnus: I thought you were a noob? How did you make an app? :) Oct 08 04:16:11 Javascript. Oct 08 04:20:13 i'm going to bash.org that! hahaha Oct 08 04:22:30 lol Oct 08 04:26:39 God, some bash.org entries are so bad. Oct 08 04:26:46 They're like "Hay guise I made an lol hahaha". Oct 08 04:28:51 Some are great, though. Oct 08 04:38:04 TacticalJoke: as always Oct 08 04:38:55 JakeWharton 8 hours later - change dagger compilier to 'compile' rather than 'apt' or 'provided' and all my problems disappear Oct 08 04:39:10 magic Oct 08 04:39:17 too tired to think anymore, i was debugging the apt plugin Oct 08 04:39:33 this is my solution for now Oct 08 04:40:13 JacobTabak: haha. Well of course that will work. Oct 08 04:40:26 that would've been nice to realize hours ago Oct 08 04:40:34 i mean, i want to help fix this issue Oct 08 04:40:39 but on my own schedule lol Oct 08 04:40:50 JacobTabak: but now you are bundling the compiler and guava in your APK Oct 08 04:41:08 guava is testcompile Oct 08 04:41:17 what do you mean exactly by bundling? Oct 08 04:41:29 oh Oct 08 04:41:34 i misread you Oct 08 04:41:38 i thought you said, *how* are you Oct 08 04:41:52 so i don't think i'm actually including guava, just the compiler Oct 08 04:41:55 how big is it? Oct 08 04:42:51 also, i can take it out for relase builds if this issue isn't fixed by the next time i release Oct 08 04:42:57 my tests just wont work Oct 08 04:43:08 wow you guys should create a guide to painful parts of android that should be avoided Oct 08 04:43:21 this is just 2 gradle plugins not working nicely together Oct 08 04:43:24 really nothing to do with android Oct 08 04:45:00 <_DB> sup Oct 08 04:45:13 anyway i have that repo up to easily reproduce the issue ( https://github.com/jacobtabak/Robolectric-Dagger-Skeleton ). i still don't know if hte issue is with the robolectric plugin or dagger, so not sure where to log the issue Oct 08 04:45:15 <_DB> I have a client who wants a app similiar to groupon Oct 08 04:45:31 <_DB> for stores hes in business with Oct 08 04:45:41 JacobTabak: it's not dagger Oct 08 04:45:49 sorry Oct 08 04:45:50 i mistyped Oct 08 04:45:55 robolectric plugin or apt plugin Oct 08 04:45:56 <_DB> lets say the user buys a coupon and goes to a store and uses it Oct 08 04:46:00 been staring at this too long Oct 08 04:46:13 mistyped/misthought same thing Oct 08 04:47:30 <_DB_> connection froze Oct 08 04:47:45 <_DB_> but yeah how Can i send a alert o the database that a coupon has been used? Oct 08 04:48:09 <_DB_> a qr scanner or perhaps he would give the store owner a device to ping it? Oct 08 04:49:55 <_DB_> i havent started making it bu I cant think of a feasible way for it to happen automatically Oct 08 04:50:07 <_DB_> sorry T key is jammed Oct 08 04:52:00 <_DB> ?? i keep getting disconnected Oct 08 04:52:09 Hello Oct 08 04:52:20 Same _DB from #javascript? Oct 08 04:52:27 Why haven't you bought a new keyboard yet? Oct 08 04:55:00 Hello.... Oct 08 04:55:13 I just accidentally said this in a different channel: Oct 08 04:55:17 Hello... if anyone is familular with JaCoCO code coverage... could you please look at my question here: http://stackoverflow.com/questions/26249378/can-jacoco-be-configured-to-show-how-many-tests-cover-each-line-of-code (includes screenshots) Oct 08 05:04:40 so guys Oct 08 05:04:54 http://cl.ly/image/3A1Q0E1Q2p3m Oct 08 05:05:02 lesson learned.. use robolectric for CI Oct 08 05:06:12 ok ok Oct 08 05:06:17 so here's the thing guys Oct 08 05:06:20 please help me Oct 08 05:06:26 I have a ContentProvider Oct 08 05:06:36 I need to pass a "cordova" object to it Oct 08 05:06:51 but i don't think i am doing this right at all Oct 08 05:06:58 what is in the cordova object Oct 08 05:07:17 brb beer... so done thinking for the day Oct 08 05:07:29 here's the code Oct 08 05:07:30 final XAPKProvider xapkProvider = new XAPKProvider (); Oct 08 05:08:28 That's replacing a tag in the manifest file Oct 08 05:09:03 Oct 08 05:09:20 So that's the basics, without passing any extra objects Oct 08 05:09:29 But, it isn't the same Oct 08 05:09:31 doesn't work Oct 08 05:10:05 wtf is a xapkprovider? Oct 08 05:10:12 It's a content provider Oct 08 05:10:26 sry i dont do content providers Oct 08 05:10:29 dont think i can help you Oct 08 05:10:34 Seeewwww... does anyone here use JaCoCo or any other code coverage tool? Oct 08 05:10:38 "APEZProvider extends ContentProvider" and "XAPKProvider extends APEZProvider" Oct 08 05:10:48 after_r no, but I might start soon! just got CI set up today :P Oct 08 05:10:59 Agamemnus i dont think you instantiate it. Oct 08 05:11:06 you query it with a content resolver Oct 08 05:11:23 and that can pass data to it? Oct 08 05:11:35 yes... a content provider is like a database Oct 08 05:11:43 the the content resolver allows you to insert or query it Oct 08 05:11:51 ahh Oct 08 05:11:53 it's not easy... lots of code for not much functionality Oct 08 05:12:16 I noticed Oct 08 05:12:31 the only benefit is that it allows for permission based transfer of data between apps Oct 08 05:12:44 why are you doing content resolver instead of in app purchase? Oct 08 05:13:16 go back a bit. Oct 08 05:13:24 I'm using APK expansions right now Oct 08 05:13:34 Want to make this work better Oct 08 05:13:40 i'm duplicating parameters to make it work Oct 08 05:13:49 but then MAYBE in-app purchase yeah ok Oct 08 05:15:07 oh yea i dunno Oct 08 05:42:06 Agamemnus: android:exported="false" --> your CP is internal to the app only, NOT available to other apps Oct 08 05:48:31 Hi lasserix_ Oct 08 05:48:36 hey Oct 08 05:57:07 it's all the same app.. Oct 08 06:05:29 also Oct 08 06:05:33 remove the multiprocess Oct 08 06:05:41 contentproviders ARE remote services Oct 08 06:05:46 so that makes no sense Oct 08 06:05:46 plus Oct 08 06:05:54 Dianne Hackborn Oct 08 06:05:54 9/12/10 Oct 08 06:05:54 Don't use this, it is some old cruft from pre-1.0 design that doesn't work and should be ignored these days. Just pretend like the attribute doesn't exist. :} Oct 08 06:12:13 fork android, remove it ! Oct 08 06:26:53 lol, HN down again Oct 08 06:30:28 headline news? Oct 08 06:45:21 I'm interested how faster buck would be instead of gradle in app I'm developing Oct 08 06:51:01 And I m still using eclipse lol Oct 08 06:51:14 http://www.androidpolice.com/2014/10/07/an-exclusive-look-at-googles-early-multi-window-explorations-for-android/ Oct 08 06:52:21 its like we're still at windows 1.0 :) Oct 08 06:53:03 is there any way to Subscribe and Produce from the same fragment using Otto? I'm getting an error when i try to register on a fragment that has a Produce method Oct 08 06:54:57 or maybe greens eventbus? Oct 08 06:54:59 anyone? Oct 08 06:57:29 I'm using eventbus Oct 08 06:57:42 from greens Oct 08 06:58:20 g00s: since when there's nexus 9 ? Oct 08 06:59:46 since veryone and their mother leaked it Oct 08 07:00:09 It's too big Oct 08 07:00:15 It won't fit Oct 08 07:00:44 where ? Oct 08 07:00:59 ;) Oct 08 07:00:59 Mavrik: with full spec ? Oct 08 07:01:29 well, not interested in tablets... Oct 08 07:01:31 gordon_ is multiple modules Oct 08 07:01:40 (responding to your buck comment) Oct 08 07:02:10 whats wrong with eclipse? Oct 08 07:02:18 I'm trying to find the best environment setup for myself Oct 08 07:02:23 its not supported Oct 08 07:02:26 after_r: ask what is *not* wrong with eclipse? ;) Oct 08 07:02:28 nd not modern Oct 08 07:02:32 something with code coverage.. im thinking that command line is the only way to fly Oct 08 07:02:44 after_r zzz cant deal with you right now goodnight Oct 08 07:03:00 JacobTabak: have you used buck ? Oct 08 07:03:06 no, thinking about it Oct 08 07:03:10 jacoco is not giving me enough info Oct 08 07:03:19 method limit killing me Oct 08 07:03:25 but i saw the talk at droidcon nyc Oct 08 07:03:35 JacobTabak: build system wont solve it ;) Oct 08 07:03:41 buck does solve it.. Oct 08 07:04:01 what ? Oct 08 07:04:02 how Oct 08 07:04:07 exopackage for debug builds, proguard for release builds Oct 08 07:04:52 will dive into it Oct 08 07:05:05 does it support native extentions ? Oct 08 07:05:14 *extensions Oct 08 07:05:26 i don't think so Oct 08 07:05:31 they mentioned it Oct 08 07:05:39 i think they said its possible Oct 08 07:05:45 someone would need to contribute it though Oct 08 07:05:56 as native ext I mean ndk code in libraries Oct 08 07:06:00 yep Oct 08 07:07:06 htey said something about if you set up your buck build, you can do gradle builds w/o maintaiing 2 buildfiles Oct 08 07:07:10 JacobTabak what are the few big libraries you are using contributing to the problem ? Oct 08 07:07:34 i just downgraded to google play services 4.0.30 and that put me back under Oct 08 07:08:01 facebook SDK... Oct 08 07:08:03 why doesn't this work? Oct 08 07:08:04 rxjava Oct 08 07:08:04 Context ctx = getBaseContext (); Oct 08 07:08:08 JacobTabak: what video / article did you read ? Oct 08 07:08:18 gordon_ they gave a presentation at droidcon nyc Oct 08 07:08:19 "cannot find symbol" Oct 08 07:08:26 JacobTabak is rxjava big? i haven't even looked yet :O Oct 08 07:08:33 JacobTabak: http://new.livestream.com/facebookdevelopers/events/2089675 Oct 08 07:08:35 this one ? Oct 08 07:08:37 and i spoke to them at another event as well before droidcon Oct 08 07:08:45 gordon_ the videos aren't up yet Oct 08 07:08:54 http://nyc.droidcon.com/2014/lineupnyc/session-68/ Oct 08 07:09:41 ok, thanks for info Oct 08 07:09:50 will monitor this site :> Oct 08 07:10:03 do you have twitter Oct 08 07:10:06 whats your handle Oct 08 07:10:14 Wy can't I get the getBaseContext Oct 08 07:10:18 why is it so hard Oct 08 07:10:21 Agamemnus ive never used basecontext in my life Oct 08 07:10:32 if you want basecontext, you are doing it wrong Oct 08 07:10:44 gordon_ pm me your twitter handle Oct 08 07:10:48 I'm still trying to get the cordova object and the ContentProvider to communicate Oct 08 07:10:56 I can't find any way Oct 08 07:11:13 download a sample... Oct 08 07:11:20 There is nothing Oct 08 07:11:24 ,... Oct 08 07:11:26 yes there is Oct 08 07:11:26 they don't communicate Oct 08 07:11:58 I got a context Oct 08 07:12:02 but not the right context Oct 08 07:12:15 Context ctx = Context.getContext (); inside the ContentProvider won't crash Oct 08 07:12:22 well.... I mean it will crash Oct 08 07:12:28 But it will compile. Oct 08 07:12:45 But what I need is: cordova.getActivity().getApplicationContext() Oct 08 07:12:51 Can you put a fragmentstatepageradapter inside a fragment? Oct 08 07:13:27 lasserix_ it might create a singularity Oct 08 07:13:31 can buck do Robolectric type testing? Oct 08 07:13:46 where the whole android platform is "emulated" on the machine java vm Oct 08 07:13:51 thus way faster Oct 08 07:14:25 after_r buck doesnt have anything to do with testing Oct 08 07:14:39 well Oct 08 07:14:40 im not sure Oct 08 07:14:40 then why would I use it Oct 08 07:14:43 but i think gradle runs the tests Oct 08 07:14:46 buck just builds it Oct 08 07:14:50 oh Oct 08 07:15:47 i'm probably wrong Oct 08 07:15:53 can espresso tests also be robolectric tests? Oct 08 07:16:01 so that they run without an emulator/device Oct 08 07:16:04 if you look at the deckard sample Oct 08 07:16:08 or do espresso tests require one? Oct 08 07:16:11 I did look at it Oct 08 07:16:12 deckard-gradle Oct 08 07:16:14 they're separate Oct 08 07:16:25 so they do require one? Oct 08 07:16:53 i believe you need an emulator Oct 08 07:17:08 it uses the googleinstrumentation test runner Oct 08 07:17:10 genymotion is 2.3.0 today Oct 08 07:17:14 g00s no shit??? Oct 08 07:17:20 because I got this project: https://github.com/nenick/android-gradle-template/ to work without a device/emulator Oct 08 07:17:25 they've been so quiet Oct 08 07:17:32 and the "component tests" which are espresso tests worked Oct 08 07:17:40 g00s so that is a no? Oct 08 07:17:45 so thats why im confused Oct 08 07:18:05 lasserix_ recursive fragments is always going to be dicey; it might work Oct 08 07:18:12 ahh ok Oct 08 07:18:23 PagerAdapter it is Oct 08 07:18:37 after_r thats awesome Oct 08 07:18:39 https://github.com/nenick/android-gradle-template/blob/master/AppComponentTests/src/test/resources/org.robolectric.Config.properties <-- that file "emulateSdk: 18" so Oct 08 07:18:51 so is it emulated for espresso? Oct 08 07:19:07 i don't know, but i'm going to be working on this tomorrow Oct 08 07:19:15 whats your time zone, i am probably going to want to talk to you Oct 08 07:19:20 ;D Oct 08 07:19:29 thatt template required to be built with java 1.7 btw Oct 08 07:19:40 i have AA as well unfortunately Oct 08 07:19:46 but yea Oct 08 07:19:48 i use 1.8 Oct 08 07:19:50 with retrolambda Oct 08 07:20:00 do i need to downgrade? Oct 08 07:20:25 just install the 1.7 jdj from oracle.com Oct 08 07:20:28 jdk * Oct 08 07:20:40 no lambdas then Oct 08 07:20:41 JacobTabak has retrolamda ever caused you any grief ? Oct 08 07:20:45 yes g00s Oct 08 07:20:50 i can't use it on my main project right now Oct 08 07:20:54 fucking dingleberry, i knew it Oct 08 07:21:01 im going to get rid of some other dingleberries Oct 08 07:21:04 so i can use that one Oct 08 07:21:16 after_r that project you linked doesn't use dagger for di Oct 08 07:21:18 :\ Oct 08 07:21:19 yeah, there is a hierarchy of them Oct 08 07:21:37 anyway Oct 08 07:21:48 my "fix" of using the compile configuration on dagger-compiler put me back over the method limit Oct 08 07:21:56 to solve the problem i wasted all day on Oct 08 07:22:04 so time to remove some other dingleberries Oct 08 07:22:29 i got an idea Oct 08 07:22:32 how bout google fixes that hsit Oct 08 07:22:36 how bout that? Oct 08 07:22:41 fking slackers Oct 08 07:22:45 google really needs to work on this problem Oct 08 07:22:56 im sure they are Oct 08 07:23:33 whats the consensus on putting next/previous buttons in a viewpager? Oct 08 07:23:42 lasserix_ with the long troll Oct 08 07:23:55 ? Oct 08 07:24:03 i think it's pointless and stupid and kind of ugly Oct 08 07:24:14 ... thats what that other guy has been talking about for the last 2 days Oct 08 07:24:20 i would put them only for a wizard type thing Oct 08 07:24:24 but bosses people who have no UI idea are always like "how will the children know?!?! WON"T SOMEONE THINK OF THE CHIDLREN?" Oct 08 07:25:03 lasserix_ use a custom viewpager indicator or tab strip Oct 08 07:25:17 not button Oct 08 07:26:00 on one app im working on now, i have a viewpager for wine types, so my viewpager indicators are gonna be circles that represent the wine color Oct 08 07:26:07 with the current one highlight somehow, haven't thought it out yet Oct 08 07:28:22 JacobTabak: I'll be here tomorrow Oct 08 07:28:27 JacobTabak: Im central time Oct 08 07:28:31 cool me too Oct 08 07:28:32 its 1:38 am for me now Oct 08 07:28:36 thats not central Oct 08 07:28:37 2:38 I mean Oct 08 07:28:38 you trollll Oct 08 07:29:03 anyway i finally got our CI working with robolectric so I would love to be able to run espresso tests without the emulator, so maybe we can chat about i Oct 08 07:29:05 it Oct 08 07:29:07 but its time to sleep now Oct 08 07:29:42 ok Oct 08 07:29:51 that link i gave u seems to do it Oct 08 07:29:58 im not sure tho Oct 08 07:32:03 time to hit the hay Oct 08 07:32:04 JacobTabak: recently rewritten tests from robolectric to andorid tests ;) Oct 08 07:32:27 gordon_ travis builds with emulator took 15-17 minutes Oct 08 07:32:40 robolectric = 2 Oct 08 07:32:50 strange Oct 08 07:33:02 just use genymotion :D Oct 08 07:33:13 turn off animations Oct 08 07:33:16 and you will be good to go Oct 08 07:33:35 build is slow Oct 08 07:33:41 not running tests Oct 08 07:34:01 cant use genymotion on travis Oct 08 07:34:14 also cant use haxm Oct 08 07:34:22 Go to bed Oct 08 07:34:25 u Oct 08 07:34:42 Ain't no rest for the wicked Oct 08 07:35:01 how do I use onTouchEvent on a View like it can be done on Activity? Oct 08 07:36:39 JacobTabak: maybe normal PC would be better than travis.... Oct 08 07:37:26 gordon_ theres something nice about having a fresh vm every time, automatic github/hipchat integration, etc etc Oct 08 07:37:34 also my org uses it Oct 08 07:39:50 Is there no way to access a content provider except by using a resolver? Oct 08 07:40:00 Say I wanted to set a public variable in it. Oct 08 07:40:24 know that pain Oct 08 07:40:24 http://digg.com/video/how-to-turn-a-pumpkin-into-a-beer-keg Oct 08 07:40:42 Agamemnus if you're in your own application, dont' use a content provider lol Oct 08 07:40:46 its only for sharing data with other applications Oct 08 07:40:53 (or expansion apks?) Oct 08 07:40:56 APK expansions Oct 08 07:41:02 Look man Oct 08 07:41:08 >.> Oct 08 07:41:11 I need either the content provider to access the cordova object Oct 08 07:41:13 i don't see anything Oct 08 07:41:20 Or the cordova object to access the content provider Oct 08 07:41:31 How can I access the content provider? Oct 08 07:41:38 contnet providers are the only way to share data between apps... smae answer as before, content resolver Oct 08 07:41:40 Like say I have public int mainFileVersion = 0; Oct 08 07:41:46 if you're in your own app, don't use a content provider Oct 08 07:41:51 AAAARGHHHHHH Oct 08 07:41:52 unless its an expansion apk or whatever Oct 08 07:41:55 i dont know how those work Oct 08 07:41:56 Yes. Oct 08 07:41:57 IT IS Oct 08 07:42:01 its not in your own app Oct 08 07:42:02 then Oct 08 07:42:03 its another ap Oct 08 07:42:05 But how do I access the object? Oct 08 07:42:05 apk Oct 08 07:42:09 CONTENT RESOLVER LOL Oct 08 07:42:15 no i don't want to query shit! Oct 08 07:42:21 2 bad Oct 08 07:42:22 I want to modify public int mainFileVersion = 0; Oct 08 07:42:35 That's inside the ContentProvider Oct 08 07:42:48 if you're in your own app then dont use a content provider Oct 08 07:42:49 lol Oct 08 07:42:57 echo echo echo Oct 08 07:43:02 you can change anything yo uwant any way you want Oct 08 07:43:04 stop saying that Oct 08 07:43:08 only use a content provider if you can't access the variables Oct 08 07:43:16 Ok look Oct 08 07:43:19 It's simple Oct 08 07:43:29 The content provider accesses the data from a ZIP file Oct 08 07:43:34 But I don't care about that. Oct 08 07:43:42 First it needs to know the name of the zip file. Oct 08 07:43:44 so why are you talking about it? Oct 08 07:43:49 do you have the source for the content provider? Oct 08 07:44:03 just call the methods directly that its using to query whatever data Oct 08 07:44:06 To know the name of the zip file(s) it needs to know the main and patch versions Oct 08 07:44:26 is it open source? Oct 08 07:44:29 I'm extending ContentProvider Oct 08 07:44:31 Yes Oct 08 07:44:38 so assuming your'e in your own apk Oct 08 07:44:40 Any clue if I can find out the current time of the track being played by the default music player ? As I know I can get just the track name, artist, metadata and so on. Oct 08 07:44:42 and you can call the methods in the content provider Oct 08 07:44:50 you don't need to query, you can just call the methods Oct 08 07:45:03 and if they're open source, you should know exactly what they are, what params they take, and what they return Oct 08 07:45:14 HOW Oct 08 07:45:18 How do I call the methods?!? Oct 08 07:45:23 vvu getPosition... mediaplayer method Oct 08 07:45:28 Agamemnus you don't know what the hell you're doing Oct 08 07:45:28 getCurrentPosition maybe Oct 08 07:45:33 http://pastebin.com/QfsJPK1r Oct 08 07:45:43 JacobTabak you are also a sucker for trying to answer these questions Oct 08 07:45:44 lines 59 and 60 Oct 08 07:45:50 How can I set those values? Oct 08 07:45:56 I don't know how to get the object! Oct 08 07:46:02 they're instance variables Oct 08 07:46:03 fucking learn java, android Oct 08 07:46:05 lol Oct 08 07:46:10 you need an instance of the class Oct 08 07:46:14 stop asking us these dumbass questions Oct 08 07:46:15 But how do I get the contentProvider object? Oct 08 07:46:20 It's not instantiated in Java! Oct 08 07:46:22 JacobTabak: from another application i want to read the state of the default music player, not from the same app Oct 08 07:46:38 vvu no such thing as a default music player Oct 08 07:46:52 fragmentation and such Oct 08 07:46:53 If it's so stupid Oct 08 07:46:57 Why can't you tell me Oct 08 07:47:07 you'll just come back with another stupid questions Oct 08 07:47:11 Just tell me Oct 08 07:47:18 its like playing stupid question wak-a-mole Oct 08 07:47:23 I've been trying to figure this out for 5 hours Oct 08 07:47:37 you'll be on it for months at this rate Oct 08 07:47:40 JacobTabak: thx, need to look into it :) Oct 08 07:47:41 Agamemnus you can create an instance of it if you want Oct 08 07:47:42 its a class Oct 08 07:47:46 and it has a no args constructor Oct 08 07:47:48 this is how java works Oct 08 07:47:50 u call new xxx() Oct 08 07:47:55 It's inside an AndroidManifest.xml file Oct 08 07:48:00 g00s Oct 08 07:48:03 his content provider Oct 08 07:48:03 i have to put both of you guys on ognore :) Oct 08 07:48:09 *ignore :D Oct 08 07:48:12 is INSIDE THE MANIFEST Oct 08 07:48:15 There is no new () Oct 08 07:48:34 g00s im going to bed so dont ignore me Oct 08 07:48:34 bye Oct 08 07:48:39 gnight Oct 08 07:48:40 god Oct 08 07:50:37 I am trying to understand how to use onTouchEvent with Views. So I wrote this class http://pastie.org/9630482 and then did CustomImageView imageView = (CustomImageView) findViewById(R.id.imageView); but it throws error on runtime - what am I doing wrong ? Oct 08 07:55:33 guess time to get more negative points on stackoverflow Oct 08 07:55:47 gnight Oct 08 07:58:40 shmoon Oct 08 07:58:46 why are you overriding? Oct 08 07:58:56 just have ImageView implements OnTouchListener Oct 08 07:59:01 lasserix_: just tring to understand how to work with onTouchEvent and views Oct 08 07:59:34 ya I think setOnTouchListener is what I should do but just for learning's sake Oct 08 08:00:29 you'd only do this if you need to override the way it handles its Oct 08 08:00:32 handle touch events Oct 08 08:00:46 like delegate them in some weird way, since there are other ways to do that Oct 08 08:01:22 I need to repeat my question from above. My app needs to get the current status of the audio player *especially the current position of the song e.g. how many seconds since it started playing*. any idea how to do that ? Oct 08 08:01:40 i guess doing it that way too doesn't call performCLick (ie you have to manually do it) Oct 08 08:01:44 Hey guys, how come I get a NullPOinterException on this: private CloseableHttpClient httpclient = HttpClients.createDefault(); ? Imports are fine. Oct 08 08:02:23 shmoon: http://android-er.blogspot.com/2014/09/warning-custom-view-overrides.html Oct 08 08:03:24 http://www.programering.com/a/MzM5MzMwATk.html Oct 08 08:04:43 It works fine out of an android context Oct 08 08:05:09 Ie in a pure java environnment Oct 08 08:07:11 Traceback:http://pastie.org/9630503 Oct 08 08:09:24 ok lasserix_ , programering seems like a nice resource btw Oct 08 08:11:32 the GoogleMap class dont have a LongClickListener on / for markers, what would be the best pratice to add for markers? Oct 08 08:12:58 hi there Oct 08 08:23:39 I had forgotten to add INTERNET permissions, but that didn't change anything Oct 08 08:27:40 Hey , I am trying 2 center a text inside a scrollview but Not achieving it , http://pastebin.com/wAZaZ4Fj Oct 08 08:34:14 Hi all. I use a TranslateAnimation to animate a EditText and Button up when keyboard is visible. but the Click of the button isn't working after the animation. After the animation, I can click on old position of the button (= position before animation). How can I fix this? Oct 08 08:44:26 FrancescoV, animations just change the place where view is rendered, they do not change where the view is located in the layout (and where it handles touches) Oct 08 08:45:00 so you need to lay it out in new position after animation completes. Oct 08 08:48:12 FrancescoV: you shouldn't need to move the edit text Oct 08 08:48:22 just to accomodate the keyboard Oct 08 08:52:30 Mavrik: thanks! Oct 08 08:52:53 FrancescoV, usually just adjusting margins on layoutparameters in onAnimationEnd suffices Oct 08 08:53:04 depending on your container layout Oct 08 08:53:10 lasserix_: I need to do some animations for the client Oct 08 08:53:31 yes, Need to change the marginTop then (changing yDelta) Oct 08 08:53:38 thanks for your help Oct 08 09:00:13 yo Oct 08 09:01:32 I'm trying to delete an sms Oct 08 09:01:35 this is the code im using Oct 08 09:01:37 http://pastebin.com/RTKf1vEQ Oct 08 09:01:50 the log shows that the cursor isnt null and the id is defined Oct 08 09:01:58 however rows deleted is 0 Oct 08 09:02:18 any ideas? Oct 08 09:15:45 hey Oct 08 09:16:07 what is the simplest way to send an intent scheduled in the future (like 30 seconds) ? Oct 08 09:16:13 without involving alarm if possible Oct 08 09:19:52 an handler? Oct 08 09:19:58 with post delayed Oct 08 09:24:28 jvrodrigues: k Oct 08 09:24:29 thakns Oct 08 09:24:56 Hey , I am trying 2 center a text inside a scrollview but Not achieving it , http://pastebin.com/wAZaZ4Fj Oct 08 09:25:27 SO how can i use gravity for scrollview Oct 08 09:26:06 put the scrollview inside the linear layout Oct 08 09:26:20 dont do gravity center on the linear Oct 08 09:26:29 err nm Oct 08 09:26:46 fill+parent-> match_parent Oct 08 09:26:49 not that that will change it Oct 08 09:27:33 no worries Oct 08 09:27:42 dont center your scrollview Oct 08 09:28:02 When i put scrollview inside linearlayout , it says scrollview is useless here Oct 08 09:28:18 yeah i am just tired Oct 08 09:28:47 killer: The scrollview height is wrapping the content? Oct 08 09:29:00 jvro don't delte inside Oct 08 09:29:11 get the id and then do a seperate call outside Oct 08 09:29:25 i am guessing there is some locking going on Oct 08 09:30:00 Mrdarknezz: yes scrollview is all over and it has text inside it(2 b centered) . http://pastebin.com/wAZaZ4Fj Oct 08 09:30:19 killer: Don't you want to center the linearlayout and match_parent the height on the scrollview? Oct 08 09:30:43 killer: Now it will just calculate the height of it's children as it's total height Oct 08 09:31:56 killer: http://pastebin.com/vjjAdmN1 Oct 08 09:31:58 like that Oct 08 09:32:44 Why are you even using a scrollview? Oct 08 09:33:08 Mrdarknezz: You just centered the LinearLayout? Oct 08 09:33:15 What would you remmond Oct 08 09:33:20 recommend Oct 08 09:33:28 killer: The textview is inside the linearlayout Oct 08 09:35:30 killer: I would do something like this http://pastebin.com/smhcDWYV Oct 08 09:40:22 Doesn't seem to work Oct 08 09:40:55 killer: Is the text not in center+ Oct 08 09:40:56 ? Oct 08 09:41:24 No Oct 08 09:42:20 how can I use findViewById() from a class that isn't an activity or anything? Oct 08 09:45:03 Mrdarknezz: http://pastebin.com/v3TRYUWg Oct 08 09:46:44 and without having to use a constructor. I would like to create my own "logger" class that would write to a specific textView, that I could call from anywhere, like Log Oct 08 09:53:33 are there any sites that let you test apps on real devices but also stream audio? Oct 08 09:54:10 one of my beta testers reports my audio app has broken performance on a certain android model, but without access to the physical device I don't know how to proceed Oct 08 10:07:46 How to set a notification icon from drawable? Oct 08 10:12:29 MalekAlrwily: http://developer.android.com/reference/android/app/Notification.Builder.html Oct 08 10:12:50 .setSmallIcon(drawable) Oct 08 10:19:30 d0de: Do you have reason to believe that all devices of a single type react poorly to your application? Oct 08 10:19:41 Perhaps your tester modified the phone in some way, etc. Oct 08 10:20:22 Generally, regardless of your implementation, sound is interpreted the same way across the majority spectrum of devices Oct 08 10:20:25 Darklust, yes that's certainly possible Oct 08 10:20:57 It's a Sony Xperia device, I wondered if something called "ClearAudio" might have something to do with it Oct 08 10:20:58 http://userguide.sonymobile.com/referrer.php?region=global-en&product=xperia-z-ultra#!Enhancing-the-sound-quality.html Oct 08 10:21:46 my app plays several audio streams simultaneously, I thought perhaps whatever audio enhancement software is preloaded might choke if it's given too many streams at once Oct 08 10:22:09 Every device I have access to myself, even lower-end devices, work fine Oct 08 10:22:15 That sounds possible, it's usually the equalizers that are at fault for audio issues outside of hardware Oct 08 10:22:40 I've asked the tester to turn it off and see if that helps, so we'll see Oct 08 10:23:10 I've never released an app before, I confess I'm a bit nervous at the prospect of releasing something only to find it's completely broken on some portion of devices Oct 08 10:23:49 danijoo_: No method called setSmallIcon(Drawable) Oct 08 10:24:15 Look at the docs. this method exists Oct 08 10:24:24 I mean that can happen, but when you start getting the feedback you can analytically determine whether it's a large part of your userbase, and either rectify it with a fix or stop supporting their hardware Oct 08 10:24:58 Darklust, thanks, that makes sense. I think I am more nervous that is rational about this. Oct 08 10:29:50 Darklust, if you don't mind my asking, I couldn't help notice a change in your writing style in the last few minutes. It left me a bit confused Oct 08 10:30:25 danijoo_: you mean this method setSmallIcon(int icon)? Oct 08 10:30:37 d0de: I'm bored Oct 08 10:30:51 kk Oct 08 10:31:06 MalekAlrwily: yes Oct 08 10:31:29 danijoo_: it is "int" not "Drawable" Oct 08 10:31:37 I get drawable at runtime Oct 08 10:32:03 it seems not possible Oct 08 10:32:08 thanks anyway Oct 08 10:32:21 nope its only possible if you have an id to your icon Oct 08 10:32:24 It's possible to change the opacity for assets dynamically, is it also possible to set different colors? Oct 08 10:33:16 what kind of assets Oct 08 10:34:56 danijoo_: I am confused Oct 08 10:35:34 because I know that WhatsApp can set drawable without id Oct 08 10:36:02 I always see my friends photos in notification Oct 08 10:36:16 X_X Oct 08 10:36:22 MalekAlrwily: but not in the notificationbar Oct 08 10:36:28 MalekAlrwily: You may be referring to setLargeIcon(Bitmap) Oct 08 10:36:32 they set the big ones you can see when you scroll down Oct 08 10:36:37 "largeIcon" Oct 08 10:37:12 what it called, the images on left Oct 08 10:37:34 in notification Oct 08 10:38:30 MalekAlrwily: There is a small icon that is shown in the small black bar when the notification arrives and that is the small icon Oct 08 10:38:40 and you can set a large one that is shown when the user pulls down Oct 08 10:38:50 the first one must be an id, the second one can be anything Oct 08 10:40:32 You should really read the guide on notifications first.. Oct 08 10:42:25 danijoo_: Thank you :) Oct 08 10:42:40 no problem Oct 08 10:50:46 Is there some kind of standard way to do a settings page with the default Android UI? Oct 08 10:51:13 PreferenceFragment Oct 08 10:52:08 danijoo_, thanks! Oct 08 10:58:03 Hi guys, I've got a question regarding the APIs related to the signal strength/radio parameters. I have some older devices where I can't use the calls to the API Level > 17 methods and I need to get some radio parameters like RSCP, RSSI, Ec/Io in a UMTS network. I have seen that there is a SignalStrength class, but all its methods return -1 as these are related to EVDO and CDMA. Any ideas Oct 08 10:58:03 where else I could try to get this information? Oct 08 11:01:01 if i use findfragmentByTag and i get a not null value, this implies that the fragment is visible? Oct 08 11:02:51 Is there a testing tool that can generate unit/integration tests for a given class/interface/API ? Oct 08 11:07:52 resu01: this implies there is no fragment with that tag. No fragment at all. Oct 08 11:09:20 if i get a not null value. If i get the fragment as a resullt. Will this imply that the fragment i received as a result is currently displayed? Oct 08 11:10:17 no Oct 08 11:10:44 it just tells you that there is a fragment with that tag Oct 08 11:10:49 it says nothing about its state Oct 08 11:26:12 Anyone know if there is an android port for spinkit? Oct 08 11:46:54 hello, is there a function to call on webview to store the current page to cache? Oct 08 11:47:39 doesn't that happen automatically? Oct 08 11:47:48 to a certain extent Oct 08 11:47:54 but i wish to trigger it myself Oct 08 11:51:40 is that possible ? Oct 08 11:54:50 Hi! I have a SecurityException when my app tries to open the Contacts provider (uses-permission is set in my manifest) and also some strange behaviour with my internal storage. It is possible that my internal memory is corrupted? Oct 08 11:55:29 like some flash phisical issue= Oct 08 11:55:31 ? Oct 08 11:55:53 try it in the emulator Oct 08 11:55:58 but yes, all is possible Oct 08 11:56:02 It happens only on a nexus 5 Oct 08 11:56:21 emulator, samsung s4...s3 with CM 11 ... note3 ...note3 neo...it's all ok Oct 08 11:56:38 then that answers your question Oct 08 11:57:02 its either corrupt, or you accessing external storage (SD) in some odd way Oct 08 11:57:09 while the nexus 5 does not have one Oct 08 11:57:54 I use the standard way "context.getExternalFilesDir(null)" in order to access the internal storage Oct 08 12:00:47 Is it possible to limit an apk version based on the language? Oct 08 12:02:35 How do you prohibit certain localizations Oct 08 12:18:09 i've got the following code to get letter width from a certain textview. https://bpaste.net/show/cb1e33b2ee2d it works fine on api version 8 to the latest, but on android l it returs a bigger value. if i use a textview that i get from getView(), the result is the same on all platforms. any idea why? Oct 08 12:19:51 Hey guys. Need some help here. Im using the navigation drawer with listview and setting a header that contains an image view on this listview. The problem is that the imageview is not refreshing on bitmap loaded by picasso. Oct 08 12:20:08 How can I refresh the header view or the entire navigation drawer? Oct 08 12:21:49 How do I check the phones screen density? Oct 08 12:22:26 getResources().getDisplayMetrics().density Oct 08 12:25:17 Hi guys. I'm new to android dev but am trying to wrap up a project a co-worker that left did. I am on Ubuntu using Android Studio and need to build this project for x86 and ARM. Trying to find straight forward documentation for this has not been easy. Any pointers? Oct 08 12:27:33 Pointers about what exactly? Oct 08 12:27:45 You didn't really give any information about what the issue is. Oct 08 12:29:28 From reading through a few pages of documentation on developer.android.com it seems like you need to update Gradle to create separate APK files for x86 and ARM builds. Is that accurate? Oct 08 12:30:17 Basically, I'd love to see current best practices for creating signed APKs for the most common devices. Oct 08 12:30:30 first thing first Oct 08 12:30:35 why do you want separate APKs? Oct 08 12:30:40 is that even necessary? Oct 08 12:30:49 Maybe it isn't. Oct 08 12:31:14 you do split APKs only if you have so much native libs that they're too large to distribute both Oct 08 12:31:22 so you even have any native code in your project? Oct 08 12:31:36 That's what my impression was from reading http://developer.android.com/sdk/installing/studio-build.html#workBuildVariants Oct 08 12:31:50 I mean, mostly you just click "Build -> Generate signed APK..." in Android STudio and publish that :) Oct 08 12:31:59 that's just an example of how to do that if you have to. Oct 08 12:32:10 Ok. That's good to know. Oct 08 12:33:11 I should have hopped in here yesterday before this long wild goose chase looking for info on how to do this... haha Oct 08 12:34:49 Thanks Mavrik! Oct 08 12:49:02 Where can I find out what the size of notification buttons should be? Oct 08 12:49:09 I thought they are scaled down, but apparently not ;) Oct 08 12:55:47 platzhirsch, aren't they 48dp with 32dp icons like all other buttons in UI? Oct 08 12:55:57 Mavrik: yes, just found out 32dp :) Oct 08 12:56:01 thanks Oct 08 13:03:51 Mavrik: although 32dp is way too big here :) Oct 08 13:24:44 Hey guys, is it bad practice to use SVG icons rather than PNGs? My developer is telling me it will make the app slower/heavier, it just seems silly using PNG's when you can use the vector version that is smaller filesize and will look crisp at every size & screen density Oct 08 13:38:32 jimmyff: yes, but can't you just slice the SVGs into the correct sizes? Oct 08 13:43:53 Been trying to get an access token using a service account (in python) but it keeps returning { "error": "invalid_grant" } which really doesn't tell me anything. Any hints on where I could start looking? Oct 08 14:04:24 Hello.. Anyone can help-me about this error (arm-linux-androideabi-gcc: Internal error: Killed (program cc1))? Oct 08 14:16:48 bzf: have you set the grant_type member in your token request Oct 08 14:16:58 hey , i need to use commitAllowingStateLoss for fragments in oder to get my fragments work inside async callback. anyone knows more about this? Oct 08 14:17:07 bzf: is it oauth 2? Oct 08 14:17:31 Mrdarknezz: Yeah, it's oauth2 Oct 08 14:17:51 Following the thing at https://developers.google.com/accounts/docs/OAuth2ServiceAccount Oct 08 14:18:18 bzf: Wait are you writing python now? Oct 08 14:18:22 bzf: This is android Oct 08 14:18:54 Yeah, but I'm gonna use it for IAP and didn't know where else to ask, haha Oct 08 14:19:00 lol Oct 08 14:19:18 Well invalid grant sounds like you got the grant_type member wrong Oct 08 14:19:19 but idk Oct 08 14:19:35 check the oauth rfc doc Oct 08 14:19:46 I'm using the one from the page (grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer) Oct 08 14:20:16 no idea Oct 08 14:20:26 Btw this is only for devices with <11 api Oct 08 14:41:27 anyone knows why i cant change fragments after config change ? Oct 08 14:42:20 what i have is a message that shows up while a async task is being executed. on success i change fragment Oct 08 14:42:36 but when i change device orientation i get state loss Oct 08 14:54:16 Sorry, I know this was hit on a lot around the IO conference time, but I am genually curious about why Android went with Java, particularly when Google released Go around the same time. I guess they needed to get Android to the market really quickly? Do you think they regret that now? Oct 08 14:56:14 Also, with ART, could we have a simulator if they make one for x86? Oct 08 14:56:39 Go is utterly not ready for any mobile use. Oct 08 14:56:43 not even now Oct 08 14:57:32 also Android was released more than a year before golang came into existence. Oct 08 14:57:42 And ART has nothing to do with simulation or emulation. Oct 08 14:58:30 Mavrik well if ART could change dex to x86 instructions right? Oct 08 14:58:46 uh Oct 08 14:58:49 Guys this is my issue: http://stackoverflow.com/questions/26237039/android-development-drawing-google-maps-inside-a-drawer-navigation-activity-cl does any1 have a clue about it? Oct 08 14:59:05 Mavrik I was thinking that the benefit of ART was that it compiled dex to ARM on installation Oct 08 14:59:08 mattblang, a x86 CPU running Android has always been executing x86 instructions. Oct 08 14:59:12 mattblang, so? Oct 08 14:59:18 Dalvik did that as well Oct 08 14:59:22 just at runtime not installation Oct 08 14:59:30 ART just moved the compilation step, the semantics are the same Oct 08 14:59:31 Mavrik got ya, yeah Oct 08 14:59:44 you already have x86 Android which runs natively Oct 08 15:00:24 mattblang, anyway, Android was not initially developed by Google Oct 08 15:00:33 and Java as a language made alot of sense in 2007 Oct 08 15:00:45 it actually still does if they'd bother to update the runtime to Java8 Oct 08 15:01:00 Mavrik yeah, that is actually what spurred my curiousity Oct 08 15:01:25 getUUID and fetchuuidwithsdp has been introduced API level 15, how would one know that a certain remote Bluetooth device was compatible for a certain UUID before ? Oct 08 15:01:41 Mavrik reading about lambdas in Java8, but how Android won't have it until, whenever, since I guess they have to reimplement everything? Wasn't that the result of the legal battle, that they could use the API but had to rewrite the source code? Oct 08 15:02:07 mattblang, they don't have to reimplement everything, but they do have to update runtimes on phones Oct 08 15:02:10 Mavrik reuse API stubs I mean Oct 08 15:02:19 since Java 8 brought new bytecode ops Oct 08 15:02:32 Mavrik oh okay. thought I remembered something about only being able to use the stubs Oct 08 15:02:38 the Java legal battle was about the standard library (e.g. classes and calls you have available) Oct 08 15:03:28 Mavrik right, got ya. even if they could use everything in Java, they Dalvik (or ART) has to handle it Oct 08 15:03:50 the thing is that J8 needs some new commands supported by JVM (in Android case Dalvik or ART) and they did not implement them Oct 08 15:04:04 you'd also have to wait for the devices to be updated with that runtime for the apps to work Oct 08 15:04:28 but honesly I don't get why they're dragging their feet Oct 08 15:04:30 Mavrik yeah, makes me sad Oct 08 15:04:56 Mavrik been doing a lot of Node development recently, it is making me understand a lot of the complaints people have with Java Oct 08 15:17:20 any way to reliably retrieve the SDK API version of the smartphone ? Oct 08 15:17:46 BuildConfig.VERSION_CODE seems to be the app SDK version which is not really interesting :] Oct 08 15:17:58 nameless`, Build.VERSION.SDK_INT Oct 08 15:18:11 is the canonical way of checking Oct 08 15:18:31 e.g. if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWITCH) Oct 08 15:18:34 Mavrik: thank Oct 08 15:20:15 hello guys Oct 08 15:25:54 Yuri_Harrison: hello Oct 08 16:38:52 hey Oct 08 16:49:30 is there a special way to decompile the google play store apk? Oct 08 16:50:56 http://stackoverflow.com/questions/26251820/java-android-how-do-i-access-the-contentprovider-that-is-declared-in-androidman Oct 08 16:51:11 androidmanifest.xml. Oct 08 16:58:58 Trying to get a dropdown spinner's text to change color when the dropdown is active... Oct 08 16:59:11 Is there a specific color state to use for that? Oct 08 16:59:44 I've tried state_{activated,selected,active,expanded,hovered} with no success. Oct 08 16:59:47 hi there ppl goodevening :) Oct 08 16:59:52 or whatever ;) Oct 08 17:00:19 hey is there any good downloadable setting with some emulators setup for testing? Oct 08 17:01:18 what are the best targets to test ? Oct 08 17:01:24 So, what is the state of the main spinner layout when the dropdown is expanded? Oct 08 17:01:57 How to change the time of repeating alarm Oct 08 17:20:27 Hey, is there a way to point screen orientation in the manifest to a value in resources? Oct 08 17:22:11 wow, this Adobe Digital Editions security things is huge! I hope nobody is using that POS Oct 08 17:26:21 I listen for loss of audio focus with an AudioFocusChangeListener and stop playback if I lose it. But it only seems to work when headphones are plugged into the device. Am I crazy? Oct 08 17:27:03 ah, no. It's to do with apps in the recent apps list Oct 08 17:27:07 never mind Oct 08 17:27:51 I am trying to share a text using Intent, it sent a part of text, not completed Oct 08 17:43:37 Hey guys. I was hoping you might have some more insight on my issue. Oct 08 17:46:24 I lost the password to my alternate Google account. I can still access it on the phone because it's logged in as a secondary account, and I've tried everything to reset the password. 1) I didn't set a backup email and 2) The phone number I registered it with has been long disconnected. Oct 08 17:46:52 So I'm wondering, is there any way to extract the Google account password from an unrooted phone? Oct 08 17:46:55 sounds like you're screwed, but since this is an android appdev channel, not sure we're the ones to help you. Oct 08 17:47:02 try #android-root Oct 08 17:47:13 It's not rooted, unfortunately. Oct 08 17:47:14 however short answer: no; the password is not stored in the phone Oct 08 17:47:28 hey gentlepeople Oct 08 17:47:34 Hm. And the hashes are salted. Oct 08 17:48:35 if I have an async task that implements an interface.. and a calback is fired through this interface.. there’s no guarantee that the asynctask will still be running when the callback is fired is there? Oct 08 17:54:19 interesting ! http://corner.squareup.com/2014/10/advocating-against-android-fragments.html Oct 08 17:54:48 g00s, screw fragments. I switched to Flow and my life has improved massively. Oct 08 17:55:19 as usual, i get worried that fragments being part of andoid'd architecture - you ditch them at your own peril Oct 08 17:55:37 i mean, as future features assume fragments Oct 08 17:55:52 but yeah, nobody will prevent you from using just plain views so Oct 08 17:56:26 Hey guys, simple question. Is it guaranteed that my application's onCreate has been called before any activity lifecycle things are called? Oct 08 17:58:38 g00s, it's easy to add fragments when you need them...unless they're compat fragments....looking at you, Facebook API! Had to make an activity to wrap it just to use it. Oct 08 17:59:28 g00s, but you probably won't need them. Anything good is either a view or its own activity. Oct 08 18:01:08 what i'd really like to see, is a good argument /for/ fragments - in essence interacting with the claims in the square piece. you know, because having a debate requires 2 sides but yeah - the fragment lolcycle Oct 08 18:01:29 sorry got disconnected Oct 08 18:01:42 you can't have a good argument for something that's fundamentally broken Oct 08 18:02:36 that's like arguing for asbestos use Oct 08 18:02:47 they still use it in car brakes Oct 08 18:02:48 Given that I want to save a variable between instances, in this case a booking ID, what is the best way to do this? SharedPreferences? Oct 08 18:02:48 sure, it insulated well. but it also killed you Oct 08 18:02:58 fragments kill you Oct 08 18:03:06 * g00s dead Oct 08 18:03:12 x.x Oct 08 18:03:32 Nice "birthday" pictures in the resources of Android Wear .apk http://ss.nohus.eu/7995/263b7fa6 I wonder whose mom is that. Oct 08 18:03:37 davidgoransson: Between instances? You mean different times your app is opened? Oct 08 18:04:13 most of my intellectual energy in doing android app dev still goes to 'how the hell am i going to do better with component lifecycle & concurrency this time' Oct 08 18:04:14 Asbestos was a cheap fire retardant! Oct 08 18:05:02 Well the problem is that i got basicly 2 states my app can be in. 1: Make a booking, 2: You have a active booking (and thus not allowed to make a new one until that is complete). Given that the user kills the app, I need to restore the application to the active booking state if the booking is still active. Oct 08 18:05:23 and 'how do i comprehend this mess of layouts, xmls, etc to be my information archicture on all form factors' Oct 08 18:05:43 flan3002: If the user pauses it, there is no problem since the state is saved. Oct 08 18:06:34 davidgoransson: SharedPreferences will be sufficient to preserve simple data between app starts. For more complex data, you might want to do custom serialization or use a database. Oct 08 18:07:10 Is it possible to display the blinking cursor in TextEdit all the time, even without having the focus? Oct 08 18:07:11 davidgoransson you can also look at realm.io Oct 08 18:07:21 and mvstore for java-only k/v Oct 08 18:07:26 Well there should only be like 5-6 variables needed to be stored. So isn't that much data. When should I save this data? onDestroy, seems dangerous? Oct 08 18:07:43 davidgoransson save it onPause Oct 08 18:07:51 only 5 things, prefs should be ok Oct 08 18:08:07 g00s: do you use realm? Oct 08 18:08:49 g00s: Or, hmm probably better to save it directly when the user makes a booking? If the mobile shutdown (e.g battery is pulled) onPause wont be called? Oct 08 18:08:54 JakeWharton, g00s, really interesting articles. I guess I'll try it when I figure out something to do on Android. Oct 08 18:08:55 pieces029 no, not yet - i think since it has a c++ part it didn't work with gradle yet? have to look into it more Oct 08 18:09:01 http://stackoverflow.com/questions/26251820/java-android-how-do-i-access-the-contentprovider-that-is-declared-in-androidman Oct 08 18:09:04 help, anyone Oct 08 18:09:27 And if I add it to onPause it will be saved every time the user switches applications do searches etc? Oct 08 18:09:37 Agamemnus you are back, asking a question, and having no idea what you are doing Oct 08 18:09:50 again, read the docs Oct 08 18:09:59 Delegating stuff into views instead of Fragments gets rid of a bunch of lifecycle Oct 08 18:10:01 g00s: my good man Oct 08 18:10:02 and god damn it, why isn't my ignore working Oct 08 18:10:05 Look at the link Oct 08 18:10:26 If you don't want to help, just don't say anything Oct 08 18:10:26 it works for me Oct 08 18:10:29 HexChat? Oct 08 18:10:39 textual Oct 08 18:10:43 Java programmers are pretty hostile, aren't they? Goes with the territory of horrible docs, I guess. Oct 08 18:11:01 Agamemnus well #java is, yes Oct 08 18:11:05 lol Oct 08 18:11:09 And it seeps in here. Oct 08 18:11:12 @Agamemnus Oct 08 18:11:17 lol Oct 08 18:11:21 but anyhow, being lazy and not reading basic stuff, and then asking us silly question rapid fire ... Oct 08 18:11:31 If it's so basic, why didn't anyone answer yet? Oct 08 18:11:46 and if it is so basic Oct 08 18:11:56 why are you expending SO MUCH energy to keep telling me to read the docs Oct 08 18:12:03 instead of just telling me how to do this? Oct 08 18:12:07 g00s: Yeah it looked like way to much work to setup. If it's not in central, ain't nobody got time for that. Oct 08 18:12:09 because you are spamming the channel Oct 08 18:12:27 I think you are. Oct 08 18:13:57 btw g00s, thanks for the reply. Oct 08 18:14:08 yw Oct 08 18:14:13 <3 Oct 08 18:15:23 Agamemnus, content providers are not simple. Highly suggest reading the docs when you start using them. Oct 08 18:15:43 i's suggest starting with some java first, but we already mentioned that Oct 08 18:16:18 but no, Agamemnus doesn' want to learn java. so he's just going to keep asking us Oct 08 18:16:41 g00s: in fact, this conversation is tiring Oct 08 18:16:54 yes, please go and learn java, come back later :) Oct 08 18:16:55 it's best you put me on ignore, maybe you'll spend less time rambling Oct 08 18:17:06 learn how to use your IRC program :P Oct 08 18:19:04 I'm starting to think that you are one of the contributing factors to the hostility among java developers :D Oct 08 18:20:07 I there a better way to set screen orientation programatically that isn't setRequestedOrientation() in the on create. That still causes a reconfigure on every screen load…seems wasteful. I don't want to resort to doubling up activity classes and setting orientation in the manifest but that seems like my only option. Oct 08 18:22:13 jayd16: Is there a reason you don't have two layout files put into different res/layout cateogries? Oct 08 18:23:06 business decision. They're ios focused so its basically "looks like ipad on tablets, looks like iphone on phones" Out of my hands. Oct 08 18:24:51 jayd16: well that sucks, but I don't under stand why you can't use the res folders. Unless you are saying a phone can't go back and forth between landscape and portrait Oct 08 18:25:22 we have it set up as under sw600 its portrait, over sw600 is landscape Oct 08 18:25:23 I'd also fight that until my last breath. I fucking hate iOS "ports' Oct 08 18:25:31 way too late to fight it Oct 08 18:25:37 :( Oct 08 18:29:37 basically my options are pretty shitty. I can double up the activities in the manifest and start the one with the orientation set that I need. I could build multiple APKs with orientations set accordingly, but that's a whole build process change. Oct 08 18:30:01 and for some reason you can't call setRequestedOrientation in the constructor of the activity, that seems to be ignored Oct 08 18:30:42 was ABS merged into AppCompat, or did google just write their own implementation? Oct 08 18:30:52 they wrote their own Oct 08 18:30:55 ok Oct 08 18:31:51 and would you recommend appcompat over ABS these days? Oct 08 18:31:53 jayd16: constructor? Oct 08 18:31:59 i would recommend minSdkVersion=15 Oct 08 18:32:10 fair point Oct 08 18:32:13 jayd16: try onCreate Oct 08 18:32:42 there's little or nothing to be gained by switching between ABS and AppCompat Oct 08 18:32:44 Whats the reason for ditching 14? It's just not a thing right? Oct 08 18:32:56 all 14 devices were upgraded to 15 Oct 08 18:33:04 Ty Oct 08 18:33:11 alright, I was just asking because one of our interns said his professor is teaching them to use ABS Oct 08 18:33:14 pieces029: when I do it in onCreate, its too late because it will go through on start and then pause, resume, reconfigure. I was trying to set it before the lifecycle but that's ignored, so no luck there. Oct 08 18:33:18 my console shows ICS at 4.9% now, i think i'm going to drop it soon Oct 08 18:33:31 minSdk=16 :) Oct 08 18:33:34 jayd16: can you do it in onCreate but before super is called? Oct 08 18:33:55 pieces029: doesn't help Oct 08 18:34:10 jayd16, couldn't you use something like Flow and only "on create" your top level view just once? Oct 08 18:34:21 Flow? Oct 08 18:35:24 It's a replacement for the Fragment architecture. Let's you decide how you switch screens basically instead of forcing a crazy fragment system down your throat. Oct 08 18:35:36 I mean, the issue is that android won't respect setRequestedOrientation until after it does a bunch of work it has to throw away. Oct 08 18:36:31 You could have your view "oncreate" step happen only once and just assign children to it, like how you'd handle an ActionBar with Flow or something like that. Oct 08 18:37:57 That seems like way more of a rewrite than having portrait and landscape activities in the manifest and handling which to start Oct 08 18:40:11 Just use two activities then. It's a relatively minor inconvenience and won't slow down your code at all. Oct 08 18:40:47 yeah, thanks. I think that's what I'll have to do. At least I know I'm not missing something obvious. Oct 08 18:41:13 I have a menu with submenus. How to I capture the reference to a submenu menuItem on the parent menu's onCreateOptionsMenu() ? Oct 08 18:51:31 Can anyone think of a reason why ART would crash when attempting to call an extern C function, but not Dalvik? Oct 08 18:51:47 note, the function binding is in Mono/C# Oct 08 18:52:00 Oh, it's just menu.getItem(0).getSubMenu().getItem(0) Oct 08 18:52:19 do any android 4.x.x devices have a hardware menu button? Oct 08 18:52:34 yes Oct 08 18:52:42 galaxy phones Oct 08 18:57:08 kailoAtWork, great, thanks Oct 08 19:13:34 Hi. I have a layout with some EditText's and a button aligned to the parents bottom. If I want the text widgets to expand while the user inputs text - how can I prevent them from covering the button. I want to button to be pushed down if that would occur. Oct 08 19:15:36 Nevermind, figured out how to solve it. Oct 08 19:18:31 can I use buck and robolectric ? Oct 08 19:34:49 I set up an intent filter to register my app as capable of opening URLs to my domain. Is there a way I can exclude certain pages? Oct 08 19:35:31 My app can open the equivalent of the root domain, but if the page being visited is e.g. mydomain.com/about or mydomain.com/contact those should open in the browser, not my app Oct 08 19:37:08 If I increase minSDK from 8 to 11 in AndroidManifest, the old APK is still available for users with lower api levels, isnt it? Oct 08 19:37:28 Until I deactivate the old apk manually Oct 08 19:40:07 yeah Oct 08 19:40:11 looks like I can use android:pathPattern Oct 08 19:42:22 anyone know how to use BluetoothGatt.readCharacteristic(BluetoothGattCharacteristic c) ? What is the minimum state c requires for this call to work ? Oct 08 19:42:47 fucking documentation is atrocious Oct 08 19:43:31 I need to make a background service that will continuously do some network related task in an asynchronous maneer. Oct 08 19:43:59 so i made a service that spawn a thread but what would be a good design while waiting for intent ? Oct 08 19:45:17 wat Oct 08 19:45:38 g00s: haha Oct 08 19:45:44 atrocious docs you say Oct 08 19:45:54 nameless`: Services are waiting for an intent by definition Oct 08 19:46:18 Agamemnus yes, but not for you - since you're asking questions that are in the docs :) Oct 08 19:46:59 allright, well i just had to read the source code for BluetoothGatt and that explains it Oct 08 19:47:15 man, if the source code was not available developing for android would be nearly impossible Oct 08 19:47:35 danijoo: yes but I want this one to have his own thread Oct 08 19:47:42 Agamemnus so thats another avenue for you to try; read the source luke ! Oct 08 19:47:49 if only the google play stuff was open source Oct 08 19:47:51 like maps Oct 08 19:48:06 danijoo: without having to give him his own process in order to avoid IPC Oct 08 19:48:37 nameless`: Usually its done like this: Service waits in ui thread for intent Oct 08 19:48:40 yuizy i have a feeling the ratio of open source to closed source stuff will decrease until google makes it perfectly clear that the code is useless without licensing their stuff Oct 08 19:48:52 yeah Oct 08 19:48:53 not sure if that ever gets to 0, but it will get smaller Oct 08 19:48:55 on intent it creates a new thread, do the work and stop Oct 08 19:49:09 danijoo: yes but I want to regurlarly scan my neighborhood (bluetooth), make some processing, exchange message without the UI involved Oct 08 19:49:24 so? Oct 08 19:49:26 it's such a shame when you are working with the closed stuff Oct 08 19:49:39 you can do this all in the spawned thread Oct 08 19:49:40 and think to yourself 'if only i could look at the source this would be easy' Oct 08 19:49:44 :( Oct 08 19:49:45 whats the problem Oct 08 19:50:35 well I guess I spawn the thread by calling somethread.start() in the method onCreate or onStart Oct 08 19:51:02 no. you spawn it for the intent Oct 08 19:51:18 in onHandleIntent Oct 08 19:51:27 danijoo: it is not an IntentService Oct 08 19:51:30 but a Service Oct 08 19:51:40 is tehre a way to display something on an EditText field (besides hint), for example if a user entire 2 fields, 2 other fields auto-complete? Oct 08 19:52:12 compile: you can call setText(".....") on the edittext field to add text to it Oct 08 19:52:18 shoudl android:pathPattern work with the query string of a URI? Oct 08 19:52:31 so if the value is say 29, it should display on the field correct? Oct 08 19:52:33 help Oct 08 19:52:40 I'm so close but i'm stuck on one last thing Oct 08 19:52:42 http://stackoverflow.com/questions/16733232/how-do-i-call-custom-method-in-contentprovider-through-contentresolver-and-acces Oct 08 19:52:52 The example is "cr.call(DBProvider.CONTENT_URI, "myfunction", null, null);" Oct 08 19:52:58 But what is DBProvider? Oct 08 19:53:13 danijoo: let me explain, from the UI I send an intent to the service en request him to perform a bluetooth scan which is insinchronous so I also create a broadcastreceiver to handle the finnish scanning Oct 08 19:53:17 turns out the answer is "no", which sucks Oct 08 19:53:28 danijoo: however i want all of this done in another thread than the UI Oct 08 19:53:53 how can I pause my thread between the startscan (which immediately return) and wake him up when i receive the intent Oct 08 19:54:11 nameless`: i never worked with bluetooth but isnt the scan performed asynchronous by default? Oct 08 19:54:18 danijoo: it is yes Oct 08 19:54:47 so you are safe to start it from ui thread and only have to handle the result in a seperate thread, correct? Oct 08 19:55:13 i guess Oct 08 19:55:30 because then you dont need any threading in your service Oct 08 19:55:59 you can do everything in ui thread until your broadcast receiver gets a result. then your broadcastreceiver can start a thread to handle the result Oct 08 19:56:42 maybe I should create my service in its own process Oct 08 19:58:26 thats not possible Oct 08 19:58:33 services are in ui thread by definition Oct 08 19:59:02 oh wait they arent. Oct 08 19:59:25 they are Oct 08 19:59:39 you can start them in a seperate thread Oct 08 19:59:40 but it can be spawn in his own process with the process attribute in manifest Oct 08 19:59:45 but it doesnt really make sense Oct 08 19:59:51 if all you do is querying for BT in them Oct 08 20:02:46 nameless`: you'd receive the broadcast event async in your service thread and then dispatch it to your other thread Oct 08 20:03:30 nameless`: s/service thread/service instance/; event handlers show up independent of whatever else you're doing (and aren't on the ui thread) Oct 08 20:04:00 dragorn: not really. a normal service is on ui thread Oct 08 20:04:10 unless you explicitly say it to not be Oct 08 20:04:28 danijoo: not what I said; a bcastreceiver isn't on the ui thread Oct 08 20:04:50 danijoo: so he can register it in his service and then use that to notify his scanning thread (or whatever he's doing) Oct 08 20:05:02 Since scanning isn't actually sync, I'm not sure he needs another thread to do bt scanning anyhow Oct 08 20:05:07 broadcast receiver is on ui thread too.. Oct 08 20:05:46 but if I get right what he want to do, this is ok Oct 08 20:05:53 because the BT-scanning is done by android Oct 08 20:06:03 all he want to do is a bit processing which is ok in ui thread Oct 08 20:07:51 danijoo: technically that's only true if it's in the manifest; if you register a handler at runtime things get more complex. In theory he could register a handler in his other thread and get them there, but I'd rather be explicit about it Oct 08 20:08:14 I want to read a file encoded in base64 to a bytearray Oct 08 20:08:30 dragorn: yes. Oct 08 20:09:00 but leaving all this aside I still think he doesnt need any thread at all. Oct 08 20:09:46 how can I open a the file and get it to byte array or string relatively cheaply before using Base64 decode methods? Oct 08 20:09:48 because It seems all he want to do is "query bluetooth in service " -> "receive result in broadcastreceiver" Oct 08 20:09:53 no threads needed for this Oct 08 20:10:09 knapper_tech: inputstream Oct 08 20:10:55 danijoo: agreed, initiating a bt scan and knowing when it finished shouldn't require a thread Oct 08 20:13:17 if I upload a new apk to google play with an increased minApiVersion (8 to 11), will api8-user be able to download the old version of the app until I manually deactivate it? Oct 08 20:17:23 danijoo: yes Oct 08 20:18:43 thx Oct 08 20:30:39 ok Oct 08 20:30:46 I have a function that's not static: Oct 08 20:30:48 @Override public String getAuthority () {return "com.mygame.expansion";} Oct 08 20:31:19 I need to pass a static function. I can't make it static because... hmm Oct 08 20:33:03 nvm Oct 08 20:44:12 hello Oct 08 20:44:45 I am new to Android development Oct 08 20:44:52 I have a question here Oct 08 20:45:32 I have a variable defined in activity and how can I access this variable from the surfaceview? Oct 08 20:46:08 it seems when I do this: Activity activity = (Activity) Context, the object is a different one from the original Oct 08 20:48:25 Is there a way to get the list of a content provider's authorities? Oct 08 20:49:32 Hi Oct 08 20:50:18 hmm what's a good way to write to a file FILO capped at N Kb Oct 08 20:51:09 i don't want to rotate, i always want the last N kb available Oct 08 20:51:21 i guess that's not efficient Oct 08 20:55:32 Hi Jacob, I looked back at what you said Oct 08 20:55:42 and you're like the button click listeners are working Oct 08 20:55:52 if I put the viewpager at the top of layout Oct 08 20:56:06 due to z ordering Oct 08 20:56:24 ok Oct 08 20:56:45 this is a time warp Oct 08 20:56:54 sorry StingRay_ Oct 08 20:56:56 lol Oct 08 20:56:56 im giving him a chance because he didnt ping me Oct 08 20:57:05 I join again…and …erm….again it's 100% the same thing Oct 08 20:57:11 lol Oct 08 20:57:13 this is quite funny Oct 08 20:57:15 not my fault you join Oct 08 20:57:15 ><; Oct 08 20:57:19 you should just remain Oct 08 20:57:42 Only left is the ghosting effect that suggests I have two views on top of each other Oct 08 20:57:45 for whatever reason Oct 08 20:57:59 but you're right, viewpager does not interfere with clicklisteners Oct 08 20:58:03 yea you need to just try all sorts of different things Oct 08 20:58:09 nobody in irc can help with this stuff Oct 08 20:59:31 ok Oct 08 20:59:43 by the way Oct 08 20:59:56 JacobTabak, I figured out the problem Oct 08 20:59:59 Well Oct 08 21:00:14 I needed to use a function called "call" Oct 08 21:00:23 Found a stackoverflow post in the depths of nowhere Oct 08 21:01:32 i.e.: @Override public Bundle call (String method, String arg, Bundle bundle) Oct 08 21:01:37 :-) Oct 08 21:40:30 Hey guys Oct 08 21:45:06 What is the compression type for Android BitMaps? Oct 08 21:45:17 I need to send the appropriate byte arrays in Oct 08 21:45:23 docs say they are compressed Oct 08 21:56:41 knapper_tech bitmaps aren't compressed Oct 08 21:56:44 ever Oct 08 21:56:52 if it's in memory Oct 08 21:56:55 JacobTabak, bitmap factory says so Oct 08 21:57:01 you're misunderstanding it Oct 08 21:57:04 anyway, I'm passing in a list of raw ints that are ARGB encoded now Oct 08 21:57:08 JacobTabak, no i'm not Oct 08 21:57:09 anyway Oct 08 21:58:19 knapper_tech bitmap factor creates uncompressed bitmaps Oct 08 21:58:22 factory Oct 08 21:58:26 from compressed streams Oct 08 21:58:43 JacobTabak, well I have an uncompressed stream Oct 08 21:58:51 all done Oct 08 21:59:04 <|Blaze|> I'm having problems uploading a .apk to the google play developer console, anyone else having issues? Oct 08 21:59:15 I have an array of raw integers for each argb. Oct 08 21:59:24 yea - thats not compressed Oct 08 21:59:25 <|Blaze|> It's just staying at 0% complete Oct 08 21:59:26 but it's separae Oct 08 21:59:38 and setPixels wants to set a full 32bit int Oct 08 21:59:51 doesn't seem difficult from here Oct 08 22:00:23 how do you guys deal with injecting dependencies that can throw exceptions in their constructors? Oct 08 22:00:33 i don't want to inject null.... Oct 08 22:07:54 JacobTabak use a factory? Oct 08 22:08:37 inject the factory and check for null in the code? Oct 08 22:08:46 that can work Oct 08 22:08:58 :\ Oct 08 22:09:01 sux Oct 08 22:09:14 annoying when constructors throw exceptions Oct 08 22:09:18 are you using a DI framework or smth? Oct 08 22:09:30 because you can just catch the exception when you build the dependency Oct 08 22:09:39 that’s what we do Oct 08 22:09:45 but we also do all our own di Oct 08 22:09:48 no framework Oct 08 22:13:11 I split my project in half with a dagger, then squeeze the result between 2 springs to make some guice. Oct 08 22:14:07 and then peed on CDI Oct 08 22:16:14 JacobTabak: what exception is it? Also couldn't you create an interface, then wrap one with the object and create an implementation of hte interace that does nothing / is empty and return one or the other depending on if the exception is thrown? Oct 08 22:16:41 pieces029 some io exception Oct 08 22:16:42 one implementation* I suck at explaining things sometimes :( Oct 08 22:16:48 its a filehandler Oct 08 22:16:57 pieces029 i don't want to overengineer this Oct 08 22:17:10 i think i'm just gonna check for null in the consuming code :\ Oct 08 22:17:15 That's not overengineering, that's how you skip nulls. Oct 08 22:17:32 true Oct 08 22:17:52 just makes reading the code more difficult Oct 08 22:18:06 Yeah, I guess you could wrap it in an optional Oct 08 22:18:12 if you have Guava with you. Oct 08 22:18:44 similar, just less work, and tells more or less why you are checking for null. Oct 08 22:19:11 i'm just going to inject the one thing that can change between build types Oct 08 22:19:43 more, uglier code, but at least not making assumptions Oct 08 22:19:50 that another developer would know it could be null Oct 08 22:20:13 What are you going to inject? Oct 08 22:20:26 Didn't understand your final conclusion Oct 08 22:20:49 the path of the log file Oct 08 22:21:02 to pass into FileHandler Oct 08 22:21:05 rather htan injecting the filehandler itself Oct 08 22:21:40 Oh, yeah that make sense. Oct 08 22:22:35 yea but now it will be painful to customize the other constructor params Oct 08 22:22:38 like amount of log files, etc Oct 08 22:23:27 qualifying annotations with runtime retention don't add do the method limit, do they? Oct 08 22:26:11 (because they're not methods) Oct 08 22:30:07 JacobTabak, the highest bits when settings ints are alpha, right? Oct 08 22:30:20 argb Oct 08 22:30:36 8bits aarrggbb Oct 08 22:33:40 11bits aarrghhh!! Oct 08 22:36:17 Any good free pdf creation libraries out there? Google would not answer me. Oct 08 22:39:54 The price of free. Oct 08 22:40:44 True, but I'm not going to pay 2000EUR for iText for my 50 user application :P Oct 08 23:01:27 Charge every user $41? jk Oct 08 23:46:49 Can someone recommend me an application example with bluetooth AVRCP? Oct 08 23:53:02 yay https://support.google.com/googleplay/android-developer/answer/6066610 Oct 08 23:53:23 I think I’m a ltitle late to the party on this one Oct 09 00:05:55 Hello Oct 09 00:05:59 Any Android and SDL2 developers? Oct 09 00:06:02 Has anyone successfully got SDL2 working for Android Oct 09 00:07:53 My app shows and hides action-bar items by keeping the Menu given to onCreateOptionsMenu. I notice that if I hide all items, I have problems with my old phone (running 4.0 and with a hardware menu button). Oct 09 00:08:28 When my app starts, there are no items in the menu. Later, items are added. The problem comes when I click the menu button right away. Then, the menu doesn't ever work. Oct 09 00:09:04 In other words, if there are no items in the menu and I click the hardware menu button, the menu never works. Oct 09 00:09:16 This doesn't occur if I wait till the menu has items before clicking the hardware menu button. Oct 09 00:09:23 It shouldn't be like this, right? Oct 09 00:09:41 Calling invalidateOptionsMenu fixes the menu, but I don't wanna call that every time. It re-inflates the menu from XML. Oct 09 00:09:57 is this just with the hardkey? Oct 09 00:10:00 Yeah. Oct 09 00:10:04 My newer phone has no issue here. Oct 09 00:10:07 and is this actual device or emulator? Oct 09 00:10:09 The on-screen menu works fine. Oct 09 00:10:11 An actual device. Oct 09 00:10:23 I think the buttons call different things Oct 09 00:10:29 hard vs soft Oct 09 00:10:38 What is the file extension for an eclipse workspace? Oct 09 00:10:46 Mallot, there is none Oct 09 00:10:52 it’s a folder Oct 09 00:10:56 usually called workspace Oct 09 00:10:58 that stinks Oct 09 00:11:04 It's one of the "features" of Eclipse. Oct 09 00:11:07 it usually goes in your user dir by default Oct 09 00:11:22 or documents Oct 09 00:11:27 alright, thanks guys Oct 09 00:11:29 tricknology: I don't support you know where the code is for hardware menu buttons and stuff? Oct 09 00:11:32 In the Android source. Oct 09 00:14:08 nope, i’ll look around a bit though Oct 09 00:14:41 Oh, don't worry. I'll keep searching. Thanks. :) Oct 09 00:15:04 http://stackoverflow.com/questions/10929579/how-to-check-if-android-phone-has-hardware-menu-button-in-android-2-1 Oct 09 00:15:04 a little closer Oct 09 00:15:12 KeyCode.Menu Oct 09 00:15:40 so listen for key presses by overriding onKeyUp Oct 09 00:15:46 and ckeck if it was KeyCode.Menu Oct 09 00:15:52 if so fire away Oct 09 00:16:05 I think I had to do this with a back button once Oct 09 00:16:25 Oh, cool. Oct 09 00:16:41 Well, I checked onPrepareOptionsMenu, and it's firing every time (even though nothing is being shown). Oct 09 00:16:49 if (keyCode == KeyEvent.KEYCODE_MENU) { … } Oct 09 00:17:05 that’s whack Oct 09 00:17:13 paste a snippet? Oct 09 00:21:45 A snippet of what? Sorry. Oct 09 00:24:37 your broken code Oct 09 00:24:46 TacticalJoke Oct 09 00:25:43 maybe you are inflating the menu before you have inserted anythign into it? Oct 09 00:26:14 but if you change things in the menu, invalidateOptionsMenu(), I think, would be the only way to go Oct 09 00:26:36 if it’s working then it means your contents were different than after you called it, naturally. Oct 09 00:28:10 try somethign like if (view.getChildCount() == 0 ){ invalidateOptionsMenu() }; Oct 09 00:28:21 or try getChildCount() to log around your suspect area Oct 09 00:28:37 it will really help you narrow it down, I had to do that a few days ago Oct 09 00:28:57 This should be all the relevant code: http://pastebin.com/07SeTR41 Oct 09 00:29:17 Yeah, that's an idea. Oct 09 00:29:36 Yeah, I tried debugging this. Oct 09 00:30:17 okay I have no idea what I'm doing :/ Oct 09 00:30:21 Even when no menu is shown, it still thinks everything is okay. For example, "menu.findItem(R.id.clear_menu_item).isEnabled()" correctly evaluates to true when I click the hardware menu button and nothing shows. Oct 09 00:31:43 I'm using Robolectric and I want to pause the test for 5 seconds to sync things from a server, when I call Thread.sleep or use a CountdownLatch, it moves on to the next test while pausing for the previous one. And then the next test doesn't pause at all even though that code is in setUp() :/ Oct 09 00:32:13 do you have it set eo enabled by default in the XML layout? Oct 09 00:32:19 how does it becoem enabled? Oct 09 00:32:28 Yeah. Oct 09 00:32:31 Enabled by default. Oct 09 00:32:37 And visible by default. Oct 09 00:32:38 For all items. Oct 09 00:34:10 If all my action-bar items were in the menu, I wouldn't have to worry about this, right? I could just use onPrepareOptionsMenu. Oct 09 00:34:21 The only problem is that R.id.roll_button is visible all the time. Oct 09 00:34:55 well you have items in your menu because you put them there in your layout xml, no? Oct 09 00:35:06 Yes. Oct 09 00:35:07 you didnt do menu.addItem() Oct 09 00:35:36 Right. Oct 09 00:35:49 and this only happens with the hardkey? Oct 09 00:35:54 Yeah. Oct 09 00:36:09 is onCreateOptionsMenu() even being called with that? Oct 09 00:36:11 And only if I pressed the hard key when no menu items were available. Oct 09 00:36:18 Only onPrepareOptionsMenu. Oct 09 00:36:26 With the hardware menu button. Oct 09 00:36:33 Oh, it's calling onCreateOptionsMenu at first. Oct 09 00:36:40 When the Activity is created. Oct 09 00:36:43 ok Oct 09 00:38:38 I don’t think any of those methods call invalidate() Oct 09 00:38:48 are you caling super()? Oct 09 00:39:19 super.onPrepareOptionsMenu(menu); Oct 09 00:39:55 Yeah, although this problem doesn't relate to onPrepareOptionsMenu. I implemented that only to figure out this problem. Oct 09 00:40:06 gotcha Oct 09 00:40:31 The thing is, I'm disabling/enabling an always-visible button the ActionBar. That's why I'm not just taking the easy route and messing with the ActionBar in onPrepareOptionsMenu. Oct 09 00:40:45 But I'm starting to wonder whether it's wise to enable/disable an always-visible button on the fly. Oct 09 00:40:57 put invalidateOptionsMenu() at the end of updateMenuItems() Oct 09 00:40:58 I wonder whether that's against some Android guidelines. Oct 09 00:41:06 … if it’s updating menuItems Oct 09 00:41:11 I tried that. Haha. That causes a stack overflow. Oct 09 00:41:21 otherwise you should just add them dynamically to the view in onCreateOptionsMenu Oct 09 00:41:26 If, however, I put "invalidateOptionsMenu();" somewhere else, that fixes the problem. Oct 09 00:41:28 oh we’re onto something Oct 09 00:41:40 It's because onCreateOptionsMenu calls updateMenuItems. Oct 09 00:41:50 So it's an indefinite loop, basically. Oct 09 00:41:55 aah that makes sense Oct 09 00:42:30 and invalidateOptionsMenu() calls onCreateOptionsMenu()? Oct 09 00:42:36 Yeah. Oct 09 00:42:48 heh Oct 09 00:42:57 It'd been a while since I'd had a stack overflow. lol Oct 09 00:43:05 I got my first one the other day Oct 09 00:43:09 after 3-4 years Oct 09 00:43:12 lol Oct 09 00:43:28 Do you think it's weird to enable/disable an always-visible Action Bar button on the fly? Oct 09 00:43:43 I actually am using text for this button right now. I wonder how weird it'll look when I move to an imag. Oct 09 00:43:44 image* Oct 09 00:43:51 Having an enabled image and a disabled image. Oct 09 00:44:09 you can do lots of things Oct 09 00:44:12 set the image clickable Oct 09 00:44:14 I might keep it enabled and just show a toast when the criterion isn't met. Oct 09 00:44:19 imagebutton Oct 09 00:44:47 I do think it’s a bit strange Oct 09 00:44:53 Okay. Oct 09 00:44:59 A toast might be more self-documenting. Hmm. Oct 09 00:45:01 but I don’t use it much Oct 09 00:45:12 are you tryign to put mesages in the action bar? Oct 09 00:45:15 Basically, they can click that button if and only if the list (in the UI) has two or more items in it. Oct 09 00:45:30 Oh, no. Just preventing the user from clicking if it there are fewer than two items. Oct 09 00:45:59 why not use setClickable(true/false)? Oct 09 00:46:19 Is that possible with an ActionBar item? Oct 09 00:46:24 noot sure Oct 09 00:47:15 I can't think of a single Android app that ever shows an ActionBar button being disabled. Hmm. Oct 09 00:47:15 bit old schol but yes Oct 09 00:47:22 android:onClick="doThis" Oct 09 00:47:24 in your xml Oct 09 00:47:36 then define a functino called “doThis()” in your activity Oct 09 00:47:43 tadaaa Oct 09 00:47:58 doThis(MenuItem item) Oct 09 00:48:20 Okay. Right now, I'm just using onOptionsItemSelected. Oct 09 00:48:30 then you can switch(item.getItemId()) Oct 09 00:48:48 item selected, inflate menu, nothign inflating Oct 09 00:48:51 right/ Oct 09 00:49:32 Everyone seems to work fine apart from the menu being visible. Oct 09 00:49:40 It's like an invisible menu with the right attributes and everything. Oct 09 00:49:59 I suspect it's a bug in my phone's Android version (4.0.4). Oct 09 00:50:19 can’t you update? Oct 09 00:50:32 try this in an emulator < 2.3.3 Oct 09 00:50:54 It's my older phone. No more updates. But it's cool for testing. :) Oct 09 00:51:08 apparently not :/ lol Oct 09 00:51:24 well man I wish I could help. I tried to go through all the logical steps Oct 09 00:51:42 My time here is up Oct 09 00:51:46 catch ya on the flip Oct 09 00:53:46 Does anyone know where I can get the source code of Google Keep? Oct 09 01:03:47 Hi... what would be my best bet if I want an "encrypted development environment"? I want all my source files to be encrypted, and I want to access them de-crypted only for a short time while I am making changes and doping development? 1 option is see is to run a VMWare OS and enable the "encrypt content" option in the VMware host... Oct 09 01:04:02 can I do the same encrypted stuff using something like Docker/Fig ? Oct 09 01:04:27 I want to sandbox/isolate my source code as much as possible Oct 09 01:04:29 How do I set up the Android SDK ( the one from google ) for C++ development? Oct 09 01:09:39 TacticalJoke: google.com/jobs Oct 09 01:09:49 Is onPrepareOptionsMenu guaranteed to be called when the user opens an ActionBar overflow menu? I ask because the documentation says nothing about ActionBars. Oct 09 01:10:04 JakeWharton: Are you saying that Keep isn't open-source? :D Oct 09 01:10:05 yes Oct 09 01:10:10 and yes Oct 09 01:10:19 Okay. lol Oct 09 01:10:25 TacticalJoke: just disasemble it Oct 09 01:10:31 "just" Oct 09 01:10:43 Is there any big Google Android app whose source I can find? Oct 09 01:10:49 I/O Oct 09 01:10:51 iosched Oct 09 01:10:53 My Google Fu is strong, but I honestly couldn't find any before. Oct 09 01:10:54 Okay. Oct 09 01:10:58 TacticalJoke: also id like to see Oct 09 01:11:04 not a huge fan of iosched's codebase Oct 09 01:11:06 https://github.com/google/iosched Oct 09 01:11:16 Thanks. Oct 09 01:11:25 Yeah there was some WTFs in there. Oct 09 01:11:29 are* Oct 09 01:11:58 Like what is going on in here https://github.com/google/iosched/blob/master/android/src/main/java/com/google/samples/apps/iosched/Config.java Oct 09 01:12:20 That rep function... Oct 09 01:12:30 They don't use onPrepareOptionsMenu. :/ Oct 09 01:12:37 I'm looking for a big app that uses it. lol Oct 09 01:13:14 What are you trying to accomplish? Oct 09 01:13:21 I found some weird code in Android earlier. In one of the stream/writer/reader classes. It was basically a no-op. Oct 09 01:13:41 I'm worried because the documentation for Activity.onPrepareOptionsMenu doesn't say anything about ActionBars. Oct 09 01:13:51 But my testing shows that it *is* called when the ActionBar overflow is displayed. Oct 09 01:14:25 yes Oct 09 01:14:27 it is Oct 09 01:14:41 Here it is: Line 119: https://android.googlesource.com/platform/libcore.git/+/android-4.2.2_r1/luni/src/main/java/java/io/OutputStreamWriter.java Oct 09 01:14:47 "charsetEncoder.charset();" does nothing. Oct 09 01:15:31 Unless, unbeknown to me, it has side effects. Oct 09 01:16:17 JakeWharton: Do all the big apps make the assumption that onPrepareOptionsMenu plays nicely with ActionBars? Oct 09 01:16:25 yes Oct 09 01:16:39 and yes, that charset() line can be removed Oct 09 01:16:46 welcome to Apache Harmony code Oct 09 01:18:18 That's copied from Apache Harmony? Oct 09 01:18:32 Oh, wait. Oct 09 01:18:35 It says it right there. lol Oct 09 01:20:06 They have the same bug in their latest (I think) version, but the variable has a different name there. ('enc' versus 'charsetEncoder'.) Oct 09 01:20:40 it's not really a bug Oct 09 01:20:52 and either javac or the JIT will optimize that out Oct 09 01:21:28 Yeah, not a bug. My brain is multitasking a bit too much tonight. Oct 09 01:21:50 That's interesting about Apache Harmony. Didn't know that Android used that. Oct 09 01:23:13 Does GitHub have an "Android apps" section? Oct 09 01:23:16 Can't seem to see one. Oct 09 01:23:17 no Oct 09 01:23:20 Dough. Oct 09 01:23:38 I wonder whether there's some nice repository of links to cool open-source Android apps. Oct 09 01:24:07 if you google'd it you'd find some Oct 09 01:24:27 TacticalJoke: there's a marketplace just for those kinds of apps Oct 09 01:24:29 I've been googling this here and there for a few months. Not a whole lot comes up. Oct 09 01:24:35 f-droid? Oct 09 01:25:17 this irc channel should have its own little site of free open source apps Oct 09 01:26:08 This seems goodish: http://en.wikipedia.org/wiki/List_of_free_and_open-source_Android_applications Oct 09 01:28:50 Hardly anyone seems to use onPrepareOptionsMenu. Hmm. Oct 09 01:28:54 Searching through all these apps. Oct 09 01:30:13 https://github.com/search?o=desc&q=stars%3A>1+android&s=stars&type=Repositories&utf8=✓ Oct 09 01:30:24 i already told you that onPrepareOptionsMenu works Oct 09 01:30:49 you even tested it and confirmed that it works Oct 09 01:31:27 I know. I just hate when the documentation doesn't guarantee stuff. Makes me nervous. Oct 09 01:33:23 TacticalJoke: sometimes you gotta find out stuff as you go Oct 09 01:41:15 I'm looking at the apollo source code, and I am wondering what is the IApolloService does? It looks like it's just a stub in the MusicPlaybackService. Am I reading that correctly, or does this somehow let other apps tie into apollo? https://github.com/CyanogenMod/android_packages_apps_Apollo/tree/cm-11.0/src/com/andrew/apollo Oct 09 01:50:46 If I use onPrepareOptionsMenu, I don't absolutely have to ever call invalidateOptionsMenu, right? Oct 09 01:51:11 (Unless I need to change something visible, it seems {including the overflow hotdog button}.) Oct 09 01:51:51 so does anyone know how to develop Android apps with C++ ? Oct 09 01:58:35 hmm http://phandroid.com/2014/10/08/report-google-considers-app-and-game-trials-for-google-play/ Oct 09 01:58:48 i was interested until it seemed i had to split my app into trial and full versions Oct 09 01:59:09 google, just give us promo codes for fuck sake ! Oct 09 01:59:46 cause if i need different flavors of my app for this, its just more pita Oct 09 02:04:52 g00s: how do you think companies like the NSA develop top secret software? Oct 09 02:05:06 obviously encrypted.. but what editor/IDE do they use? Oct 09 02:05:28 notepad++ Oct 09 02:05:48 do they compile Eclipse? Oct 09 02:05:50 probably the things normal people use after_r Oct 09 02:05:54 or use someo open source thing? Oct 09 02:06:10 yes but lets say its top secret.. Oct 09 02:06:23 well if it's top secret how would we know eh Oct 09 02:08:04 no Oct 09 02:08:12 they write in in the blood of traitors Oct 09 02:09:14 they probably either use open source or more likely a custom built fork of something open source Oct 09 02:09:44 * StingRay_ wonders what the point of this speculation is :) Oct 09 02:10:12 the truth is out there StingRay don't hate spooky speculation Oct 09 02:10:38 the truth and lies are all made up Oct 09 02:10:43 neither exist Oct 09 02:10:47 ;) Oct 09 02:11:04 g00s that voucher thing cant work though Oct 09 02:11:25 would be good but …. would mean a hell of a system for them to implement Oct 09 02:11:42 I think we can say that concepts don't exist by usual definitions of 'exist'. We're normally talking about physical objects with physical properties when we use that word. Oct 09 02:12:54 What really exists man? Oct 09 02:12:57 Cheech is not here man Oct 09 02:16:46 StingRay_ iTunes has it, so it can't be too hard Oct 09 02:16:55 This seems wrong: http://developer.android.com/guide/topics/ui/menus.html#ChangingTheMenu Oct 09 02:16:57 google behind in the monitization area, as usual Oct 09 02:17:14 "On Android 2.3.x and lower, the system calls onPrepareOptionsMenu() each time the user opens the options menu (presses the Menu button)." && "On Android 3.0 and higher, the options menu is considered to always be open when menu items are presented in the action bar. When an event occurs and you want to perform a menu update, you must call invalidateOptionsMenu() to request that the system Oct 09 02:17:14 call onPrepareOptionsMenu()." Oct 09 02:17:17 It has false implications, IMO. Oct 09 02:17:32 lasserix: you mean Dave Oct 09 02:17:36 It implies that you can't use onPrepareOptionsMenu in the same way on 3.0. Oct 09 02:17:53 Dave's not here man Oct 09 02:18:16 That seems false in two ways: 1. 3.0+ devices with hardware buttons *do* act the same. 2. 3.0+ devices without hardware buttons don't always need invalidateOptionsMenu() to be called. Oct 09 02:18:28 God, why does the documentation suck so much. Oct 09 02:18:45 #theyonlyhadonejob Oct 09 02:19:05 why do you whine so much Oct 09 02:19:29 it is what it is, deal with it! Oct 09 02:19:34 Because I don't want subtle bugs that affect 3.7% of my user base and leave me scratching my head. Oct 09 02:19:47 I want stuff to work. That's why I whine about the horrible documentation of Android. Oct 09 02:19:59 Documentation isn't just about how things currently work: it's also about how things will work in the future. Oct 09 02:19:59 Here's some cheese sir. Oct 09 02:20:01 TacticalJoke but we dont always need to hear your thoughts/ramblings line by line Oct 09 02:20:03 ;) Oct 09 02:20:09 And half of those 3.7% are going to give 1/5 stars Oct 09 02:20:10 Perhaps it'll go well with the whine. Oct 09 02:20:42 But the geniuses at Google developed it..it's impossible that they could have made a mistake Oct 09 02:20:46 I hope that the authors of the apps I use have whined about the Android documentation before. That is all. Oct 09 02:21:03 True, Ologn. Oct 09 02:21:05 i think the geniuses at google are too clever for anyone's good Oct 09 02:21:28 Maybe they're so clever that they have created the illusion that the documentation is bad. Oct 09 02:21:33 Just for fun. Oct 09 02:21:43 TacticalJoke: android has evolved a lot over the years and yes that has created a lot of 'fragmantation' and baggage, you gotta study that and pick your way through it, it's not easy I admit Oct 09 02:22:00 Some of the Android code is so bad. Some of it is a master class in how not to do things. Oct 09 02:22:07 TacticalJoke were you supporting 2.3 ? Oct 09 02:22:17 TacticalJoke: what's the problkem? Oct 09 02:22:23 Nah, I'm 14+ (soon to change to 15+, I guess). Oct 09 02:22:29 make it 16 Oct 09 02:22:33 I remember stumbling across the fact that an APK could only contain 65335 methods...I forget what the bizarro error message popped up which indicated that Oct 09 02:22:45 haha that's funny Oct 09 02:22:55 lasserix: My problem is that I wish that Google would correctly document onPrepareOptionsMenu and invalidateOptionsMenu so that I don't have to lose sleep over the thought of the behaviour changing in future. Oct 09 02:22:56 they couldnt use a long bitmask Oct 09 02:22:59 No one cared three years ago...well at the recent Droidcon, three speakers mentioned that Oct 09 02:23:06 Actually, that's more of "my solution" than "my problem". Oct 09 02:23:10 TacticalJoke: just encapsulate whatever you need then override it Oct 09 02:23:10 Why 16? Oct 09 02:23:19 14 and 15 are going away Oct 09 02:23:19 that way whatever they change you can always use your code Oct 09 02:23:21 One of my phones is 15. Oct 09 02:23:38 lasserix: Nice idea. Oct 09 02:24:01 That method-limit thing is crazy. Oct 09 02:24:07 It includes libaries you use. Oct 09 02:24:17 And I heard that ART isn't gonna fix it. Oct 09 02:24:51 really Oct 09 02:24:57 you need 65k methods? Oct 09 02:25:02 It includes any libraries you use. Oct 09 02:25:06 still Oct 09 02:25:15 that sounds like bad code design patterns Oct 09 02:25:16 Some people were complaining on SO that they have reached the limit just by using three big libraries. Oct 09 02:25:21 ah Oct 09 02:25:30 Even after proguarding stuff. Oct 09 02:25:33 I think. Oct 09 02:25:42 I want to know if there are any IJ/AS plugins to count them Oct 09 02:25:47 couldn't find any Oct 09 02:25:49 yeah Oct 09 02:25:51 there is one Oct 09 02:25:55 really? Oct 09 02:26:16 Honestly, I like Android, but I get the impression that it was just hacked together like a 15-year-old's VB project. Oct 09 02:26:22 The more I learn about it, the more I think this. Oct 09 02:26:53 That was a 15-year-old in the '90s/00s. I'm not sure what they're using these days. Python? Oct 09 02:26:53 you should not have to be messing w/ proguard during debug builds Oct 09 02:26:58 TacticalJoke you are not the only one :) Oct 09 02:27:03 and if you have to include Google Play Services, it's rough Oct 09 02:27:09 it's 20k+ methods Oct 09 02:27:12 Glad I'm not. :D Oct 09 02:27:25 lasserix what is the plug and does it count lib methods ? Oct 09 02:27:26 TacticalJoke: you have discovered the truth, now what Oct 09 02:27:37 android's archtecture hails back from a time where really weird shit was required to get java running on phones Oct 09 02:27:52 and thats the way it stayed Oct 09 02:28:12 while (true) { complain(); codeAnyway(++disappointment); } Oct 09 02:28:18 hehe Oct 09 02:28:46 i keep rooting for MS & Ununtu because i want more options :) Oct 09 02:28:52 *Ubuntu ha Oct 09 02:28:55 Just remember the G1. We have come a long way. Oct 09 02:28:57 I kinda wish Google had used a fresh programming language and BCL. Oct 09 02:29:12 pieces029 HW, yeah, graphics assets, yea - java framework - same old shit Oct 09 02:29:13 I'd love to write mobile Windows apps. :) Oct 09 02:29:15 The lang is not the issue. Oct 09 02:29:20 I think Windows 10 is gonna unify that platform. Oct 09 02:29:27 TacticalJoke: you can use other languages like scala or C# to do android Oct 09 02:29:31 pieces029: I know. Just a side issue. lol Oct 09 02:29:38 What's wrong with Java? Oct 09 02:29:40 shmooz: Yeah, but it'll cost me. Oct 09 02:29:40 this can be handy to get a count - https://gist.github.com/JakeWharton/6002797 Oct 09 02:29:49 I don't mind Java. I just don't like some of the baggage of its BCL. Oct 09 02:29:52 You can use groovy to if you want, but it fixes none of the issues with android Oct 09 02:30:06 Stuff like PrintWriter is a perfect example (though I don't use it). Oct 09 02:30:07 It sucks. Oct 09 02:30:13 What is BCL? Oct 09 02:30:15 whatever you try to do with android, its like putting bandaids on cancer Oct 09 02:30:17 Base-class library. Oct 09 02:30:23 lol g00s Oct 09 02:30:34 PrintWriter sucks because it silently consumes exceptions. Oct 09 02:30:46 Why does it do this? I dunno. Probably because checked exceptions are a failure. Oct 09 02:30:49 oh yeah, the inheritance model sucks, especially with views. Why did they use interfaces! Oct 09 02:31:45 I'm glad we don't have to use Objective-C, though (although I know that Apple devs don't have to anymore, either). Oct 09 02:31:48 TacticalJoke: you can get an iPhone and do Objective C Oct 09 02:31:53 "Objective-C" even looks horrible. Oct 09 02:31:58 Hyphens and capitals. Oct 09 02:32:01 I can't even read it. Oct 09 02:32:07 ]]]]]]]]] Oct 09 02:32:25 The biggest issue I have with it though is namespacing. Other than that though I don't know enough to judge. Oct 09 02:32:29 I'm pretty sure the creator of that language was blind. Oct 09 02:32:36 pieces029: why wouldnt they use interfaces? Oct 09 02:32:49 java doesn't allow for multiple inheritance Oct 09 02:32:53 Java's way nicer than C++, too. Oct 09 02:32:58 I don't know why they didn't... Oct 09 02:33:12 java doesn't have multiple inheritance, that's why Oct 09 02:33:26 That has nothing to do with interfaces... Oct 09 02:33:30 That was a smart decision by the Java creators. Oct 09 02:33:31 yes it does Oct 09 02:33:35 You can have as many interfaces as you want... Oct 09 02:33:37 it has everything to do with it Oct 09 02:33:39 exactly Oct 09 02:33:42 I think checked exceptions were a nice try but a failure. Oct 09 02:33:49 I think you are aruging the same thing... Oct 09 02:33:55 you said why interfaces? Oct 09 02:33:57 That I was complaining about. Oct 09 02:34:01 No... Oct 09 02:34:03 they don't use them. Oct 09 02:34:04 oh Oct 09 02:34:07 That's the issue. Oct 09 02:34:12 What do you folks think about checked exceptions? Oct 09 02:34:12 ohh i see Oct 09 02:34:19 Personally, I never throw them from public methods. Oct 09 02:34:25 Checked exceptions are good Oct 09 02:34:27 I just tolerate them in the BCL. Oct 09 02:34:28 and you probably should Oct 09 02:34:33 i can't really imagine a view class as a giant interface that seems odd Oct 09 02:34:44 pieces029: They can be a maintenance nightmare. Oct 09 02:34:51 Why? Oct 09 02:34:55 One tiny change and now 207 methods need their signatures updated. Oct 09 02:35:34 lasserix: it would be good, for example I was using a lib that was a "header list view" but it wasn't a list view, and didn't have all the list view methods. If there was a list view interface then it could be a list view while being composed. Oct 09 02:35:44 TacticalJoke: what... Oct 09 02:35:51 So you just return null? Oct 09 02:35:58 I used unchecked exceptions. Oct 09 02:36:22 I mean, that's... okay, but why not use the system to make sure you are handling them? Oct 09 02:36:31 Because the system sucks. Oct 09 02:36:37 It's code bloat and maintenance hell. Oct 09 02:36:48 They didn't add checked exceptions to C# for this reason. Oct 09 02:36:50 So you would rather just not handle exceptions. Oct 09 02:36:55 well you can show more specific error messages to the user when they happen Oct 09 02:36:59 http://www.artima.com/intv/handcuffs.html Oct 09 02:37:09 pieces029: No. I use unchecked exceptions. Oct 09 02:38:27 Yeah, but then you can just ignore them? Oct 09 02:38:44 It's possible, sure, but some exceptions should be dealt with. Depends on the case. Oct 09 02:38:51 Some exceptions should not be dealt with. Oct 09 02:38:55 why are checked exceptions a pain? Oct 09 02:39:11 Right, so if you are going to deal with them why not expicitly say they are being thrown. Oct 09 02:39:37 Because most methods don't deal with the exception. They let it bubble up. And this means numerous "throws" clauses which is code noise and which is a maintenance pain. Oct 09 02:39:59 I agree with andres in that artile it doen't make life easier, but I mean you can have the same argument about why have types and all sorts of stuff like that. Oct 09 02:40:11 TacticalJoke: yeah you bubble them to the ui so you can show an error message. Oct 09 02:40:25 Bubble all the way back to the UI Oct 09 02:40:26 like if the user tries to play a streaming video, instead of saying 'Error: Can't play. (Don't know why)' you say 'Error: No Connection, check your connection' Oct 09 02:40:26 pieces029: Right. That's the typical case. Oct 09 02:41:05 I'm writing four or five classes that interact right now. The code is very clean. One class throws an (unchecked) exception, which is consumed several classes pu. Oct 09 02:41:06 up* Oct 09 02:41:12 In C# you write your app and then wait for QA to tell you about the exceptions and then you catch them. Oct 09 02:41:15 If I were to use checked exceptions, my code would be a complete mess. Oct 09 02:41:23 "throws FooException, BarException" everywhere. Oct 09 02:41:36 Some tiny method whose "throws" clause is larger than its body. Oct 09 02:42:01 So gross means verbose? Oct 09 02:42:13 Otherwise I don't understnad how that is gross. Oct 09 02:42:31 Well, I said "mess", but I'd kinda agree with "gross". :D Oct 09 02:42:47 "Messy" as in "it's hard to read the code because of all this stuff that's not really very important". Oct 09 02:43:30 I think exceptions are pretty important. Oct 09 02:43:39 I think checked exceptions are amazing in some ways. I just don't like how they are in practice. Oct 09 02:43:46 Yeah, exceptions are a great idea. Oct 09 02:43:50 Centralised error handling. Oct 09 02:43:53 no they are not. Oct 09 02:44:01 Way better than returning error values. Eww. Oct 09 02:44:05 no Oct 09 02:44:10 do or do not Oct 09 02:44:12 Go back to C land Oct 09 02:44:14 there is no try Oct 09 02:44:30 Agamemnus: Some modules can't deal with the "do not" and need to let some other module do it. Oct 09 02:44:42 you shouldn't wait for an error Oct 09 02:44:48 that's terrible design imo Oct 09 02:44:57 don't justify it Oct 09 02:45:00 There is a difference between exception programming and using exceptions to handle the unforseen. Oct 09 02:45:02 Exceptional circumstances occur. Oct 09 02:45:19 Such as IO errors, socket disconnections, etc. Oct 09 02:45:28 Programmers can't prevent those in advance. They have to be dealt with after the fact. Oct 09 02:45:51 99% of the time that should really be handled by checking for return values etc Oct 09 02:45:56 No. Oct 09 02:46:00 That's how you get horrible code. Oct 09 02:46:21 :/ Oct 09 02:47:11 I feel like most things Agamemnus has said today have been just to troll Oct 09 02:47:22 I'm no troll Oct 09 02:47:29 I'm Gandalf. Oct 09 02:47:30 Could have fooled me. Oct 09 02:49:51 its pretty easy to make an interface that handles your checked exceptions Oct 09 02:50:11 TacticalJoke: ok so now you changed your mind and love exceptions! Oct 09 02:50:22 shmooz: I do love exceptions. Never changed my mind. :) Oct 09 02:51:42 I dislike only checked exceptions. Unchecked exceptions are cool with me. Oct 09 02:51:47 just catch the ones that have a possibility to be thrown and make it transparent or pleasant to the user Oct 09 02:53:03 This is a nice summary: Oct 09 02:53:04 "Opening files is actually a good example for utterly counterproductive checked exceptions are. Because most of the time the code that opens the file can NOT do anything useful about the exception - that's better done several layers up the call stack. The checked exception forces you to clutter your method signatures just so you can do what you would have done anyway - handle the exception Oct 09 02:53:04 in the place where it makes most sense to do so. " Oct 09 02:53:06 From SO. Oct 09 02:53:33 http://stackoverflow.com/questions/613954/the-case-against-checked-exceptions Oct 09 02:53:43 Yeah, I wouldn't base things I believe in off of SO posts. Oct 09 02:54:17 He makes a valid point. Not sure why it matters whether it's on SO. Oct 09 02:54:26 Surely you've been in this situation before? Oct 09 02:54:39 IOException is the perfect example of an exception that should not have been made a checked exception. Oct 09 02:54:51 I completely disagree... Oct 09 02:55:25 Checked exceptions even make **unit tests** hard to read. Oct 09 02:55:27 TacticalJoke i just joined and don't understand why you say that Oct 09 02:55:28 Let alone anything else. Oct 09 02:55:37 .... you can use 'throws' in unit tests Oct 09 02:55:38 JacobTabak: I'm arguing that checked exceptions are teh suck. Oct 09 02:55:47 Yeah, but those 'throws' clauses become huge very easily. Oct 09 02:55:48 how is that even an argument? Oct 09 02:55:51 They hinder readability. Oct 09 02:55:56 ... what? Oct 09 02:56:00 unit tests can just throw Exception Oct 09 02:56:04 its like 10 characters Oct 09 02:56:09 Oh, sure. Oct 09 02:56:10 That's true. Oct 09 02:56:25 I forgot about that (since I avoid checked exceptions as much as possible). Oct 09 02:56:42 checked exceptions are one of the reasons why java is such a reliable language Oct 09 02:56:50 if you don't like them, there are plenty of other languages Oct 09 02:56:56 JacobTabak: This quotes perfectly summarises the main problem with checked exceptions: Oct 09 02:57:04 "Opening files is actually a good example for utterly counterproductive checked exceptions are. Because most of the time the code that opens the file can NOT do anything useful about the exception - that's better done several layers up the call stack. The checked exception forces you to clutter your method signatures just so you can do what you would have done anyway - handle the exception Oct 09 02:57:04 in the place where it makes most sense to do so." Oct 09 02:57:48 Why is that an issue. Oct 09 02:57:54 Code readability and maintenance. Oct 09 02:57:54 so you're saying the method should just return null or a sentinel value that the calling code should have to remember to check? Oct 09 02:58:03 Can anyone tell me Oct 09 02:58:04 Uh, no. Oct 09 02:58:04 TacticalJoke i don't think you know what maintenance is Oct 09 02:58:11 Have you folks seriously not heard of unchecked exceptions?! Oct 09 02:58:14 How wouldI know if I was in ui code that I needed ot handle an exception if I wans't told there is one that could be thrown? Oct 09 02:58:29 pieces029: You do what everyone does in C#. Read the documentation. Oct 09 02:58:32 TacticalJoke so - maintainability - you'er assuming someone who's visiting the code a year later would remember to look for the same unchecked exception? Oct 09 02:58:42 How do you get the provider's "android:authorities=" string (inside AndroidManifest.xml) into a variable without knowing the instance? Oct 09 02:58:45 JacobTabak: No problem with that in C#. Oct 09 02:58:56 TacticalJoke there are unchecked exceptions Oct 09 02:58:57 plenty of them Oct 09 02:58:59 it's not a language thing Oct 09 02:59:00 Checked exceptions are a nice idea, but they're a nightmare. Oct 09 02:59:00 HAHAHA, I use to do .net development, I would look all over the place for what things could possibly throw. Oct 09 02:59:06 Ppl also suck at writing docs Oct 09 02:59:15 they just don't do it among many things. Oct 09 02:59:16 JacobTabak: Did you read what Anders said about them? Oct 09 02:59:25 He could've implemented them in C#, but he knows they're trouble. Oct 09 02:59:33 http://www.artima.com/intv/handcuffs.html Oct 09 02:59:37 so- Oct 09 02:59:54 C# is a nice language **** ENDING LOGGING AT Thu Oct 09 03:00:00 2014