**** BEGIN LOGGING AT Fri Jan 29 02:59:59 2016 Jan 29 03:00:14 g00s, could you elaborate on that? Jan 29 03:00:37 My overall intention is to send a bunch more data than just a simple message. I'm just trying to develop a basis on which to build upomn Jan 29 03:00:38 huck5 https://developers.google.com/nearby/?hl=en Jan 29 03:00:46 g00s, thanks for link! Jan 29 03:01:07 That's very cool. Jan 29 03:01:42 huck5 also, these guys might have an API http://opengarden.com/home/ Jan 29 03:01:51 bit Wifi Direct is pretty poor on android Jan 29 03:02:40 WiFi direct being the api this resource talks about? https://developer.android.com/guide/topics/connectivity/wifip2p.html Jan 29 03:03:16 yeah Jan 29 03:03:41 Well I'm glad I came here for advice then, as that is what I was leaning towards Jan 29 03:03:42 looks like opengarden removed any mention of their SDK Jan 29 03:03:55 wonder if they gave up on android :( Jan 29 03:04:09 Oh dear.. Jan 29 03:04:32 So, for Google Nearby... how close in proximity to the devices have to be? Jan 29 03:04:44 the docs say Jan 29 03:04:49 good point :) Jan 29 03:14:06 g00s: why :( Jan 29 03:14:25 wifi direct is unreliable on android Jan 29 03:15:08 google kinda screwed that up along with BT (oems, too, blah blah) Jan 29 03:17:46 just reading here google made $30bn on android across its lifetime; and thats what apple makes with iphone in one quarter Jan 29 03:18:40 but didn't oracle calculate the $30bn figure ? Jan 29 03:19:32 g00s: is WiFi direct *anywhere* outside of stuff that most people only ever see as dongles (miracast)? Jan 29 03:20:02 also, Android is not the profit maker in case of Google, unlike with Apple where hw sales are direct source of profit Jan 29 03:20:18 p_l its from advertising ... Jan 29 03:20:55 g00s: yes, but the devil is in the details of what we count as profit in such case Jan 29 03:21:05 the oracle # is probably inflated because they are going for damages Jan 29 03:21:13 with Apple, it's very clear cut - hw sales and AppStore Jan 29 03:22:52 p_l, yes, lots of kiosks do wifi direct now Jan 29 03:22:55 for sharing data Jan 29 03:23:29 the problem with google nearby is that it requires an internet connection Jan 29 03:23:34 wifi direct requires nothing Jan 29 03:23:47 you could do pure p2p with wifi direct, but you can't with nearby Jan 29 03:25:02 yeah, i wanted to use nearby but wifi drops on my device when BT devices are connected Jan 29 03:25:12 can't connect to anything at all Jan 29 03:25:42 * p_l can't use WiFi Direct anywhere except android, so.... Jan 29 03:26:20 how are you so unfortunate? Jan 29 03:26:25 I use bluetooth and wifi all the time... Jan 29 03:26:26 my wifi icon turns into (!) Jan 29 03:26:41 maybe just the n7 is borked Jan 29 03:26:53 pfn: simple - in order to find anything that uses WiFiDirect, I'd need to find a Miracast/WiDi receiver :> Jan 29 03:27:09 and then use either Android or windows-only intel widi Jan 29 03:27:12 p_l, I mean g00s Jan 29 03:27:20 ah Jan 29 03:27:35 maybe it's the n7 Jan 29 03:27:49 but I haven't had a problem connecting a bt keyboard and wifi at the same time on n7 Jan 29 03:28:17 https://github.com/pfn/qicr/blob/master/src/main/scala/com/hanhuy/android/irc/fragments.scala#L846-L861 Jan 29 03:28:27 meh, using an rx thing isn't so nice for this situation... Jan 29 03:31:36 I don't really use my n7 much anymore since I cracked the screen on it, though Jan 29 03:31:46 screen on that thing is a pos, minor surface crack and the digitizer eats shit Jan 29 03:32:55 heh Jan 29 03:33:03 why do I have rx higlighted still... Jan 29 03:33:25 * p_l thinks that obviously someone needs to write a java network library called tx Jan 29 03:33:51 well, there's rxtx Jan 29 03:33:53 that's close Jan 29 03:37:46 :D Jan 29 03:38:28 fwiw Jan 29 03:38:33 "rx" on freenode is a bot I think. Jan 29 03:38:40 I have attempted first contact via PM Jan 29 03:38:45 I have not been successful. Jan 29 03:40:08 well, of course, it can only receive Jan 29 03:40:25 even if it could transmit Jan 29 03:40:30 I can't receive :( Jan 29 03:42:48 ergo, we need rx/tx gattai ;) Jan 29 03:47:36 pfn, (sorry was afk) you mentioned that Google Nearby requires an internet connection. Does a local ad-hoc connection suffice? Jan 29 03:47:48 no Jan 29 03:47:53 local ad hoc is not internet Jan 29 03:47:59 anything in gms requires an internet connection Jan 29 03:48:02 I assume by internet it means "being able to connect to google" Jan 29 03:48:03 that is why it is in gms Jan 29 03:48:05 and not in android Jan 29 03:48:42 pfn, oh! Well thank you for making me aware of this. Jan 29 03:48:55 Ideally I want the app to be able to run without data, or internet connection. Just on adhoc or bluetooth. Jan 29 03:50:09 pfn, do you have any suggestions then? Does that lead me back the Andoid WiFi P2P api? Jan 29 03:50:31 I was thinking of working on something like Nearby that would use local network Jan 29 03:50:49 p_l, well... I will keep my ear to the ground for it :) Jan 29 03:52:21 For my proof-of-concept/start I just want to send a basic message/picture/data to another phone on the wifi/bluetooth connection. In the end I would like to be able to share fairly large chunks of data in close to real time. Would one of the two options (bluetooth/wifi) be better than the other for this? Jan 29 03:55:13 if you have WiFi connectivity, you can try using mDNS for service discovery Jan 29 03:56:25 huck5, yes Jan 29 03:57:49 p_l, it has been a while since I've messed around with Android application development. Could you maybe elaborate a little on what "service discovery" entails? Jan 29 03:58:28 By that I mean, a service would be something my application is running? Jan 29 03:59:14 huck5: Multicast DNS, with DNS-SD (DNS Service Discovery). Apple calls it "Bonjour" Jan 29 03:59:36 essentially a way to scream on the net "hey, I have service X on IP Y!" Jan 29 04:00:50 p_l, yeah that sounds like it would work! Jan 29 04:01:09 What if I wanted to stream a video from device A to device B... it should be able to handle that? Jan 29 04:01:42 you get dnssd as part of wifip2p Jan 29 04:02:12 you don't really need mdns for wifidirect anyway Jan 29 04:03:20 huck5: mdns is just about finding each other on the network. Rest is plain IP Jan 29 04:05:10 it's included in the android apis Jan 29 04:05:27 I should write an alternative to superbeam, superbeam sucks Jan 29 04:05:38 right idea, crappy implementation, doesn't connect half the time Jan 29 04:06:31 I want something closer to Plan B "personal mainframe", essentially a common substrate for multiple applications talking in a mesh between all my computing devices Jan 29 04:06:43 with no stinkin' cloud Jan 29 04:08:23 thanks p_l, pfn. I've got a good sense of which direction to head now :) Jan 29 04:09:05 p_l, yeah, 'cept android doesn't have any good support for mesh networking Jan 29 04:10:22 pfn: not wifi mesh Jan 29 04:12:10 And just to clarify yet again, for streaming media between devices, the WiFi is likely a better way to go than Bluetooth? Jan 29 04:12:53 yes Jan 29 04:13:01 Awesome, thanks again :D Jan 29 04:13:06 (... what's bluetooth good for, then?) Jan 29 04:14:10 I suppose connecting with bluetooth compliant-only devices. Jan 29 04:15:17 huck5 BLE is pretty nice Jan 29 05:18:16 hey Jan 29 05:19:02 how does one get make an intent in one activity class then keep track of it in another activity class? Jan 29 05:19:30 is there a way to keep track of intents? Jan 29 05:20:07 I read its possible with an intent extra. but then the question comes how do i list all intents out there too loop through to check for that intent unique id? Jan 29 05:25:16 how do i capture an end of app event from task manager? Jan 29 05:25:23 you don't Jan 29 05:25:28 read d.android.com thoroughly] Jan 29 06:05:51 <_genuser_> anybody using a huawei phone? Jan 29 06:25:57 yes Jan 29 07:11:55 I wrote an app and I have this weird issue where, after the app is left alone for about 10 minutes or so, the data dissapears from the app. Is there something I have to do to keep from losing the data? Jan 29 07:21:58 amazoniantoad: are you using any persistent model? Jan 29 07:22:13 br0mahn, no Jan 29 07:23:32 what do you mean by left alone and data disappeared? are you doing something like changing orientation and whatnot? Jan 29 07:24:32 br0mahn, no. It just dissapears. I have the people fill our their form and at the very end the data is submitted to my server. Well, if the tablet sits for too long the data is just gone. Jan 29 07:24:36 The app is still running Jan 29 07:24:42 but no data is there Jan 29 07:25:46 lol Jan 29 07:26:14 br0mahn, ever hear of something like this? Jan 29 07:26:56 nope Jan 29 07:27:09 who took it tbh Jan 29 07:33:10 you mean in-memory? Jan 29 07:52:00 Hey, what do you use to allow your apps to resolve mDNS .local domains? Jan 29 07:52:22 mdnsjava looks abandoned Jan 29 08:03:33 recycler views repeating rows… I’ve seen it before but I can’t remember why.. quick web link to a solution.. I think it was straight forward.. Jan 29 08:29:49 regan: i dont have that problem Jan 29 08:30:04 you might have problem with caching Jan 29 08:30:16 like, not setting something empty Jan 29 08:51:43 Goodmorming for those in Europe. I have a table cell layout with 3 buttons and 1 checkbox. I can get click events from the buttons, but I CAN'T get a click event from the CHECKBOX. My target is 23 and minimal SDK is 15. What could be wrong that my checkbox events don't work?? Jan 29 08:52:30 I hope it's not a weird bug or something, but this really ruined my day yesterday. Jan 29 08:54:51 dunno, you could try something like focusable = false, focusable in touch mode etc. Jan 29 08:55:08 is this tablelayout? Jan 29 08:55:39 similar bug was occuring during old days of listview and making rows clickable Jan 29 09:03:28 Ashiren, listview is indeed clickable too. But than why do the buttons throw click events. Jan 29 09:03:59 I'll disable click event for a cell and see what happens. Thnx Ashiren Jan 29 09:29:14 Hello guys, I have a cell with a checkbox which doesn't react on changing check states. I set OnClickListener as well as OnCheckedChangeListener, but both of them are not called. While some buttons on the same are reacting well on click events. So how come the checkbox doesn't receive click events? I'm 100% sure my checkbox works, cause I can set the checkbox to checked state, which by default is unchecked. So I really have the r Jan 29 09:29:14 ight checkbox object. Jan 29 09:30:28 This is obviously a bug in Andrdoid OS, but there must be a workaround. Jan 29 09:32:08 why android studio ctrl+k cuts line to clipboard Jan 29 09:32:54 need to rebind each key manually is frustrating Jan 29 09:33:09 imagine how much of efforts is that, multiplied by number of users Jan 29 09:33:11 squ: you can configure the keymap in the settings, just switch to the one that’s default for your OS Jan 29 09:33:18 it has quite a few preconfigured keymaps Jan 29 09:33:25 sure Jan 29 09:33:29 just switch to one where most keys match what you want Jan 29 09:33:37 sure Jan 29 09:34:26 one day I'll go netbeans Jan 29 09:34:38 obviously, if you want to have a keymap that differs a lot from what each platform – Windows, X11, KDE, Gnome, OSX – uses by default, you’ll have to configure a lot Jan 29 09:35:02 I found the thing to reconfigure to change the "close current tab" only after a long time Jan 29 09:35:26 I dropped all attempts to configure it Jan 29 09:35:40 using default layout Jan 29 09:35:45 full of shit on the screen Jan 29 09:36:46 we need software police Jan 29 09:37:24 https://en.wikipedia.org/wiki/Core_Infrastructure_Initiative Jan 29 09:37:36 squ: did you hear about Parse? Jan 29 09:37:38 this initiative was created to fund under funded open source project Jan 29 09:38:02 we need something similar to destroy eclipse and others Jan 29 09:38:24 other way indians will continue making shit software Jan 29 09:38:32 and drop on our heads Jan 29 09:38:55 thepoosh: yes Jan 29 09:39:13 the smalltime android guys in Israel are shitting their pants Jan 29 09:39:33 Well, Parse left them one year of support, Jan 29 09:39:37 i saw today about 10 different posts in the same group looking for alternatives Jan 29 09:39:50 and a way to self-host everything except for (a) analytics, (b) notifications, (c) I’ve forgotten Jan 29 09:40:00 last time what I did with Parse I added event handler to send added row to mail-newsletter service Jan 29 09:40:07 never had problems with it Jan 29 09:40:09 and in one year they should be able to find a node.JS dev which can add that stuff for them Jan 29 09:40:16 justJanne: that's just enough time to go through the contracts of everyone and see if you need to supply freebees Jan 29 09:40:47 it's a normal BaaS Jan 29 09:41:09 thepoosh: can you tell story in full Jan 29 09:41:35 what story? Jan 29 09:41:43 about Israel :) Jan 29 09:41:45 & Parse Jan 29 09:41:54 Parse announced that they are shutting down in Jan 27th 2017 Jan 29 09:42:04 wow Jan 29 09:42:09 gotta read Jan 29 09:42:10 tons of IL android devs who give freelance work use them Jan 29 09:42:22 I use it too Jan 29 09:42:23 now all of them need to update old projects Jan 29 09:42:35 and maybe for free depending on the client and contract Jan 29 09:42:38 so... Jan 29 09:42:45 good thing i work in a normal place Jan 29 09:43:15 squ: http://venturebeat.com/2016/01/28/facebook-is-shutting-down-its-parse-cloud-service-on-january-28-2017/ Jan 29 09:44:43 what do you mean, normal place? Jan 29 09:46:23 a place that has enough money to develop it's own server code Jan 29 09:46:31 >> And many of Parse’s team members, including former Parse CEO Ilya Sukhar, have moved on Jan 29 09:46:39 never knew it is russian Jan 29 09:46:58 Ilya is considered russian name, despite you may say it is originating from Israel :) Jan 29 09:47:56 no, it's russian Jan 29 09:48:00 also in Israel Jan 29 09:48:15 one of the android qa guys we have is named Iliya Jan 29 09:48:47 russian or israelian? Jan 29 09:49:07 just came from Mosco Jan 29 09:49:09 w Jan 29 09:49:13 a few months ago Jan 29 09:49:15 I see Jan 29 09:49:36 now what … have to search new cloud service Jan 29 09:49:49 probably amazon cloud Jan 29 09:50:04 >> And unlike Instagram, Facebook never moved the Parse infrastructure onto its own data centers and off of cloud provider Amazon Web Services (AWS). Jan 29 09:50:33 as it states it was based on amazon, so it would make sense to make open-sourced parse server api to amazon manually Jan 29 09:51:03 Guys, what could prevent receiving a click event for a checkbox in a table cell??? Jan 29 09:52:30 S3 is a good place to start Jan 29 09:52:37 but you can also go Azure Jan 29 09:53:16 Number5: if there is a view on top of it that os taking the touch event Jan 29 09:54:40 S3? Jan 29 09:55:06 not familiar with cloud companies Jan 29 09:55:11 thepoosh: what do you use? Jan 29 09:55:15 AWS-S3 Jan 29 09:55:17 thepoosh, , well I have buttons on the same cell too and they do get click events. Why those buttons do get click events and the checkbox not? Jan 29 09:55:19 we use amazon Jan 29 09:55:23 right Jan 29 09:55:29 ye, it seems ok Jan 29 09:55:38 Number5: dump the hierarchy Jan 29 09:55:49 squ: there is a lot of boiler plate for amazon though Jan 29 09:55:52 IMO Jan 29 09:56:03 I have amazon account and played with it Jan 29 09:56:09 it has ubuntu Jan 29 09:56:19 thepoosh, , can you clarify more about dumping hierarchy please? Jan 29 09:56:28 so I guess, installing parse server won't be a problem Jan 29 09:56:46 Number5: http://developer.android.com/tools/help/hierarchy-viewer.html Jan 29 09:57:22 thepoosh: any idea why they close parse Jan 29 09:57:37 no money in it Jan 29 09:57:44 probably no data as well Jan 29 09:57:53 everyone is using free service Jan 29 09:58:23 https://redd.it/435vjp Jan 29 09:58:49 too much text :) Jan 29 09:59:38 we have had random people passing though here asking about it, but it never seemed to have that much traction Jan 29 10:00:20 I really liked Parse.com Is there an comparable service, I mean like API and how to configure? Jan 29 10:00:46 seems the main thing that's missing from the open source stuff is their push support Jan 29 10:00:47 Number5: so far — amazon aws + manual install of parse.com server api Jan 29 10:01:22 yea, that is what you get from open source — no one is responsible Jan 29 10:01:41 squ, so there's a Parse.com server you can download for free and run it on your own system? Jan 29 10:02:05 https://github.com/ParsePlatform/parse-server Jan 29 10:02:20 Number5: yes it is written in their message Jan 29 10:02:33 Well cool! Jan 29 10:02:42 Really really cool :P Jan 29 10:02:51 >> we’re releasing the open source Parse Server, which lets you run most of the Parse API <...> For more details, check out our migration guide here. Jan 29 10:03:30 we'll see how cool it really is Jan 29 10:03:32 squ: eh, that's usually wrong. Jan 29 10:03:58 Open development projects, which are not just source dumps, usually have someone take responsibility. Jan 29 10:04:10 I don't know you and asked nothing Jan 29 10:04:30 > squ yea, that is what you get from open source — no one is responsible Jan 29 10:04:46 I was commenting on that. Jan 29 10:05:33 :) Jan 29 10:05:38 Morning happy Android people. Jan 29 10:19:07 hey! Jan 29 10:19:32 Do you know of a simple way to resolve .local domains via mDNS? mDNSjava seems to be unmaintained Jan 29 10:26:51 justJanne, hmm, for some reason looking for mDNS on Android lands you on https://developer.android.com/training/connect-devices-wirelessly/nsd.html ... did you try that approach_ Jan 29 10:26:52 ? Jan 29 10:27:07 nsd sadly isn’t compatible with existing mDNS systems Jan 29 10:27:29 Of course not :/ Jan 29 10:31:05 What's a good past site with not too much Ads garbage? Jan 29 10:36:33 Ok guys, I'm just stuck. This is the first time since I develop Android I give up. This is my layout of a table cell. I get click events for the buttons, but not for the DAMNED Checkbox.: http://paste.ofcode.org/ycqvXxbPsymTu5NzG2diQx Jan 29 10:44:35 Number5: asking question to find an answer is not giving up ;-) Jan 29 10:45:05 Did you target the correct id for the checkbox? Jan 29 10:45:16 br0mahn, thank you for you positive motivation. But this is really killing me. Jan 29 10:45:44 br0mahn, yes, I tested, by setting the checkbox to checked state, which is by default unchecked. Jan 29 10:46:15 Somehow the checkbox doesn't receive the click event, while the Buttons do. Jan 29 10:46:43 Show your java code implementation on this Jan 29 10:47:05 thepoosh, suggested me to check out the view hierarchy. But it shows me nothing just a black screen. Jan 29 10:47:09 ok Jan 29 10:49:35 This is the adapter part implementation: http://paste.ofcode.org/A9PGGZDKuZAJ9XwWixcLy6 Jan 29 10:51:14 br0mahn, the weird thing is, I have the same implementation on another project I did some years ago and that just works. Jan 29 10:51:49 I want to use the checkbox to trigger ActionMode, so the user can delete selected items. Jan 29 10:53:00 If can't get this to work, I'll try to catch click event on the TextView and than set the checkbox. My last hope. Jan 29 10:57:38 not-a-recyclerview :( Jan 29 11:00:14 Number5, try adding 'android:descendantFocusability="blocksDescendants"' to the root of the item layout Jan 29 11:01:03 or maybe that solved the reverse issue where you can't click on the item when you have a checkbox... Jan 29 11:01:05 Zharf, I have no experience with recycler-view yet. But I will, maybe this weekend :) Jan 29 11:04:52 Zharf, the same result, not working, not working not working. Man man man. Thnx for the help anyway Jan 29 11:04:55 phone is dead slow, most apps refuse to start; reboot does not help; flush dalvik did not help, I got this several times per second: http://pastebin.com/6eeb5kWR what can be wrong ? Jan 29 11:05:16 I think this might not be an issue if you used recyclerview since it doesn't do click handling for items Jan 29 11:08:04 but my phone got unusable since a few hours, and this is the only odd thing I could find Jan 29 11:09:27 doublehp, this is pretty much offtopic here, and I don't think anyone here could help you very easily, I think your best bet is to ask htc (according to logs you're on an htc phone? :) Jan 29 11:09:51 though I suspect they'll tell you to factory reset the phone and if problem persists, do something else Jan 29 11:10:02 doublehp: try #android-root Jan 29 11:10:11 Zharf: HTC will say two things: make a full reset, and, phone is out of waranty Jan 29 11:10:18 yeah Jan 29 11:10:49 get a cyanogenmod [solved] Jan 29 11:10:51 "something else" = "buy our latest one" Jan 29 11:11:19 E/android.os.Debug( 6546): failed to load memtrack module: -2 Jan 29 11:11:55 E/memtrack( 6546): Couldn't load memtrack module (No such file or directory) Jan 29 11:12:02 E/libc ( 6546): mmap fail (pid 6546, tid 6546, size 2088960, flags 0x4002, errno 12(Out of memory)) Jan 29 11:12:17 OOM sounds really bad to me ... but i don't know if it's ok on android Jan 29 11:12:24 Number5: have you tried setOnCheckedChangeListener instead? Jan 29 11:12:32 usually, on linux desktop, this means ... "reboot needed" Jan 29 11:12:33 sorry was afk for a moment Jan 29 11:13:00 br0mahn, yes, but I'll try again. Jan 29 11:14:49 You can check on some example on the net on how to implement this Jan 29 11:15:18 doublehp, maybe your RAM is defekt? Jan 29 11:15:23 defect* Jan 29 11:15:34 just a guess Jan 29 11:16:01 or the internal storage has worn out Jan 29 11:16:14 guesses Jan 29 11:16:23 nothing we can help you with here Jan 29 11:16:45 danijoo: RAM defect never happened in my whole life ... Jan 29 11:17:03 doublehp, so what? Jan 29 11:17:17 oh ... could swap file help ? Jan 29 11:17:36 a swap on your phone? Jan 29 11:19:09 danijoo: so, when people tell me about RAM defect, i always read it with caution. Always found a better explanation. Jan 29 11:19:36 danijoo: many people use swap on android. it usually solves OOM Jan 29 11:19:46 but i can't find the RAM eater process Jan 29 11:19:58 thats absolutly wrong Jan 29 11:20:09 because OOMs in applications cannot be solved with more RAM Jan 29 11:20:14 those are HEAP OOMs Jan 29 11:22:59 br0mahn, Checkbox just doesn't work at all!!! This is really crazy man! I have a fragment for Login and I added a checkbox in a simple fragment layout and also no click event! What's going on here???? Jan 29 11:23:38 I target to version 23 with minSDK=14. Jan 29 11:23:47 Can someone try it out? Jan 29 11:25:45 danijoo: the OOM is in a system process !!! Jan 29 11:25:57 doublehp, thats why i guess its your hardware Jan 29 11:26:13 to check if its software, make a reset Jan 29 11:26:26 danijoo: did several reboots Jan 29 11:26:34 Number5, show your codes Jan 29 11:26:34 ok, is ther a ramtester ? Jan 29 11:28:40 pfn: do you have rescue for sbt and crashlytics? they like to have their own 'cool' plugin Jan 29 11:31:37 doublehp, ask #android-root Jan 29 11:32:21 did, 20mn ago Jan 29 11:33:02 good Jan 29 11:43:22 danijoo, sorry for the late response: http://paste.ofcode.org/39B65vWPZCmjza222FDWdUh (layout), http://paste.ofcode.org/xy4xySkWvXreqFPv8mqHhT (java) Jan 29 11:44:17 is it possible via the Android API to know if a specific app is running? Also, is it possible to know if this specific app is open and not only running in the background? Jan 29 11:45:23 I test this on a laptop with Android 4.04, cradle build looks lie this: http://paste.ofcode.org/sGmj4u55ujBhsyiWpSn5tp Jan 29 11:46:08 Number5, you want to see when the box is checked/unchecked, right? Jan 29 11:46:12 Lobosque, google for system manager api Jan 29 11:46:21 danijoo, yes Jan 29 11:46:42 Tested your layout. Strangely, on my side. Jan 29 11:46:48 danijoo, I've done this multiple times before on other apps I developed. This is really crazy. Jan 29 11:46:49 no problem* Jan 29 11:46:59 I used ListActivity Jan 29 11:47:08 br0mahn, really? Jan 29 11:47:21 hmmm, could it be because I use a style?? Jan 29 11:47:28 Number5: first result is DevicePolicyManager, is this it? Jan 29 11:47:38 did you read the docs on androids checkbox class? Jan 29 11:47:39 (I know you didnt) :P Jan 29 11:47:51 Lobosque, don't know, Jan 29 11:48:04 danijoo, no, why? Jan 29 11:48:14 Number5, because thats where it tells you what to do.. Jan 29 11:48:26 http://developer.android.com/reference/android/widget/CompoundButton.html#setOnCheckedChangeListener(android.widget.CompoundButton.OnCheckedChangeListener) Jan 29 11:48:29 danijoo, please provide me link Jan 29 11:48:31 this method is what you want Jan 29 11:48:33 ok thnx Jan 29 11:48:39 Hold on, what was the problem again Number5 ? Are you trying to see if the checkbox is clicked or is the Checkbox doesn't even tick? Jan 29 11:49:18 br0mahn, danijoo I want to read its state when it changes. Jan 29 11:49:29 after it's clicked Jan 29 11:49:37 Number5, see the link Jan 29 11:49:53 this method is what you want instead of your OnCLickListener Jan 29 11:50:27 danijoo, I'll try again, but I already tried that method until I went back to the old onclick event handler Jan 29 11:50:38 man man man, this redculous Jan 29 11:50:41 OnCLick is wrong Jan 29 11:51:13 danijoo, ok, I'll try that. But onClickeListener works too, as I have used it before on other apps Jan 29 11:51:35 but then you have to check if its checked/onchecked everytime Jan 29 11:51:39 which is ugly Jan 29 11:51:41 and wrong Jan 29 11:53:48 danijoo: 3mn to test 100M randomly placed ... got 2G to test. Not even sure how to calculate how many pass i have to run to have 99% chances to test every location randomly Jan 29 11:54:11 Number5, ListActivity http://pastebin.com/raw/1fdiixqn, BaseAdapter: http://pastebin.com/raw/Lh8QJNkH Jan 29 11:54:12 doublehp, wrong channel. Jan 29 12:03:33 <_HumanX_> is it just me or ' Environment.getExternalStorageDirectory() ' never works at all ? Jan 29 12:03:40 its you Jan 29 12:03:45 it works Jan 29 12:03:46 <_HumanX_> lol Jan 29 12:03:54 oh wait. Environment? Jan 29 12:04:01 I alsways use context. Jan 29 12:04:01 <_HumanX_> Yeah Jan 29 12:04:13 <_HumanX_> Aha Jan 29 12:04:41 why do you use Environment? Jan 29 12:05:18 <_HumanX_> idk, i guess its just there Jan 29 12:06:19 <_HumanX_> And why do you use context ? Jan 29 12:06:42 because thats how you do it in android if you want external resources Jan 29 12:06:54 the context is the linker for anything not part of your code/app Jan 29 12:06:59 _HumanX_: http://vpaste.net/2PTq4 Jan 29 12:07:04 https://youtrack.jetbrains.com/issue/KT-10733 << super annoying.. Jan 29 12:07:39 _HumanX_: take care of that null return Jan 29 12:08:13 <_HumanX_> Oh, ok Jan 29 12:08:34 <_HumanX_> Thank you all, most appreciated Jan 29 12:26:03 I have a database with some relational data, which I would like my app to access. Most likely the data will not change very often, but I would like to be able to keep it in sync with the database (which I currently plan to expose through a JSON API). What is the correct way to do this? Jan 29 12:26:21 Currently I fetch a huge json file on first app run, write it to a local sqlite database, and access that sqlite database from then on Jan 29 12:26:35 (was going to rewrite this to use Parse, but that isn't really an option anymore :-P) Jan 29 12:27:12 why dont you fetch small jsons everytime they are required? Jan 29 12:28:11 danijoo: I thought about that, but I am kinda scared about.. internet issues, I guess? Jan 29 12:28:23 its 2016 :) Jan 29 12:28:32 On a website I'd easily just fetch the data when required Jan 29 12:28:54 but if you want the data to be always available while offline, theres no way arround fetching it all at once like you do it now. Jan 29 12:29:15 nah, the app also fetches som pdfs, so I have internet access as a requirement Jan 29 12:29:32 and then just parse the json files on the fly, with no writes to a local database at all? Jan 29 12:29:53 id cache them somewhere for some amount of time Jan 29 12:30:09 then use the cache and recheck with the server from time to time Jan 29 12:30:47 are there any pre-made caching solutions for this use case, or do I just store the file and recheck if it is older than xx? Jan 29 12:31:09 http has a solution called cache-control :) Jan 29 12:31:21 that does the job for you Jan 29 12:32:23 danijoo: oo, that does seem nice Jan 29 12:32:31 so it is a fully acceptable practice to just parse json on the fly? :D Jan 29 12:33:10 basically your server sends a header saying ¨dont bother me with this again for 1 week¨ and your http library will cache the response for that time Jan 29 12:33:26 w0bni, hard to tell. depends on the size. Jan 29 12:33:38 the answer is no if your json is 10 mb in size :p Jan 29 12:35:49 danijoo: oh no, I'm good Jan 29 12:43:10 I got a question about android pay programming can you use coupons with it? Jan 29 12:46:59 Hey all Jan 29 12:47:31 Is the Google Fit History API in playservices 8.3 obfuscated for anyone else or just me? Jan 29 12:48:10 danijoo: phone working fine again after cleaning dalvik and classi caches. Jan 29 12:49:17 i looking for api for android pay Jan 29 12:49:30 Sorry newbie question. Jan 29 12:49:42 pay ? Jan 29 12:49:44 "mc" is no longer "midnight commander" for google but minecraft :( Jan 29 12:50:49 doubleehp,If i read it right android pay you can use coupons with it.I try to make a coupon app.:) Jan 29 12:55:03 never mind i try see if i can find anything. Jan 29 12:55:59 hello, i have this error - > http://pastebin.com/9zeLN1WQ the code is here -> https://github.com/guardianproject/OrbotVPN/blob/master/src/org/torproject/android/vpn/OrbotVpnService.java line 262 someone can help please ? Jan 29 13:08:36 http://i.imgur.com/vcm8tLt.jpg Jan 29 13:09:22 http://devopsreactions.tumblr.com/post/138012434787/java-benchmarks Jan 29 13:09:30 Why would a public API be obfuscated? D: Jan 29 13:10:18 squ: oh god, that leg animation Jan 29 13:10:30 looks like he's spinning around his leg Jan 29 13:10:31 s Jan 29 13:15:48 hi Jan 29 13:16:50 how i can solve Attempt to read from field 'com.android.server.am.TaskRecord com.android.server.am.ActivityRecord.task' on a null object reference ? in getActivity.finishAffinity Jan 29 13:21:50 t0th_-_, don't read on null object references :| Jan 29 13:23:54 i know Jan 29 13:24:14 but this is inside Acitivity class Jan 29 13:24:36 without the code how should anyone even try to answer Jan 29 13:24:37 http://pastebin.com/PgwNv6gt Jan 29 13:24:42 problem in finishActivity Jan 29 13:33:17 Hello, i can use INSTALL_REFERRER to get data from market links "market://details?id=my.package.name&referrer=someDataToTransfer", but what about regular play store referrer ? Jan 29 13:34:46 does it apply ? Jan 29 14:00:48 Hello Jan 29 14:01:15 I have a little problem, I need to delete shared prefences/ app data from python Jan 29 14:01:38 of another app, at first it seemed easy but I cannot find the path to the xml file containing the information Jan 29 14:01:50 Any idea where such XMl can be? Jan 29 14:05:08 Aviram, its /data/data/package.name/shared_prefs for old android versions Jan 29 14:05:29 and /data/user/yourUserId/package.name/shared_prefs for newer versionss Jan 29 14:05:48 yourUserId is 0 unless you have multiple users on the phone Jan 29 14:06:50 t0th_-_, read your code :P Jan 29 14:07:04 what code? Jan 29 14:07:35 are you sure you want finishAffinity() and not finishActivity() ? Jan 29 14:07:45 So a co-worker and I are having a conversation about an issue we have for a ConccurentModification exception. He says that the change he made prevents it from happening (it doesn't happen all the time). I'm convinced his change from and enchanced for loop to a regular for loop doesn't do ANYTHING to fix the exception. Thoughts? http://pastebin.com/PAVKuC1f Jan 29 14:08:50 Thanks danijoo Jan 29 14:08:51 i need remove all previous activities Jan 29 14:09:11 eghdk, yeah theres not really a difference in there beside that the enhanced for-loop uses an interator instead of a counter variable.. Jan 29 14:09:15 and I wonder now - if the device isnt' rooted and the preferences are received user MODE_PRIVATE I wont be able to reach the file, correct? Jan 29 14:09:25 Aviram, correct Jan 29 14:10:02 danijoo: Exactly. right? The regular for loop could actually be better in the android world, but when we're talking about Concurrent Modification... that change from an enchanced for to aregular for, provides to value. Jan 29 14:10:37 eghdk, yeah. the normal loop doesnt require an interator obj. to be created so its a bit less memory intensitive Jan 29 14:10:54 but should really make no difference on whats happening inside the loop Jan 29 14:11:30 t0th_-_, okay. I just wassnt sure because you wrote finishActivity here but the code has Affinity ;) Jan 29 14:11:43 Any easy way to debug concurrent modification exception? I could've sworn I've seen someone here discussing it saying that you can switch to a different datatype and it helps debug. danijoo Jan 29 14:11:44 :) Jan 29 14:12:00 eghdk, no idea sry Jan 29 14:12:02 eghdk: Synchronize access Jan 29 14:13:32 What happens if an item is removed from the list while you're looping through it? Right now you get a ConcurrentModificationException, with a regular for-loop it'll silently skip items Jan 29 14:13:51 SimonVT: danijoo Alright. I know that synchrnoizing should work, but not sure whether I should just put a synchronize around every method that touches that list or what. Jan 29 14:14:04 If you need to touch it from multiple threads, yes Jan 29 14:14:06 I think someone here before mentioned to replace ArrayList with CopyOnWriteArrayList Jan 29 14:18:31 SimonVT: Oooh. So what if I don't want to touch it from multiple threads? Jan 29 14:19:37 Then you don't get ConcurrentModificationExceptions Jan 29 14:19:57 Nice! And then I don't need synchronize all over the place? Jan 29 14:20:50 Of course not, there's only one thread using it Jan 29 14:21:05 But since you said you get ConcurrentModificationExceptions, it sounds to me like you have multiple thread using this list Jan 29 14:23:43 SimonVT: Yeah. Deff a background thread, and the UI thread I bet is doing it somewhere. I bet in my adapter we are doing a sort on the list. Adapter stuff is run on main thread (AFAIK) so that should probably do it. Thanks SimonVT Jan 29 14:24:34 SimonVT: Meant to say. We deff want it doing most everything in a background thread. BUT we probably are modifying it on the UI thread. Jan 29 14:27:42 Then you'll be ConcurrentModificationException free Jan 29 14:28:01 SimonVT: Oh one last thing on CME. I read on SO that you can make a copy of your ArrayList before you mess with it. In your opinion is this a viable option? Jan 29 14:28:22 I guess, that would double the memory heap because you need a copy Jan 29 14:28:43 Hi there. Does anyone know why a java application (running _and_ in AndroidStudio in debug mode) would evaluate ("192.168.0.1".equals("192.168.0.1")) as false? Both strings are actually variables. Debugger tells that they are at the same memory location, and have to be equal in my book. Jan 29 14:29:30 Wont use that much memory, assuming each item is the same Jan 29 14:33:14 So the actual ArrayList object would have to be duplicated, but the objects inside don't? That actually seems like a viable approach SimonVT. In this case I KNOW that I don't want multiple threads modifying it, so I'll look for where thats being done. Jan 29 14:33:39 Yeah, exactly Jan 29 14:34:09 lukeer, that should not happen. Check your variables again Jan 29 14:34:12 Thanks man. Appreciate it. I swear I'm gonna ready java concurrency in action soon! Jan 29 14:34:17 SimonVT: Jan 29 14:36:31 They both are visible in the debugger (printed in grey after the code line). In the object view beneath, they are both shown with their memory address. I can unfold them and see that they also have identical offset and length parameters. Jan 29 14:41:38 lukeer: Uninstall your app, start a new debugging session, double-check you're not mistaking local/member variables.. What you're saying doesn't happen Jan 29 14:52:50 SimonVT: so my co worker is sitting here with me he says "when the foreach pulls the iterator you aren't allowed to modify the underlying collection while the iterator is in use. If you remove the iterator from the equation, then the CME won't be thrown." Jan 29 14:54:07 Right, you just get undefined behavior Jan 29 14:55:08 You're using a regular for loop.. You're currently processing item 10, while another thread removes item 5 from the list. Your loop will skip item 11 Jan 29 14:57:04 Other scenarios include getting an IndexOutOfBoundsException, or processing the same items twice Jan 29 14:57:13 CopyOnWriteArrayList is such a neat datastructure for those cases :) Jan 29 14:57:30 That you don't get an exception doesn't mean you're doing it right Jan 29 14:58:39 This is the worst mistake in my life on programming. Somehow I forgot to clear filter field and because of that, I couldn't log checkbox's state changes. So, more than a day I was crunching my head because I couldn't understand why checkbox's state didn't react on click event. Button clicks do show up in logcat but the checkbox not! More than one day wasted! So if you're struggling with a bug, remember that I was struggling more Jan 29 14:58:39 than one day just because my logcat filter wasn't cleared! Jan 29 15:20:18 I made two screenshots http://picpaste.com/7cb7f5ce9a445e398a6d54a381ac5628.png and http://picpaste.com/8078d44beca0afd59b6e63b6c7a0f086.png Jan 29 15:20:19 The former being our test setup and the latter showing that program flow indeed goes the wrong path. Jan 29 15:25:37 hello, i need some help, im using okhttp client.newCall(request).enqueue(new Callback() {}); Jan 29 15:26:24 that callback works on background thread,in some cases i need to update ui Jan 29 15:26:49 but problem is i have almost 80x methods and 170 callbacks like this Jan 29 15:27:36 sci-fic: RxJava with subscriber on main thread? Jan 29 15:27:37 i dont want to put handler.post(new runnable) for all these methods, i need to wrap callback to run it on background or main thread (as parametric) Jan 29 15:28:16 you'll get NetworkOnMainThreadExceptions if you just have the callback run on the main thread because the ResponseBody is hooked directly up to the Socket to pull bytes Jan 29 15:29:06 Well, that’s what RxJava’s observables can solve – you can do the action on a background thread, and have the callback that changes the UI on main thread Jan 29 15:30:05 :O Jan 29 15:30:23 JakeWharton: I think OkHttp directly integrates with RxJava? Jan 29 15:30:29 no Jan 29 15:32:43 oh, sorry, that was Retrofit Jan 29 15:32:46 justJanne: u mean rxAndroid if im correct, aren't u ? Jan 29 15:33:07 sci-fic: rxAndroid has rxJava as dependency, but yes. Jan 29 15:33:21 JakeWharton: any suggestions about that ? i guess you are contributor on okhtp or retrofit Jan 29 15:37:43 Write a MainThreadCallback which buffers the response and then posts callbacks to the main thread. Then use Callback for background threads and MainThreadCallback for main threads. Jan 29 15:52:49 gordon_, have what? Jan 29 15:56:43 thanks guys Jan 29 15:57:45 do you have exmple fot crashlytics ? Jan 29 16:00:38 need to sleep now Jan 29 16:00:54 will check it tomorrow Jan 29 16:03:39 lol Jan 29 16:11:15 SimonVT: Wait, so thanks for the update, but I'm still confused, I thought going from a for to an enchanced for was exactly the same. You're saying using a regular for could be better in terms of crashing but we'll get unexpected results? Why wouldn't it just keep crashing with a CME? Jan 29 16:14:10 gordon_, resValues += (("string", "com.crashlytics.build_id", java.util.UUID.randomUUID.toString)) Jan 29 16:14:27 gordon_, something like that Jan 29 16:14:33 eghdk: Not crashing is worse.. CMEs are for when you have an iterator Jan 29 16:18:57 SimonVT: Oh damn. Does that mean, I should potentially make all of my for loops, into enchanced for loops so I can see where I'm messing this up? My point is... how would I know that this was actually broken if I wasn't using an Iterator? Jan 29 16:20:07 You know if you're accessing your list from multiple threads.. If you are, ensure you handle that Jan 29 16:21:31 hi, anybody have an example with SealedObject ? Jan 29 16:21:43 what the best way to store a token localy? Jan 29 16:21:55 hm, seeing "01-29 11:18:56.289 D/android.support.v7.widget.GridLayout: horizontal constraints: x3-x0>=704, x3-x2<=0, x2-x1<=294, x1-x0<=166 are inconsistent; permanently removing: x3-x2<=0." all the time, but it doesn't say which GridLayout that is Jan 29 16:21:56 should always use enhanced for loops Jan 29 16:22:01 t0th_-_, ask #java Jan 29 16:22:11 except for primitive arrays, possibly Jan 29 16:22:30 I don't remember if there was special optimization for those Jan 29 16:23:51 hey, maybe you guys can help. Jan 29 16:24:06 never Jan 29 16:24:25 I am trying to use umano’s SlidingUpPanel. I have in the panel a nestingscrollview, in that one a linearlayout, in which I have one layout with static height, and a recyclerview Jan 29 16:24:28 I want to have something general executed (not ui) after X minutes, how do i do that? (I dont think its Service, AlarmManager) Jan 29 16:25:05 the aim is that the layout with static height is displayed at the bottom of the screen in collapsed state, and, if expanded, at first is at the top of the screen, but can be scrolled off from screen Jan 29 16:25:54 falcom, what makes you think its not AlarmManage? Jan 29 16:26:03 anyone got experience with that, or can tell me how to proceed? Jan 29 16:26:17 SimonVT: Okay. That makes sense. So does it necessarily mean "accessing your list from multiple threads" will cause an issue? Or is it modifying the list from multiple threads will cause the issue? Jan 29 16:27:02 eghdk: modifying the list while it is being accessed is the issue Jan 29 16:28:27 Ah. That's actually a great way to put it. Not that its necessarily being modified in multiple places, it's that it's being modified while somewhere else is accessing it. Jan 29 16:30:31 justJanne: Wait. So modifying the list while it is being accessed is the issue, but is that true for a single thread? No right? Jan 29 16:31:01 If you have only a single thread, then usually you can’t modify the list while it is being accessed Jan 29 16:31:35 danijoo: fair question. I think the task by AlarmManager will still exist even when the user exit the app, I dont need it to presist even the exit of the app (from what I read) Jan 29 16:32:10 justJanne: Aha. I was thinking myself into a corner. Makes sense. THANK YOU Jan 29 16:33:34 falcom, use a handler then Jan 29 16:33:51 Handler.postDelayed(yourTask, delay) Jan 29 16:34:03 s/yourTask/runnable Jan 29 16:36:18 it's trivial to modify a list on the same thread it's being accessed Jan 29 16:36:26 for (Item item : items) items.remove(item); Jan 29 16:37:03 falcom, why would you think that Jan 29 16:37:29 Hi, does anyone here know anything about targeting specific modules when compiling aosp from source? Jan 29 16:37:32 right, JakeWharton, I had forgotten that someone would do that Jan 29 16:37:39 pabl0, make MODULE Jan 29 16:37:54 pfn: http://developer.android.com/reference/android/app/AlarmManager.html saids "Note: The Alarm Manager is intended for cases where you want to have your application code run at a specific time, even if your application is not currently running." Jan 29 16:38:05 justJanne, that is the most common source of CME Jan 29 16:38:15 falcom, that's what you want, you said Jan 29 16:39:30 pfn: ah i think i might have phrased poorly, i want something to happen 10minute afterward but dont need the persistentness even after the app exits. Jan 29 16:39:47 Thanks pfn, i'll take a look into it! Jan 29 16:40:10 danijoo: i think handler might be the right thing to use, thanks! Jan 29 16:42:47 Anyway, maybe you guys can help me, this [1] is the current layout I use for the SlidingUpPanel, and this [2] is a mockup of what the result should look like. Now, the issue is that the panel somehow doesn’t scroll properly (or, at all), so I’d hope maybe one of you would have experience with that and could help me. Jan 29 16:42:47 [1] https://gist.github.com/justjanne/cc358e2ecf7825bb6f95 Jan 29 16:42:47 [2] http://imgur.com/a/mkBAW Jan 29 16:43:10 yes, I am using the NestedScrollingHelper as suggested on their github Jan 29 16:43:21 I'm very new to android. How do you people normally test a new class(assuming it doesnt depend anything that cant be mocked)? // Starting a new test project and copy paste the class just for to setup seems inefficient Jan 29 16:44:39 nestedscrollinghelper/view are not necessary on v21+ -- start working with v21+ first to make it work, then add the nestedscrolling crap to make it backward compat Jan 29 16:45:32 falcom, unit testing is a good way Jan 29 16:46:29 you mean experimenting, I just do it in an existing app Jan 29 16:46:32 pfn: how would I do it on v21+ then without that? Any resource on that? Jan 29 16:46:33 and run it Jan 29 16:48:39 justJanne nick butcher's Plaid app has a BottomSheet class, its a little more involved Jan 29 16:49:09 its relatively easy to copy it out, with some styles. the 2 utility classes it depends on are internal to appcompat Jan 29 16:49:43 g00s: where would I see that sheet in the app? Just trying to see it in action Jan 29 16:50:47 justJanne only when you post a new story Jan 29 16:50:56 i never do that :D Jan 29 16:51:43 one thing hopefully that comes in next support lib; i was going to use the flipboard one, but didn't work with recyclerview child Jan 29 16:52:07 i think they are waiting for RC getting wrap_content support Jan 29 16:52:09 does Plaid’s work with RC? Jan 29 16:52:09 *RV Jan 29 16:52:17 i dont see why not ... Jan 29 16:53:52 ah, okay, that doesn’t solve my issue Jan 29 16:54:11 my panel would be displayed 100% of the time, just not always fully Jan 29 16:54:14 like the play music panel Jan 29 16:54:27 justJanne, seems like something I'd start writing with viewdraghelper--not necessarily v21 for that, but I normally don't make the whole thing respond to scroll for up/down, just the handle Jan 29 16:54:50 Ah, i got an idea Jan 29 16:55:11 I know an app which does /exactly/ what I want Jan 29 16:55:20 let’s see how Phonograph implemented it Jan 29 16:56:12 this is more of a hardware issue, but is there any standard for the placement of NFC and Qi power contacts on phones? If I make a piece of hardware that uses both simultaneously, is it even possible to do that semi-universally? Jan 29 16:56:14 I know they used umano’s panel, too Jan 29 16:56:22 I basically half-assed it for qicr, heh Jan 29 16:57:25 well, pfn, my use case is: you scroll up, the input bar becomes larger, into a multiline text view, with WYSIWYG editor for bold/color/etc, and if you scroll further, you get a list of recent messages you sent, so you can easier go up/down in the history Jan 29 16:58:12 justJanne, that can all be done from VDH Jan 29 17:00:35 omg, phonographs solution is so evil Jan 29 17:00:46 they use a slidinguppanellayout inside a slidinguppanellayout Jan 29 17:01:31 lol Jan 29 17:04:32 Hi, is this channel about development on the android operating system or about mobile android development in general? Jan 29 17:04:56 Haffe, android APPS development only Jan 29 17:08:28 http://www.computerworld.com/article/3027524/smartphones/interest-in-smartphones-is-flattening.html Jan 29 17:08:39 Ok. I am looking to get into android games development for fun (and maybe profit). Do you have any opinions on the books "Learning Java by building android games", "Android Game Programming By Example" "Pro Android Games" and "OpenGL ES 2 for Android: A Quick-Start Guide" ? Jan 29 17:09:25 Working through these books to me seems like they would give me a lot of knowledge about buildning games for android. Jan 29 17:11:36 g00s, I think we are reaching the point were upgrading every year isnt needed anymore because hardware is good enough to run well enough for > 1year Jan 29 17:12:14 I'm learing how to use Android Studio. I've checked out an open source app from github. My question is, how do I find the code that a button runs when pressed? Jan 29 17:12:31 i've noticed that batteries usually don't last well beyond 2 years though ... and most phones don't have replaceable one Jan 29 17:12:45 Haffe, are you proficient in other programming languages? or did you do standard OpenGL dev before? Jan 29 17:12:57 I think starting with OpenGL is not an easy route Jan 29 17:13:31 ktwo: Taught a university course in racket, have developed embedded systems in C. Have university credits in C++. Jan 29 17:13:48 Wrote some webapps in python. Jan 29 17:14:02 Ok so maybe it will work then ;) Jan 29 17:15:44 Haffe, theres also unity if you want to go the easy way :) Jan 29 17:15:54 :) Jan 29 17:16:36 dougquaid, search the setOnClickListener method for that button (getting the id from it's xml) Jan 29 17:16:50 ktwo: Thanks Jan 29 17:17:20 Haffe racket looks pretty neat, nice batteries included platform Jan 29 17:17:32 how did the teaching aspect go? Jan 29 17:17:39 dougquaid, sometimes theres also android:onClick="..." in the code. then you need to look for a method with that name Jan 29 17:17:53 Well, we got a lot of high-quality final student projects. So I would like to think it went well. Jan 29 17:18:00 pfn: I’ll have to use the nestedscrollview even on 21 Jan 29 17:18:16 Haffe students know any languages prior ? Jan 29 17:18:22 Because my bottomsheet is effectively a recyclerview with header Jan 29 17:18:25 Some groups actually used the openGL package to accelerate graphics operatations. Jan 29 17:18:41 g00s: Don't think so, or rather it wasn't a pre-requisite. Jan 29 17:18:50 It was an intro to programming course. Jan 29 17:19:03 nice Jan 29 17:19:37 Haffe better than JS :D Jan 29 17:19:54 Haven't coded much javascript. Jan 29 17:20:02 as a first language i mean Jan 29 17:20:08 justJanne, nested scroll views are built in on 21 Jan 29 17:20:13 I don't have much experience. Jan 29 17:20:18 oh, pfn? how? Jan 29 17:20:24 With teaching or using javascript. Jan 29 17:20:24 Haffe did you use HtDP ? Jan 29 17:20:33 g00s: No, we used SICP. Jan 29 17:20:37 wow Jan 29 17:20:41 justJanne, every view. group supports nested scrolling natively Jan 29 17:23:46 pfn: sorry if I sound stupid, but I was asking more on how to use it Jan 29 17:29:00 justJanne, I was only advising to try getting it working on v21+ first, and you don't need to do anything special with nestedscrolling to make that sort of thing happen Jan 29 17:29:23 justJanne, beyond that, what you showed seems to me to be an application of VDH without relying on sliding up panel, etc. Jan 29 17:35:04 justJanne, if you need to control multiple views within a panel with relation to the scroll position, I would use VDH directly, rather than nesting multiple sliding panels, as you saw something else do Jan 29 17:36:31 Hi, anyone have an idea how many GB mirroring AOSP takes? 80-90 maybe? Jan 29 17:36:46 genii, a little less, but yeah, that ballpark Jan 29 17:36:50 Well, pfn, in general, if I have a layout like this (pseudocode): , then I’m not sure how to handle the dragging properly Jan 29 17:36:56 genii: wait a minute, I can do a stat Jan 29 17:37:22 pfnguyen@galactica1:~$ df ~/android Jan 29 17:37:22 Filesystem 1K-blocks Used Available Use% Mounted on Jan 29 17:37:26 /dev/sdb1 104857564 98198984 4632760 96% /storage Jan 29 17:37:32 so out of space Jan 29 17:37:59 justJanne, in VDH you have a drag range, and you can determine your position in that range Jan 29 17:38:09 justJanne, given that position, expand items as necessary Jan 29 17:38:19 pfn: but how would I scroll the fragment off the screen? Jan 29 17:38:20 pfn: You could use tune2fs to reduce reserved superuser area maybe Jan 29 17:38:47 justJanne, so everything is inside the recyclerview? that is your panel? Jan 29 17:38:53 no Jan 29 17:39:14 mainlayout { content, panel { fragment, recyclerview} } Jan 29 17:39:36 the idea is that I can scroll the panel so far up that the fragment is scrolled off the top of the screen Jan 29 17:39:37 panel should turn into a coordinator layout Jan 29 17:39:53 and you can create a Behavior to scroll fragment off screen as recyclerview scrolls up Jan 29 17:39:57 yeah, tried that Jan 29 17:40:02 somehow I can’t get that to work Jan 29 17:40:52 you need to block scrolling of the recyclerview, via the behavior, until the fragment is off the screen Jan 29 17:41:01 but everything should be handled within the behavior Jan 29 17:42:10 is there a common way to create a persistent object when starting an android app in java? Jan 29 17:42:32 a singleton? any standard java way will do Jan 29 17:42:38 basically I'm running a device driver via jni in the background and sync the devicelist to the android app Jan 29 17:42:41 Application is /effectively/ singleton Jan 29 17:56:56 * genii wanders off Jan 29 17:58:12 mrec: create singleton and init it in Application if necessary Jan 29 18:20:22 o/ Jan 29 18:21:12 for those of you here that have written libraries, what technically makes a library project different from an application project? Jan 29 18:22:35 hmm, what's a good dumbphone for sr.s Jan 29 18:22:38 seniors Jan 29 18:22:54 need to replace an old ass flip phone Jan 29 18:24:04 drinfernoo: nothing Jan 29 18:25:45 drinfernoo: are you asking how to make a library project? I’m quite new to it, but you do need different build.gradle settings and you’ll produce a different result (.aar instead of .apk) Jan 29 18:25:49 if that’s the kind of thing you mean Jan 29 18:26:12 well, yeah Jan 29 18:26:36 say i wanted to change an application project to a library project Jan 29 18:26:46 instead of starting with a library project in AS Jan 29 18:26:54 what changes would need to be made? Jan 29 18:27:21 I guess there could be a lot of changes to do that. I don’t use AS, but somehow you’d need to move to the com.android.library plugin in the build.gradle, for starters. Jan 29 18:27:48 i may just have to play around with it Jan 29 18:28:37 yeah, I can’t offer much advice for migrating one to the other. sorry Jan 29 18:29:41 just switch out com.android.application for com.android.library Jan 29 18:31:34 Anyone here familiar with animations? I'm trying to fade an animation into the background, i.e make it smaller and smaller, but it's fading to the top left Jan 29 18:32:23 pfn, then all the aar packaging and publishing is done via grafle files? Jan 29 18:34:54 viewHolder.label.setText(model.label); In a statement like this is setText a method of label which is a string or the ViewHolder? Jan 29 18:36:01 holder.dateTime.setText(mDataset.get(position).getText2()); In this case neither Date or ViewHolder classes have setText method. Jan 29 18:38:55 sudhirkhanger, setText() would be a method of label, but label would need to be a class that has a setText() method, obviously Jan 29 18:39:27 drinfernoo, publishing is separate Jan 29 18:40:37 drinfernoo: Sorry my mistake. Both of them are TextView. Not sure why I was over thinking. Jan 29 18:40:47 lol Jan 29 18:41:12 pgn, so does com.android.library make it build an aar instead of an apk then? Jan 29 18:44:42 fpn, not pgn lol Jan 29 18:44:48 no pfn lmao Jan 29 18:46:13 yes, it makes it build an aar Jan 29 18:46:32 ok sweet Jan 29 19:07:43 vigilancer: hmm well I'll have the next problem there how to clean up the singleton once the application gets killed Jan 29 19:11:23 is there some way to receive a notification when a user is about to close an app? Jan 29 19:11:35 no Jan 29 19:11:41 singleton simply disappears when app is killed Jan 29 19:11:49 you can use lifecyclecallbacks Jan 29 19:11:51 in application Jan 29 19:11:56 I'd like to put the devices into standby mode when the app exits.. Jan 29 19:12:25 depends on what you call "exits" Jan 29 19:12:40 the whole app (not only the activity) Jan 29 19:12:47 be more specific Jan 29 19:13:52 the user starts up the app, everything initializes once the user closes the app the attached devices should be deinitialized properly in order to save battery/ac power Jan 29 19:14:49 what is "closes the app" Jan 29 19:14:55 wipes it from the screen Jan 29 19:14:55 you have to define that Jan 29 19:15:00 How do I put something right into the Public downloads directory? Jan 29 19:15:02 wiping it from the screen isn't closing Jan 29 19:15:12 and that event cannot be captured Jan 29 19:15:14 Like... where is the public downloads dir? Jan 29 19:15:36 closing all activities doesnt 'exit' the app Jan 29 19:15:38 for me anyway Jan 29 19:15:57 therefore the singletons (statics variable) persist for some time after all activities are closed Jan 29 19:16:02 pfn: it should send a sigkill or something like that if there's still a JNI thread running and not exiting in the background? Jan 29 19:16:09 you cant know when system will kill or 'exit' the app Jan 29 19:16:10 SIGKILL cannot be captured Jan 29 19:16:59 eghdk: https://developer.android.com/reference/android/os/Environment.html Jan 29 19:17:16 i.e. Environment.DIRECTORY_DOWNLOADS Jan 29 19:17:29 should return the path Jan 29 19:17:55 pfn: I forgot right.. Jan 29 19:18:18 how about atexit()? Jan 29 19:18:22 (via JNI) Jan 29 19:18:41 you can try Jan 29 19:18:42 * pfn shrugs Jan 29 19:18:48 dunno if that's in bionic Jan 29 19:19:01 I don't care about the java side, but the C driver side should be deinitialized properly Jan 29 19:19:22 and dunno if it's normal exit when swiped Jan 29 19:23:01 Won't all jni/ndk stuff die once the process dies anyway? Why are you worried about it Jan 29 19:24:27 is it necessary to unregister all of my broadcast receivers onPause()? Like should I be doing that or it's okay to have some that aren't unregistered onPause? Jan 29 19:26:35 grekkos: I only unregister the USB related ones within onStop Jan 29 19:35:49 grekkos, always unregister receivers Jan 29 19:36:00 and do it in the complementary callback Jan 29 19:36:07 if you register onStart, unregister onStop, etc. Jan 29 19:36:09 always Jan 29 19:37:57 pfn: btw, I managed it! it works :D Jan 29 19:38:09 justJanne, nice; what approach did you take? Jan 29 19:39:19 Well, I changed the way I wanted the UI anyway, discovered that nested sliding panels are nicer anyway, and then forked the library, modified it to handle it better, and use that now Jan 29 19:39:46 just /a little bit/ hacky Jan 29 19:40:36 I see Jan 29 19:41:19 Hello! Jan 29 19:42:15 I hate to be that guy that just come here and ask questions, but I'm a newbie and I would appreciate if you answer me this simple question. I couldn't find a good explanation on google Jan 29 19:42:55 pfn: ah okay... is there a document explaining it? I was poking through the docs for register and unregister and I couldn't find anything Jan 29 19:43:07 I created a variable inside a function in an activity, and now I want to use that variable in another class. How can I do that? Jan 29 19:44:27 you’d move that variable to be a member of the class Jan 29 19:44:29 does anyone know if you can add an admin user to an app listing Jan 29 19:45:33 s73v3r: How can I do that? Jan 29 19:45:57 Anyone ever used the Facebook sdk? Jan 29 19:46:15 you declare it in your class. Jan 29 19:46:31 you’re probably going to need to read some books on object-oriented programming Jan 29 19:46:36 My service keeps closing when i close the activity and it restarts after activity closed , sometime it takes 3 - 4 minutes in restarting service , the service is in the background , I want to use minimum device memory and want the service to be continous Jan 29 19:46:39 any help ? Jan 29 19:47:00 s73v3r: Yes, that's true. Thank you for your time :) Jan 29 19:47:26 I searched online a lot but could not find a proper sollution , the service is START_STICKY , its not a Intent Service and not binded to the activity at all Jan 29 19:47:56 I tried to run it in a process":personal" in my manifest but that too dint help Jan 29 19:48:08 it always restarts and restart time is always a lot Jan 29 19:59:08 pfn: Oh I misread the code, I was unregisterring it but I was registerring multiple broadcasts to the same receiver Jan 29 20:04:43 ??? Jan 29 20:08:26 does XML autocomplete fail for you guys when referencing a theme attribute in layout_height ? Jan 29 20:08:43 if i do android:minHeight it works fine Jan 29 20:17:03 so android:layout_height="? ... " nothing happens Jan 29 20:21:20 hi, I'm trying to set up automatic unit testing for my application, however the gradle project includes volley and the tests for that are being urn Jan 29 20:21:32 run*. How can I exclude those tests from the gradle test task? Jan 29 20:38:08 how can i not show my app activity in history stack ? Jan 29 20:39:51 I have a Retrofit call.enqueue() method being called inside a Runnable every 5 seconds, but am getting "java.lang.IllegalStateException: Already executed at retrofit2.OkHttpCall.enqueue". Any ideas? Jan 29 20:40:15 new book on building maintainable software in java, wonder if its any good http://shop.oreilly.com/product/0636920049159.do Jan 29 20:43:42 Anyone used the facebook sdk to get user photos? Jan 29 20:45:57 SimonVT: It's the end of the day and I'm still trying to wrap my head around CME. I see this SO question that basically says: http://stackoverflow.com/questions/1655362/concurrentmodificationexception-despite-using-synchronized that CME aren't usually problems related to multi threading Jan 29 20:47:40 CME is creating an iterator, changing the collection, and then calling next() or hasNext() on that iterator in that order, whether on a single or multiple threads Jan 29 20:48:44 I'm making a background service that I want the user to control through USSD codes. For example, a user dials *123# to start or stop the service. Is that possible? Are there any tutorials on how to do it? Jan 29 20:49:55 drose379 : Do you know facebook has removed option to get friend list from there sdk ? Jan 29 20:50:03 I didnt know that Jan 29 20:50:07 I just need to get the users photos Jan 29 20:50:23 dougquaid: http://stackoverflow.com/questions/5477597/how-is-it-possible-to-do-ussd-requests-on-android Jan 29 20:50:38 if you have user ids you can get it with there GET request to graph api Jan 29 20:50:40 dougquaid: hmm nevermind might not be useful Jan 29 20:50:53 chinu, Its just giving me the date created and photo ID Jan 29 20:50:57 I was looking for the photo URL Jan 29 20:51:22 drose379 : you can pass photo id to there Image graph API Jan 29 20:51:42 And that will give me? Jan 29 20:51:50 falcom: Yeah, I saw that too but I don't think it's quite what I'm looking for Jan 29 20:51:56 http://graph.facebook.com/67563683055/picture?type=square Jan 29 20:52:17 you can set type to square , small , big Jan 29 20:52:36 Ok Is there a way to get full size Jan 29 20:52:55 set type to large Jan 29 20:53:10 Ok Jan 29 20:53:22 Ill try that thanks Jan 29 20:53:41 no problem Jan 29 20:54:06 any one here knows how we can not save our activity in history stack ? Jan 29 20:54:13 in android Jan 29 20:54:46 in manifest add android:noHistory="true" to activity Jan 29 20:54:52 chinu, whenever I pass an ID from one of my photos to that URL I get a ? Jan 29 20:55:10 you get a image dude Jan 29 20:55:22 Ashiren : done that Jan 29 20:55:40 still i can see the activity in history stack , in lollipop Jan 29 20:56:18 you mean when you hold home button Jan 29 20:57:32 how can I change the theme in Android studio app Lollipop? Jan 29 20:58:40 Ashiren : Yes when i hold the menu button i can see all the apps , and there is my app as well , which i have done noHistory : true Jan 29 20:59:13 elisa87 : you can customize theme in style inside res -> values ->style.xml Jan 29 20:59:32 and specifically for lollipop check values-v21 ->styles.xml Jan 29 21:00:24 i think this affects only 'local' activity stack Jan 29 21:00:38 i dont know if you can manipulate the system's app stack Jan 29 21:01:24 oh! i found something Jan 29 21:01:31 android:excludeFromRecents="true" in activity manifest Jan 29 21:01:32 Ashiren : actually i just checked one app Privacy lock , and there lock activity is not visible in stack , so wondering ! Jan 29 21:01:56 JakeWharton: I thought CME was accessing a List<> on one thread, while another thread was modifying it (add, delete, sort) Jan 29 21:02:05 chinu: what should I exactly write in styles.xml to change the theme? Jan 29 21:02:18 chinu: https://stackoverflow.com/questions/3762763/how-to-remove-application-from-recent-application-list Jan 29 21:02:20 eghdk: potentially if it fits the scenario i described Jan 29 21:02:40 elisa87 : please ask your specific problem , otherwise go to developer portal or do your homework at stackoverflow Jan 29 21:02:47 read what I wrote and consider the first and third actions on thread A and the second action on thread B Jan 29 21:03:23 JakeWharton : Is this THE JAKE WHARTON :o (Founder of all Retrofit and all those open source projects ? ) Jan 29 21:04:10 JakeWharton: Oh. So all it takes is CREATING the iterator on one thread, while modifying in another thread? Jan 29 21:04:11 Has anyone ever encountered a problem with Authenticator settings not being set for post request using HttpURLConnection? Jan 29 21:06:15 Ashiren : great , That helped , but when I am pressing multiple times the menu button i can still see the activity , but what i was trying to do its working , Thanks man Jan 29 21:10:33 resource id cannot be an empty string (an id with value @+id/") any idea how to fix this? Jan 29 21:11:17 Have you defined and id for the resource? Jan 29 21:12:11 eghdk: you have to interact with the iterator as well Jan 29 21:12:24 there's nothing wrong with creating an iterator and modifying the collection on another thread so long as you never use that original iterator Jan 29 21:13:09 JakeWharton: Okay, so I'm trying to comprehend this. So accessing a List<> on one thread via an Iterator, while another thread was modifying it (add, delete, sort) is enough to create a CME. Because it's happening to me. Jan 29 21:13:27 or the same thread Jan 29 21:13:30 elisa87 : seriously man , you are in the wrong place , learn a little more Android , these are just pure basic Android concepts Jan 29 21:15:10 So how does that fit the parameters you set forth in the begining? "CME is creating an iterator, changing the collection, and then calling next() or hasNext() on that iterator in that order, whether on a single or multiple threads" Jan 29 21:15:20 Has anyone had trouble setting the authorization heads of a post request using Authenticator. If I attempt to use HttpUrlConnection to send a get request, all the auth heads are included as defined by Authenticator.setDefault, but if I send a post request non of the Auth headers are set. Jan 29 21:16:27 how to add a background in android studio app for lollilop from a photo I have and should my photo be specific format or resolution for Galaxy nexus emulation? Jan 29 21:17:20 I wish the play store console had a way to see statistics of app version by android version Jan 29 21:17:23 Elisa have you tried googling either of your past two problems? Those should be pretty easy to find the solution to Jan 29 21:17:58 I'd like to see what versions of my app gb users are still on, if they haven't bothered updating, I'd just drop their ass in future versions Jan 29 21:18:27 JakeWharton: 1. CME is creating an iterator (YES, I do that on ThreadA) 2. Changing the collection (Yes, I do that on ThreadMain) 3. Call next() or hasNext() on that iterator (Yes, do that on ThreadA). That SHOULD or SHOULDN'T cause a CME? Jan 29 21:18:39 it may Jan 29 21:18:47 still on this problem? Jan 29 21:19:05 concurrently modifying an Iterator will not cause a CME Jan 29 21:19:05 Hm. What about my scenario WOULD cause it to CME? JakeWharton Jan 29 21:19:06 non-concurrent collections might not publish the change from Thread B to Thread A while it's iterating Jan 29 21:19:25 oh Jan 29 21:19:33 changing the collection, yes, you will receive a CME Jan 29 21:19:45 Iterator -> change collection -> do anything with iterator => exception Jan 29 21:19:59 regardless if you're on the same thread or different threads Jan 29 21:21:34 So, I create an iterator to go over this ArrayList, and I change something in the ArrayList from another thread, and call next() in the iterator. CME. Right? Jan 29 21:22:17 So why if I go from enchanced for, to a normal for loop, I get no more CME? http://pastebin.com/Vr2i1NRK Jan 29 21:23:00 failed sending reply to debugger : broken pipe Jan 29 21:23:12 what is this? failed sending reply to debugger : broken pipe Jan 29 21:25:17 elisa87 : I think you are messing here with others now , go home you are drunk Jan 29 21:25:34 eghdk, because the concurrency issue is that the state of the *Iterator* and *Collection* are inconsistent Jan 29 21:25:40 eghdk, in that case, you are retrieving an item by index Jan 29 21:25:44 there is no iterator Jan 29 21:26:04 if you did, for (Iterator it = collection.iterator(); it.hasNext();;) { item = it.next(); } Jan 29 21:26:07 you would have exception Jan 29 21:26:19 you didn't write the same code Jan 29 21:26:40 concurrent access in the loop you wrote would have non-deterministic behavior Jan 29 21:27:06 So do I always just skip echanced for loops? pfn Jan 29 21:27:12 no Jan 29 21:27:19 stop modifying concurrently Jan 29 21:27:54 eghdk: When you use the “enhanced” for loop you are implicitly creating an Iterator object (one of these : http://developer.android.com/reference/java/util/Iterator.html ) in order to iterate over the list. If you use your own index you do not have any iterator object. When people say “Iterator” they are referring to a specific thing, not talking about the general idea of iterating over a collection like you do with your Jan 29 21:27:55 “int i” loop. Jan 29 21:28:02 Any easy way to make sure I'm not? Like in this case, I wouldn't actually know if I was modifying concurrently. In a small app, that's cool, but my current app has a ton of code I walked into. pfn Jan 29 21:28:14 eghdk, no Jan 29 21:28:25 write your code better such that your list is not mutable Jan 29 21:28:36 or wrap your list you expose as an unmodifiableList Jan 29 21:28:46 OH. Theres an idea Jan 29 21:28:55 public List getList() { return Collections.unmodifiableList(myInternalData); } Jan 29 21:29:09 For "testing" right now I can wrap all my lists in unmodifiable lists... I like it!!! Jan 29 21:29:22 for testing, you should do it for always Jan 29 21:29:24 :P Jan 29 21:30:15 Wait really? I should always do it? Jan 29 21:30:31 I'll take that advice. It's really good idea in my opinion. Jan 29 21:30:57 android:background="@drawable should my image be png or jpeg? Jan 29 21:32:05 depends if you want to support alpha Jan 29 21:32:30 there's also some color things where jpeg might be better than png depending what you're doing with the image Jan 29 21:34:05 pfn: Btw, this is the design I decided upon: http://imgur.com/a/QAYE0 Jan 29 21:34:27 (The message history is the nested recyclerview) Jan 29 21:35:21 eghdk, anything you expose as public api should never be mutable Jan 29 21:35:33 eghdk: The simple for( i = 0; … ) style loop still suffers from the concurrent modification problem. It just does not have a mechanism to warn you about it. So if you want to so something to catch your problems, using the enhanced loop is helpful, because it will throw exceptions and alert you to the fact that you have a problem. If you can make it immutable, that’s great. Jan 29 21:35:47 justJanne, I see Jan 29 21:36:05 I did that in qicr like so: https://www.youtube.com/watch?v=PyTL_Mq6HpI Jan 29 21:36:34 pfn: So I essentially have a static list that I'm accessing, youre saying wrap it in a getter and do the Collections.unmodifiableList(staticList) thing? Jan 29 21:36:46 eghdk, sure Jan 29 21:36:51 That way, anywhere where I'm modifying it. I'll know right away? Jan 29 21:36:56 pretty much Jan 29 21:37:05 it's a pity java has no immutable collection api Jan 29 21:37:32 Well, Java 9 might bring one Jan 29 21:37:48 Also, pfn, I wanted to have something that looks more... Material-ly Jan 29 21:37:50 irrelevant for android for at least 5 years probably :P Jan 29 21:37:52 Yeah. It kinda doesn't make sense why I shouldn't mutate but I'm allowed. idk. I still have to read consurrency book. But this should help in the very short term. Thanks everyone Jan 29 21:38:13 justJanne, turn off the alpha, add elevation and presto, instant material :P Jan 29 21:38:29 I like alpha, as an effect Jan 29 21:38:37 Well... It also has to move, animate and feel like Material ;) Jan 29 21:38:46 it does move and feel material :P Jan 29 21:38:58 Oh, yeah, well, if users here want to see alpha, they can just set it via the theming engine Jan 29 21:39:34 I'll probably have to use a foreground service, 4 seconds to connect is just too much every time you rotate the device. Jan 29 21:39:35 Hello! I'm writing a library that will need to access the internet, to read the input stream of a connection to a URL. I would prefer everyone using the library would use OkHttp, but I do not want to tie anyone to OkHttp. Is there a clean way to use OkHttp in my library, without hard-coding a version dependency? Or, to eliminate the dependency altogether, would it be better to make an interface that the use can wrap the OkHttp Jan 29 21:39:54 4 seconds everytime you rotate? :P Jan 29 21:40:38 pfn: if you rotate, the foregroundservice gets killed, so it has to reconnect to your bouncer, load a few hundred thousand lines of backlog, etc Jan 29 21:40:54 *backgroundsevice Jan 29 21:40:54 justJanne, hope you have unlimited data :P Jan 29 21:41:03 background service doesn't get killed on rotation Jan 29 21:41:05 Foregroundservice means it doesn't get killed Jan 29 21:41:23 Well, it seems to get killed on unbind Jan 29 21:41:45 *bound* services that are not otherwise started get killed on unbind Jan 29 21:41:46 Also, I have unlimited data at 64kbps dialup speed :D Jan 29 21:42:07 bound services suck Jan 29 21:42:16 Hm, I should read the documentation another time. Jan 29 21:42:24 services you start via startService do not get stopped onunbind Jan 29 21:42:51 I've only used startService for foregroundservices before Jan 29 21:42:56 (Those with notification) Jan 29 21:44:01 > Lord_Javascript. Jan 29 21:44:16 Interesting name Jan 29 21:45:05 Lord_Javascript? Of the Google Javascripts? Jan 29 22:07:22 Do you guys have open source projects you use to reference for architecture and good practice? Jan 29 22:07:59 I'm not sure whether this is Kotlin 1.0 RC or Kotlin 1.0 RC EAP: https://gist.github.com/abreslav/f60fc0de060e7ed721c9 Jan 29 22:10:08 could be canary RC for EAP ! Jan 29 22:17:41 I think, when I move to Kotlin, I'll start with unit tests. The capacity to use `identifiers such as this`, alone, is reason to move unit tests to Kotlin. :D Jan 29 22:18:13 Like '@Test fun `returns foo when confronted with bar() { ... }`. Jan 29 22:18:23 Oops, missed the closing ` (and '). Jan 29 22:20:46 falcom: I’d say https://github.com/nickbutcher/plaid is a nice example for quality code and UI Jan 29 22:21:32 g00s: Do you think you'll move to Kotlin? Jan 29 22:22:29 justJanne: that looks pretty, However currently I'm more interested in backend related. event-driven architecture Jan 29 22:23:03 TacticalJoke i was going to be writing a bunch of fresh java code, i'd consider it - but thats not in my near term future Jan 29 22:23:08 *if Jan 29 22:24:43 and i get pretty distracted. i see this new shiny book on neural networks in java Jan 29 22:24:54 which i find much more interesting :) Jan 29 22:55:14 hmm, if I initialize something asynchronously in the background and notify java synchronously (eg. a call a singleton callback) which is a subclass of the main activity what would be the best way to notify the main class? BroadcastReceiver? (that's what I figured out so far) Jan 29 22:55:36 I'd like to update a list of devices in the Main Activity Jan 29 22:56:42 I use my broadcast receivers for that Jan 29 22:56:57 mrec: Jan 29 22:57:02 Isn't Handler.post simpler? Jan 29 22:57:19 If i add an animation to an animation set that has already been added to a view, it "loses" it's position on a ScaleAnimation and always goes to the top left of the screen. Why? And is there a way to circumvent this? Jan 29 22:57:31 justJanne: what do you find nice about it in particular? Jan 29 22:58:14 can't see what is the point to create RestAdapter etc inside activity Jan 29 22:58:49 ok im using AsyncHttp (Loopj) but responses are limited to around 4020 bytes (!!) - is there a property I should configure ? Jan 29 23:00:42 limited? i used loopj lib a lot and never seen such a limit Jan 29 23:01:37 if I use curl I dont have any problems with the response size Jan 29 23:05:32 I see another option BlockingQueue in a thread? Jan 29 23:05:59 blockingqueue might be fine there's only one consumer anyway Jan 29 23:06:10 creating that in the singleton Jan 29 23:06:17 polling in the main activity Jan 29 23:06:28 mrec: Handler.post is the simplest choice. Jan 29 23:06:49 TacticalJoke: I'll have a look at it thanks! Jan 29 23:07:01 I'm mainly from the C/C++ world :-) Jan 29 23:36:59 I'm using otto events. is it bad practice to have events containing big payload? Jan 29 23:37:13 So I recently upgraded an app to API 23 and added permission checks for Location. I am testing the upgrade use case but I do not have a physical device. I could not simply install the new apk but I could install with the -r option for reinstall. I am wondering if this is the same as upgrading the app from the play store? Although it does not seem like the same process. Jan 29 23:37:30 falcom: it makes no difference Jan 29 23:37:44 otto passes references which are always the same size: 4 bytes Jan 29 23:42:59 8 bytes on 64bit :p Jan 29 23:43:20 and there are 64bit builds of android out there... Jan 29 23:54:57 slow friday Jan 30 00:16:04 Indeed, pfn. At least better than a day full of panic Jan 30 00:40:41 panicking is overrated Jan 30 00:40:50 unless you get a million bucks for it Jan 30 01:05:34 anyone here ? Jan 30 01:05:47 no Jan 30 01:05:50 i had a question about connecting android app to a server Jan 30 01:06:44 Meenome: ask Jan 30 01:07:19 will google it first.. later if im really depressed, ill ask here then Jan 30 01:07:20 ty Jan 30 01:07:35 users.forEach { if (it.hasQuestion) { println(it.question) } } Jan 30 01:07:53 heh :p Jan 30 01:08:46 Actually, there's probably better with `map` or something. :D Jan 30 01:10:35 I guess `users.filter { it.hasQuestion }.forEach { println(it) }`. Jan 30 01:11:35 better than |askIfOkToAskQuestion() { askIfOkToAskQuestion(); }| Jan 30 01:11:45 :D Jan 30 01:15:47 I guess it could be `channel.askMetaQuestion(new MetaQuestionCallback() { @Override public void onPermissionGranted() { channel.askQuestion(question); } });`. Jan 30 01:16:52 (Or rather `user.askQuestion(channel, ...);`.) Jan 30 01:18:01 * capella and my head hurts Jan 30 01:18:59 My brain is dead from carrying ~8KG of human flesh for several hours. The fatigue goes straight to my brain. :\ Jan 30 01:19:54 The crying, screaming kind. **** ENDING LOGGING AT Sat Jan 30 02:59:58 2016