**** BEGIN LOGGING AT Thu Apr 10 02:59:58 2014 Apr 10 03:00:11 wtf did i just hit? oohhhhhh Apr 10 03:01:56 bu i would think cameras under the hood wood get dirty quick Apr 10 03:32:58 bet you it doesn't run android Apr 10 04:03:23 I am trying to use Otto Bus with Dagger. https://github.com/kamoljan/Nefete/blob/master/nefete/src/main/java/org/kamol/nefete/ui/fragment/InsertAdFragment.java#L27 however, getting error: No injectable memebers on com.squareup.otto.Bus… Required by InsertAdFragment for ActivityModule Apr 10 04:12:36 Are you providing it? Apr 10 04:13:32 starting to think JakeWharton has a flasher on certain words lol Apr 10 04:14:04 I do. Push notifications to my phone. Apr 10 04:14:27 not sure if you're serious or not Apr 10 04:14:52 I am Apr 10 04:15:04 oh, what do you use to do that ? Apr 10 04:15:13 IRCCloud Apr 10 04:15:43 Actually I pay SimonVT to watch and then he IMs me Apr 10 04:18:55 :JakeWharton I am not sure how to provide it Apr 10 04:19:42 You should read the Dagger website then: http://square.github.io/dagger Apr 10 04:20:04 :JakeWharton http://pastebin.com/zKwc7URh ? Apr 10 04:20:32 why are you prefixing his name with ':' :S Apr 10 04:21:58 :bankai_au I thought with ‘:’ there will be notification, I know he is very busy, so there is possibilibty of missing it :) Apr 10 04:22:24 it's weird ... Apr 10 04:23:51 bankai_au: like that correct? Apr 10 04:24:48 my irc client gives both options: before and after nickname to use “:” Apr 10 04:27:59 i miss nothing Apr 10 04:30:43 :D nice! Apr 10 04:32:14 and yes, so long as `bus` is a real thing Apr 10 04:32:29 you really should just be new Bus()'ing it inside the method, though Apr 10 04:36:21 you mean http://pastebin.com/7pSheSCG ? Apr 10 04:39:13 JakeWharton, my paycheck is late.. Again.. Apr 10 04:39:29 kamol: yes Apr 10 04:39:31 is there a definitive place to learn how to use gradle as it relates to android projects? Apr 10 04:39:56 JakeWharton, thank you Apr 10 04:40:17 i guess there's this: http://tools.android.com/tech-docs/new-build-system/user-guide Apr 10 04:40:18 Mango_Man: have you seen this page? http://tools.android.com/tech-docs/new-build-system/user-guide Apr 10 04:40:23 haha, nice Apr 10 04:40:26 Mango_Man: the tools site and samples Apr 10 04:40:26 also, various open source projects that are already using it Apr 10 04:41:11 Mango_Man: try U2020 it uses gradle :) Apr 10 04:42:02 https://github.com/JakeWharton/u2020 Apr 10 04:43:14 good stuff, thanks everyone Apr 10 04:43:23 I'm looking at making an Android Library project, but I'm not sure the best way to do it. The new 'official' way is to produce .aar files, but these are incompatible with Eclipse + ADT. I could make it a project that can be downloaded via a maven/gradle dependency, but if you're not using either of those tools it doesn't help. I could have it export a .jar file, but I don't think gradle officially supports this...what's the best way to do th Apr 10 04:43:24 is to ensure compatibility with more Android projects? Apr 10 04:43:53 gradle supports jars Apr 10 04:44:05 will your hypothetical library project have android resources? Apr 10 04:44:15 or are you just spittin' bytecode? Apr 10 04:44:57 they won't need resources or images or anything, so I think .jar files should work fine Apr 10 04:45:42 I know gradle supports importing jars, but what I meant was, I'm not sure you could have a gradle library project export a jar (seems to only support exporting a .aar) Apr 10 04:45:52 not sure if I made that clear :) Apr 10 04:46:58 was looking at your Picasso library, actually, it looks like you're building it with maven? Apr 10 04:47:04 indeed Apr 10 04:47:29 gradle can export a jar with some massaging (or if you have no Android dependencies) Apr 10 04:47:58 here's an example: https://github.com/square/fest-android/blob/master/build.gradle#L54-60 Apr 10 04:49:01 hah! just came across this: http://stackoverflow.com/questions/19307341/android-library-gradle-release-jar , good to know it's working for you as well. thanks Apr 10 04:51:35 JakeWharton: It gives NullPointerException onResume (eventBus.register(this)) https://github.com/kamoljan/Nefete/blob/master/nefete/src/main/java/org/kamol/nefete/ui/fragment/InsertAdFragment.java#L70 Apr 10 04:51:56 SimonVT you getting paid in dogecoin ? Apr 10 04:52:09 barbs: i'm the one who answered that question Apr 10 04:52:35 ah, so you are! Apr 10 04:53:42 kamol: you aren't injecting the fragment Apr 10 04:54:45 I did, https://github.com/kamoljan/Nefete/blob/master/nefete/src/main/java/org/kamol/nefete/ActivityModule.java#L25 Apr 10 04:55:19 that is a list of things you will be injecting. you still need to call ObjectGraph.inject on it to get the actual dependencies Apr 10 04:55:56 oh, yeah yeah yeah, it was in doc, sorry :) Apr 10 05:01:48 Hi, Android based device keep on sending SSDP (for UPnP) toward port 1900 of 239.255.255.250 , FF02::C etc address, How do i stop it ? UPnP is disbled in Router, and don't want to use it. I do not want Android device to use SSDP for UPnP either. Apr 10 05:05:32 JakeWharton: I just extended the fragment form BaseFragment (as, shown in sample app) http://pastie.org/9069500 is it right, onActivityCreated? Apr 10 05:06:00 yeah that should work Apr 10 05:09:00 is there any way to prevent one of the sliding Views of DraweLayout from intercepting the touch gestures of a child view - in my case a Switch. If i drag over the switch - the drawer moves rather than the switch Apr 10 05:09:26 :JakeWharton reResume() of the Fragement, eventBus.register(this) is getting following error http://pastie.org/9069511 Apr 10 05:09:59 you have two fragment instances, both are registering Apr 10 05:14:14 how come I managed to make two fragment instances? Apr 10 05:26:00 JakeWharton: maybe the way productActivityReultEven() is built, is wrong? https://github.com/kamoljan/Nefete/blob/master/nefete/src/main/java/org/kamol/nefete/ui/fragment/InsertAdFragment.java#L132-L142 Apr 10 06:15:58 heh, gave up on scala already? Apr 10 06:26:54 Hi, is there any template or library for some client to sign a order in my app? Apr 10 06:28:35 Sign as in cryptographically or signature on screen? Apr 10 06:29:58 mushroomed: there are some good articles to help you get started http://corner.squareup.com/2012/07/smoother-signatures.html Apr 10 06:33:11 JakeWharton: maybe the way productActivityReultEven() is built, is wrong? https://github.com/kamoljan/Nefete/blob/master/nefete/src/main/java/org/kamol/nefete/ui/fragment/InsertAdFragment.java#L132-L142 Apr 10 06:33:23 no Apr 10 06:33:27 there are two fragment instances Apr 10 06:33:47 or you are calling register twice Apr 10 06:34:16 we should really add the object identity to that exception so you can make the distinction Apr 10 06:35:43 JakeWharton you mentioned you do views as kind of state machines: I have some progress bars embdedded in segments of a listview, and have an interface for updating them that sub'd runnable classes call tied to the main activity. Any recomendations on how to develop a datastructure that to route via to appropiate progress bar from handler's onMessage? Apr 10 06:37:21 view implements a listener, pass the view to the runnable, view holds reference to Runnable, hold the listener in a WeakReference in Runnable, if the view is recycled null out the listener on the runnable Apr 10 06:38:14 ahh so i had it backwards, perfect handled the case i was trying to figure out too. cool thank you! Apr 10 06:40:04 Also i was curious, on this progress bar i have alpha animation to fade it to transparent with anonymous animation listener which on AnimationEnds hides the progress bar, i am just curious, in the event the user leaves the activity / the view is detached in between the time the animation has started and ended, do i have do a check on the progress bar before hiding it, or will the animation handle that automatically? Apr 10 06:40:58 serious edge case, but was just wondering in general if there is a good way to handle this kind of thing: should i fully subclass the animation and just throw a boolean to false and check that if / on canceled? Apr 10 06:42:20 the anonymous listener will hold a reference to the parent object which is the parent view which has a strong reference to the progress view Apr 10 06:42:40 it'll be there no matter what, but it might not be on the screen anymore (but who cares) Apr 10 06:42:41 ahh so i need to weak reference it or top class it? Apr 10 06:42:59 unless the animation is 30s+, it's fine Apr 10 06:43:20 ahh okay, yeah just 256 ms :) Apr 10 06:43:31 thanks again Apr 10 06:43:43 f2prateek: Well, I really need a developer to make a simple app. Can I ask what I need and see if someone here wants to do it? Apr 10 06:44:08 mushroomed where about you located? Apr 10 06:44:09 mushroomed: no, per the channel topic Apr 10 06:44:20 lasserix: Peru Apr 10 06:44:27 JakeWharton: Ok, sorry~ Apr 10 06:44:40 mushroomed: ahh, for projects like this i tend to think you want to work with someone you can hash out the details in person Apr 10 06:45:14 lasserix: Skype would be enough Apr 10 06:45:34 then just use elance or craigslist or whatever Apr 10 06:45:41 or freelancer Apr 10 06:45:59 Mmkay~, thank you both very much Apr 10 06:47:27 oh JakeWharton: sorry to belay the obvious, when you say the view implements a listener, what is this listener? Apr 10 06:47:35 whatever you want Apr 10 06:47:40 something to notify it of the data Apr 10 06:48:03 then do I even need it, since i can just call progressbar.runonui or whatever for mutating the progress from the runnable? Apr 10 06:48:21 nope, you can do that too Apr 10 06:48:28 ahh okay cool thanks Apr 10 06:48:47 the listener is a bit more future-proof, though. keeps the responsibility of acting on the result of the Runnable in the view itself Apr 10 06:49:07 doesn't really matter Apr 10 06:49:07 yeah Apr 10 06:49:43 in this case this is not actually a list view, since I rolled my own pre-allocated "list set" view, instead of checking recycled should i just checked isAttachedToWindow or something? Apr 10 06:51:07 (I found pre-allocated a linear list mimicing a list view--since i always know the maximum number of rows which is a static--saved about ~150 ms on invalidation as measured onGetView) Apr 10 06:52:04 Sorry to pester you with such questions, just trying to write code up to the quality you typically publish code Apr 10 07:04:51 Good evening. New to android/java, but not to programming. Any time I try to Log.i() something from with a variable, the project fails to build with a "cannot find symbol". I'm sure I'm doing something stupid, but can't for the life of me figure it out (even after about 4 hours of googling and trying different things). Thoughts? Apr 10 07:05:45 you need to pop the right import in there Apr 10 07:06:47 oh shit g00s_ i keep telling you i'll help you "later" and then i never do :( Apr 10 07:07:09 i'm a horrible irc'er Apr 10 07:07:30 s/irc'er/person/ Apr 10 07:07:31 ;-) Apr 10 07:07:42 iggy unless you're using vi or something, the IDE should suggest or add import android.util.Log; Apr 10 07:07:43 /ban pfn Apr 10 07:07:57 I have it imported Apr 10 07:08:27 canadiancow :) i'm sure you are busy, no worries Apr 10 07:08:29 I can print strings all day long (there was a rather interesting one with a lot of f-bombs somewhere about 3 hours ago) Apr 10 07:08:47 canadiancow you'll like this http://www.colormoo.com/ Apr 10 07:09:25 hi all Apr 10 07:10:03 how does google track installs when users install app using app share? Apr 10 07:10:13 g00s_ lol Apr 10 07:10:17 i <3 cows Apr 10 07:10:18 :) Apr 10 07:10:23 XD Apr 10 07:10:45 iggy: you van only log strings with Log. Methods Apr 10 07:10:54 g00s_: i.e. for(int i=1; i<5; i++) { ... Log.i(TAG, "loop"); <--- works fine Log.i(TAG, "loop", i); <---- no workie Apr 10 07:11:28 iggy: what is the third arguement? Apr 10 07:11:29 since when is Log.i(String, String, int) a method? Apr 10 07:11:30 "loop" + i Apr 10 07:11:34 f2prateek: http://developer.android.com/reference/android/util/Log.html shows logging a variable Apr 10 07:11:58 iggy: and it uses a + Apr 10 07:12:05 Not , Apr 10 07:12:16 sweet :/ Apr 10 07:12:27 bdg Apr 10 07:12:31 public class LogUtils { public void i(String tag, String format, Object... args) { Log.i(tag, String.format(format, args)); } } Apr 10 07:12:31 * iggy doesn't feel at all dumb right now Apr 10 07:12:31 dbg Apr 10 07:12:47 hi, i inherit from Button to create my own and now i'd like to apply a style programmatically. How do i do that? I want to use it later without having to define what style to use with that button. Apr 10 07:13:12 or iggy, basically copy https://android.googlesource.com/platform/packages/apps/UnifiedEmail/+/master/src/com/android/mail/utils/LogUtils.java :P Apr 10 07:14:01 Hi, Android based device keep on sending SSDP (for UPnP) toward port 1900 of 239.255.255.250 , FF02::C etc address, How do i stop it ? UPnP is disbled in Router, and don't want to use it. I do not want Android device to use SSDP for UPnP either. Ho do i stop SSDP traffic coming out from my multiple Android devices, its flooding the router! Apr 10 07:14:01 well, hopefully I'm not going to be doing a lot of logging, but I'll put that in my URLs of interest Apr 10 07:15:53 iggy i recomend you wrap the logger in an enum with a boolean is logging Apr 10 07:15:55 tErik: how many packets do the devices send? thousands a second? Apr 10 07:16:04 cause proguard won't always excise log messages Apr 10 07:16:50 yeah, I saw there's some build DEBUG variable I can key off of if I need to Apr 10 07:17:01 rayo, no not that much, but each minute i see around approximately 3 x 8 = 24 UDP 1900 packets from android device IP-addresses. Apr 10 07:17:02 not anymore Apr 10 07:17:11 you release a signed apk or not Apr 10 07:17:17 no more debug in manifest Apr 10 07:17:34 JakeWharton: thank you! Apr 10 07:17:52 that's not really much and won't flood your router Apr 10 07:18:08 rayo, all my router logs, mostly full of these SSDP traffics Apr 10 07:18:26 why does it log that traffic? Apr 10 07:18:45 router logs all traffic Apr 10 07:19:13 then that should be not a lot, just download something and you will have a lot more packets going on Apr 10 07:19:55 how do i disable SSDP (for UPnP) inside the Android OS ? Apr 10 07:20:07 iggy: or simply use https://github.com/f2prateek/ln ☺ Apr 10 07:21:57 f2prateek cool, what is this though? ' and log to multiple endpoints." Apr 10 07:22:45 So you can attach multiple implementations, each tied to a particular logging endpoint Apr 10 07:23:08 One could be logcat, one could be crashlytics, one could be Google analytics Apr 10 07:23:16 ah, thought this was like logback-android Apr 10 07:23:45 which i haven't used, but i like slf4j Apr 10 07:24:03 of course, there is slf4j-android as a thin wrapper Apr 10 07:24:09 I was basically just trying to make sure what I was seeing in jdb was what I was supposed to be seeing Apr 10 07:24:34 a a firewall rules Apr 10 07:24:53 Its really just like timber with tiny differences Apr 10 07:24:59 few firewall rules can be set inside andorid to block SSDp outbound traffics ? Apr 10 07:35:14 is app share a legal app? Apr 10 07:35:44 just being curios Apr 10 07:36:20 afaik it only shares links to android market Apr 10 07:37:59 hi! im trying to modify dalvik's bytecode interpreter to be able to catch all java function calls and write this info to a temp file, so i switch interpreter to portable version and modify its C code, but it leads to performance flaw, and traced application crashes with such log http://pastebin.com/uLVDzb6s . So what is the best way to do that? i need to trace apps in google emulator. Apr 10 07:38:39 tracing *will* cause performance issues Apr 10 07:39:27 also, your tracing is causing timeouts Apr 10 07:39:41 it's ok im not interested in high perfomans, i need it to be stable Apr 10 07:40:01 oles_: well, you still need to make it not cause timeouts in applications Apr 10 07:40:09 an async buffer or somethinbg Apr 10 07:41:48 p_l, now i'm trying to write logs in memory mapped file Apr 10 07:42:20 oles_: I recommend you step it under debugger to check what exactly timeouts and when Apr 10 07:42:45 (if you haven't got a gdbserver on the device, you're doing this backwards) Apr 10 07:47:11 p_l, now i use emulator, but any changes a make(even just allocation some memory or calculating class name string length) leads lack of performance and crashes. that is strange for me.. Apr 10 07:48:00 oles_: I think if you're modifying stuff at that level, you should ensure you have gdbserver there. Apr 10 07:48:14 i was wondering, is it really necessary to make "viewholder" method for listview adapter "static" or not? Apr 10 07:48:19 And yes, interpretation coupled with trace file I/O will make it slow Apr 10 07:48:37 Sorry for a lame semantic question, I'm iterating over a cursor, before i begin iterating i've defined some primitives. these primitives are assigned via the cursor, and reflect the current state, which could be changed on the next iteration. what's a good name for these variables, like id_stateHolder ? Apr 10 07:54:27 p_l, yes gdbserver is already there, but i don't now how it can help me, i have no exact crash or sigsegv it just exist, (all my modifications to interpreter is strlen(methodname) at that time)) Apr 10 07:55:49 Does anyone know (my dev phone is rooted) if there is a command to delete all contacts via adb? Apr 10 07:55:58 oles_: you can attach it to observe the behaviour of the interpreter, also attach the java debugger through adb Apr 10 07:58:05 p_l, ok, thx i Apr 10 07:58:17 i'll try that Apr 10 07:59:33 i think oles is planning to log all calls from any app out there. Apr 10 08:00:52 the gdbserver will only work if you have the debug symbols on the app Apr 10 08:01:34 broody: he is modifying the interpreter, he can compile it with debug symbols Apr 10 08:01:47 anyway, you do not need symbols to run GDB, they are just the map not the terrain Apr 10 08:03:53 also, at least his problems look tractable Apr 10 08:04:29 I never had the idea that dynamic loading failed on one project because of bloody ABI mismatch, and I had to debug the thing separated by ocean Apr 10 08:08:12 can you set xml for an AlertDialog Apr 10 08:12:40 mylord: yes Apr 10 08:12:45 there is a setView Apr 10 08:13:14 http://developer.android.com/guide/topics/ui/dialogs.html#CustomLayout Apr 10 08:16:38 thepooch, cool.. and can i set size to fill_parent without the xml, on normal use of the AlertDialog.Builder? Apr 10 08:20:15 Hi, i have a ListView with an adapter, when i clear the items in the adapter and load new items into it, the ListView automatically jumps to the last elemement... but why? Apr 10 08:21:17 elo Apr 10 08:21:29 e!o Apr 10 08:21:51 e!0 Apr 10 08:30:12 because you clear the adapter and add items into it Apr 10 08:30:20 and you probably have a transcript mode set on it Apr 10 08:31:44 pfn: I'm not sure what transcript mode is? Apr 10 08:33:17 google knows all Apr 10 08:33:39 I just found it on Android dev guide :) thanks Apr 10 08:33:44 much apriciated Apr 10 08:34:06 hi guys i have a proble. with asynctask and activity Apr 10 08:34:18 http://paste.ubuntu.com/7229845/ Apr 10 08:34:32 prog = new ProgressDialog(getActivity()); error is here Apr 10 08:35:13 this is so cool http://www.theverge.com/2014/4/9/5598622/project-ara-module-development-kit-explains-how-to-make-parts Apr 10 08:42:23 pfn: I've got it to work perfectly now, thanks for the tip :) Apr 10 08:57:14 greetings Apr 10 09:00:51 does anybody know how to do multiple selection on a listview? i have a normal listview where each row is defined as a relative layout filled with text views, normally i use a onItemClick listener to open a new activity. but now i need to programatically switch to another mode where touching one will only highlight it, and the use can select a few and then press a button at the button to perfrom an action on all selected items Apr 10 09:01:18 the user*^ Apr 10 09:03:31 i dont want to use checkboxes Apr 10 09:04:30 xylinx include wasClicked to your adapter backing dataset Apr 10 09:04:55 also isn't there a listview layout attribute = multset? Apr 10 09:09:09 i want to create a custom viewgroup (extending linearlayout) that i can use like