**** BEGIN LOGGING AT Tue Mar 29 02:59:58 2016 Mar 29 03:15:36 Anyone familiar with physical keyboards? I have one on my tablet I'd like to figure out what keylayout file it's using. Logcat returns deviceId=33 source=0x101 when I press keys in a console window, but I don't see any obvious way this maps to the keylayout files. Mar 29 03:22:49 anyone here doing wear dev? Mar 29 03:54:30 hmm, when I go home, I can't like test from my android device, yet teamviewer to my work pc (where android studio is?) Mar 29 03:54:51 huh? Mar 29 03:58:13 your statement does not make much sense Mar 29 04:03:26 I guess I'm asking if I can do remote debugging of an android app Mar 29 04:07:02 Define remote. Mar 29 04:07:12 do you have to interact with the device? Mar 29 04:07:19 is it connected to adb currently? Mar 29 04:07:29 I have the device with me, but android studio is at work 30 minutes away Mar 29 04:07:37 I can teamviewer to that work pc Mar 29 04:07:47 but I cannot physically connect it to the work pc.. Mar 29 04:08:02 Ah, there is not a way I am aware of. Mar 29 04:08:02 I can physically connect it to my home pc though, but there's no android studio there Mar 29 04:08:05 ok Mar 29 04:08:15 in order to connect adb it has to be physicall at the machine Mar 29 04:08:19 (at least initially) Mar 29 04:08:33 it was at the machine Mar 29 04:08:36 and will be again tonight Mar 29 04:08:40 err tommarow I mean Mar 29 04:09:19 if you are looking for a long term solution, you may be able to jimmy rig something with wireless adb and vpn Mar 29 04:09:26 but it would be janky at best Mar 29 04:11:01 hrm ok Mar 29 04:11:28 well that's it, gotta install android studio at home too :) Mar 29 04:12:00 oh yeah. that is a much beter optin Mar 29 04:13:14 I'd rather wait to install android studio, than use the built in emulator D: Mar 29 04:13:26 that thing is so slow, i can't go back to it after getting a device lol Mar 29 04:14:03 I feel like the wait time to install, and the wait time to load the emulator will be the same lol Mar 29 04:14:19 well cool thanks Mar 29 04:16:07 i am trying to crash something that does not crash. i spawn a thread, holding a ref to a final object (a View on an Activity) and change its content via view.Post(). if i finish() the activity, i can still post to the view, albeit with no result, as if that view was part of an "old" Activity instantiation. could that be the case? Mar 29 04:16:28 why does .post() on that view return true in that case? i was expecting it to return false Mar 29 04:16:31 can you stop the back button from exiting the android program? Mar 29 04:16:43 or change the state of your app in some way instead Mar 29 04:17:19 for me, when the back button is hit, the app ends, i'm not entirely sure how to handle a back button push Mar 29 04:17:40 how come it does crash? i think the finish() has no effect because the closure of the setOnClickListener still holds a ref to the final variable.. but then.. where "is" that Activity? in limbo, waiting to be GC? Mar 29 04:19:08 i meant "how come it does _not_ crash"? (the emphasis did not make it through) Mar 29 04:24:38 a simple toString() on the Activity objects does report them as separate objects on the heap (at different mem locs: MainActivity@2055b0f, MainActivity@83d0ad0) Mar 29 04:29:29 <_xor> Is there a way to discover deep links into an existing app? I'm doing a sales demo for a company and would like to be able to deep link into their existing app as part of the demo. Mar 29 05:13:00 maroloccio, why would it crash Mar 29 05:13:02 Is there any way to pass a filename at the command prompt to be opened by the Android API? Just as an example just trying to throw a PDF up. Mar 29 05:13:27 sceadwian, am Mar 29 05:13:55 am startactivity -a android.intent.action.VIEW -d file:///path Mar 29 05:13:57 something like that Mar 29 05:15:22 Hmm, will have to alias that. Thanks. Mar 29 06:17:56 Hi, I am keeping a reference of my Activity in WeakReference but when heap size grows, it becomes null, while the activity is running Mar 29 06:20:45 that is false Mar 29 06:25:17 pfn: But it is happening. I am keeping its context but after a few seconds it becomes null Mar 29 06:25:33 That doesn't happen if app is already running in background Mar 29 06:25:37 weakreferences never become null if the referent isn't gone Mar 29 06:25:42 you're doing it wrong Mar 29 06:27:55 pfn: [https://dpaste.de/CQqZ] this is what I am talking about, when I open the app, first few requests fail and logs ".MainActivity GCed" while it is open Mar 29 06:28:28 It is my attempt to make Volley requests leak-safe Mar 29 06:28:44 leaking context in an asynctask is overblown Mar 29 06:29:32 My app was giving too many OOMs because of leaks Mar 29 06:29:34 in any case, you're passing it a context that goes out of scope for some reason or another Mar 29 06:29:44 basically doing it wrong Mar 29 06:30:13 How should I do it? Mar 29 06:30:24 no idea how you're doing it Mar 29 06:31:20 Can you give me an example of using Volley which doesn't use anonymous listeners? Mar 29 06:32:03 I don't use volley Mar 29 06:32:28 :( Mar 29 06:33:03 and as long as your asynctask ends in a non-stupid amount of time, leaking the activity during that time is irrelevant Mar 29 06:33:27 as I said, people whining about asynctask because it leaks activities is overblown Mar 29 06:33:46 if the small leaks that occur as a result of asynctask end up in OOME, you're doing it wrong Mar 29 06:33:55 reduce your memory load, don't store so much crap in your activity Mar 29 06:36:36 So if my http requests take a couple of seconds to complete and user closes that activity while its happening, its fine? The problem of OOM is somewhere else? Mar 29 06:48:36 most likely Mar 29 07:04:46 https://www.youtube.com/watch?v=IL50oWdgfNY Mar 29 07:05:03 new stuff in N explained by devs Mar 29 07:06:18 hmm, interesting Mar 29 07:06:41 but the marketshare is still held by jelly bean and (cough*) gingerbread Mar 29 07:06:48 gordon_: cool Mar 29 07:07:02 dave0x509: no gingerbread support Mar 29 07:07:06 where can I find a breakdown of a theme? Mar 29 07:07:21 if you still support 2.x you should stop now Mar 29 07:07:26 @gordon, I see plenty of gingerbread powered every day Mar 29 07:07:34 I see none Mar 29 07:07:39 chinese manufacters send plenty Mar 29 07:07:44 clOnes Mar 29 07:07:46 meaning, AlertDialogs look weird on 4.x devices and I want to know exactly what needs to be changed Mar 29 07:08:12 thepoosh: are you using appcompat ? Mar 29 07:08:18 yes Mar 29 07:08:32 dave0x509: if they're sending 2.x still, they're not valid android devices Mar 29 07:08:36 wait, I think the dialog is not an AppCompatDialog Mar 29 07:08:39 should it me? Mar 29 07:08:44 lol Mar 29 07:08:50 I'm always using FragmentDialog Mar 29 07:08:51 *be Mar 29 07:09:07 y'all all devs here? Mar 29 07:09:45 dave0x509: if you want to create android device now and get google certificate - you need to provide the newest android available while starting development Mar 29 07:09:50 so now - marshmallow Mar 29 07:10:04 dave0x509: this is an android dev channel so... Mar 29 07:10:08 ikn @gordon Mar 29 07:10:28 eh... slack kids.. Mar 29 07:10:36 hey guys, is it me or that floating button action bar is starting to get annoying Mar 29 07:10:53 lol, every activity, i have to delete that poor thing Mar 29 07:10:57 why Google? whyyy Mar 29 07:11:06 dave0x509: just use a different template Mar 29 07:11:10 silly goose Mar 29 07:11:22 * gordon_ always starts with blank project Mar 29 07:11:28 mehhh Mar 29 07:13:07 dave0x509: what are you mehing about? Mar 29 07:13:15 you are using the FAB template Mar 29 07:13:35 bro, i am not using any FAB template Mar 29 07:13:41 just a blank activity Mar 29 07:13:50 black activity doesnt have FAB button Mar 29 07:13:58 that fab button is implemented by default in it Mar 29 07:14:28 just add class and extend from you BaseActivity Mar 29 07:14:31 it does gordon Mar 29 07:14:39 what version of AS are you on? Mar 29 07:14:47 2.0 beta 7 Mar 29 07:15:00 but I'm adding class and extend Mar 29 07:15:11 because... wizards suck Mar 29 07:15:17 lol Mar 29 07:15:40 i'm trying to make a rpg lately Mar 29 07:15:47 but can't find any good storylines Mar 29 07:33:21 http://stackoverflow.com/questions/36219188/android-support-bottomsheetbehavior-cant-be-dynamic Mar 29 07:33:54 i feel like with these APIs, unless you do exactly what they have in the example, it isn't going to work Mar 29 07:36:20 wow t-mo to offer data only plans, does anyone do that ? Mar 29 07:51:33 hi! Mar 29 07:51:51 good morning Mar 29 07:52:03 does android allow concurrent http requests via async tasks ? I have a weird issue and I am pretty new to android development Mar 29 07:52:05 AlexandruM: just to be clear, you know you sent your password to #android, not to nickserv? Mar 29 07:52:33 didn't send the password, accidentally copied some spaces from the verification email Mar 29 07:52:51 aww Mar 29 07:52:58 cool, so your password isn't "miquabloclue"? :) Mar 29 07:52:59 it was the verification code from the email, not the password Mar 29 07:53:02 nope Mar 29 07:53:02 ah Mar 29 07:53:03 :P Mar 29 07:53:05 either way... Mar 29 07:53:15 email had some spaces I did not notice Mar 29 07:53:18 short answer is that asynctasks are run in series, by default Mar 29 07:53:32 aww .. Mar 29 07:53:42 well there is my issue then Mar 29 07:53:45 thanks Leeds Mar 29 07:54:09 there are ways to change it, but I don't have links to hand... Mar 29 07:54:29 I see, there is something called THREAD_POOL_EXECUTOR Mar 29 07:54:34 that will run them in parallel Mar 29 07:55:17 thanks again Leeds Mar 29 07:55:17 that's the biscuit Mar 29 07:55:33 :) Mar 29 07:57:39 welcome Mar 29 07:58:24 what about RxAndroid in this scenario Mar 29 07:58:37 Handling Asynchronous Jobs Mar 29 08:01:12 @Leeds : worked, I just tried it Mar 29 08:01:20 cool Mar 29 08:33:09 Ashiren: morning Mar 29 08:40:58 Hi.. How can I know that viewpager attached all fragments? Is there an event for that? Mar 29 08:47:12 guliash: what do you mean? Mar 29 08:47:18 there is the getItem method for that Mar 29 08:49:26 thepoosh: getItem creates a new fragment. I need to get an existing one, which is currently shown. Mar 29 08:49:52 getItem is called when the pager wants to attach a new fragment Mar 29 08:53:43 hello, I'm pretty new and I'm trying to go through the official hello world/getting started guide. Mar 29 08:54:12 thepoosh: I see. Then I should signal from adapter to activity, that a new fragment was created? Mar 29 09:03:06 so, how may we help you Mar 29 09:03:14 guliash: it depends on what you actually want to accomplish with this Mar 29 09:04:25 max12345: d.android.com/training Mar 29 09:05:38 thepoosh: thank you Mar 29 09:05:54 no probs Mar 29 09:06:23 thepoosh: looking at the link, that's what I'm trying to use, I ran into some troubles connecting my device so that android studio can use it Mar 29 09:06:38 I have enabled the developer options on the phone but there was no connect dialog or anything Mar 29 09:06:40 OS? Mar 29 09:06:51 ubuntu 15.10 Mar 29 09:08:05 did you install the correct drivers? Mar 29 09:08:25 http://www.droidviews.com/setup-adb-usb-drivers-ubuntu-easily/ Mar 29 09:08:35 I probably didn't. Mar 29 09:09:05 thanks :) Mar 29 09:10:03 try sudo adb shell Mar 29 09:11:07 Ashiren: make me a sandwich Mar 29 09:14:27 "the necessary sdk packages" that's the version that needs to match my device version if I want to build for it? Mar 29 09:14:39 or is 6. backwards compatible? Mar 29 09:16:21 its backwards compatible Mar 29 09:16:30 just install and target newest sdk Mar 29 09:19:49 sudo apt-get install android.* Mar 29 09:20:18 hm? Mar 29 09:20:31 https://i.imgflip.com/11lgkl.jpg Mar 29 09:21:31 [solved] Mar 29 09:21:50 is there an official support way of adding a shadow for toolbar, wrapping it in an appbarlayout seems to work on my marshmallow device but not on jelly bean... Mar 29 09:22:04 Zharf: you need the z index Mar 29 09:22:16 it doesn't work on versions that don't have it though Mar 29 09:22:21 so add a 9-patch Mar 29 09:22:27 for the older api versions Mar 29 09:22:39 why don't they have one ready in the support libs for older apis Mar 29 09:22:44 it's silly Mar 29 09:22:56 they just don't Mar 29 09:23:12 just makes toolbar not worth the effort -.- Mar 29 09:24:30 has it been ever worth it Mar 29 09:25:15 I don't know, I would like it to be considering how actionbar is broken on so many devices, but seems like toolbar isn't any better Mar 29 09:26:33 Maurits-: Just want to know when I can safely get fragments from the adapter. Mar 29 09:28:08 guliash: the entire point of the pager pattern is that you create fragments on demand Mar 29 09:28:24 guliash: so you don't potentially have 100s of fragments in memory at a given time Mar 29 09:28:39 guliash, http://stackoverflow.com/a/15261142/857853 ? Mar 29 09:29:08 if you don't want that, just pre-initialize them and stick them in a List or something Mar 29 09:35:00 do you agree with this http://stackoverflow.com/a/36259462/3411682 answer? Mar 29 09:39:20 Good morning fellow developers :) Mar 29 09:39:29 Let's Rock'n Roll! Mar 29 09:39:56 Let our fingers hit the keys and do the magic :P Mar 29 09:40:02 it's been a long time since I rock and rolled Mar 29 09:40:13 it's been a long time since I did the stroll Mar 29 09:40:32 let me get it back let me get.... yeah ok Mar 29 09:40:39 Zharf, is that a song? :P Mar 29 09:40:57 led zeppelin - rock and roll Mar 29 09:41:45 thepoosh: hmmm that install guide didn't help me completely, I have an offbrand device, I found the vendor ID and I think I edited the android connection rules correctly but the list of connected devices is still empty Mar 29 09:48:54 restart system :? Mar 29 09:49:19 I already did. Mar 29 09:49:45 my guess is that I messed up the manually written config file Mar 29 09:56:52 so whats in the config file Mar 29 09:58:39 Ashiren: it's what that link said about installing the USB drivers Mar 29 09:59:33 I made a file named "70-android.rules" and put it what it says on the webpage, with the vendor ID set to the value I got from lsusb Mar 29 10:00:36 I think I might have misunderstood the website Mar 29 10:02:19 I'll restart and see if it worked later though, I think I can go on with the hello world tutorial without having to use my real device. Mar 29 10:02:25 thanks for the help :) Mar 29 10:11:00 Hello guys, Is it possible to perform an http request without knowing whether http could be HTTP or HTTPS with Volley? At the moment Volley returns an error if HTTP is not working, it doesn't try to use HTTPS. Unless I have the webserver has to redirect http to https or something like that. Any help is welcome. Mar 29 10:12:42 The reason for my question is, the webserver sometimes switches from https to http, because of issues on the server side. But still my app should fetch data from webserver. Mar 29 10:19:33 hi. i've a problem with card view. They have an arbitrary width and a fixed height, but i've set them match_parent (for the width) and wrap_content (for the height). This is the result: http://imgur.com/CpK33u4 Mar 29 10:25:15 LucaS05, oops, this doesn't look nice. Are the layout parameters not overridden somewhere?? Maybe you swapped the properties because you didn't take a break, it can happen :) Mar 29 10:26:35 its beautiful Mar 29 10:26:42 absolutely :) Mar 29 10:26:50 Number5: this is the code i use: http://pastebin.com/WKuU51uN Mar 29 10:27:02 Have you set the layout to match parent too? It looks like the match parent does work, but the parent width is set to a fixed size. Mar 29 10:27:57 Number5: yes. the parent is a listview and i have match_parent on it Mar 29 10:28:21 maybe i've to investigate deeper in this direction Mar 29 10:29:45 Is there a simple way to adapt ListView to Coordinator Layout? I have a listview and it does not react to tab height changes (before as a relative layout it did). Lucas thanks for reminding me I have to eat.. :) Mar 29 10:30:01 Number5: in the activity that contains the viewpager, the sliding tabs and the actionbar, i have wrap_content only on the slidingTabs Mar 29 10:30:18 But how about the cell view (where the card view resides). Somewhere you must have set a fixed width accidantely .I haven't played with CardView yet, but to me it's just another view. Mar 29 10:30:34 is there something I can do against android studio freezing? Mar 29 10:31:16 max12345, on what machine? Mar 29 10:31:19 I mean OS Mar 29 10:31:25 ubuntu 15.10 Mar 29 10:31:37 just stops working and can't be killed Mar 29 10:32:20 there is a message about a recommendation to use the Oracle IRE/IDK though... Mar 29 10:32:27 max12345, damn, that must be bug. Have you googled for it? Check which version of AS and also check whether it starts freezing after an update... Mar 29 10:34:06 Number5: (Maybe) I got it! I was reading the listView's xml and it has wrap_content on its layout_width Mar 29 10:35:02 LucaS05, ahah, you said it was on match_parent. Anyway, change it to match_parent and see the result and tell us whether it worked or not :) Mar 29 10:35:42 Number5: yes, i was reading the listView's wrapper layout.... Mar 29 10:36:32 hm well seems to be a wide spread problem... Mar 29 10:55:22 using ?android:attr/actionBarSize causes my toolbar to be smaller than actionbar was on this device -.- Mar 29 10:55:27 * Zharf sighs Mar 29 10:55:36 @max12345 : maybe try using oracle jdk instead of openjdk Mar 29 11:07:17 I had that problem before Mar 29 11:10:30 gordon_, actionbar height? Mar 29 11:11:09 no, android studio stopped working Mar 29 11:12:45 ah Mar 29 11:16:15 can anyone help with this :http://imgur.com/5gT8bvQ ? I’m trying to start the listview after the tab/action bar so I won’t have hidden bubbles behind the action and tab bar. Mar 29 11:19:47 Here is the current layout http://pastebin.com/iSmmt0QV. Tried Coordinator Layout as top element and it didn’t work either Mar 29 11:30:40 anyone has an idea? Mar 29 11:32:19 Hello all I'm following a tutorial from the french magazine GNU Linux n°82. At the midle of the tutorial I've got an error that I can't manage to solve by Googling. Mar 29 11:32:28 The error is: Class 'MyLocationListener' must either be declared abstract or implement abstract method 'onStatusChanged(String, int, Bundle)' in 'LocationListener' Default File template less... Mar 29 11:32:57 Here is a pasteBin link for more details: https://bpaste.net/show/acf70aef2d83 Mar 29 11:33:18 Thanks in advance for your kind help (: Mar 29 11:42:36 well Mar 29 11:43:23 click on MyLocationListener then press alt+Enter Mar 29 11:49:32 Cash-: you got a typo on line 45, after "Changed to" Mar 29 11:55:52 Thanks Ashiren you solved all my problem. nice to have seen the typo ! Mar 29 11:56:11 probably there are more Mar 29 12:25:32 Ashiren: just got here, this last line must make you so happy Mar 29 12:25:40 should be your signature for everything Mar 29 12:27:49 hm? Mar 29 12:32:30 hello all Mar 29 12:32:41 anyone know if there is an ETA for AS2 release? Mar 29 12:37:58 bithush, why wait, i think the beta is pretty stable, i actually had more problems with 1.5 than with as2 Mar 29 12:38:18 just wondered is all Mar 29 12:38:34 totally new to android dev, just learning some java before jumping in :) Mar 29 12:39:44 good Mar 29 12:41:24 that good for me Ashiren? Mar 29 12:41:43 eeyup Mar 29 12:42:02 dont flood full newbie java questions here Mar 29 12:42:23 ha no Mar 29 12:42:30 that is what stack overflow is for ;) Mar 29 12:43:25 stackoverflow already has an answer for every newbie question too, some people just spam specific questions on there that are very basic without even looking for the answer Mar 29 12:47:36 And to answer the question, there's no ETA :) Mar 29 12:47:38 yeah I meant that, not posting the same thing again and again. they will just be closed. Mar 29 12:47:52 Google will probably make SOMETHING stable at I/O Mar 29 12:49:36 there is an android studio 2.0 ? Mar 29 12:49:45 bithush, \o/ Mar 29 12:50:18 AlexandruM, 2.1 too. Mar 29 12:50:46 oO Mar 29 12:50:50 I should try that Mar 29 12:50:58 since 1.5 feels sluggish on this machine Mar 29 12:51:25 is there an installer for 2.0b7 or just the zip? Mar 29 12:56:53 AlexandruM, canary channel Mar 29 12:57:05 bithush, same :P Mar 29 12:57:24 bithush, Unless you want that specific version Mar 29 12:57:52 is API24 Android N? Mar 29 12:58:41 eeyup Mar 29 12:58:47 Maybe Mar 29 12:58:54 but target 23 for now Mar 29 12:59:17 yeah its just the option during AS2b7 setup Mar 29 13:00:14 thanks NoirAvlaa Mar 29 13:05:49 hi, is there any unit test for in app purchase and admobs? Mar 29 13:12:30 How can I tell whether a fragment is attached to the currently active Activity? I tried !isHidden() , but that sometimes gives problems when the screen is off. Mar 29 13:15:00 hello again, I could identify that one thing that makes my android studio crash is rightclicking in it's context. Mar 29 13:15:06 which is weird... Mar 29 13:15:35 oO Mar 29 13:16:31 it's the step about creating a second activity by rightclicking my domainname Mar 29 13:16:52 How do I recover a deleted keystore? Mar 29 13:17:06 but that can't be it, it just froze without me doing anything :( Mar 29 13:17:16 is there a "stable" release I can use instead? Mar 29 13:24:23 impossible Mar 29 13:28:28 hello,mediaPlayer.setVolume is not affecting my sound. Any idea ? Mar 29 13:29:33 how do you use it Mar 29 13:30:27 setVolume takes [0..1] Mar 29 13:33:49 Ashiren: setVolume(0.1f,0.1f); Mar 29 13:34:34 any different when you set 0.01f and 1f? Mar 29 13:34:44 also volume is logarithm things Mar 29 13:34:49 http://stackoverflow.com/questions/5215459/android-mediaplayer-setvolume-function Mar 29 13:35:49 Dear devs, I want to be able to change text size through the whole app depending on the selected font size by the user. Does this mean that I have to add methods everywhere (all my fragments and activities) to change text size? Or can I do that in a clever way? Mar 29 13:36:06 I have two strings which look identical, but when I do a .equalsIgnoreCase() on the two strings, it comes up false. Any reason for that? or should I go to #java? Mar 29 13:36:46 eghdk, is there a space added in one of the strings? Mar 29 13:37:56 Number5: Nope. This is insane though. I literally have used .equalsIgnoreCase a million times, but it seems like its acting up. Mar 29 13:38:08 Number5, the proper way to do that is to let users set font size in their phone settings Mar 29 13:38:13 otherwise you'll have to do it manually Mar 29 13:39:10 eghdk: are you sure there arent characters that are different and look alike Mar 29 13:40:18 eghdk, someone trolling you with UTF-8? :P Mar 29 13:40:26 Compare codepoints. Mar 29 13:40:41 Mavrik, hmmm you're right, I totally agree with you on that. It's because the iOS version has this setting too. But I think, it's a weird setting, I mean, I've never came across a popular app that has a font size adjustment. Mar 29 13:40:42 I mean, I guess I can't be 100 percent sure, but it's just a unique id value. So it's like 324jskjfs398fan09n and 324jskjfs398fan09n but they look quite identical. Is there any way to make sure that the characters are in the same format? Mar 29 13:41:11 Mavrik: Yeah, I'm not really up to par with character formats, but I thought java handles stuff in UTF-16? Mar 29 13:41:19 Number5, yeah, thing is you use "sp" for text sizes Mar 29 13:41:28 Number5, and that's automatically scaled according to OS text scale Mar 29 13:41:36 so try to see if you can modify that in configuration just for your app Mar 29 13:42:02 Mavrik, good point, I indeed use sp for font size in my xml layouts. Mar 29 13:43:32 I tried using isAdded, but that is not sufficient, as the Fragments may be added to other Activities Mar 29 13:43:35 that are not active Mar 29 13:43:41 Mavrik: Any way to take a string and "normalize" it or something? Mar 29 13:43:55 I guess. Mar 29 13:44:01 you could toUpperCase or something Mar 29 13:44:04 eghdk, but yeah, internally they're UTF-16 Mar 29 13:44:16 but what I meant is that there's bunch of characters that look the same but have different code points Mar 29 13:44:22 and it's easy to troll comparisons like that ;) Mar 29 13:49:46 Good Morning. Mar 29 13:51:46 is it good to hold service intent as a global variable Mar 29 13:53:56 Mavrik: Hmm, I just did a getBytes on the String and the bytes look the same. Mar 29 13:55:06 But then I did a comparison on the bytes and that failed too. wtf Mar 29 13:58:57 anyone know of any problems receiving multicast packets on marshmallow? using a nexus 5 for testing. Mar 29 14:02:13 To those who are familiar with Volley, I perform a request with url starting with http, but the link is moved to https, can Volley resolve the link from http to https automatically? Otherwise I have to add an extra method checking whether it's http or https based on response. Thank you. Mar 29 14:10:15 Number5, I'm not sure, but it would be easy enough to test and see Mar 29 14:10:48 I would assume it could handle a proper redirect though Mar 29 14:11:09 truckcrash, I already tested it, hence my question. maybe I have to use another method, but I can't find much information about it on google. Mar 29 14:41:37 eghdk, then you gone done it wrong Mar 29 14:47:39 boys Mar 29 14:47:43 http://pastebin.com/WWt08Vdt Mar 29 14:48:07 whats wrong with my code showing 0? Mar 29 14:48:15 speed Mar 29 14:49:59 how accurate is actually? Mar 29 15:05:14 http://hello.genymotion.com/see-whats-next/ Mar 29 15:05:17 I wonder... Mar 29 15:12:04 gordon_: I feel like some better ci support? But then again, that's because I can't really think of a big change to make things better. Their interface to start up genymotion is pretty crappy. maybe they'll fix that. Mar 29 15:13:06 SuperTyp: http://stackoverflow.com/a/11900757/1864883 Mar 29 15:15:01 is there an easy way to delay evaluation of a directive on page load? Mar 29 15:15:33 like if i don't want an ng-if to be processed until the page has been open for a couple seconds Mar 29 15:16:36 Hi All, I'm using Soundpool to play 12 sounds . In some devices and some Android SDK version, it takes very long time to load the sounds. Do you know of any solution for that? Mar 29 15:17:52 My app is instrumental app, so you play for example a guitar Mar 29 15:40:01 In API23, do I need to declare a permission to read/write in internal storage? Mar 29 15:48:09 uniqdom: yes, any permission that android considers dangerous needs to prompt the user to use it Mar 29 15:48:32 uniqdom, you request it Mar 29 15:48:41 oh, internal storage, no Mar 29 15:48:44 are you sure about that Mar 29 15:48:48 yep.. internal storage Mar 29 15:49:19 I have requested access for external storage, and i think that that works fine. Mar 29 15:49:33 but I'm having an exception in internal storage: Mar 29 15:49:49 java.io.FileNotFoundException: /data/user/0/com.example.dodo.wtfrymotor/app_data/testfile: open failed: EACCES (Permission denied) Mar 29 15:49:56 http://paste.debian.net/422483/ Mar 29 15:50:24 oops, yeah internal you should be fine. read that as external. Mar 29 15:50:50 I have created manually that file with adb, but in this folder /data/data/com.example.dodo.wtfrymotor/app_data/testfile Mar 29 15:51:19 i think that /data/user/0 is /data/data/ but for my app Mar 29 15:52:36 i have created the file as root user. but i see that it have read and write access for all users Mar 29 15:53:01 -rw-rw-rw- 1 root root 5 2016-03-29 12:44 testfile Mar 29 15:54:30 ls /data/user/0/com.example.dodo.wtfrymotor/app_data/testfile and does it exist Mar 29 15:55:16 yes, the file exists Mar 29 15:55:17 -rw-rw-rw- 1 root root 5 2016-03-29 12:44 /data/user/0/com.example.dodo.wtfrymotor/app_data/testfile Mar 29 15:56:22 as not-root? Mar 29 15:56:46 you probably created app_data without permissions Mar 29 15:57:12 app_data was created by my app, without root permissions Mar 29 15:58:10 ls -la app_data/ Mar 29 15:58:16 drwxrwx--x 2 u0_a150 u0_a150 4096 2016-03-29 12:44 . Mar 29 15:58:43 but basically do it as not-root Mar 29 15:58:54 I'm fetching three URL's to images that I would like to cache with Picasso: http://pastebin.com/DUCh9AtF First problem, fetching all three images. Should I make three different .fetch & .load methods or is it possible to load them all at once? Second problem, when cached, how do I gain access to the image data in another activity? The idea is to load images into cache during loading and display them later. Mar 29 15:58:56 anyway, not interested in supporting root-related issues Mar 29 15:59:37 ok I will create the file as non-root user Mar 29 16:00:48 hello guyz. i have an issue with notification i am loading 150x150 image in it and image size is 24 kb so i have tested on motorola xt912 with jelly bean notification is sliding down properly, i have tested on android one and its working fine but on samsung Note 4 when i pull down the notification its causing the lag . and when i unlock the screen the password screen appear in 5 seconds. on Note 4 i have 5.1.1 running any suggestion i have s Mar 29 16:00:48 earched but can't find a solution Mar 29 16:00:58 i'm starting fragemnt A from fragmentactivity and then replacing fragment A to B. B has recyclerview and A adds something to API via Post, but when I go from fragment A to B then recyclerview on B doesn't update, I have to reload it manually to see the changes Mar 29 16:01:43 I call Loades onStart on fragment B, but I guess it doesn't get time to load? Mar 29 16:06:31 hi all Mar 29 16:07:01 Has anyone managed to use the "new" ndk integration of the android gradle plugin yet? Mar 29 16:07:33 I'm using traceview to look at my network requests... any idea what OpenSSLSocketImplSSlInputStream.read could be doing for an entire second before seemingly sending my request? Mar 29 16:08:00 it seems to be like a unicorn, the only thing we know is "> Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration." Mar 29 16:08:57 and in the link, it seems they refer to some magical version of the plugin, which is not stated clearly, is this mainstream yet? is the doc outdated? Mar 29 16:09:06 * foocraft sorry for the ? abuse Mar 29 16:09:48 In my build.gradle I currently use this: classpath 'com.android.tools.build:gradle:1.3.1' Mar 29 16:11:13 old build Mar 29 16:11:16 1.3.1 is old Mar 29 16:11:24 The issue I'm having is that I'm trying to have two flavors of an app and two build types. Each of the flavors and the build types has should have its own jni configuration. Mar 29 16:11:25 experimental gradle is stupid, too Mar 29 16:11:36 pfn: the problem was related to root as you pointed out. thanks Mar 29 16:12:05 pfn: I know that it's old, I've been refraining from upgrading because I don't know what else that will break :D (as usual) Mar 29 16:12:24 but yeah, I can upgrade it, now that I'm going to try to restructure my jni folder(s) Mar 29 16:12:42 just to which version is it advised to try to use the new ndk integration? Mar 29 16:12:56 new ndk integration is in experimental gradle plugin, it's utter shit Mar 29 16:13:00 that's not a path you want to take Mar 29 16:13:14 My impression is that regardless of version, the android plugin simply composes some folder from all those flavors and build types, and uses that for the build Mar 29 16:13:22 * foocraft nod Mar 29 16:14:13 okay, my current situation is actually very shitty. I have lots of Application.mk and Android.mk files and I use ndk-build as part of a make file. NDK_APPLICATION_MK is given as argument to ndk-build to select which way I will build, then gradle is invoked for that build Mar 29 16:14:30 of course, needless to say, no matter which ndk you pick, this is hardly recognizable by ndk-gdb Mar 29 16:14:50 so what I want to do is maybe src/main/jni will contain all those common .mk files Mar 29 16:15:37 and src/debug/jni will contain something like Application-BuildType.mk and Android-BuildType.mk which then the flavors include Mar 29 16:16:03 but that's only if and only if android's gradle plugin simply merges the folders *before* running ndk-build Mar 29 16:16:31 also, when/how does it decide to run ndk-build? one of the cryptic features of android ndk + gradle android plugin Mar 29 16:16:51 * pfn shrugs Mar 29 16:16:53 * pfn doesn't use gradle Mar 29 16:17:04 ant!? Mar 29 16:17:07 no Mar 29 16:17:09 I use sbt Mar 29 16:17:10 sbt? Mar 29 16:17:14 okay fair Mar 29 16:17:49 sbt is good actually but... I'm part of a team, and most of them won't like sbt because they're scared that it's new.. Mar 29 16:18:07 although how does flavor/buildType work in sbt with android? Mar 29 16:18:18 there's flavors and buildTypes keys Mar 29 16:18:19 do they have such a concept in their "android plugin"? Mar 29 16:18:23 yes Mar 29 16:19:11 does it compose a folder before running the build (ignore assets/res for now, those are probably handled by aapt first) Mar 29 16:19:34 it doesn't compose jni Mar 29 16:19:46 but neither does the gradle plugin Mar 29 16:21:58 from what I can tell, it seems gradle's new ndk integration wishes to just generate Android.mk and Application.mk as a target, and whatever was going to be written with mk syntax is now just written in gradle Mar 29 16:22:07 that's right Mar 29 16:22:46 *but* as you said, it's shit. so which version of the android plugin do you recommend for gradle? (thanks a lot for the help btw) Mar 29 16:23:59 I would say just use 1.5.0 and run ndk-build as a custom task Mar 29 16:24:13 and do all your merging/env-setup whatever there Mar 29 16:24:51 the only issue with that is that ndk-gdb goes batshit insane Mar 29 16:25:15 should be able to pass env to ndk-gdb so that it knows how to find the right files too Mar 29 16:26:22 (ndk-gdb is very stubborn. fyi) Mar 29 16:26:59 it's not trying to read those things from env. It's a big chain of shell scripts and awk scripts that determine what it will try to do before starting Mar 29 16:27:13 indeed Mar 29 16:27:22 I don't ever do flavor-based ndk Mar 29 16:27:34 one-flavor to rule them all, and interact with it differently in java Mar 29 16:28:12 that's the best solution, if the size and speed difference between flavors isn't too much Mar 29 16:28:37 but your approach is probably the best, given the current infrastructure.. Mar 29 16:29:23 but yeah, my ndk usage is mostly trivial or straightforward that way Mar 29 16:30:15 250000 lines + a bunch of static and shared libraries.. Mar 29 16:31:19 interesting that ndk-gdb doesn't execute a target in the mk to find what it should be doing, but greps it out... Mar 29 16:34:52 hahaha. where did you find that? Mar 29 16:34:56 Yeah Mar 29 16:35:01 It also expects AndroidManifest and other crap Mar 29 16:35:15 I actually had to write my own ndk-gdb to get something to debug on Android Mar 29 16:35:18 I think it expects the folder structure of whoever wrote that damn script Mar 29 16:35:27 hi, how is possible to set loader gif until all items are downloaded with retrofit ? Mar 29 16:35:36 or animation Mar 29 16:35:39 me too, Mavrik. However, with each ndk upgrade, I find it harder and harder to keep up with their hacks Mar 29 16:35:58 * pfn is still using r9d for personal stuff Mar 29 16:37:04 The only problem with r9d is that we're using c++11 and iirc, r9d has an outdated set of libstdc++ headers/implementation Mar 29 16:37:37 yeah, like I said, trivial stuff :P Mar 29 16:37:38 if you're using C, which is orders of magnitutde more productive in the first place, then yes, you shouldn't have a problem Mar 29 16:38:26 I like to stay in managed as much as possible Mar 29 16:38:36 Are there any alternative to play multiple small sounds for SoundPool? It is loading really slow the sounds Mar 29 16:38:52 load the sounds first, then play Mar 29 16:39:19 I'm loading (using asynctask) on onCreate, but it takes couple of seconds to load all the sounds Mar 29 16:41:10 use smaller sound clips Mar 29 16:52:16 I'm using 12 sounds of 1-3 secons Mar 29 16:52:21 seconds* Mar 29 16:52:32 smaller as in file/size sample&bitrate Mar 29 16:53:25 dragorn https://guardianproject.info/2016/03/28/copperhead-guardian-project-and-f-droid-partner-to-build-open-verifiably-secure-mobile-ecosystem/ Mar 29 16:53:34 g00s, yup Mar 29 16:53:46 pfn , I will try. any other options? Mar 29 16:55:11 no Mar 29 16:56:42 I'm using dagger2 with retrofit with RxJava and want to connect to 2 different services. Some of the modules are common for both clients but I'm concerned they might fight with each other Mar 29 16:56:50 which of the following need to be created for each retrofit client instance: OkHttpCache, RxJavaCallAdapterFactory, GSON converter? Mar 29 16:58:34 not sure if the okhttp cache can be shared or if it'll cause weird conflicts; seems like the gson converter and rxjava stuff can be shared though Mar 29 17:21:40 If I have a Nested Class that extends Runnable, and I create a new Thread in the Activity, then the runnable calls a method in the activity which modifies the UI, that will be an issue right Mar 29 17:21:53 Becuase the runnable needs to post back to Main thread Mar 29 17:22:14 of course Mar 29 17:22:20 activity.runOnUiThread is a thing Mar 29 17:22:28 Whats that Mar 29 17:22:36 rtfm Mar 29 17:22:42 Suure Mar 29 17:26:11 So in the runnable I would need (Activity)getApplicationContext().runOnUiThread(runnable) pfn?) Mar 29 17:26:36 pass the activity to the runnable Mar 29 17:26:42 application is not activity Mar 29 17:26:49 Good point Mar 29 17:27:34 pfn do you think SQLite transactions belong on the background thread? Mar 29 17:27:38 Thats what Im trying to decide Mar 29 17:27:48 profile, see how long they take, then decide Mar 29 17:27:53 java sucks Mar 29 17:27:56 How do I do that Mar 29 17:28:00 use systrace Mar 29 17:28:12 java makes it such a pain to decide to make something async Mar 29 17:28:32 Ok, also, what is the cutoff where I should say ok this should be async or ok this is fine to be blocking Mar 29 17:28:54 consider that the main thread wants to animate shit on screen at 60fps Mar 29 17:29:17 Ok so that makes the cutoff Mar 29 17:29:19 ... Mar 29 17:29:21 Hmm Mar 29 17:29:28 1000ms / 60, if your code takes a significant chunk of that time, you will want to move off-main Mar 29 17:29:28 enable strict mode and see if it blows up Mar 29 17:29:40 strictmode doesn't blow up blocking calls Mar 29 17:30:50 Any doors fans? Mar 29 17:40:25 cretin45 is still alive :) Mar 29 17:41:32 hmm, I wonder how hard it is to write a hand/gesture recognizer in opencv Mar 29 17:42:56 Anyone here using NixOS on their dev machine? Mar 29 17:43:23 g00s: i guess Mar 29 17:47:09 How come someone reccomended to me that I use List instead of ArrayList when working with GSON + Retrofit Mar 29 17:47:28 interface Mar 29 17:47:34 ?? Mar 29 17:47:47 Could you elab Mar 29 17:47:51 SOLID Mar 29 17:48:34 i wasn’t around when they said it, but I’m guessing it’s because you want your code to be written against the List interface, rather than a concrete implementation of list Mar 29 17:49:08 Why though? Whats the benefit / difference? Mar 29 17:49:26 same as any other situation with that Mar 29 17:49:37 code to the interface, not coupling to implementations Mar 29 17:50:07 Hmmm Mar 29 17:50:10 Thanks Mar 29 17:52:18 Anyone here familiar with Dagger. I have it set up, but I was wondering if the stuff I'm injecting makes sense? In my one case, my MainActivity has a listView, so I'm injecting List. Is that a proper use of Dagger? Mar 29 17:53:16 i’m not that familiar with Dagger, but I don’t think you want to use it to inject the actual data Mar 29 17:53:38 wouldn’t you use it to inject the object which fetches the data, and get it from there? Mar 29 17:54:27 s73v3r: Mind taking a look here? http://stackoverflow.com/questions/36003820/how-to-provide-an-object-asynchornously-with-dagger My last comment didn't get an answer which is what I'm really after Mar 29 17:54:47 like i said, i don’t know too much about dagger, so I wouldn’t be of help looking at it’s code Mar 29 17:56:42 s73v3r: Yeah, I guess I'll wait around for someone that uses it to come along. If Dagger is your thing, let me know if injecting the Array of data that I bind to an adapter in my activity is the right thing to inject. The reason why I want to swap the injections is so that I can have Real Data and MockData. Mar 29 17:56:51 eghdk_ thats something you would use rxjava for Mar 29 17:57:15 like I said, I’m 90% sure you don’t want to inject the actual data Mar 29 17:57:23 g00s: You guys are killing me with this rxjava stuff. Hahah. Mar 29 17:57:25 you want to inject the object which fetches the data Mar 29 17:57:37 eghdk_ its the wrong application for DI Mar 29 17:57:39 otherwise dagger now has to know how to get the data Mar 29 17:58:10 g00s: It's on my to do list to learn rx, but right now I'm trying to learn dagger =/ So you think this is the wrong way to use DI? Mar 29 17:58:18 yeah Mar 29 17:58:42 not that i've used dagger on android either heh Mar 29 17:58:51 your dependency is not the data, it’s the object which fetches the data Mar 29 17:59:52 Hm. so MainActivity has a ListView and I have a List that I want to swap out between List and List. Why wouldn't I inject the data? Mar 29 18:00:00 s73v3r: Hm. Good point Mar 29 18:00:13 because you don’t want to force Dagger to know how to fetch the data Mar 29 18:01:16 s73v3r: Give me a second for that to sink in... Force dagger to know how to fetch the data... but isn't that what the @Provides methods are all about? To provide these different pieces of data? (excuse my ignorance, it just hasn't clicked yet I guess) Mar 29 18:01:30 no Mar 29 18:01:44 eghdk_ i'd read about dependency injection in general, and what problems it solves Mar 29 18:01:47 lets say your messages come from a network call Mar 29 18:02:10 you don’t want dagger to have to make network calls in order to fulfil that dependency Mar 29 18:02:14 g00s: I have read a TON, and now I'm starting to put it into practice =( Mar 29 18:02:30 lol Mar 29 18:02:34 s73v3r: Gotcha. So I'm not using the network. I'm using a DB, but same deal right? Mar 29 18:02:40 same exact thing Mar 29 18:03:01 you want to create a Repository object, which handles fetching the data Mar 29 18:03:08 that is what you’d inject using Dagger Mar 29 18:03:26 and you’d create an interface for it, so you can swap it out for a version that returns test data Mar 29 18:03:33 So the Repository object is like the middle man, cache layer type of thing? Mar 29 18:03:56 yes Mar 29 18:04:19 it would know if it would need to fetch data from the network, or from the db, or from local cache Mar 29 18:04:52 it would probably delegate to other object to actually do those things Mar 29 18:05:03 s73v3r: Thanks man. That makes a lot of sense, and resolves my problem from my SO question. Mar 29 18:06:32 That Repository object, makes sense for their to be one of right? Should I try to force it to be a singleton, or a member of my app class? Mar 29 18:06:56 there’s no reason to explicitly make it a singleton; in fact, I’d advise against it Mar 29 18:07:18 I seem to remember that Dagger has a way of making a dependency a “singleton”, in that there’s one instance created Mar 29 18:08:29 s73v3r: Yes it does. I was just more curious if its an standard operating procedure to make this repository/middleman/cache object a singleton or make it a member of the App class so that it's easily accessible and such. Mar 29 18:08:50 some people do. I actively dislike singletons, so I try to avoid them whenever possible Mar 29 18:09:18 If you’re already using dagger, I see no reason to reinvent the wheel. If you want something injected to be a singleton, just use Dagger’s mechanism for doing it Mar 29 18:09:19 Nothing wrong with singletons. Mar 29 18:09:33 i’ve seen them overused far too much Mar 29 18:09:40 i hate global mutable state Mar 29 18:09:47 They’re a fact of life, some things should only exist as one instance Mar 29 18:10:06 Then create immutable singletons Mar 29 18:10:09 some things, yes. but the majority of singletons I’ve seen are not those things Mar 29 18:10:33 You’re seen bad singletons, it doesn’t mean singletons are bad, just that there are programmers who don’t understand what a singleton is Mar 29 18:10:50 Create an immutable singleton and don’t use static and you’re fine. Mar 29 18:10:51 jaana: I don't think he's arguing against you hah Mar 29 18:10:56 which is why i avoid singletons. so I don’t have to worry about that problem Mar 29 18:11:05 You can’t avoid singletons. Mar 29 18:11:06 i honestly find arguing about singletons to not be interesting Mar 29 18:11:10 yes, you can Mar 29 18:11:12 You can avoid static and you can avoid mutable state. Mar 29 18:11:16 But not singletons. Mar 29 18:11:21 the majority of singletons do not need to be singletons Mar 29 18:11:43 e.g. gps in your phone. Why would you allow multiple instances of it if your phone only has one? Mar 29 18:11:59 and as I said, Dagger has the capability to turn a regular object into a “singleton”, so it’s not worth writing the code to enforce singleton-ness on the object Mar 29 18:12:08 GPS is provided by the system. Mar 29 18:12:29 … as a singleton Mar 29 18:12:36 right, but it’s the system Mar 29 18:12:43 I’m talking about things in my code Mar 29 18:12:54 Same thing, there are things in all apps that should only exist as one instance Mar 29 18:13:01 i disagree Mar 29 18:13:08 e.g. your config file, your main display, etc... Mar 29 18:13:14 most things made as singletons do not need to be singletons Mar 29 18:13:19 All apps have them, they are universal. Mar 29 18:13:56 I do think the singleton pattern is overused in a lot of Java codebases (including Android apps) Mar 29 18:13:57 main display is again something made by the system Mar 29 18:14:01 Is an event driven structure in an activity ok? Mar 29 18:14:14 i’ve seen network access be made a singleton Mar 29 18:14:21 that has no business as a singleton Mar 29 18:15:17 singleton purpose was to enforce "one of", but many use it as a global variable / conveninece Mar 29 18:15:32 but yeah, i do agree some things should be enforced that way - like sqlite database connections Mar 29 18:16:32 hmm Mar 29 18:18:36 i don’t even think that needs to be coded up as a singleton. DI or a ServiceLocator can take care of that Mar 29 18:18:50 s73v3r: Last thing... so would I inject RealRepository/MockRepository or would I just inject Repository and the repository decides what kind of data it's going to grab (e.g. whether it's hardcoded mock data or grabbing it from the network) Mar 29 18:19:52 you would inject an instance of a RepoInterface. RealRepository and MockRepository implement this. The Dagger provides thingy would chose which one based on what kind of build you’re doing Mar 29 18:20:20 s73v3r any reason you aren't using dagger yet ? Mar 29 18:20:37 cause my project at work isn’t using it Mar 29 18:22:39 AS question... I want to add a library to my Project... an .aar file... also the source code for the library... but how to I add the references in my project screen? Mar 29 18:24:22 s73v3r: Great. but what if dagger didn't provide based on what kind of build I'm doing? I have debug drawer that lets me swap data sets at runtime, so in this case, would I still inject a RepoInterface or would I just inject the ConcreteRepository Mar 29 18:24:37 you inject the interface Mar 29 18:24:51 the activity or whatever being injected codes to the interface Mar 29 18:25:14 look at the u2020 project; i think it’s doing exactly what you want to do Mar 29 18:26:46 Will check it out. Thanks Mar 29 18:32:03 If I have an activity open, and that activty creates a new thread with a runnable and the activity closes while that runnable thread is still running, will the thread continue until done? Mar 29 18:32:35 pfn would you happen to know that one Mar 29 18:34:34 why are you referencing runnable so much in you question. take that out and re-read your question Mar 29 18:34:35 until done or the process is killed Mar 29 18:35:09 canvs2321: I reference it twice.. because the question revolves around a runnable Mar 29 18:35:22 no it revolves around a thread and activity Mar 29 18:35:39 Idk pfn seemed to get it Mar 29 18:35:57 the runnable is irrelevant Mar 29 18:36:03 Understood Mar 29 18:46:09 I got a singleton question since you guys were talking about it a min ago Mar 29 18:46:22 avoid them :p Mar 29 18:46:27 Well Mar 29 18:46:37 Ok so I have a few values stored in shared preferences Mar 29 18:46:41 And I use them throughout the app Mar 29 18:46:54 I singleton access to sharedprefs Mar 29 18:46:58 So to make it easier I created a "SharedPreferenceHelper" class Mar 29 18:47:07 why? SharedPrefs is it’s own singleton Mar 29 18:47:14 With methods like getValueX() getValueY(), setValueX()... Mar 29 18:47:16 Etc.. Mar 29 18:47:20 I have that class as a singleton Mar 29 18:47:30 s73v3r, typesafety, and there's no reason not to treat it as a singleton Mar 29 18:47:32 i see absolutely no reason for that to be a singleton Mar 29 18:47:45 i said why to the being a singleton part Mar 29 18:47:54 me or pfn? Mar 29 18:47:58 because singletons are awesome Mar 29 18:48:29 no. there is no reason that should be a singleton Mar 29 18:48:31 i always singleton SharedPreferences Mar 29 18:48:56 What are the downsides s73v3r Mar 29 18:49:07 again, why? SharedPreferences is already a singleton Mar 29 18:49:23 because sharedpreferences does not have a typesafe api Mar 29 18:49:24 drose379: you just don’t need to do it Mar 29 18:49:25 Because I have the wrapper around SharedPreferences that has getter/setter methods for me Mar 29 18:49:34 Basically what pfn said Mar 29 18:49:36 access to it is effectively singleton either way Mar 29 18:49:49 pfn: I’m not arguing against making a helper for SharedPrefs. I’m arguing against making that helper a singleton Mar 29 18:50:05 drose379, yeah, I usually have a singleton as well Mar 29 18:50:11 Injected if possible so you can replace it for testing. Mar 29 18:50:16 you can newinstance it or singleton, doesn't really matter Mar 29 18:50:21 simple helper would require context, wouldnt it? Mar 29 18:50:29 Yes it requires context Mar 29 18:50:33 so? Mar 29 18:50:39 Since shared preferences effectively are a singleton on filesystem Mar 29 18:50:40 and singleton wouldnt Mar 29 18:50:53 singleton would absolutely require context Mar 29 18:50:57 Yeah mine does Mar 29 18:51:00 just for initialization Mar 29 18:51:19 Yeah but getInstance does not know if its initialized yet, so you need to pass context each time... Mar 29 18:51:23 For me at least Mar 29 18:51:40 so why go to the trouble of making it a singleton? Mar 29 18:51:52 drose379, that's why you use Dagger2 :P Mar 29 18:51:52 if you’re gonna do that, why not just hang it off the Application subclass? Mar 29 18:52:15 i have more complex "singleton". initialisation in Application the rest normally by getInstance() Mar 29 18:52:23 probably its not pure singleton by definition Mar 29 18:52:24 Just create the singleton instance in Application#onCreate, save passing a Context everything Mar 29 18:52:40 Thatd be nice Mar 29 18:52:47 Wheres Application#OnCreate though Mar 29 18:53:11 But you don’t need that class hanging around during the entire app' Mar 29 18:53:20 during the entire app’s lifetime Mar 29 18:53:25 you only need it in a few places Mar 29 18:53:52 Wait where is the Application#OnCreate method Mar 29 18:53:55 Never heard of that Mar 29 18:54:03 It's in the Application class Mar 29 18:54:19 So if I create a class that extends application, that class will run whenever the application opens? Mar 29 18:54:23 how do I get Stopping - Graddle Build Running .... to actually stop... it seems stuck in this mode... Mar 29 18:54:54 If you google how to use the Application class, it will run whenever an application component is started Mar 29 18:54:55 why go to the trouble of making it singleton? Mar 29 18:54:57 I don't Mar 29 18:54:59 then when I try running... Grtadle Buld Running wont stop... Mar 29 18:55:01 I type "object Settings {}" Mar 29 18:55:10 Thats bad ass SimonVT Mar 29 18:55:36 s73v3r: by the way... Mar 29 18:55:54 Im liking the way the Repository class you told me I should make last night is working out Mar 29 18:56:03 Thanks Mar 29 18:56:54 But if you want to save the 8 bytes, or however much an object cost, by all means, just create a helper class and pass a Context every time Mar 29 18:57:23 what if i want settings without access to context Mar 29 18:57:26 I would like to take advantage of the Application class Mar 29 18:57:40 That too yeah --^ Mar 29 18:58:03 Ashiren: Then pass the instance of the helper class. But in most cases, you’re not going to need that Mar 29 18:58:34 or read the values into a config class, and use that Mar 29 18:58:59 Use of Application class would solve this though Mar 29 18:59:06 then do it ~ Mar 29 18:59:16 Oh im just chiming in Mar 29 18:59:23 Not sure if I really need to do that now Mar 29 19:01:10 Anyone ever used the monkey to test UI? Mar 29 19:04:13 creating garbage on lower android versions is more harmful than keeping a small object in memory Mar 29 19:04:48 up until v21, the gc was non-compacting Mar 29 19:04:57 memory fragmentation ftl Mar 29 19:05:14 So what does this mean Mar 29 19:05:28 use the google Mar 29 19:06:00 Ok Mar 29 19:06:23 it's even fast, just say "ok google memory fragmentation" :P Mar 29 19:06:26 assuming you have a non-shitty phone Mar 29 19:06:38 Galaxy s6 Mar 29 19:06:51 Is that considered shitty Mar 29 19:06:59 no, not really Mar 29 19:06:59 it's a samsung, probably yes Mar 29 19:07:25 I would have bought a nexus 5 Mar 29 19:07:27 or 6 Mar 29 19:07:46 different people want different things from their phoens Mar 29 19:07:48 phones Mar 29 19:08:01 The s6 is beautiful ill give it that Mar 29 19:08:08 And i have the google now launcher installed, so its fine Mar 29 19:09:26 google now launcher lets you ok google with the screen on Mar 29 19:09:32 dunno if the s6 lets you do it with the screen off Mar 29 19:09:58 Didnt even know that was a thing Mar 29 19:10:24 How do they constantly listen for "ok google" without killing bat Mar 29 19:10:45 there is a low power listener Mar 29 19:10:57 low power cpu Mar 29 19:11:07 Do we have access to it with the SDK Mar 29 19:11:30 no Mar 29 19:11:47 You kidding? Mar 29 19:12:06 no Mar 29 19:12:16 Why wouldnt they give us access to that Mar 29 19:12:20 perhaps via ndk Mar 29 19:12:21 why would they? Mar 29 19:12:27 and the low power cpu isn't available for all devices Mar 29 19:12:37 Oh ok Mar 29 19:12:45 I thought they would so we can develop low power consumption apps Mar 29 19:13:04 if everyone uses the low power cpu, it won't be low power anymore Mar 29 19:13:06 that chip is there specifically to listen for that phrase Mar 29 19:13:12 Oh no way haha Mar 29 19:13:15 Thats funny Mar 29 19:13:35 at least on the Motorola phones, it’s not a general purpose CPU Mar 29 19:13:36 s73v3r: Cool, so I implemented this repository layer. Just trying it with Mock data for right now, but what's the recommended way for this scenario. MockWebRepository.getItems(), internally getItems knows that items is null so it goes out and does a network request. Meanwhile, what does getItems() return? Mar 29 19:14:14 eghdk: Since you don’t know if you’re going to be taking time or not, you’ll have to pass a callback to the getItems method Mar 29 19:15:07 s73v3r: aha, so should getItems() return anything? Mar 29 19:15:21 drose379, yeah, the DSP actually actively searches for a certain pattern which in this case is "ok google" Mar 29 19:15:23 probably not. If you’re doing something like Rx, you can return an Rx thingy Mar 29 19:15:34 The newer models are actually programmable but Google doesn't expose an API Mar 29 19:17:29 s73v3r: got it. Thanks. That makes sense Mar 29 19:18:28 might be able to access it via ndk Mar 29 19:18:47 maybe, but I’d imagine it’s undocumented, and liable to break Mar 29 19:19:08 of course Mar 29 19:19:11 as is anything non-public Mar 29 19:20:54 I doubt they expose even the kernel interface / headers. Mar 29 19:37:05 s73v3r who should handle the threading that takes place if getItems takes long? Should my Activity be aware of it and call it inside a new Thread, or should the Repository handle knowing that it has to do stuff off the main thread? Mar 29 19:48:03 hiya fellas Mar 29 19:48:42 I need to have a textview having wrap content as a height because some text when the locale is German or Chinese becomes too big for that textview, now for when it's English, the text is showing fine but the textview is having too much height Mar 29 19:49:17 I need something like minHeight, that would allow me to specify some static measurement when the text can fit and wrap content when the text cannot fit so that it would just expand itself accordingly Mar 29 19:49:27 it sounds illogical Mar 29 19:58:49 can't you create a different layout for the different languages? Mar 29 19:59:06 i dont know the answer to your question, though Mar 29 19:59:45 of course I can Mar 29 19:59:58 but I thought from the layout itself I can have the textview wrap content in a sane way Mar 29 20:00:14 right now it's giving way too much height for the content (the text) i've given it when I set it to wrap content on height Mar 29 20:00:40 40dp almost in height, and the text inside it is 12sp Mar 29 20:00:48 60dp even Mar 29 20:05:27 When I select a specific device in device chooser by default.... then i want to change it. How do i get it to display the option again? Mar 29 20:05:35 unplug replug Mar 29 20:05:47 I have to? Mar 29 20:05:54 that's what I do, dont know Mar 29 20:06:09 That's what i'm doing but sending to emulator... I have to close the emulator and we all know it takes long to come backup Mar 29 20:06:18 isn't there like an option? Mar 29 20:09:54 not sure Mar 29 20:12:16 oh yea here it is TinFury Mar 29 20:12:16 http://stackoverflow.com/questions/16616185/android-studio-intellij-idea-run-debug-configuration-remembering-which-dev Mar 29 20:19:35 I'm getting a callback in my Activity while my app is in the background. Should I set up a deregistration method or something? Mar 29 20:21:48 whatever you have to deregister or unhook you can do in onStop/onPause usually Mar 29 20:25:59 Odaym: So I guess the object I'm interacting with I'll have to implement an unregister? So... I guess I'm gonna have to start keeping a list of listeners in my object. Or am I thinking about this wrong? Mar 29 20:26:36 all the services I used that have register have an accompanying unregister to be called in onPause/onStop Mar 29 20:26:55 broadcast receivers, Otto, etc. Mar 29 20:29:26 nnnnnnnnnnnnngh Mar 29 20:29:44 I really shouldn't be reading this code, just writing it from scratch would be much more pleasant Mar 29 20:30:01 there's a static Context in this class Mar 29 20:30:11 which gets an activity instance Mar 29 20:30:12 ;_; Mar 29 20:30:20 Hello. Can someone help me, please? Mar 29 20:31:13 BrenoMelo_, not without you helping us help you first Mar 29 20:31:18 don't ask to ask, just ask Mar 29 20:31:36 maybe that should go in the message Mar 29 20:31:58 I need to develop an application that captures network packets. However I can not find any library that allows this. Mar 29 20:32:51 Like JPCAP library in Java. Mar 29 20:35:15 http://stackoverflow.com/questions/27887719/capture-packets-in-android Mar 29 20:35:16 ? Mar 29 20:35:37 one of those must be open source Mar 29 20:36:14 this https://www.kismetwireless.net/android-pcap/ Mar 29 20:36:21 https://www.kismetwireless.net/android-pcap.git Mar 29 20:38:32 Nice, I didn't know kismet was still a thing. Glad to see it's still actively being worked on. Mar 29 20:39:02 Thank you. But when using PCAP, the application must be developed in C / C ++. Mar 29 20:39:46 so what bro! Mar 29 20:39:52 you're up to the challenge, use NDK! Mar 29 20:40:32 Ok Mar 29 20:40:48 How do I know which nexus image to flash? I see 4 different ones for 6.0.0 Mar 29 20:44:28 s73v3r: check the paper box you bought the device in, it has the required data on it Mar 29 20:44:44 lets see if i still have that :S Mar 29 20:44:46 at least it had in the Nexus 7 days Mar 29 20:45:11 which versions of the Nexus 6 exist anyway? Mar 29 20:45:12 i’ve got a nexus 6 Mar 29 20:45:23 yeah, but all nexuses had that stuff Mar 29 20:45:34 have to, FCC regulations Mar 29 20:46:01 well, at least for 5.1.1, it has a bunch that say “For Project Fi ONLY”, “For T-mobile ONLY”, etc Mar 29 20:46:09 none of that for the 6.0.0 versions Mar 29 20:46:19 but it has the codename, right? Mar 29 20:46:58 it has the build number, LXXXXX for 5, MXXXXX for 6 Mar 29 20:47:22 hmm Mar 29 20:47:25 nothing else? Mar 29 20:47:40 on the site? no Mar 29 20:48:54 So @Singleton in Dagger apparently means that it will be scoped to whatever it was injected into. So I'm injecting a Repository into my Activity, how do I expand that scope so that I only get it once per Application? Mar 29 20:49:10 that’s what @Singleton should be doaing Mar 29 20:49:12 doing Mar 29 20:52:49 s73v3r: Apparently its scoped to only my activity. Mar 29 20:53:06 i don’t think it’s only scoped to the activity. I think it’s scoped to the dagger scope Mar 29 20:53:08 So if I leave my activity (via back button) and open up my activity again, it has to rebuild that list. Mar 29 20:54:11 s73v3r: What's the dagger scope though? Where the object craph is created or what? Mar 29 20:54:17 i believe so Mar 29 20:56:07 finally i found an Android Police post saying if you have Lolipop version X, you should update to Marshmallow version Y. Why the fuck Google doesn’t put this on the site with the images is beyond me Mar 29 20:57:21 So my ObjectGraph.create() is happening in my App class. Wonder why my Repository isn't sticking around. Mar 29 20:58:31 How can I get two different toolbars between 2 fragments? Mar 29 20:59:13 All I want to do is have the second fragment have an additional button on the toolbar Mar 29 20:59:38 have each fragment render its own toolbar Mar 29 21:00:13 Hmm, okay, thanks! Mar 29 21:00:26 IggyGee: Alternatively you can set new menu items when each fragment is loaded. Mar 29 21:02:33 eghdk: I can add and remove individual menu item? Mar 29 21:04:14 IggyGee: I'm sure you could... but what I meant was you can inflate new menu items each time a new fragment is loaded. Mar 29 21:04:45 oh, yeah i was about to do that lol Mar 29 21:05:07 2 Mar 29 21:05:14 I currently do this in one of my apps: MainActivity has ToolBar and Tabs and ViewPager, and then each fragment when its loaded inflates their own menu Mar 29 21:05:52 gotcha, that makes the most sense, would I do that in the onCreateView or onCreateOptionsMenu? Mar 29 21:06:18 for the fragment ^ Mar 29 21:08:34 Is there something like a Nexus plugin for Apache? So I can pull dependencies? And push my own libs? Mar 29 21:08:54 it has been a while since i've dealt with this, but I think you just call setHasOptionsMenu(true) in your oncreate, and then inflate the menu the onCreateOptionsMenu Mar 29 21:09:05 if i am not mistaken, it should be as simple as that Mar 29 21:09:51 alright, I'll try it out, thanks guys Mar 29 21:14:48 oh great, now there's a third party library that's also leaking Mar 29 21:19:15 Zharf :( Mar 29 21:19:39 patch it :) Mar 29 21:19:41 PRit Mar 29 21:19:42 Win! Mar 29 21:20:19 if I used github, I might Mar 29 21:21:08 <_pr0t0type_> hey guys, is there a way to interpolate values defined in your gradle.build file into your AndroidManifest.xml file? Mar 29 21:22:26 interpolate them? Mar 29 21:23:02 <_pr0t0type_> yeah, say if I have a value in gradle.build (say myValue = "someValue"). Mar 29 21:23:43 <_pr0t0type_> then in AndroidManifest.xml I would do: and an overall still stupid interaction concept. Mar 29 22:16:16 justJanne, what's your solution? Mar 29 22:16:52 Zharf: Using thought, and time. Not stupid "throw everything at the wall and keep what sticks", which is what google is doing Mar 29 22:17:10 nothing against A/B testing, but you can’t develop a framework or guidelines like that. Mar 29 22:18:00 bottom nav makes much more sense on these large screens than top nav Mar 29 22:18:11 so you have no solution Mar 29 22:18:23 well, I personally love the navigation drawer. Mar 29 22:18:42 it just has issues on devices larger than 6" and smaller than 7" which are in portrait Mar 29 22:18:59 roughly how many items fit in navigation drawer on a normal 5" phone ? Mar 29 22:19:10 let me check... Mar 29 22:19:29 11.5 Mar 29 22:19:36 portrait Mar 29 22:19:55 7 in landscape Mar 29 22:19:58 justJanne i'm kinda tormented atm, i have 6 navigation items but want to put servers in there as shortcuts too Mar 29 22:20:21 so there could be 7-10 maybe - i think that may be too much Mar 29 22:20:29 g00s: I have only shortcusts in there – the list of channels you have Mar 29 22:20:36 similar to what IRCCloud does Mar 29 22:20:42 shortest past to finger(s), presumably the thumb Mar 29 22:20:53 adq: that is NOT bottom ;) Mar 29 22:20:56 human will have elongated hands soon Mar 29 22:21:07 in fact, you can’t reach the bottom at all if you hold the phone in single-hand position Mar 29 22:21:28 i'm sure they did a lot of study on finger tracking like they did on eye tracking in the 80s Mar 29 22:21:36 so there is no excuse! Mar 29 22:21:36 i hold my phone in one hand, and can quite easily reach the bottom Mar 29 22:21:46 s73v3r: with pinkie at the bottom? Mar 29 22:21:48 it’s the top i can’t quite reach Mar 29 22:21:52 you can’t if you hold the phone like a can. Mar 29 22:22:01 if they wanted something thumnable i think they should have had a radial type menu that you could position either side, depending if you were lefty or righty Mar 29 22:22:13 i want to see a heat map of the average finger positions of million of users Mar 29 22:22:16 i can Mar 29 22:22:26 well, I can’t reach the bottom, or the top. Mar 29 22:22:31 but it might be biased a bit, due to the current UI/UX Mar 29 22:22:34 adq, wouldn't that depend on ui Mar 29 22:22:36 I can’t reach most things on the Moto G 2014 Mar 29 22:22:38 yes partially Mar 29 22:22:39 and while my hands aren’t as small as Someone With Tiny Hands, they aren’t huge Mar 29 22:22:48 on the 2013 I could reach most things, except for the status bar Mar 29 22:23:04 on moto g 2013 – which was far too huge at 4.5" – I couldn’t reach the status bar either. Mar 29 22:23:12 I can't reach the top of my 4.5" device with my hand Mar 29 22:23:15 maybe we would be surprises to see most of users are holding the phone in one hand and touching the screen with the other Mar 29 22:23:15 :)) Mar 29 22:23:19 the current phablets like the 5" moto g 2014 are impossible to use Mar 29 22:23:25 surprised* Mar 29 22:23:28 adq, yes, because they're forced to Mar 29 22:23:32 THIS Mar 29 22:23:56 I'm sad that my xperia mini pro died Mar 29 22:23:58 Especially with added touch sensors this has gotten pretty anoying Mar 29 22:23:59 sorry, the accent circonflex key is broken Mar 29 22:24:06 but everything dies eventually I guess Mar 29 22:24:08 so I can’t write that atm Mar 29 22:24:27 :^) Mar 29 22:24:46 Ah, now it works. Mar 29 22:24:55 I fucking hate Google Japanese IME for linux. Mar 29 22:25:04 constantly breaks input for everything Mar 29 22:25:24 Where can I find popular aid codes for HCE? Mar 29 22:25:33 ??? Mar 29 22:26:13 http://developer.android.com/guide/topics/connectivity/nfc/hce.html Mar 29 22:26:28 justJanne do you have any recent screenshots of your top level nav ? Mar 29 22:26:39 servers/ channels / users etc Mar 29 22:27:06 yeah i forgot nav drawer is kinda lousy landscape on small devices Mar 29 22:27:29 Well, I do! Mar 29 22:27:42 maybe what i will do , is have a nav item 'servers' that list those, and you can favorite some - and that will show in the nav drawer Mar 29 22:28:15 Sava, look into pcsc(-lite) sources maybe Mar 29 22:28:24 they should have all the famous AID Mar 29 22:28:39 (and ATR) Mar 29 22:28:48 I found MasterCard and Visa, can't find others Mar 29 22:29:08 problem is, often there are no "average" users. probably have a bimodal distribution where 50% will use one BT device, 50% many BT devices - and making a UI nice for both is really challenging Mar 29 22:29:28 well, this is a highly proprietary field, i'm not very surprised but you should find some huge list if you searc hbetter, maybe try some proprieraty products and see what they use too Mar 29 22:29:50 g00s: then add two different UI flows, and allow users to choose? Mar 29 22:30:49 UI flow is easy, its just that the whole information architecture of the app is optimal one way or the other Mar 29 22:30:56 its like unresolvable constraints Mar 29 22:31:00 g00s: http://i.imgur.com/ZuHzIbw.png Mar 29 22:31:07 oh thanks Mar 29 22:31:16 the icon shows being connected or not, and if it’s a channel or a person Mar 29 22:31:22 dot = person, dot with hash = channel Mar 29 22:31:44 yellow = connected, grey = away, grey circle with transparent fill = offline/left Mar 29 22:31:57 it’s the best solution we could find after asking hundreds of users. Mar 29 22:32:09 sure - ok so, those look like servers + channels - do you have any static navigation items, like 'Settings', etc ? Mar 29 22:32:23 well, yes – we had some discussion on that. Mar 29 22:32:30 that looks nice btw Mar 29 22:32:33 we tried static navigation drawer items, ones at the bottom, etc. Mar 29 22:32:37 looks clean Mar 29 22:32:45 in the end, the users preferred having them in the overflow menu Mar 29 22:32:48 I'm not sure I'd like that with my 90+ windows Mar 29 22:32:52 but it looks ok Mar 29 22:33:00 maybe too much padding between the yellow dot and the channel/nick name :p Mar 29 22:33:03 Zharf: I have currently 500 different buffers ;) Mar 29 22:33:10 justJanne interesting Mar 29 22:33:12 adq: that’s the exact padding the design guidelines specify Mar 29 22:33:16 damn Mar 29 22:33:22 so spacy Mar 29 22:33:42 g00s: but that might be just from our target group - which are (a) irc users, (b) who self-host a bouncer, and (c) have an android device Mar 29 22:33:48 I think drawer gets less usable the more it has to scroll, but I guess it works ok for your case Mar 29 22:34:01 ok i found something else, then Mar 29 22:34:04 Zharf: you can collapse networks and their subwindows ;) Mar 29 22:34:23 the yellow dot is up by few pixels compared to the bound of his text (channel/nick) on the right Mar 29 22:34:25 justJanne is anything collapsable in that list, or is it one level Mar 29 22:34:43 g00s: it’s server -> (channel|user), so only top level items are collapsible Mar 29 22:34:45 yeah i have to agree the yellow circle seems misaligned Mar 29 22:34:48 (as there is no third level) Mar 29 22:35:32 it's tricky with textview :/ getBoundSomething often works great Mar 29 22:35:40 edge <-> yellow is 16dp, edge <-> text is 72dp Mar 29 22:35:44 exactly as guidelines Mar 29 22:35:53 the circle is too small, but making it larger makes it too heavy Mar 29 22:36:04 justJanne hm, have you seen what NavigationView does ? Mar 29 22:36:10 hm? Mar 29 22:36:23 this is exactly the navigationview specs. In fact, this IS navigationview Mar 29 22:36:24 there is equal padding on left / right of the icon, probably 16dp Mar 29 22:36:41 yes, but the navigationview icon is 24dp, not 16dp itself Mar 29 22:37:02 ok, well seems like your users like it Mar 29 22:37:09 well, they don’t care. Mar 29 22:37:14 :) Mar 29 22:37:17 I personally dislike it, too, but the specs... Mar 29 22:37:19 yeah, very minor details Mar 29 22:37:26 it’s so much work to fix it Mar 29 22:37:46 which is crazy considered how flat it is Mar 29 22:38:00 justJanne I also thought, instead of having overflow in nav drawer like that .. to put two tabs, 'servers' '???' where ??? was shit from overflow like Settings Mar 29 22:39:03 well i guess you have a spinner there so that surely wouldn't work Mar 29 22:39:31 ah, yeah. Mar 29 22:39:33 yeah i like , thanks for sharing Mar 29 22:39:38 gives me some ideas Mar 29 22:39:41 we have the ability to let users sort items into custom lists. Mar 29 22:39:58 is that solarized color theme ? Mar 29 22:40:01 say, "work", or "only private messages", or "only channels with unread messages", or "only people I know from bowling" Mar 29 22:40:05 that’s what the spinner is for. Mar 29 22:40:09 and yes, that’s solarized Mar 29 22:40:20 all current themes in the tablet version (7"): http://i.imgur.com/SzybOam.png Mar 29 22:40:21 is that in a library somewhere, i like that too :D Mar 29 22:40:31 nope, all custom implemented. Mar 29 22:43:16 justJanne what libraries have you used so far ? Mar 29 22:44:07 https://github.com/justjanne/QuasselDroid-ng/blob/master/app/build.gradle#L143-L166 Mar 29 22:44:55 justJanne so is the nav drawer the materialdrawer library ? Mar 29 22:45:01 nope, it used to be Mar 29 22:45:13 now it’s just the designsupport one Mar 29 22:45:32 I’ll probably stop using jJ-StreamSupport and jJ-310 soon, and instead switch to abp-threeten and to jsr streamsupport Mar 29 22:45:45 that will also mean dropping jodatime Mar 29 22:45:46 oh yeah the big nerd expandable recylerview lib looks nice Mar 29 22:46:04 also, I use a custom fork of the umano AndroidSlidingUpPanel Mar 29 22:46:20 of https://github.com/umano/AndroidSlidingUpPanel Mar 29 22:46:35 has one change: the ability to tag elements as excluded from reacting to touch Mar 29 22:47:29 justJanne have you looked at the bottom sheet stuff in the support lib? seems maybe still a bit buggy though Mar 29 22:47:48 g00s: nope, and it doesn’t seem to be suited for my case. Mar 29 22:48:34 I have a separate Thread that adds or clears to my MessageArrayList. On my UI side, I use that MessageArrayList to put it into an adapter. Can I cause a ConcurrentModificationException this way? Mar 29 22:48:53 g00s: use case for the bottom sheet one: https://dl.kuschku.de/videos/device-2016-02-09-235359.mp4 Mar 29 22:49:22 eghdk: yes. Mar 29 22:49:36 eghdk: when you add an element to the list while you iterate over it. Mar 29 22:49:53 solution: use the observable collections from the android databinding lib Mar 29 22:50:01 justJanne: Iterate... as in when the adapter iterates to it? Mar 29 22:50:09 where’s the source for the compat libraries? Mar 29 22:50:16 eghdk: for example. Mar 29 22:50:48 i just want to browse Mar 29 22:50:48 So I should be able to use the synchronize keyword to solve this right? Mar 29 22:51:17 justJanne so in that video, you have 'Settings' kinda pinned down there like a footer Mar 29 22:51:28 g00s: yup, as I said, we tried every combination Mar 29 22:51:38 but pinning it takes too much space on landscape Mar 29 22:51:46 yeah Mar 29 22:51:53 settings + about means you end up with 3 items left Mar 29 23:01:13 justJanne is the nav drawer the only place which lists servers / channels ? Mar 29 23:04:45 s73v3r, in your SDK sources/android-[APInumber]/android/support Mar 29 23:07:39 g00s: yup. Mar 29 23:08:08 well, you can also navigate by clicking on irc:// link Mar 29 23:08:09 *s Mar 29 23:09:51 Which are automatically created when you mention a channel name, like ##politics anywhere. Mar 29 23:13:19 SimonVT: A while ago we talked about CME because I had a question going from an enchaned for loop to a regular for loop and my response was "the exception went away", but you had the better response and basically said that I might get weirdness like processing the same item twice and stuff. Mar 29 23:14:00 SimonVT: I'm starting a new project and my ArrayList that I use for my adapter is having stuff added and removed on another thread, what's the safest way for me to give my list to my adapter? Mar 29 23:23:35 I’m looking at ConnectivityManager and NetworkRequest. I’m not quite sure where one specifies the network one wants to join Mar 29 23:38:14 you guys are SOO right, having your own device rocks alot more compared to the emulator Mar 29 23:38:31 it's like the difference between a racecar and a sliding puke slowly dripping on the grouind Mar 29 23:44:47 guideX, try genymotion Mar 29 23:45:15 gd it lolcycle, I had exact same issue as described in http://stackoverflow.com/a/29464116/1373568 and his palliative works Mar 29 23:45:47 with the WifiConfiguration class, is it possible to tell the system that I don’t need Internet access, and to not fail over to another network just because the network I joined doesn’t have internet? Mar 29 23:49:31 I feel like android is remembering something from the last time I ran it Mar 29 23:50:41 I create a login guid, maybe I'm crazy, but it seems to remember a login guid Mar 29 23:50:50 am I just crazy? Mar 29 23:51:02 What do you mean with last time? Mar 29 23:51:09 Some stuff is stored, yes. Mar 29 23:51:26 what about variables at the top Mar 29 23:51:37 like private AjaxResultModel _loginResult; Mar 29 23:51:47 which is in my public class MainActivity extends AppCompatActivity { Mar 29 23:55:09 you're crazy Mar 29 23:55:12 learn java Mar 29 23:55:22 there is nothing android does that is not the same as java Mar 29 23:55:25 absolutely nothing Mar 29 23:55:30 (as the jvm) Mar 29 23:56:25 ah ok Mar 29 23:56:33 maybe a glitch for me somewhere Mar 29 23:56:44 I seem to pass the wrong loginguid at some point, my glitch it seems :) Mar 29 23:56:46 pfn: thanks Mar 29 23:56:53 it is always your glitch Mar 29 23:56:55 remember that Mar 29 23:57:18 well I'm in an unfamiliar language, there's more doubts than usual Mar 29 23:57:31 so sometimes, I might need a sanity check I guess Mar 29 23:58:33 man AS2.0 indexes huge projects really slowly Mar 29 23:58:40 what version of intellij is it based on? Mar 29 23:59:32 14.0 Mar 29 23:59:39 now to figure out what 1.5 is based on Mar 30 00:00:13 get ssd Mar 30 00:00:25 oh god it would be so awful if I did not have one already Mar 30 00:00:43 * pfn doesn't notice any slowness with indexing Mar 30 00:00:48 a little bit after updating dependencies Mar 30 00:02:24 huh they are both intellij 14 Mar 30 00:02:35 yeah, android studio sucks Mar 30 00:04:35 android studio is pretty good, I like it.. Mar 30 00:04:39 outside of the emulator Mar 30 00:04:57 it's very rare I'm able to start using an ide so quickly and relatively pain free Mar 30 00:05:43 I find that's the experience with most IDE Mar 30 00:06:18 typically, I am good with visual studio, plain text editors, and suck at all other ide's Mar 30 00:06:43 while I wouldn't say my code is good in android studio, at least the code makes sense, and I can understand it etc Mar 30 00:06:50 and it runs and stuff Mar 30 00:07:24 for instance, I have alot of problems with xaml/wpf/metro/universal dev etc because the mvvm and front end is so weird Mar 30 00:17:11 that has nothing to do with IDE Mar 30 00:17:48 I guess it just first time imports real slow Mar 30 00:21:03 missingno: yeah, that's true of all IntelliJ's Mar 30 00:21:39 Open a big project for the first time and the index will be slow, but subsequent indexes are usually pretty darn quick Mar 30 00:21:51 this index took like 15mins Mar 30 00:23:18 that's egregious, I would look at the disk in Activity Monitor (Mac) or Task Manager (Win) and see how what speed it's indexing at Mar 30 00:38:43 Hey Mar 30 00:39:57 I have a presentation entitled "Security in the Mobile Environment" and would like some tips and potential topics Mar 30 00:40:06 Can anyone help? Mar 30 00:42:46 i'm trying to find the android icon files and perhaps update it, how can i do this? Mar 30 00:42:56 its in bin Mar 30 00:43:14 bin? Mar 30 00:43:27 the bin directory assuming you are talking about Android Studio Mar 30 00:43:46 yea i have project open, not sure if i see bin dir Mar 30 00:44:16 I don't really know much about android so maybe I am mistaken Mar 30 00:44:23 how can the icons be updated or custom icons be incorporated? Mar 30 00:44:37 what icons Mar 30 00:46:17 like this https://thenounproject.com/search/?q=cuisine+menu&i=29536 Mar 30 00:46:33 so where should i put these files? Mar 30 00:46:42 png or svg file Mar 30 00:46:53 new->vector assest Mar 30 00:46:58 and then import it Mar 30 00:49:17 rgb-one: for network calls- * always use HTTPS. * Assume that an attacker has full access to the source code. So any client keys, API endpoints are all visible to them Mar 30 00:58:23 rgb-one: https://sites.google.com/site/droidnotsecure/home Mar 30 01:12:27 thanks vigilancer, will check it out Mar 30 01:12:51 this looks interesting http://www.informit.com/store/java-performance-companion-9780133796872 Mar 30 01:13:03 but doesn't look too applicable to android Mar 30 01:13:13 Any of you ever been hacked or downloaded malware on Android? Mar 30 01:13:33 or IOS, etc. Mar 30 01:14:11 i guess that stagefright POC is on github now Mar 30 01:14:35 i wonder how many people were never patched Mar 30 01:17:48 hi Mar 30 01:18:00 quick question Mar 30 01:18:31 I am unit testing the response body for an http get request Mar 30 01:18:47 I was wondering what is the best way to go about this Mar 30 01:19:25 anyone ever seen this before? Mar 30 01:19:26 FATAL EXCEPTION: main java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy when getting content provider settings Mar 30 01:20:56 http://pastebin.com/HKYdZZGE Mar 30 01:22:36 anyone? Mar 30 01:36:04 * [Saint] wonders why no one who works with the android sdk manager thinks it is problematic that it is virtually impossible to install anything but the _very latest_ built-tools Mar 30 01:36:13 <[Saint]> +in a headless environment Mar 30 01:37:02 <[Saint]> having to resort to hand-crafting urls via trial and error and dumping what I needed in there manually I found to be less than ideal. Mar 30 01:37:33 such is life friend Mar 30 01:37:48 if it can be improved, improve it Mar 30 01:40:56 <[Saint]> If there was a trivial path to supplying a pull request believe me I'd take it. Mar 30 01:43:00 harsukh: wue? Mar 30 01:43:04 que* Mar 30 01:44:35 I'm trying to figure out what the best way is to test a http get request and assert the response body is valid and what I am looking for Mar 30 01:45:01 harsukh: are you using retrofit? Mar 30 01:45:17 yes Mar 30 01:45:31 so wait, you want to mock out the service? Mar 30 01:45:44 or you want to test your response from the service? Mar 30 01:45:47 I don't really want to mock the rest service Mar 30 01:45:57 If I did that I would have used wire mock Mar 30 01:46:12 I'm just trying to test the response body Mar 30 01:46:31 whats the problem then Mar 30 01:46:38 it is tricky with live services because there might be minute information changes Mar 30 01:46:39 make the request, get the response? Mar 30 01:47:17 wouldn't it be easier to save a response to a file, then test against that static data? Mar 30 01:49:28 that makes sense Mar 30 01:50:07 so when you say mock out the service, that means I would make a fake service to assert that the way I am retrieving data is correct? Mar 30 01:50:09 harsukh: I use a custon okhttp3 Interceptor class Mar 30 01:50:25 oh, that's perfect Mar 30 01:50:56 if I set the interceptor to get the response body I can assert that against my actual retrieved response Mar 30 01:51:09 but then that wouldn't be a correctness test Mar 30 01:51:36 well why would you test the server? Mar 30 01:51:47 you're testing with your assumptions of what the server will return Mar 30 01:51:56 you're right Mar 30 01:52:08 I'm stuck in this circular logic can't seem to break it Mar 30 01:52:20 also how do you write tests for a constantly changing response? Mar 30 01:52:26 you can't really Mar 30 01:52:48 right you are Mar 30 01:54:56 so if I was mocking the service then I would just be testing the method of retrieval against a fake service right? Mar 30 02:02:31 RustyShackleford: are you there? Mar 30 02:11:55 justJanne just had an idea; i think i will try putting my list of things in nav drawer like you did, put having the sub - navigation stuff as a bottom sheet with the peek showing the critical things like Settings Mar 30 02:20:02 harsukh: basically yeah Mar 30 02:20:26 its more like testing if your app works correctly given this static data Mar 30 02:21:12 I see Mar 30 02:21:38 thanks so much Mar 30 02:21:48 do you use robolectric for testing? Mar 30 02:45:49 harsukh: just junit Mar 30 02:45:55 I'm really not an expert Mar 30 02:46:11 I just hapened to be solving a similar problem as you Mar 30 02:46:55 I'm working on my custom intercepter. Use the request to determine which response to return Mar 30 02:47:59 build your response object, read a file in as a string and set this as the ResponseBody, then return your specially created Response instead of making the API call Mar 30 02:49:33 thanks I appreciate it Mar 30 02:50:26 I'm going to try to publish some code of this on my blog as soon as I write a test Mar 30 02:50:35 In case anynoe ever gets the error: FATAL EXCEPTION: main java.lang.SecurityException: Unable to find app for caller android.app.ApplicationThreadProxy when getting content provider settings Mar 30 02:50:56 Check your Intent Extras, you might be passing something too large :/ Mar 30 02:51:05 lol Mar 30 02:51:32 Major pain to find, 2 lines of code to fix Mar 30 02:53:05 interesting Mar 30 02:53:14 were you passing large strings? Mar 30 02:53:21 in the intents? Mar 30 02:54:13 Well the culprit was an ArrayList of CustomObject Mar 30 02:54:29 and CustomObject was parcelable? Mar 30 02:54:38 those CustomObjects has many fields, some of which are Strings Mar 30 02:54:50 that’s the thing.. and I’m wondering if that’s what the root of the error was.. Mar 30 02:54:57 CustomObject is Serialiazeable Mar 30 02:55:04 (sp) Mar 30 02:55:45 do you think it might have had something to do with the you using serializable instead of parcelable? Mar 30 02:56:12 both are the same thing, but intents and bundles were made to handle the parcelable and serializable objects better Mar 30 02:56:27 sorry I meant just parcelable. Mar 30 02:56:28 because of “when getting content provider settings”… “ at android.os.Parcel.readException(Parcel.java:1431)" Mar 30 02:56:39 yeea Mar 30 02:57:02 interesting **** ENDING LOGGING AT Wed Mar 30 02:59:58 2016