**** BEGIN LOGGING AT Wed Dec 02 03:00:59 2015 Dec 02 03:17:12 o/ Dec 02 03:17:54 silence Dec 02 03:18:53 is that a command, or an observation? Dec 02 03:22:18 observation Dec 02 03:22:35 I dont have such a power, to give commands Dec 02 03:22:39 very astute Dec 02 03:22:56 and to be honest, I dont want such a power ;) Dec 02 03:23:01 so whats up? Dec 02 03:24:21 Hello Dec 02 03:24:23 I use Qt with NDK, And I want ask how I can get IMEI by C/C++ code for ome or more sim ? Dec 02 03:27:41 anybody experienced with Palette? Dec 02 03:32:17 i'm getting crosswalk errors like org/crosswalk/core/XWalkDialogManager.java Dec 02 03:32:17 Error:(62, 58) error: cannot find symbol variable xwalk_get_crosswalk Dec 02 03:32:27 does anyone know what's going on? Dec 02 03:33:00 AmR|EiSa: https://forum.qt.io/topic/31989/solved-fetching-the-sim-card-s-phone-number-on-android/3 Dec 02 03:36:08 gordon_: I will look at it. Thanks :). Dec 02 03:41:52 np Dec 02 03:48:40 I want to hide the action bar in a certain activity. I made a new style and gave it the parent "Theme.AppCompat.NoActionBar" and set that activity to have that theme in AndroidManifest.xml, but the action bar still appears. Dec 02 03:51:35 gordon_: Can I read environment variable like IMEI by qgetenv ? Dec 02 03:52:12 duncannz, just hide it with getSupportActionBar().hide() Dec 02 03:52:15 ? Dec 02 03:53:48 drinfernoo: nvm just realised I was adding style to wrong activity Dec 02 03:54:01 haha ok Dec 02 04:33:09 * g00s looks up at the sky and claims an asteroid Dec 02 04:35:44 Android doesn't support AWT Dec 02 04:35:56 oops Dec 02 04:36:46 How I can get Environment variables list ? Dec 02 04:43:26 CedricBeust, who you telling that? Dec 02 04:44:25 Somebody asking a question about at this many years ago Dec 02 04:44:36 Didn't realize my scroll back was way up Dec 02 04:44:44 s/years/hours Dec 02 04:47:13 Years. :D Dec 02 04:47:50 Time goes fast when you sip on Blue Label blended whisky Dec 02 04:56:36 indeed Dec 02 04:56:48 I restocked my liquor bar, yay Dec 02 04:57:05 picked up some camus xo, pretty cheap at this one market Dec 02 05:24:04 CedricBeust was reading the jigsaw stuff may delay java 9 release up to 6 mos Dec 02 05:24:23 Delay unsure but yeah Dec 02 05:24:55 thats ok; if they get feedback and make it right. better than rushed like generics ;) Dec 02 05:30:15 g00s: it may be delayed, but it must be released ;) Dec 02 05:30:50 I wonder whether we'll get Kotlin before Christmas. Dec 02 05:31:04 it's beta2 Dec 02 05:31:06 so probably Dec 02 05:44:27 Bah we already "have" Kotlin Dec 02 05:44:41 Any one use Qt ? I try use QCameraViewfinder But it's not working @Android I got black screen, Can I have any help abput that, I try get help in #Qt chan but I don't get any. Dec 02 05:44:42 Although it's true that a 1.0 might make a difference in terms of adoption Dec 02 06:17:39 AmR|EiSa: I dont think anyone uses qt here Dec 02 06:17:52 it would be better to ask on qt irc / forum Dec 02 06:18:34 CedricBeust: hopefully adaption will be good Dec 02 06:19:56 hopefully it will work ok with instant run, i think xavier said it should work "theoretically" ;) Dec 02 06:20:20 instant run... Dec 02 06:20:20 PRobably won't be for a while Dec 02 06:20:39 so this is why it doesnt work for me... Dec 02 06:20:54 (it works for resources) Dec 02 06:21:04 the language looks fun, i just want a smooth ride from the build tools ;) Dec 02 06:21:30 Working on that Dec 02 06:32:04 Hi, I have an arraylist of two fragments [Frag#1, Frag#2] for viewpager adapter. How do I swap them without deleting and recreating them? Dec 02 06:32:28 The viewpager should be able to reflect their updated position. Dec 02 06:33:25 Can "getItemPosition" help in this case? Dec 02 06:41:56 Even if I have used the resources in Java code, Lint still shows it in "Unused resources". Dec 02 06:42:22 For eg loading an image resource with Glide, it would still show the drawable as unused Dec 02 06:42:33 is there a filter i can add to the command? Dec 02 06:45:04 CedricBeust: still, future of android build system seems funny Dec 02 06:45:17 How so? Dec 02 06:47:54 buck, gradle, kobalt, bazel Dec 02 06:48:03 very basic question here. I tried changing the theme with the UX. It changes in the rendering window, but when i deploy to a device the appearance doesn't change. what am I missing? Dec 02 06:49:01 did you set it theme in manifest ? Dec 02 06:50:42 I don't understand peoples obsession with build systems, it feels like everyone has a minor problem with the existing ones and then writes their own because reasons. Dec 02 06:50:44 nope Dec 02 06:51:28 jonky: so set it in manifest Dec 02 06:51:36 yawkat, that tendency extends to pretty much every branch of programming Dec 02 06:51:38 yawkat: because it should be *fast* Dec 02 06:52:04 and it's not Dec 02 06:52:12 Maven is fast. Dec 02 06:52:19 hell no Dec 02 06:52:36 gordon_, so what does the theme selector actually do if it doesn't change the manifest? Dec 02 06:52:44 no idea Dec 02 06:52:47 havent used it Dec 02 06:52:53 jonky: I see very few, say, http libraries. Dec 02 06:53:18 gordon_ also Pants right ? Dec 02 06:53:23 jonky: iirc it changes how the designers displays the ui only Dec 02 06:54:21 ah, I forgot about pants Dec 02 06:54:26 havent used it thought Dec 02 06:54:31 *though Dec 02 06:54:34 yawkat, you see few http libraries? i don't follow Dec 02 06:55:08 jonky: I know of, like, 2 java http libs and there isn't one coming out every other week Dec 02 06:55:32 oh, i didn't realize you meant java-specific Dec 02 06:55:38 Contrary to build systems Dec 02 06:56:38 https://xkcd.com/927/ Dec 02 06:58:05 It just sounds like people think that the investment in a build system is small and decide that they want to be hip and make their own. Dec 02 06:58:41 Meh, it's a useless point. I'll be grumpy somewhere else. Dec 02 06:58:48 heh Dec 02 06:58:53 well yea. that's why we end up with so many languages, frameworks, databases, etc Dec 02 06:59:02 that and people want to pad their resumes Dec 02 06:59:08 yawkat i notice a lot of game developers always want to design their own engines Dec 02 06:59:26 people talk about technical debt often, but no one seems to talk about technical litter Dec 02 06:59:27 build systems so seem to be very popular choices for home made messes Dec 02 06:59:30 that and ORM Dec 02 06:59:38 *do seem Dec 02 07:00:02 orm is vietnam of CS, build is like cambodia or something Dec 02 07:00:21 :D Dec 02 07:01:05 * yawkat is happy that languages are hard enough to implement to not have this problem Dec 02 07:01:38 * gordon_ misses carmack in gamedev Dec 02 07:02:23 Nah we need him on the Oculus Dec 02 07:03:43 CedricBeust, are you saying you wish he was on the oculus or are you saying he's better off where he is on the oculus? Dec 02 07:03:44 I lost interest when facebook's bought Oculus Dec 02 07:04:17 gordon_: You're missing out Dec 02 07:04:30 jonky: We need him to make the Oculus great (which it already is) Dec 02 07:05:15 CedricBeust, yea, I just didn't know if you were aware if he was the CTO for oculus Dec 02 07:05:15 but i guess if you own one, then you probably know :) Dec 02 07:05:40 I am aware Dec 02 07:06:18 does carmack still think android is a pile of dung ? Dec 02 07:06:53 g00s, that was taken out of context Dec 02 07:07:48 g00s, jonky, linky? Dec 02 07:08:34 https://twitter.com/id_aa_carmack/status/508995929954086912?lang=en Dec 02 07:09:47 CedricBeust: I miss mr Carmack with shotgun and demons Dec 02 07:10:37 jonky he's said a few things over the years, i can't find them all Dec 02 07:11:02 http://recode.net/2014/09/20/oculus-cto-john-carmack-samsung-let-us-bypass-android-development-hell/ Dec 02 07:11:24 "“I’ve got a lot of negative things to say about the Android development experience… Some of them are fundamental,” Carmack said." Dec 02 07:13:50 interesting, not done much done C[++] on android beyond wrapping mplayer in JNI Dec 02 07:14:00 and that was a bugger Dec 02 07:20:09 g00s: thing about Carmack is... he's right most of the time Dec 02 07:20:28 I like watch his talks Dec 02 07:21:20 He forgot that it likly runs on every device once you fixed all the samsung-exclusive bugs :p Dec 02 07:21:50 i've been following his explorations into racket scheme (vrscript) Dec 02 07:37:19 g00s: he's built some rockets Dec 02 08:07:29 http://www.osnews.com/story/19266/WTFs_m Dec 02 08:07:36 sorry guys, just.. it's my 2nd week into android Dec 02 08:19:12 Hello freenode. Dec 02 08:19:26 and android developers. Dec 02 08:27:31 hello Dec 02 08:46:09 Hello Dec 02 08:57:44 Hello Dec 02 09:04:02 hey guys. I'm doing in-app purchases using the anjlab library. but when I try to make a purchase on the screen it says purchase complete but it executes onBillingError with ErrorCode 102 (invalid signature) Dec 02 09:04:26 I checked 100 times, the public license key is the same one as the one on the developer console Dec 02 09:04:45 also the product ID is correct, I copy-pasted it Dec 02 09:04:59 does anyone know what could be the problem? Dec 02 09:15:52 Also how can I test in-app purchases without uploading it to the Alpha Channel and waiting several hours to test? Dec 02 09:26:32 hi Dec 02 09:27:15 i have a problem in genymotion for running an app like game : unfortunely , "app name " has stopped Dec 02 10:06:20 why do we use newInstance() method in fragments? Dec 02 10:08:11 For creating, and setting, the arguments bundle Dec 02 10:08:36 What is the best way to display an image as a background in my theme? Dec 02 10:08:57 I get an OutOfMemory exception when i try and load the current image I have, and it crashes the entire phone Dec 02 10:09:22 All I did was put this in the styles.xml : @drawable/background Dec 02 10:10:28 why do we use newInstance() method in fragments?after configuration change can we have different layout.that is why? Dec 02 10:13:22 Ahraz, how big is your image? Dec 02 10:13:26 in pixels? Dec 02 10:31:27 hi Dec 02 10:31:31 I have a question about enabling IP forwarding on Android 5.X Dec 02 10:31:55 Here is a diagram with IP settings on the device: 172.16.1.1/24[eth0]<-Android->[wlan0]172.16.2.1/24 Dec 02 10:31:56 Ethernet eth_host1 has the IP 172.16.1.2 and a static route set to access the wlan0 network: "ip route add 172.16.2.0/24 via 172.16.1.1". Dec 02 10:31:58 Hello, I added apply plugin: "jacoco" to my build.gradle, but no report is generated Dec 02 10:32:03 Wireless wifi_host1 has the IP 172.16.2.2 and a static route set to access the eth0 network: "ip route add 172.16.1.0/24 via 172.16.2.1". Dec 02 10:32:06 what is wrong? Dec 02 10:32:11 ave enabled IP forwarding in the kernel, by doing: "echo 1 > /proc/sys/net/ipv4/conf/all/forwarding" Dec 02 10:32:18 I had to add a route on the Android device to enable connectivity with the ethernet network, as all traffic was exiting through the default route on wlan0: "ip rule add prio 100 from all lookup 100" "ip route add table 100 172.16.1.0/24 dev eth0" Dec 02 10:32:24 However, I cannot ping eth_host1 from wifi_host1 and vice versa. What could be the problem here? Dec 02 10:44:36 onResume() isnt called on every orientation change?! Dec 02 10:44:52 https://paste.kde.org/pvl0rgl9k Dec 02 10:45:04 https://paste.kde.org/pvl0rgl9k Dec 02 10:45:21 can someone help me with this question? Dec 02 10:48:28 are you going to ask it or just spam paste links? Dec 02 10:49:36 bankai, sorry paste it twice Dec 02 10:54:21 ttomasic, do you have root access? Dec 02 10:54:39 Number5: yes, I do Dec 02 10:55:59 than you're on your own. The problem is, Android is designed such that it allows only one adapter for connectivity. To overrule that, you need to dig deeper and modify stuff which Android wasn't designed for. Dec 02 10:56:44 what about tethering support? Dec 02 10:57:08 it obviously has support to forward traffic Dec 02 10:58:17 asddasd, what's your problem? You can do it both with activity or fragment. Just start and see where end. Dec 02 10:59:41 ttomasic, that's a feature built in the OS. What you want is hacking the Android and so you're on your own. Dec 02 11:01:45 :/ Dec 02 11:02:27 ttomasic, why not use a Raspberry Pi ;) Dec 02 11:03:21 Number5: yea, I'd prefer that, but the project I am currently working on is supposed to use Android as the platform Dec 02 11:04:58 ttomasic, say that after some research it's not possible to realise that, because Android isn't designed for that. Give some good arguments why it's not possible and you're done. Dec 02 11:06:56 It's like trying to built a web server with a computer from a washing machine. Dec 02 11:07:10 Number5: yes, that seems like the only option at this point. I just started working for this company and I am still a temp, so I was kinda hoping to pull a stunt like this and impress the boss. meh Dec 02 11:07:37 lol on the eashing machine paradigm Dec 02 11:08:19 I also managed to make Android do other stuff it's not supposed to do, got stuck with the part where it should be a router Dec 02 11:08:48 well, the requirements are there...linux kernel supports IP forwarding since version 2.4, you only have to enable a flag during runtime Dec 02 11:09:00 ttomasic, I understand and it's a good attitude too. But tell your boss it's close to impossible, or you have to dig deep and modify the OS. So to not waste your and you boss's time, try another project, which is better for both of you. Dec 02 11:09:52 yeah, you're right. thanks for the help :) Dec 02 11:11:22 ttomasic, I also did kind of that with Android before, which is awful, although it worked as far as I remember. The thing is, if you make a socket connection, through which adapter is the connection? Anyway, good luck. Dec 02 11:14:53 yeah, I tried sniffing traffick with tcpdump, but it doesn't register all packets for some reason Dec 02 11:28:40 Hello, I want to use gradle in the terminal, but it says that . is not a valid comman Dec 02 11:28:41 d Dec 02 11:48:19 Guys, 1 or 2? http://imgur.com/a/HQI2t Dec 02 11:49:47 Hello! I want to add listener on event "move to sd card" or "move to phone". Only way i found - listen package changes. But if i move app to/from sd i receive 3 package events: PACKAGE_REMOVED PACKAGE_ADDED PACKAGE_REPLACED in this order Dec 02 11:50:15 how to listen for app moved to/from sd event& Dec 02 11:50:17 ? Dec 02 11:54:55 drose379: 2 Dec 02 11:55:27 xgearx: erm? whats wrong with those events? Dec 02 12:12:33 Thanks Napalm Dec 02 12:12:52 the smaller text in bold is easier to read on the higher density screens. Dec 02 12:13:10 Actually 2 is bigger text with black color Dec 02 12:13:30 Top: 10sp, Gray. Bottom: 11sp, Black Dec 02 12:24:44 I'm trying to create a reasonable number of styles for some buttons, however if I have to create an unique asset for each button color, the number of styles is going to explode (and the number of drawables will increase as well). I would really like to use backgroundTint, however this isn't supported by pre-lolipop devices. Is there another way? Dec 02 12:27:45 ok guys, my new job is getting shadier by the hour Dec 02 12:28:39 so they told me they need te the app to track calls and sms from the employees using the phone and that's fine with me.. I know there are native android APIs to read the call log Dec 02 12:30:28 howerver, now they tell me I need to keep a log of sites that have been visited thru the phone browser Dec 02 12:31:36 Napalm: i need one event Dec 02 12:31:38 not 3 Dec 02 12:32:00 my question is : is there an Android API to know which websites have been visited? Dec 02 12:32:11 so i am not sure that i chose right way Dec 02 12:32:14 thats up to the browser -> no Dec 02 12:32:33 to listen move to/from sd card event Dec 02 12:33:04 xgearx: erm? just listen to one of them. the REPLACED package one.. then lookup the package info to test to see if its on SDcard or not Dec 02 12:36:18 what if I create my own makeshift browser? Dec 02 12:36:41 basically a webview with an input field on the top Dec 02 12:37:31 JFlash, then you have a webview nobody will use :p Dec 02 12:38:23 well the company will have to find a way to uninstall all available browsers Dec 02 12:38:38 probably they will have to root the device to get what they want Dec 02 12:38:40 you cant uninstall the stockbrowser unless you make a custom ROM Dec 02 12:39:40 also they wont care Dec 02 12:39:48 they just open store and install a real browser Dec 02 12:39:58 because webview sucks and so will your mock browser Dec 02 12:42:17 yeah they'd have to remove the store, but yes, I just tell them it's just not feasible Dec 02 12:42:34 I just wanted to make sure I was not missing something obvious Dec 02 12:42:42 thank you for the feeback Dec 02 12:42:49 how about data usage? Dec 02 12:42:50 JFlash, half of the internet will not work Dec 02 12:43:01 because webview sucks Dec 02 12:43:24 in recent android webview is basically chrome, afaik? Dec 02 12:43:36 no Dec 02 12:43:42 its the same engine. thats all Dec 02 12:43:46 what about internet data usage? any APIs to know that? Dec 02 12:44:26 google :> Dec 02 12:46:10 How do I get coverage for instrumentation tests? Dec 02 12:47:00 wait Dec 02 12:47:10 Browser.getAllVisitedURLs??? Dec 02 12:47:14 http://developer.android.com/intl/pt-br/reference/android/provider/Browser.html#getAllVisitedUrls%28android.content.ContentResolver%29 Dec 02 12:48:19 danijoo, !! Dec 02 12:49:10 content://com.sec.android.app.sbrowser.browser/history Dec 02 12:58:17 People, I can create an Eclipse like virgin project using android create project command in my terminal Dec 02 12:58:23 Any gradle love out there? Dec 02 12:58:45 Not sure what the question is? :) Dec 02 12:59:06 i think he wants to create gradle projects from cli Dec 02 12:59:09 Ah. Dec 02 12:59:23 I think there's no command-line thingy. Dec 02 12:59:41 Should be able to easily write a script that creates a bare minimum build.gradle and adds a gradle wrapper though. Dec 02 13:00:53 danijoo, what about this Dec 02 13:00:54 http://stackoverflow.com/questions/13137339/can-we-get-chrome-browsing-history-bookmarks-in-our-android-app Dec 02 13:01:02 they show how to do it Dec 02 13:07:21 JFlash, they removed Browser.BookmarkColumns in API 23 Dec 02 13:07:54 you can still use it if you know the strings you need, but it's not really supported Dec 02 13:08:16 it might work in the future, but it also might not work Dec 02 13:09:43 https://developer.android.com/sdk/api_diff/23/changes/pkg_android.provider.html Dec 02 13:11:37 oh right, someone commented about that on the answer Dec 02 13:17:59 I'm trying to declare a custom xml attribute for my custom view, however when trying to compile I get a compile error: "ERROR: In MyCustomView, unable to find attribute myCustomAttribute" Dec 02 13:18:23 As far as I can tell it's declared in the same way as other working custom attributes. Dec 02 13:24:06 Syzygy, nobody can help you :( Dec 02 13:24:31 I think I just found it... give me like half an our until this crap compiles -.- Dec 02 13:24:47 because no code :p Dec 02 13:43:50 Zharf, thank you Dec 02 13:53:34 question - why doesn't the youtube android api have a stop? Dec 02 13:54:09 there's no easy way to play only a specific part of the video right, with start/stop parameters Dec 02 14:01:47 is there a way I can kill the connection of the youtube player after a certain amount of load Dec 02 14:01:55 not saying release Dec 02 14:02:10 if i can kill the connection to the internet Dec 02 14:02:16 so it doesnt load anything extra Dec 02 14:06:52 sorry, was away from keyboard. I know about writing/copying build.gradle Mavrik Dec 02 14:07:11 Would have been lovely if I could setup project from cli Dec 02 14:08:09 how can i have the device kill my app in the background? without swiping it away from the recent apps list Dec 02 14:08:28 i want to check what happens to my app when i have a random activity open and have the app killed, then restart. Dec 02 14:08:58 i believe it should start at the previous activity, versus the launcher activity, no? Dec 02 14:09:15 osxorgate, there's a debug option for that Dec 02 14:09:17 "always kill" Dec 02 14:10:25 well that refers to activities, i believe? Dec 02 14:11:26 Yes, there's also a limit for background processes. Dec 02 14:23:28 Hello, I really need to get the test coverage of instrumentation test but the jacoco report always show 0%. What is wrong? Dec 02 14:25:41 did you enable test coverage in gradle? Dec 02 14:38:28 so, I need to either android create project and write a custom build.gradle or create the directory structure manually like a savage Dec 02 14:38:36 Way to go Google! Dec 02 14:38:50 Thanks Mavrik and #android-dev for the help Dec 02 14:39:06 Uga buga. Dec 02 14:39:08 :) Dec 02 14:39:19 We're all savages here :) Dec 02 14:40:43 Okay .. I really hope someone can help me. My wearApp project doesn't compile into my mainproject apk anymore ... I'm guessing since I introduced flavors to my project things got messed up. I've read http://developer.android.com/training/wearables/apps/packaging.html but I still can't get it to work again Dec 02 14:44:14 * Looney goes to write a script for bare-minimum project setup/creation Dec 02 14:45:00 if there's anyone with any knowledge of building wearable apps .. please PM me ;) Dec 02 15:13:19 Hello, I have a little question about beta testing on Android through the Dev Console if anyone has a moment. Dec 02 15:14:00 I'm looking to know whether SharedPreferences data saved on beta tester devices will reset automatically when they download a production APK, and if not is there a good way to reset the data? Dec 02 15:14:37 it does not reset Dec 02 15:14:43 Cevari, there's no "beta" or "production" APK. Dec 02 15:14:48 and cannot reset automatically Dec 02 15:14:56 Cevari, those options just control who gets an update to whatever APK you provide. Dec 02 15:15:11 So when you move to "production" it just means that all people will get the update to that APK. Dec 02 15:15:22 alright, so I guess I should go about it with some kind of firstRun variable that resets all SharedPreferences data to default values? Dec 02 15:15:30 Otherwise the process is governed by standard Android update which does not wipe data. Dec 02 15:15:54 or you could use sharedpreferences with different filenames prefs_beta.xml and prefs_production.xml Dec 02 15:16:23 Alright, thanks. I think I understand the process a bit better now. Dec 02 15:16:30 but if you 'move to production' in the console, there's no way to know in the application that it's "production" and not "beta" Dec 02 15:17:34 don't you typically deploy a new apk for production? Just use a boolean value for production or beta then.. deploying the same apk from beta and production doesn't seem good practice, should keep those seperated Dec 02 15:17:45 but I can just change the necessary values in the code so after updating the app knows that it needs to reset the values or switch to using different values Dec 02 15:18:00 yeah it's not going to be the same APK, just wanted to know whether this was something that would happen automatically Dec 02 15:19:16 DroidGuy, some people do, some don't Dec 02 15:19:37 we used alpha in one project for internal releases and then just 'move to production' when we deemed it was good enough Dec 02 15:20:00 Cevari, if it's not the same apk then sure, you can do what DroidGuy said Dec 02 15:20:43 Okay so i have a point in my app where i want to start a new activity. But, for a debug-purpose, i've set a Log message after the startActivity() method. It still executes the log, why does it do that? Aren't startActivity supposed to switch activity directly? Dec 02 15:20:43 yeah I'm pondering between a first run variable added in the production level APK or just using a static string that gets globally added to every sharedpref key value Dec 02 15:20:50 although, if users later use beta again, they'd end up using _beta sharedprefs... might need to copy from production sharedprefs to beta Dec 02 15:20:55 but the apk uses the same backend in beta and production? That's a rare case IMO.. but sure, everybody has their own build/release environment Dec 02 15:21:24 DroidGuy, not 100% sure but I think our current project uses it like that Dec 02 15:21:33 I haven't been involved in the release process Dec 02 15:21:40 our build/release environment is that we're two guys making their first proper app and trying to do it as well as possible :p still learning a lot of things Dec 02 15:21:50 we run beta for a few days before moving to production Dec 02 15:22:51 dersand, no, it's asynchronous pretty much Dec 02 15:23:35 Cevari: from my experience, you'll want to keep beta/debug/release apks seperated. Look at buildflavors for Gradle, they'll help you streamline the process of building different APKs without duplicating whole parts of your codebase. You can define which classes/code should be included in beta/release/debug builds Dec 02 15:23:43 I'm trying to set a custom attribute from xml like so: app:compatBackgroundTint="@color/ui_red", however when I try to retrieve the value in code, it's some large negative number (as opposed to a large positive one) Dec 02 15:23:52 dersand, otherwise you'd end up in weird situations where the execution would "halt" in an activity and it'd wait for the next activity to complete before being able to continue Dec 02 15:25:22 Cevari: this explains it pretty much http://blog.brainattica.com/how-to-work-with-flavours-on-android/ Dec 02 15:26:05 DroidGuy: thanks, I'll look into it. Dec 02 15:26:31 yw Dec 02 15:27:30 god damn it, I hate that compiling my app takes 2 1/2 minutes each time... Dec 02 15:28:58 someone commented on a thread about gradle's slowness "gradle is so slow so the emulator has enough time to start" Dec 02 15:29:08 I laughed out loud Dec 02 15:29:16 Syzygy: you can run gradle in server-mode, should speed up somewhat your build.. Dec 02 15:29:28 DroidGuy, doesn't significantly Dec 02 15:30:06 our gradle bulds locally vs on our jenkins buld server, have huge differences.. Dec 02 15:30:24 *build Dec 02 15:31:39 Also, this helped a lot: http://kevinpelgrims.com/blog/2015/06/11/speeding-up-your-gradle-builds/ Dec 02 15:32:09 DroidGuy: ours as well, on my machine the slow build version (< 21 API) takes 2 1/2 minutes. on jenkins 10+. Dec 02 15:32:47 I hope that is 10s and not 10 minutes on jenkins :p Dec 02 15:32:48 gradle builds here have a duration of random(0.1, 10) minutes Dec 02 15:32:54 that is minutes Dec 02 15:33:03 lol Dec 02 15:33:31 actually, I just checked. latest nightly is 6 minutes and 6 seconds Dec 02 15:33:34 do you persistently clear caches before every build? Dec 02 15:33:43 not on my machine Dec 02 15:52:54 hi, dl.google.com works fine. but dl-ssl.google.com is blocked in my place. I just figured out files hosted in dl-ssl.google.com is the same as dl.google.com. if so, why are there two hosts? I just don't get it. for instance: dl.google.com/glass/gdk/addon.xml is just the same as dl-ssl.google.com/glass/gdk/addon.xml Dec 02 16:58:21 is there any way to remove a file from the DownloadManager without it getting deleted? Dec 02 17:06:05 wow, took a long time connecting to IRC ... am i choosing a bad server O.o Dec 02 17:06:18 Freenode being ddosed again I guess. Dec 02 17:06:50 every time i connect, there are like 390 people here, so i figure i'm the last one or its just me :D Dec 02 17:08:26 heeey hey! Dec 02 17:08:29 finally! :D Dec 02 17:08:45 I have a quick question concerning Apache Http Client Dec 02 17:09:09 my app used to work fine when the URL I was using was http://somenoipdomain.com/sss/sss/ Dec 02 17:09:27 but now that I had to test things locally, it complains that "Host name may not be null" when I use 192.x.x.x instead Dec 02 17:09:39 need to specify http Dec 02 17:09:55 well, the first time it crashes is the HttpPost Dec 02 17:10:08 the library that gives HttpGet, HttpPost, etc... Dec 02 17:10:10 + may be unaccessible if not in same subnet Dec 02 17:10:19 my laptop is right next to me Dec 02 17:10:36 accessible from my 2nd computer and by extension from my tablet Dec 02 17:10:54 current URL: http:/192.168.1.137:8080/api/events/ Dec 02 17:10:57 whats your android ip address, id check that first Dec 02 17:11:01 previous http:/randomdomain:8080/api/events/ Dec 02 17:11:40 192.168.1.108, drpibb Dec 02 17:11:48 my network is very small :P Dec 02 17:12:27 I can connect to it with a browser, drpibb Dec 02 17:12:36 are u specifying http Dec 02 17:12:41 yeah Dec 02 17:12:47 try https Dec 02 17:13:10 it's a REST API server I made with NodeJS, https doesn't work Dec 02 17:13:43 hm Dec 02 17:13:43 it used to work just few days ago but with a domain name instead Dec 02 17:14:01 id try the domain again, definitely something changed Dec 02 17:14:08 the domain name got removed and now I want to test it locally Dec 02 17:14:23 I think it's a problem with Apache and local IP addresses Dec 02 17:15:05 http://stackoverflow.com/questions/18872585/android-how-to-make-get-or-post-http-request-using-url-with-an-ip-address-instea Dec 02 17:16:03 Hi! I've just started android development. Is there someone who has used the Parse SDK and can help me with ParseQuery? Dec 02 17:16:08 how can that ever work? drpibb? Dec 02 17:16:33 well ur not giving any code man.. im kinda at a loss Dec 02 17:16:37 the best answer was to remove the port, lol Dec 02 17:16:42 id check your paramters for post, etc Dec 02 17:16:47 alright Dec 02 17:17:03 it says: "Host name may not be null" Dec 02 17:17:24 at line: response = httpClient.execute(httpPost); Dec 02 17:17:54 again, it worked perfectly with a proper hostname but not with just an IP address Dec 02 17:18:01 http://pastebin.com/dmRYdx9Q Dec 02 17:18:13 i know that works because i had the same problem but mine was an http / https error Dec 02 17:18:33 well when i tested that above, it gets a 192 just fine so maybe ur params wrong Dec 02 17:18:44 here you go: drpibb: https://github.com/Nesh108/MCC-Calendar/blob/master/mobile/app/src/main/java/com/example/nesh/mcc_calendar/RestClient.java Dec 02 17:20:59 it is definitely the IP address the problem Dec 02 17:23:26 try setting the request.setURI with the ip address Dec 02 17:23:36 requestUri=new URI(Uri); Dec 02 17:23:46 request.setURI(requestUri); Dec 02 17:23:59 rather then the str8 HttpPut(Uri) Dec 02 17:28:54 drpibb: I had only 1 slash :/ Dec 02 17:29:07 lol dumbass Dec 02 17:31:15 anyone know if there's a setting I can change in AS to make the constructor the default first method in a class? Dec 02 17:33:31 danijoo, you around? Dec 02 17:34:06 maybe Dec 02 17:34:24 Couldnt get the menu burger working yesterday Dec 02 17:34:28 With the actionbar Dec 02 17:34:45 too bad Dec 02 17:34:49 Could you point me in the right direction, the docs didnt really help Dec 02 17:35:23 not if this is all you can say about whats wrong Dec 02 17:35:43 I tried a bunch of things yesterday but nothing seemed to work Dec 02 17:35:48 I forget, one sec Dec 02 17:36:11 just follow the docs. I found them pretty clear on implementing navigation drawers Dec 02 17:36:25 The nav drawer is there, I just need the button Dec 02 17:36:56 Yeah, I tried using the ActionBarDrawerToggle, but couldnt get the button to show up Dec 02 17:38:44 cant sense your code Dec 02 17:39:04 I had all the code written yesterday but ended up deleting it, I can re-write it now and try again Dec 02 17:39:09 Youll take a look at it? Dec 02 17:40:01 maybe Dec 02 17:40:11 depends on if im there then Dec 02 17:40:18 Ok, cool Dec 02 17:40:22 but there are also other persons arround :> Dec 02 17:40:29 Right Dec 02 17:43:45 danijoo, should I be using v4 or v7 AcitonBarDrawerLayout? Dec 02 17:46:14 ActionBarDrawerLayout is not a class Dec 02 17:46:26 I meant ActionBarDrawerToggle Dec 02 17:46:28 Sorry Dec 02 17:46:36 i wont answer that Dec 02 17:46:57 Ok Dec 02 17:46:57 because the docs do Dec 02 17:47:02 Heres the code im trying: http://pastie.org/private/hgykx4c6aqeo7qd28gdjig Dec 02 17:47:27 thats all of the code? Dec 02 17:47:40 I have that in my onCreate Dec 02 17:48:04 http://developer.android.com/intl/pt-br/training/implementing-navigation/nav-drawer.html Dec 02 17:48:29 Yeah, thats the Listen For Open And Close Events part Dec 02 17:48:33 theres more to do than 2 lines Dec 02 17:48:46 you need to sync state, enable home button and stuff like that Dec 02 17:48:52 Hi! I am trying to use an intent to go to another activity in a nav drawer onItemClicked but my app restarts and goes to the app I want to move to. Can someone please help me with this? Dec 02 17:49:07 danijoo, I feel like with what I currently have, the menu button should show Dec 02 17:49:17 *goes to the activity Dec 02 17:49:38 And doesnt enable home button show a back button Dec 02 17:50:06 your feelings are wrong Dec 02 17:50:15 my feelings are never wrong Dec 02 17:50:19 drone Dec 02 17:50:49 How will adding sync state show the menu button, it doesnt make sense danijoo Dec 02 17:51:25 drose379, did you call setHomeButtonEnabled(true)? Dec 02 17:51:30 Yep Dec 02 17:51:43 did you set HomeAsUp(true) ? Dec 02 17:51:58 Yes Dec 02 17:52:09 did you sync the drawer state? Dec 02 17:52:41 No, but setting homeButtonEnabled adds a back button Dec 02 17:52:50 Instead of what should be the menu button Dec 02 17:53:08 if you dont follow the docs, you cant expect it working. Dec 02 17:53:54 The docs tell me to pass the drawable menu icon into the constructor for ActionBarDrawerToggle Dec 02 17:54:07 But when I try to do that, it tells me its expecting Toolbar Dec 02 17:54:50 drose379, yeah the docs are for the old toggle. the new one dont need a res Dec 02 17:55:03 but beside that, its the all the same Dec 02 17:56:13 Ok I guess I dont know what to put in onPrepareOptionsMenu Dec 02 17:56:38 Should I create a menu resource with the menu button in it Dec 02 17:56:48 drose379, you should follow the docs Dec 02 17:56:52 not only parts of it. Dec 02 17:57:07 What they have in the docs for this method does not apply to me Dec 02 17:58:33 drose379, did you read up what syncState() does? Dec 02 17:58:59 Syncs the toggle state Dec 02 17:59:08 what does that mean? Dec 02 17:59:57 Tells whether the drawer is open or close Dec 02 18:01:07 Hey, theres the menu button :D Dec 02 18:01:27 did you add syncState? ;) Dec 02 18:01:54 :s Dec 02 18:01:56 YEp Dec 02 18:02:08 Please stop highlighting me if you cant follow the docs. Dec 02 18:02:38 Well we were talking about it yesterday Dec 02 18:03:30 yeah. I remember me telling you to follow this tutorial you didnt follow. Dec 02 18:03:58 Just missed that part Dec 02 18:04:19 no. You said you feel like its not neccessary without knowing it. Dec 02 18:04:40 Oh yes youre right Dec 02 18:04:50 Yeah, my bad Dec 02 18:07:14 Hi! I am trying to use an intent to go to another activity in a nav drawer onItemClicked but my app restarts and goes to the activity I want to move to. Can someone please help me with this? Dec 02 18:07:25 Yeah so.. dont highlight me if you feel like that again then Dec 02 18:08:06 Wont happen again danijoo, thanks for the help anyways Dec 02 18:09:26 kimuohs, click on the image link in the topic of the channel :p Dec 02 18:09:57 yeah, it sounds like your app is crashing in the onCreate or something Dec 02 18:10:05 what does the output of logcat say? Dec 02 18:12:15 java.lang.NullPointerException: Attempt to write to field 'android.support.v4.app.FragmentManagerImpl android.support.v4.app.Fragment.mFragmentManager' on a null object reference Dec 02 18:12:53 but my first two items on the nav drawer are fragments and the third item is an intent. Dec 02 18:13:29 so i'm not entirely sure how or why the fragmentmanager comes into play when i click on the item Dec 02 18:14:16 hello Dec 02 18:14:27 I have installed Android Studio 1.5 in Linux Dec 02 18:14:37 Where can I find the adb application? Dec 02 18:14:45 I'm using Debian Jessie 8.1 Dec 02 18:15:09 locate adb :) Dec 02 18:15:10 startActivityForResult() methods parameters. why do we use them? Dec 02 18:15:16 in terminal Dec 02 18:15:22 its part of the sdk Dec 02 18:15:25 not as itself Dec 02 18:15:43 intent carrys the data Dec 02 18:15:56 what about second parameter? Dec 02 18:15:58 s73v3r, here's the code. http://pastebin.com/KZhNcfJ4 Dec 02 18:16:39 error points to line 23 when i click the case 2 item. Dec 02 18:16:41 locate adb returns maybe a thousand results Dec 02 18:16:44 it’s because myFragment is null Dec 02 18:16:55 the method is still going to finish Dec 02 18:17:07 HelloAtMega, grep android ;) Dec 02 18:17:22 how do I tell grep to search only for those 3 chars? Dec 02 18:17:29 hum, let me try Dec 02 18:18:05 HelloAtMega, locate will give you all files with adb in it and grep will filter all paths out where theres no android in Dec 02 18:18:31 but you sould know where you installed the sdk to Dec 02 18:18:31 yeah Dec 02 18:18:34 I know that Dec 02 18:18:38 I already found it Dec 02 18:18:46 s73v3r, how do i solve this? sorry, I'm a newbie to android development. Dec 02 18:18:53 good to hear Dec 02 18:18:55 I also know there is a way of launching the adb application from anywhere Dec 02 18:18:58 it’s nothing specific to android development Dec 02 18:19:02 i don't want to use fragments for case 2 Dec 02 18:19:06 I need to add the path to somewhere Dec 02 18:19:12 android doesn’t mean you forget everything you’ve learned about other programming Dec 02 18:19:14 but I don't know how it's done Dec 02 18:20:38 you need to add it to PATH Dec 02 18:20:45 udemy android course is awesome Dec 02 18:21:32 kimuohs: How would you prevent the rest of the method from running on any other platform? Dec 02 18:21:55 danijoo, can you tell me how it's done? Dec 02 18:22:04 I'll note it down and I'll never ask again Dec 02 18:22:05 :p Dec 02 18:22:10 or how would you make sure that the rest of that section only ran if myFragment wasn’t null? Dec 02 18:23:43 s73v3r, by making another method for case 1 and case 2 when the fragments!=null and putting the FragmentManager there? Dec 02 18:24:01 *case 0 and case 1 Dec 02 18:24:01 that’s a way of doing it Dec 02 18:24:24 HelloAtMega, you can add it in your .bashrc file. google it Dec 02 18:28:59 Hi, links in my webview are not clickable below android 4.4, any idea why? Dec 02 18:29:28 Also, I wrote this snippet to read contact name phone number and email, is there a way to make it faster? https://dpaste.de/WRzT Dec 02 18:33:20 astroduck, why do you do Integer.parseInt(cursor.getString())) instead of cursor.getInt() ? Dec 02 18:34:24 danijoo: Haha oops, good catch Dec 02 18:34:59 anything besides that? Dec 02 18:35:24 Im not familiar with contacts api Dec 02 18:35:28 is it slow? Dec 02 18:35:37 no, it's just messy Dec 02 18:35:40 since it's just sqlite rows Dec 02 18:35:47 yeah, takes like 10 seconds for 150 contacts :( Dec 02 18:35:52 it's not slow Dec 02 18:36:14 if it takes 10 seconds to retrieve 150 contacts, you're doing something wrong Dec 02 18:36:54 Its a simple activity, read using that and dump it into arraylist Dec 02 18:37:14 `contacts` is the arraylist Dec 02 18:38:03 do{}.while(). havent seen this for quite a long time Dec 02 18:40:10 I'm a little confused about GCM Network Manager. I have to set setExecutionWindow for one-off tasks, but I only want my one off task to run when network is available. Does this mean that my task wont run past the execution window if network comes back? Dec 02 18:40:26 pfn: how long should it take tor read ~200 contacts? Dec 02 18:40:49 astroduck, like 100ms Dec 02 18:41:22 astroduck, for every query you do another query to get the emailCursor Dec 02 18:41:28 thats why its slow Dec 02 18:41:41 https://dpaste.de/WRzT#L32 Dec 02 18:41:42 naughty Dec 02 18:41:42 and one to the phoneCursor Dec 02 18:42:01 one more question Dec 02 18:42:24 I think you can combine this to one big query, cant you? Dec 02 18:42:33 not really Dec 02 18:42:41 when we install some apk, this file is not copied into the phone, right? Dec 02 18:42:43 but you can query all emails afterward Dec 02 18:42:48 in a single query Dec 02 18:42:50 yeah Dec 02 18:42:57 it is some uncompressed and then copied, right? Dec 02 18:42:59 but you can't join them Dec 02 18:43:01 thats what i meant Dec 02 18:43:04 not into a single query Dec 02 18:43:36 I will take a year for me to be a fully functional android dev Dec 02 18:43:41 hopefully by then android is still around Dec 02 18:43:50 what kind of stupid statement is that Dec 02 18:44:02 *It Dec 02 18:44:04 pfn: ? Dec 02 18:44:27 In the tech field, things change Dec 02 18:44:38 back in the days, it was blackberry Dec 02 18:44:53 blackberry was never a thing Dec 02 18:45:00 people used it as a phone, and that was it Dec 02 18:46:55 pfn: blackberry back in the days is the bomb Dec 02 18:46:59 like palm os Dec 02 18:47:47 :( blackberry was horrid Dec 02 18:48:27 HelloAtMega, it is copied in the phone, then decompressed Dec 02 18:48:34 fyi, I still like a physical keyboard Dec 02 18:48:35 :P Dec 02 18:48:40 remake htc dream Dec 02 18:48:45 with a better hardware specs Dec 02 18:48:50 the phone was fine, the dev was ugh Dec 02 18:49:13 never dev for blackberry so I don't know Dec 02 18:50:33 adq, and where is the decompressed data stored??? Is there any default/common folder where I can find the installed applications? Dec 02 18:51:28 That sounds like a wrong question to ask. Dec 02 18:51:38 depends on the rom, usually in /data/app but this does not seem relevant to android dev, you can ask in #android-root Dec 02 18:51:45 Why do you need that? Dec 02 18:52:16 I wanted to know how to uninstall default applications that I don't need Dec 02 18:52:29 this does not seem relevant to android dev too Dec 02 18:52:30 that wont work this way Dec 02 18:52:37 pm uninstall packagename Dec 02 18:53:27 some of the applications doesn't even have an uninstall option Dec 02 18:53:30 just deactivate or so Dec 02 18:53:45 what is the 'pm' command? Dec 02 18:53:46 That's because they're not removable. Dec 02 18:53:50 Is related to adb? Dec 02 18:54:21 you need root to remove system apps Dec 02 18:54:25 but thats offtopic Dec 02 18:54:46 I have root Dec 02 18:54:50 HelloAtMega: pm is package manager Dec 02 18:54:55 ok Dec 02 18:55:04 I'll join android-root Dec 02 19:05:32 How does an activity that was started by a call to startActivityForResult() return? How does an activity receive results after a call to startActivityForResult()? Dec 02 19:05:52 what is the difference between them Dec 02 19:06:03 asddasd, did you read the docs? Dec 02 19:06:23 i think both answer is onActivityResult() method Dec 02 19:06:34 danijoo, yes i did Dec 02 19:06:39 yes see http://developer.android.com/training/basics/intents/result.html Dec 02 19:06:58 you set the result intent and finish. Dec 02 19:08:45 i did not understand.i think both answer is onActivityResult() Dec 02 19:09:01 how can you not understand it Dec 02 19:10:20 onActivityResult is called after the activity started by startActivityForResult is finished, simple as that Dec 02 19:11:45 your sentence is too complicated Dec 02 19:12:24 I think english is the problem here Dec 02 19:13:40 asddasd, you call "setResult()" to set result and then just finish() on the called activity Dec 02 19:13:52 the result will be delivered to onActivityResult of the activity that did the startActivityForResult call. Dec 02 19:17:23 thank you very much Mavrik Dec 02 19:17:31 i eventually get it Dec 02 19:17:36 pfn: sorry I was away, so what you are saying is that I get all emails phone numbers and contacts in one go and then iterate over then in my code and don't create new cursors? Dec 02 19:25:56 of course Dec 02 19:26:16 doing hundreds of queries will be slow Dec 02 19:29:04 https://youtrack.jetbrains.com/issue/SCL-9575 Dec 02 19:29:06 hope they fix it Dec 02 19:34:52 please help me! Dec 02 19:35:25 I need to use some code that uses apache http stuff Dec 02 19:35:41 so I add this to gradle to make the compiler happy Dec 02 19:35:43 compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1' Dec 02 19:36:15 but after I did it , all classes are sufixed witht HC4 Dec 02 19:36:29 so HttpGet becomes HttpGetHC4 Dec 02 19:36:57 read the docs Dec 02 19:39:07 usesLibrary("org.apache.http.legacy") Dec 02 19:39:10 or something like that Dec 02 19:39:17 g00s: ? Dec 02 19:40:18 its android{ useLibrary 'org.apache.http.legacy' } Dec 02 19:41:00 danijoo: HAI Dec 02 19:41:06 just learned something cool Dec 02 19:41:13 hey thepoosh Dec 02 19:41:19 tried that but it only work with some specific build version of graddle Dec 02 19:41:31 danijoo: http://stackoverflow.com/a/34046538/1056359 Dec 02 19:42:22 JFlash, i guess this works since gradle plugin 1.3 or so Dec 02 19:42:46 how can I tell which version of graddle I'm using Dec 02 19:42:47 thepoosh, nice Dec 02 19:42:49 I forgot how Dec 02 19:42:51 yep Dec 02 19:42:59 JFlash, by reading your file obviously Dec 02 19:43:16 danijoo: that lets me shorten build times for dev while using analytics crappery on production Dec 02 19:43:39 I think I'm using 1.5.0 Dec 02 19:43:42 thepoosh, i use flavors for that Dec 02 19:43:52 I just downloaded Android studio today Dec 02 19:43:59 and ofc protify for dev :p Dec 02 19:44:17 i want to but my boss asked me to try this approach first Dec 02 19:45:20 seriously guys, I get this error Dec 02 19:45:41 unable to find option library: org.apache.http.legacy Dec 02 19:46:05 JFlash: is your targetSdk 23? Dec 02 19:46:17 seriously dude, read the docs Dec 02 19:46:21 yes Dec 02 19:46:28 removed in 23? Dec 02 19:46:35 like a baws Dec 02 19:46:59 s73v3r: which doc specificaly? Dec 02 19:47:09 for you? All of them Dec 02 19:47:12 JFlash, you shouldnt apply for jobs you are not qualified to do ;) Dec 02 19:47:57 hey thepoosh Dec 02 19:48:13 g00s: look at my link Dec 02 19:48:19 i think it's interesting Dec 02 19:49:15 danijoo: I will get it done without or without your help. I just want to get it done faster ;-) Dec 02 19:49:30 with* or without Dec 02 19:49:36 thepoosh can you post the link again Dec 02 19:49:42 cant find it Dec 02 19:49:42 then go do it. Dec 02 19:49:46 http://stackoverflow.com/a/34046538/1056359 Dec 02 19:49:47 oh. with this attitude its 'without' Dec 02 19:50:13 oh JFlash again haha Dec 02 19:50:18 ^^ Dec 02 19:50:35 g00s, today he wanted to log all browsed urls :p Dec 02 19:50:44 sup g00s Dec 02 19:50:56 yeah, not me the client. but I talked them out of it Dec 02 19:51:08 actually no we will do it Dec 02 19:51:34 JFlash since you like to work in areas you aren't qualified for (and bullshit your way into it) , you should run as republican presidential candidate Dec 02 19:51:38 if found it super shady to but I was baffled to find out that the system actually provides an API for it!!! Dec 02 19:52:36 g00s: yes I told here yesterday that me and DOnald Trump happen to have the same motto: "learn it on the job" Dec 02 19:52:47 g00s: what do you think? Dec 02 19:52:57 thepoosh still ... reading Dec 02 19:53:25 and we’ve told you time and again that it’s a shitty motto, and yet you still expect us to do your work for you Dec 02 19:53:38 you both seem to fail :p Dec 02 19:53:39 thepoosh uh, never heard of that trick before ... Dec 02 19:53:48 well now you do! Dec 02 19:53:56 thepoosh lol :D Dec 02 19:54:07 also, as you can see it's not well documented Dec 02 19:54:12 enough... Dec 02 19:54:14 thepoosh with plugin 2, instant run, etc - do you really need it ? Dec 02 19:54:31 I cannot use it as a solution until it's stable Dec 02 19:54:35 or at least beta Dec 02 19:54:41 my builds have improved quite a bit just using gradle 2.9 and gradle-plugin 1.5 Dec 02 19:54:51 and i failed yesterday to make it work for our project Dec 02 19:54:55 same here g00s Dec 02 19:54:56 how do i configure it? Dec 02 19:55:18 danijoo was 20 seconds to build now its like, 5-7 seconds - and thats on a core 2 duo with 4G ram ahaha Dec 02 19:55:21 g00s: i managed to shorten build times from 3.27 to 50 seconds Dec 02 19:55:33 impressive thepoosh :D Dec 02 19:55:40 yeah Dec 02 19:56:03 it was the move from eclipse styled libs folder to modules Dec 02 19:56:05 im still at 15s but i think thats kotlin Dec 02 19:56:26 kotlin doesn't take long to compile Dec 02 19:56:57 another compilation step to fire up though Dec 02 19:57:06 also im at dex limit Dec 02 19:57:15 yeah, dexing takes time Dec 02 19:57:18 no idea if multidex requires extra time for incremental build Dec 02 19:57:28 multidex takes a shitton of time Dec 02 19:57:29 i think the thing that slows down my project build the most is that i have 5 modules; it was much faster with 1 module :P Dec 02 19:57:34 unless you're minSdkVersion=21 Dec 02 19:57:43 danijoo: consider preDexLibraries Dec 02 19:57:44 I do Dec 02 19:57:47 set a build type/flavor to build minSdkVersion=21 Dec 02 19:57:49 and it takes less time Dec 02 19:57:58 luckily that won't be needed much longer Dec 02 19:58:26 my debug builds are SDKVersion 21 and my production builds are proguiarded Dec 02 19:58:45 thepoosh did you see from androidweekly https://medium.com/android-news/android-build-speed-up-ver-english-c76890aa610#.etyfkn53b Dec 02 19:58:53 21+multidex Dec 02 19:59:27 minSdk=21 kinda sucks because the tools won't tell you about APIs you are using that aren't available on lower versions Dec 02 19:59:53 does anyone have any advice on trying to split a model between data models fetched from the network and persisted, and a UI model sent to the views? Dec 02 20:00:16 somebody is getting bitten being too CLEAN Dec 02 20:00:36 me? Dec 02 20:00:41 hehe :D Dec 02 20:01:09 no, I’m more bitten by a model layer that’s been carried across 3 different backend overhauls, but not really changed to reflect anything new Dec 02 20:02:28 oh i thought you meant CLEAN DTOs and entities, etc Dec 02 20:02:58 i still develop like its 2010, mvp on android is kinda pita Dec 02 20:03:00 the model classes we have now are data that’s filled in by GSON, but they have a lot of interfaces, sometimes with methods that don’t always apply, but need to be there for the situations where they do Dec 02 20:03:28 partly because java’s type system sucks ass Dec 02 20:03:39 that is definitely true Dec 02 20:04:00 what's wrong with java's type system? Dec 02 20:04:14 lack of expressibility, especially with union types Dec 02 20:05:04 it’s quite difficult to simply say, I want an object which conforms to these interfaces. I don’t care what the concrete type is, it just needs to conform to these interfaces. and then put those in a list Dec 02 20:05:32 ah Dec 02 20:05:33 Foo implements interface1, interface2, interface3 Dec 02 20:05:40 List fooList :) Dec 02 20:05:44 nope Dec 02 20:05:52 (sorry, being a smartass) Dec 02 20:05:59 i have several different classes, foo, bar, baz, that could fulfill that criteria Dec 02 20:06:07 do bounded wildcards support that? Dec 02 20:06:15 not for collections Dec 02 20:06:24 hmm Dec 02 20:06:45 I don't think I ever hit that scenario Dec 02 20:06:51 or maybe I have... Dec 02 20:07:09 i don’t know if it is a common problem or not Dec 02 20:07:31 we are doing some screwed up shit with our app<->server communication Dec 02 20:09:54 so I’m thinking it might be better to leave the data models as just the fields we get from the server, and create UI models which can be built from different variations of this, and offer functionality specific to how it’s used in the UI Dec 02 20:10:30 s73v3r was just reading https://medium.com/@metabase/why-we-picked-clojure-448bf759dc83#.ih0q2kphh Dec 02 20:10:37 the language makes all the difference :D Dec 02 20:11:07 Java is the suck . i keep thinking i'm dumb because i can't elegantly express something in java, but i dont think its me Dec 02 20:11:10 instead of having to make our data models conform to interfaces that aren’t used in all situations, or might have methods that don’t apply to this model because some other model that implements the interface needs it Dec 02 20:11:31 rewrite your app in clojure :P Dec 02 20:12:11 haha Dec 02 20:13:25 if it does not belong to all models implementing the interface, it doesnt belong into the interface Dec 02 20:13:47 unfortunately, because of java’s inability to use multiple interfaces in a list, it has to be in that one interface Dec 02 20:14:20 otherwise there’s a lot of unsafe casting that goes around Dec 02 20:14:28 ah now i get it Dec 02 20:14:31 yeah. :/ Dec 02 20:14:38 i fortunatly never run into that case Dec 02 20:14:47 i hadn’t until i came here Dec 02 20:15:42 so I want to explore splitting up the models, and make some kind of UI model classes that would have stuff that reflects how the object is represented in the UI Dec 02 20:19:46 union types are pretty ugly to represent Dec 02 20:19:56 but type inference helps with that Dec 02 20:20:31 in any case, you can hack around it by creating an interface that extends the 3 you want Dec 02 20:20:59 interface UnionOf123 extends interface1, interface2, interface3 and implementing Union directly Dec 02 20:21:04 hi Dec 02 20:22:01 practically what a language with union types on the jvm would be doing under the hood Dec 02 20:22:12 i have some idea, is it possible to buil app that will cath some stream like youtube and expose it via usb like regular file? Dec 02 20:22:58 then should be possible by any phone with usb play content on tv via usb Dec 02 20:23:02 pretty indepth Dec 02 20:23:11 but im sure its possible Dec 02 20:23:22 hetii, no Dec 02 20:23:26 why Dec 02 20:23:37 because there's no way to do it Dec 02 20:23:39 so, no Dec 02 20:24:22 pfn: yeah reading all phone numbers and emails at the same time worked great <1s for +500 contacts Dec 02 20:24:27 why, it should be possible Dec 02 20:24:30 astroduck, of course Dec 02 20:24:52 well as far as i know usb storage functionality is already done on android Dec 02 20:25:58 amd if we use pipes/ fifo all bytes should be pushed to tv Dec 02 20:26:05 on most stock devices its not Dec 02 20:26:12 you probably can use some existing apps if you make that a regular file Dec 02 20:27:16 well i think that the file don't need to fully created. Dec 02 20:27:52 like even now were we can dowload mov ie anr watch it meantime Dec 02 20:28:21 you probably will have a hard time exposing pipes to the tvs Dec 02 20:30:13 hmm i see one blocker... android require unmount card before he attach it to host Dec 02 20:31:40 but if we could pass that limitation or write kernel driver that will act as usb storage Dec 02 20:31:50 you cant pass that limitation Dec 02 20:32:04 Getting a weird XML error: Dec 02 20:32:05 Error:(68, 39) No resource found that matches the given name (at 'layout_above' with value '@id/searchButton'). Dec 02 20:32:06 you can always mount it as media Dec 02 20:32:07 with some additinal network trunk thrn it shoul be possible Dec 02 20:32:08 especially not on application level Dec 02 20:32:21 If anyone is willing to look at my XML let me know Dec 02 20:33:14 Heres the XML: having an issue with the ScrollView Dec 02 20:33:15 http://pastie.org/private/sxhauw39mrdnrmvkcgbebq#64,68 Dec 02 20:33:31 ok i will try build such kernel driver for regular pc and if success then wr can think about porting it to a droud. Dec 02 20:34:26 What I have is inside of a RelativeLayout, why would layout_above not work Dec 02 20:35:04 add a + Dec 02 20:35:36 and see if that helps Dec 02 20:35:38 I thought + was for assigning and without + was for reading Dec 02 20:36:17 Damn, that works, so whats the deal with @id VS. @+id? Dec 02 20:36:29 order matters i guess Dec 02 20:36:55 So since the searchButton is below the SrollView in the RelativeLayout, I need the +? Dec 02 20:36:56 Weird Dec 02 20:37:31 i might be wrong Dec 02 20:37:34 but it works :p Dec 02 20:37:52 Yeah, it does work Dec 02 20:37:53 Thanks Dec 02 20:40:26 Is there an API level we should be aiming to be compatable with? Dec 02 20:40:32 Hi Folks. My app has an initial activity which does a couple of asynchronous jobs before loading a new activity which is a full screen webview. what's the best way to make sure ALL those tasks complete before loading the web activity? Dec 02 20:40:50 haha this is great http://artemzin.com/blog/android-development-culture-the-document-qualitymatters/ Dec 02 20:41:06 "It's time to fix Android Development." Dec 02 20:41:13 well, before you do that, you have to fix Android Dec 02 20:41:30 drose379, dont target below 16 is a good idea Dec 02 20:41:43 So NOT below 16? Dec 02 20:41:50 I was thinking I'd go with 17 Dec 02 20:42:31 theres nothing in 17 you cant support in 16 Dec 02 20:42:49 textAlignment Dec 02 20:42:59 re Dec 02 20:43:02 danijoo i think some rich notifications Dec 02 20:43:03 http://www.linux-usb.org/gadget/ Dec 02 20:43:28 i'm thinking about minSdk=19 now Dec 02 20:43:40 What about textAlignment Dec 02 20:44:42 if i'd plan something big (multiple month dev), i'd start with 21 Dec 02 20:44:44 https://commondatastorage.googleapis.com/androiddevelopers/api_diff/17.tar.gz Dec 02 20:44:45 Mass Storage Gadget ... implements the USB Mass Storage class, appearing to the host as a SCSI disk drive Dec 02 20:45:03 also 21 for anything thats not intended to earn money Dec 02 20:45:12 danijoo, do you have anything on the store Dec 02 20:45:40 g00s, this is still an interesting article. thanks Dec 02 20:46:03 yes, and no, i dont link Dec 02 20:46:21 pfn: I thought of doing the UnionInterface, but the problem is, there are a bunch of instances where it’s a different set, and so I’d quickly end up with Union1, Union2, etc Dec 02 20:48:22 If im going to have a min of 17, is there a certain screen size I should be looking at Dec 02 20:48:25 Like, min screen size? Dec 02 20:49:52 all of them Dec 02 20:50:09 Ok Dec 02 20:50:20 haa looks like this driver is already there Dec 02 20:50:23 http://www.linux-usb.org/gadget/file_storage.html Dec 02 20:51:34 hetii, i doubt you will get this to work on android Dec 02 20:52:18 s73v3r, it's java and par for the course Dec 02 20:55:07 on my propably not cause im sure that b e not able compile this module Dec 02 20:55:27 but for cyanogenmod should be pisible Dec 02 20:55:37 *possible Dec 02 20:55:49 sorry i type fron my mobile. Dec 02 20:56:20 hetii, kinda offtopic what you are trying then Dec 02 20:56:37 Are there really 2.7 inch androids out there today that are about API 17? Dec 02 20:56:59 yes Dec 02 20:57:22 Ha, alright Dec 02 20:57:32 there are lots of tiny shitphones for 100$ Dec 02 20:57:52 2.7 prob the smallest though? Dec 02 20:58:00 Hey I got my s6 for $50 Dec 02 20:58:02 Thats a hell of a deal Dec 02 20:58:24 if i say shitphone, I always include samsung in that :p Dec 02 20:58:43 Been fine for me so far :D Dec 02 20:58:55 danijoo then maybe it will be posible streaming content to tvs that have just usb otg capabilites Dec 02 20:59:56 also you don' t need to have phone with hdmi to watch some movie on big screen Dec 02 20:59:56 hetii, theres already a solution for that Dec 02 21:00:03 $50 outright, or $50 on contract? Dec 02 21:00:10 hetii, it's called a chromecast Dec 02 21:00:10 just get a chromecast stick or firetv and you can stream wirelessly Dec 02 21:01:00 sure, this day you can order a lot of different arm boards Dec 02 21:01:11 thats not the poin t Dec 02 21:01:28 not possible, not going to discuss further Dec 02 21:01:35 if you think it's possible, go do it Dec 02 21:03:04 ok, clear. Dec 02 21:07:08 has anyone seen a warning like this before and know what could be causing it? W/Ads: Could not load custom event implementation class: com.***.****.AdmobAdapter, assuming old implementation. Dec 02 21:07:49 easy fix, remove Admob! Dec 02 21:07:54 man i wish i had problems like that Dec 02 21:08:05 sounds like something you can ignore. Dec 02 21:08:18 since theres an old implementation ready Dec 02 21:08:21 well I can't, since I'm the author of the adapter :-) Dec 02 21:08:26 maybe old play service installed issue? Dec 02 21:08:27 Hey I'm new to android NDK development. Is there anyone who would be willing to help mentor me a little on the APIs? I have a lot of stupid questions. Dec 02 21:08:40 it works in almost all the apps that use it, except one... Dec 02 21:09:20 Exaeta realistically, you can ask questions - but getting mentored probably won't happen Dec 02 21:09:28 danijoo: I thought that too Dec 02 21:11:03 what if I pay? :) Dec 02 21:11:14 then you get kicked :p Dec 02 21:11:19 because of not reading the topic Dec 02 21:11:34 oh Dec 02 21:11:47 That reminds me. I still have yet to install the NDK, it's surprisingly complex to install. Dec 02 21:12:08 Arahael: it's not, you just extract the zip... the hard part is getting your program working with it Dec 02 21:12:45 Exaeta: Which .zip? Dec 02 21:13:28 http://developer.android.com/ndk/downloads/index.html actually it's a .bin, but it's a self extracting executable Dec 02 21:13:37 Exaeta: My first attempt pointed me to java. Which failed to get the JDK. It tried to install the web browser plugin instead. Second attempt ... And so on. Dec 02 21:13:48 Arahael: NDK or JDK? Dec 02 21:14:08 Exaeta: I wanted the NDK. But apparently the SDK requires the JDK. Dec 02 21:14:25 Exaeta: I couldn't even _find_ that page! Dec 02 21:14:32 Yes NDK requires JDK and SDK. Dec 02 21:14:55 but you need the jdk to do any android dev.. Dec 02 21:15:21 Arahael: I don't know how to install the JDK since I assume you're on windows. My system is linux and it was very easy to install it automatically... Dec 02 21:15:23 I initially installed the IDE thingy, but then found out it didn't contain the SDK. So many things to get. It's 2015, and I can't just type in a single command or run a single installer and get everything. Dec 02 21:15:44 Exaeta: I'm on mac os x. Dec 02 21:15:52 on windows, to install the jdk, you double-click it.. Dec 02 21:15:57 ouch Dec 02 21:16:35 danijoo: On mac, you try running the SDK. A little message pops up saying you need the JDK. You can dismiss it by hitting 'OK', or click on "More Info..." to then get sent to the java download. Dec 02 21:16:39 Mac is the worst platform for development. It shares the disadvantage linux has of not having a lot of users, but it doesn't benefit from the fact that about half of linux users are programmers. Dec 02 21:16:43 Arahael, no IDE on this planet includes the java jdk Dec 02 21:16:44 danijoo: Which turns out to be for the *browser plugin only*. Dec 02 21:17:02 Exaeta: Well, it does have an excellent brew. Dec 02 21:17:18 Arahael: linux has brew too :P Dec 02 21:17:30 Exaeta: I'm aware. :) Dec 02 21:17:47 Arahael: Until recently mac was just using old outdated versions of the linux tools Dec 02 21:17:55 "xcode" Dec 02 21:18:04 Exaeta, so it did the same debian does since ever? :p Dec 02 21:18:21 danijoo: True, but it's worse on mac, or was. Dec 02 21:18:25 Exaeta: How so? That's very much an over-simplification. Dec 02 21:18:44 Arahael: xcode bundled old versions of GCC and stuff. Dec 02 21:19:04 Exaeta: That's actually *really* common. Dec 02 21:19:06 Now I assume it's better since apple is behind LLVM/clang. Dec 02 21:19:14 Yes and no. Dec 02 21:19:16 gcc --version Apple LLVM version 7.0.0 (clang-700.1.76) Dec 02 21:19:34 who cares if its outdated if it works Dec 02 21:19:46 Clang has version 700??? Dec 02 21:19:47 and on apple most of the thing _just works_. Dec 02 21:19:50 Apple's LLVM is modified by apple. And tends to be a bit older. And yeah, as danijoo said - who cares. This is the base compiler. Dec 02 21:19:50 I'm waaayy behind Dec 02 21:20:12 I always miss my mac when it comes to development Dec 02 21:20:28 Clang is so much better than GCC now though Dec 02 21:20:33 Macs and linux are both very good for dev. Dec 02 21:20:37 yep Dec 02 21:20:46 I hate when I have to deal with GCC or libstdc++ Dec 02 21:20:55 Does anyone use Retrofit+OkHttp? How would I finish the current activity in an Interceptor if the status is "401 Not Authorized" Dec 02 21:20:57 I can't express my feelings about windows dev, though. Dec 02 21:20:58 i think windows is the worst for development, that why everybody provides binaries for poor windows people, building stuff is a major PITA Dec 02 21:21:15 (of course VS is nice itself, etc) Dec 02 21:21:19 clang has much less bugs in my experience Dec 02 21:21:24 and there is the fact that the STL is faster Dec 02 21:21:34 And clang supports more of C++14 Dec 02 21:21:50 g00s: Windows has way, way too many libc's, too. All incompatible. Dec 02 21:21:51 do you have to compile stuff on macs? Dec 02 21:22:00 i think i decided to get out of c++ when i read dinkumwear's stl code for std:vector Dec 02 21:22:11 squirrel: No, but many of us in #*-dev do, for obvious reasons. Dec 02 21:22:20 Apart from backwards compatibility with old code I see no reason to use GCC anymore. Dec 02 21:22:28 Oh and I guess intel TSX Dec 02 21:22:33 I don't think clang supports that yet Dec 02 21:23:22 * squirrel had no problems compiling stuff on any platforms it used Dec 02 21:23:35 squirrel you are neuter ? Dec 02 21:23:55 g00s: No, of course not. Don't be crass. Dec 02 21:24:00 g00s, hes a squirrel Dec 02 21:24:05 g00s: You don't refer to people as neuter or "it". Dec 02 21:24:05 O.o :D Dec 02 21:24:09 Where is a good reference for the C++ API for android? Dec 02 21:24:15 danijoo: He's a *robotic* squirrel, to be exact. Dec 02 21:24:27 I don't know any of the Java API so I'm looking for something that will teach me to build an app hopefully. Dec 02 21:24:29 but i'm a squirrel, not people Dec 02 21:24:43 Exaeta: then why are you looking at the NDK? Dec 02 21:24:47 Exaeta, you wont be able to build an app with only c Dec 02 21:25:02 ui is still java Dec 02 21:25:04 Exaeta: I'd stick with the Java and whatever UI framework android uses. Dec 02 21:25:08 Exaeta ndk is one of the crappier parts of android Dec 02 21:25:27 if john carmack thinks its a pain, then ... Dec 02 21:25:31 What things can be done in pure C++? Dec 02 21:25:45 Exaeta: You can do everything that the C++ standard library allows. Dec 02 21:25:51 i'd only use c++ if you are porting code between platforms and want to reuse Dec 02 21:26:15 or you had some c++ library that does something more efficiently outside of the jvm Dec 02 21:26:32 than what you can do in java; and there are plenty of cases for that Dec 02 21:26:34 Well that's one reason. But another reason I want to use C++ is that I'm very good at C++ and a total noob at java. Dec 02 21:26:43 Exaeta: Then learn Java. Dec 02 21:26:45 Exaeta no, thats not a good reason Dec 02 21:26:57 Exaeta: Regard Java as a very, very, very minimal, crap, subset of C++. Dec 02 21:27:31 (And sometimes that's a good thing) Dec 02 21:27:36 learn java, screw java, learn kotlin, build app :) Dec 02 21:27:37 All I know is that Java is like C++ with functions virtual by default and huge ram overheads and a sizable CPU overhead, plus garbage collection. Dec 02 21:27:50 danijoo the cycle of life :D Dec 02 21:27:57 if you mention performance at all, we will boot you Dec 02 21:28:02 Android's framework is all written in Java so it's best to learn to write your app in Java Dec 02 21:28:04 danijoo but you forgot ... profit; which may have been intentional Dec 02 21:28:15 unless you use some sort of game framework like Cocos2d-X Dec 02 21:28:23 You boot people for talking about performance? lol Dec 02 21:28:30 g00s, when I came here the first time, I was told theres no such thing as profit in android :p Dec 02 21:28:36 Exaeta: No, for being wrong about performance. Dec 02 21:28:45 you haven’t built an app, let alone even learned how to build an app. So talking about performance is absultely asinine Dec 02 21:28:49 Exaeta: You forget that the java environment is essentially *native*. Dec 02 21:28:57 danijoo well, there is if you are facebook or the 2-3 other apps people spend 99% of their time in :P Dec 02 21:28:59 I'm talking about 38 bytes overhead per string Dec 02 21:29:08 no, you’re not Dec 02 21:29:11 Exaeta: That's nothing. And they're probably interned. Dec 02 21:29:18 That's what I consider a huge overhead. Dec 02 21:29:20 Exaeta android strings are implemented natively Dec 02 21:29:28 people get so mad in IRC about the dumbest things... Dec 02 21:29:28 then you’re not cut out for android development Dec 02 21:29:42 g00s: ah, so it doesn't use the normal java string? Dec 02 21:29:46 no Dec 02 21:29:53 ok Dec 02 21:29:56 the normal Java string is implemented natively too Dec 02 21:30:25 So what about arrays of objects? Dec 02 21:30:26 who cares about a few bytes overhead? Dec 02 21:30:32 what time is it? 1995? Dec 02 21:30:35 does android compact that properly? Dec 02 21:30:40 YES Dec 02 21:30:42 or is there indirection? Dec 02 21:30:48 Exaeta JUST DON'T USE ENUMS Dec 02 21:30:50 No indirection for arrays of objects? Dec 02 21:30:53 lol g00s Dec 02 21:30:56 seriously, just go learn java Dec 02 21:30:57 g00s, haha Dec 02 21:31:02 Exaeta: The question is whether C++ does. You forget that malloc/free also has similar issues. Dec 02 21:31:21 Exaeta, you just join ##java and tell them. They will love to discuss this :D Dec 02 21:31:23 if and only if you find that there is a problem in your app, then you should look at native code Dec 02 21:31:23 Exaeta: And you can not defragment a fragmented C++ heap. Dec 02 21:31:23 Arahael: malloc/free is C not C++. Dec 02 21:31:29 java is easy part... the android sdk is hair pull out worthy Dec 02 21:31:35 Exaeta: What do you think C++'s new and delete uses, under teh hood? Dec 02 21:31:46 Arahael: whatever you want. Dec 02 21:31:59 Exaeta: You have completely missed the point. Dec 02 21:32:00 oh boy, overloading operator new :D Dec 02 21:32:12 Exaeta, there is nothing wrong to care about performance, but focusing on tiny detail prior to the big picture would divert you, especially if your use-case does not justify heavy computations Dec 02 21:32:37 In any case. Profile, profile, profile - then optimise. Dec 02 21:32:38 Well. I'm trying to develop a cross platform app. Dec 02 21:32:49 Exaeta yeah, if you are doing number crunching, ffts, or something, then c++ Dec 02 21:32:54 Sod I can upload beta to the google play store before releasing to public? Dec 02 21:32:57 ^ Dec 02 21:32:58 I don't want the core logic to be rewritten in Java AND C++. Dec 02 21:33:08 you’re still going to be writing the app in Java and Swift Dec 02 21:33:09 UI, stuff like that, anything android specific, I can do in java Dec 02 21:33:22 Exaeta: So don't. Do the UI in java. The business logic in C++. Dec 02 21:33:53 Though frankly, these days, I'm very tempted to do stuff in javascript, though I worry about performance there. Dec 02 21:33:59 Anything that must be done in Java or should be I will. But if there is a C++ API that is equivalent I'll prefer that. Dec 02 21:34:14 NDK for c++, ppl already told you Dec 02 21:34:14 there isn't Dec 02 21:34:31 Exaeta, thats nearly all of it Dec 02 21:34:35 and you will suffer if you are new to android dev :) Dec 02 21:34:43 at least for simple apps that consist mostly of GUI Dec 02 21:35:10 I already have NDK ready lol Dec 02 21:35:15 just trying to find a good API reference Dec 02 21:35:22 developer.android.com Dec 02 21:35:26 I found this: http://developer.android.com/ndk/reference/group___asset.html but it doesn't make much sense Dec 02 21:35:38 Arahael: why, its faster than Java in many cases, http://benchmarksgame.alioth.debian.org/u64/javascript.php Dec 02 21:36:08 or just about as fast in others Dec 02 21:36:10 bfrog: Even on iOS and Android? Dec 02 21:36:38 (shrug) that I dunno, you can't compare javascript to obj-c as easily Dec 02 21:36:47 bfrog: Sure you can. Dec 02 21:36:59 bfrog: But javascript is explicitly not JIT'ed, by design on iOS. Dec 02 21:36:59 JavaScript is awful >.< Dec 02 21:37:05 js looks slower than java in most of those cases Dec 02 21:37:10 bfrog, i see way more cases where its slower than faster Dec 02 21:37:28 5 times slower in most of thema ctually Dec 02 21:37:38 I can't even understand why anyone would want to use javascript Dec 02 21:37:48 at least use something like python that makes some sense Dec 02 21:37:59 ruby ! Dec 02 21:38:04 Exaeta: Because unlike python, Javascript works *anywhere*, and most languages can compile to it. Dec 02 21:38:10 danijoo Elexir! Dec 02 21:38:34 *Elixir Dec 02 21:38:36 Use Java then. It's simpler to work with that JavaScript. Dec 02 21:38:41 yeah like it or not, javascript seems to be taking over everywhere Dec 02 21:38:43 *than Dec 02 21:38:47 at least on the web it seems Dec 02 21:38:53 use kotlin, compile it to js or java :p Dec 02 21:38:55 * g00s embarrassed to mention reading node.js book Dec 02 21:38:57 barbs: only until the webvm comes out Dec 02 21:39:01 and is around for like... a decade Dec 02 21:39:16 I’ve got an app that renders camera frames to a SurfaceTexture. However, I want to generate repeated frames for onFrameAvailable to modify with OpenGL while the camera is disabled and flipping. How should I go about this? Dec 02 21:39:32 I mean, anyone can tell me what this does: alert((!![]+[])[!![]+!![]]); ? Dec 02 21:39:37 valid javascript Dec 02 21:39:38 Exaeta, https://www.youtube.com/watch?v=FqhZZNUyVFM :p Dec 02 21:39:44 no one cares, Exaeta Dec 02 21:39:49 no one is going to write that Dec 02 21:40:00 Exaeta: It pops up an alert. Dec 02 21:40:15 Exaeta still looks more clear than template instantiation error :P Dec 02 21:40:26 g00s: With SFINIAE! Dec 02 21:40:33 when bjarne is surprised at compiler output, then ... haha Dec 02 21:40:37 *SFINAE, rather. Dec 02 21:41:08 i have a soft spot for c++ though. i like that cassandra rewrite in c++ was 10x faster Dec 02 21:41:12 It gets you slapped by me, and gets your commit priviledges revoked Dec 02 21:41:13 sometimes, jvm - just sucks Dec 02 21:41:19 var s = (!![]+[])[!![]+!![]]; Dec 02 21:41:23 what does s become? Dec 02 21:41:24 I do like C++, actually. Dec 02 21:41:29 anyone? Valid javascript Dec 02 21:41:35 Exaeta: Who cares. Dec 02 21:41:39 #android-dev <---- hint Dec 02 21:41:42 It's the string "u" Dec 02 21:41:47 That's why javascript is stupid Dec 02 21:41:47 again, nobody gives a fuck, because no one is going to fucking write that Dec 02 21:41:49 why wouldn't you just write u? Dec 02 21:42:12 Exaeta: Why is that stupid? Can you explain how you got 'u' from there? Dec 02 21:42:26 !![] == true Dec 02 21:42:28 Exaeta: Hint: undefined, coerced to a string, is "undefined". Dec 02 21:42:34 var s = {} + [] // obviously s == 0 Dec 02 21:42:44 true + [] == "true" + "" Dec 02 21:43:00 "true"[!![]+!![]] Dec 02 21:43:02 Anyone wanna try out my apk? Dec 02 21:43:07 !![] == true Dec 02 21:43:11 Exaeta: no one cares Dec 02 21:43:14 Exaeta: Or that, indeed. Whatever, and who cares. Dec 02 21:43:16 true + true == 1 + 1 == 2 Dec 02 21:43:24 "true"[2] == "u" Dec 02 21:43:31 Someone kick Exaeta until he learns to listen? Dec 02 21:43:33 enogh now .. Dec 02 21:44:06 Arahael: you're the one who asked me to explain it Dec 02 21:44:09 Arahael: maybe we should learn to ignore...on that note how do you gag someone in IRC again? Dec 02 21:44:13 Exaeta: that's awesome Dec 02 21:44:22 Exaeta: It was a rhetorical question. Dec 02 21:44:24 Exaeta: I think I'm going to use that as an interview question Dec 02 21:44:58 omg don't Dec 02 21:45:06 i hope you're being sarcastic Dec 02 21:45:06 the only hirable answer is to say, “It gets someone slapped for being dumb enough to write something like that" Dec 02 21:45:07 ahhahaha Dec 02 21:45:07 Arahael: ask a dump question and get a dumb answer :) Dec 02 21:45:22 Anyway. Dec 02 21:45:33 barbs: I think I'm tempted to do it, but only as a joke Dec 02 21:45:41 My real motivation for javascript is to use it as an elegant way to get Haskell on it easily. Dec 02 21:45:42 hahaha Dec 02 21:45:44 my ice breaker Dec 02 21:45:53 hahaha Dec 02 21:45:57 as soon as they enter the room Dec 02 21:45:59 just grill them Dec 02 21:46:11 gotta keep em on their toes! Dec 02 21:46:23 grekkos: "Thanks for the interview, however, as nice as your workplace is, I don't think I could cope with the coding standards." Dec 02 21:46:33 Hi all! Trying to make a small minesweeper game. Got stuck with building the game screen. I want the game to be scrollable in both directions and the only solution that brought me close is gridveiew in scroolviewH in scrollviewV. what is the right way to do this? Dec 02 21:47:11 well we all know who to blame for the scourge known as javascript... https://en.wikipedia.org/wiki/Brendan_Eich Dec 02 21:47:29 Arahael: You're hired Dec 02 21:47:34 hahaha Dec 02 21:48:31 grekkos: Ha, you almost had me there. ;) Dec 02 21:51:38 Arahael: haha Dec 02 21:53:41 hello all. I have a question. I have two devices, lets call one device the server, and one the client. on the server device, the app that handles it needs to maintain an open tcpip socket between the devices even when the main user interface is closed. should I use a service to maintain this open thread communication? Dec 02 21:54:13 I meant open tcpip communication. Dec 02 21:54:14 PhoenixFyre cant Dec 02 21:54:21 use gcm Dec 02 21:54:37 gcm? what does that stand for? Dec 02 21:54:44 Google Cloud Messaging Dec 02 21:55:11 hmm. why can't I maintain a socket connection between two devices? Dec 02 21:55:29 you couldn’t guarantee that the service woudln’t be closed Dec 02 21:55:45 are you doing this over WiFi? Dec 02 21:55:52 mobile networks tricky Dec 02 21:55:53 yes, over wifi Dec 02 21:56:20 i think you could do it, but you’d have to account for the situation where the service is killed Dec 02 21:56:37 would the “server” device be under your control? Dec 02 21:56:41 Does anyone know any way to easily copy and repeat frames on a SurfaceTexture? Dec 02 21:56:51 PhoenixFyre in older versions of android, you could write a service that had a socket open, and the device would go to sleep. when a packet arriver, the device would wake up, and you could grab a wakelock to do work - but google is making that more and more difficult Dec 02 21:57:01 s73 yeah, I agree on that. but running the tcpip socket in a service is the best thing to do right? I wouldn't use an intentservice for this right? Dec 02 21:57:11 i think so, yes Dec 02 21:57:39 PhoenixFyre look at Nearby Messages, Nearby Connect (also) Dec 02 21:57:41 s73 ok. thanks for the help. I just wanted to verify this before I went and developed this. Dec 02 21:57:53 PhoenixFyre its not going to work well though Dec 02 21:58:06 what’s the reason for not using Bluetooth? Dec 02 21:58:29 you dont need reasons to not use bt :p Dec 02 21:59:06 i think it is possible if both sides know how to reconnect Dec 02 21:59:09 still, that does seem to be designed for their use case Dec 02 21:59:33 he didnt really say what the usecase is Dec 02 22:00:03 short range communication between two devices? Dec 02 22:00:22 can be anything from sending a ping to a 10 gb file or realtime communication Dec 02 22:00:38 which is why I said “depending" Dec 02 22:01:18 bt is too low bandwith Dec 02 22:01:33 ok Dec 02 22:01:35 PhoenixFyre yeah you should mention your use case Dec 02 22:01:41 sorry. Dec 02 22:01:54 yeah, bt at this time can't handle video streams. Dec 02 22:02:07 it handles data flow great, but large vid streams not so much. Dec 02 22:02:08 what about wifi p2p (if that wasnt mentioned already) Dec 02 22:02:11 ahhm yeah BT HS is not around yet :D Dec 02 22:02:21 wifi direct? Dec 02 22:02:30 wifi direct is nighmare Dec 02 22:02:42 g00s tell me about it. Dec 02 22:02:43 yeah it is ^ Dec 02 22:02:44 google doesn't even us it for Nearby Dec 02 22:02:47 :) Dec 02 22:02:49 PhoenixFyre, http://developer.android.com/intl/pt-br/guide/topics/connectivity/wifip2p.html Dec 02 22:03:06 but still even with wifi p2p, I still need something on either end maintaining the open socket right? Dec 02 22:03:58 yeah. You'd need a service for that Dec 02 22:04:03 not intentservice Dec 02 22:04:11 daniele_athome yeah, a service. Dec 02 22:04:36 danijoo I meant. Dec 02 22:05:20 thanks guys for the advise. always helpful as ever. Dec 02 22:05:20 yeah you would need that Dec 02 22:08:03 another satisfied customer ! Dec 02 22:19:28 hm.. this is a weird one.. http://crashes.to/s/5882c16ab6e Dec 02 22:23:58 danijoo forgot to unit test :P Dec 02 22:24:17 you should be doing more MVP and daggering and unit testing ! Dec 02 22:24:35 this will make webview reappear on the customers phone? :p Dec 02 22:24:51 OEMs heavily modify webview if i recall Dec 02 22:25:21 yeah im just wondering. I doubt they rename the class so no app can open webview Oo Dec 02 22:25:37 also its accross multiple oems and devices. only common is Android 5 Dec 02 22:30:49 How do I get all available plugins in Android Studio? Dec 02 22:31:27 For instance, I went to install the plugin "Rearranger" that is available with a simple search using IntelliJ IDEA but it does not show up when I search plugins in Android Studio Dec 02 22:31:40 install manually Dec 02 22:31:50 Android Studio 1.5, IntelliJ IDEA 15.0.1 Dec 02 22:32:30 danijoo, I know I can install manually, but that doesn't check for updates and I'm pretty sure manual plugins don't merge with new versions of AS Dec 02 22:32:57 if they work on intellij, they most likely work on AS Dec 02 22:33:25 I know, why isn't it showing up when I click "Browse reposiories..."? Dec 02 22:34:08 I guess its not the same repo Dec 02 22:34:51 I see an option to add a repo. I guess my question is, how can I add the repo Dec 02 22:35:22 by using the option to add a repo that you saw :p Dec 02 22:36:47 okay, but what should I enter? o.O Dec 02 22:37:09 surf2b1 if the plugin is for IDEA 15, it won't show up in AS 1.5 Dec 02 22:37:54 no idea what the path to their repo is Dec 02 22:37:58 g00s, that plugin has been available since IDEA 12 at least Dec 02 22:38:08 you can google it or sniff the traffic Dec 02 22:38:35 Gah. Dec 02 22:38:39 FU proguard. Dec 02 22:39:24 hi, I'm trying to run instrumentation tests, and it works if I explicitly list the test classes, but not otherwise Dec 02 22:39:28 so this works: adb shell am instrument -w -e class im.tox.toktok.app.MainActivityHolderTest im.tox.toktok/android.test.InstrumentationTestRunner Dec 02 22:40:56 but it does not work without the -e class ... flag. according to http://stackoverflow.com/a/9067493 the test classes should be called *Test, which is the case, but it is still not detected Dec 02 22:41:45 So question about the JNI.. is it ok for me to create a namespace called "java" or would that conflict with anything in the JNI? Dec 02 22:42:23 Exaeta: a C++ namespace? yes, that's fine Dec 02 22:44:18 I just... wouldn't. Dec 02 22:44:34 It sounds like something that would collide with possible other libs. Dec 02 22:45:06 g00s, my bug: https://code.google.com/p/chromium/issues/detail?id=506369 Dec 02 22:46:51 iphy Ok thanks, I'm trying to wrap the JNI interface in something more C++ stylish. It's a very C-like API atm. Dec 02 22:47:01 How do I use AS 2.0 live preview? Can I use it on my phone? Can I use it in RecyclerViews? Dec 02 22:47:27 explodes_, i didnt get it to work and know nobody who did :/ Dec 02 22:50:04 to get it to work , you must follow the exact steps dave burke did on screen Dec 02 22:50:12 ok. anyone know what the green circle on the run button is? Dec 02 22:50:31 g00s: do you by chance have a link to that video? Dec 02 22:51:03 g00s, you mean open the video in fullscreen and pretend clicking? Dec 02 22:51:25 https://www.youtube.com/watch?v=AefJXhCxrK8 maybe- Dec 02 22:52:13 What is the difference of "AttachCurrentThread" and "AttachCurrentThreadAsDaemon"? Dec 02 22:55:56 Oh, this explains how to use Instant Run http://tools.android.com/tech-docs/instant-run Dec 02 22:56:01 I'll let you know if it worked Dec 02 22:57:53 undefined reference to '__cxa_thread_atexit' androidtest3.cpp :s Dec 02 22:58:18 Hey, has anyone ever come across thie error? Dec 02 22:58:21 java.lang.UnsatisfiedLinkError: Couldn't load gnustl_shared from loader dalvik.system.PathClassLoader[DexPathList[[zip file ... Dec 02 22:58:22 is there a reason to pass a context to a View/ViewGroup’s method, considering a view has a context given to it in the construtor? Dec 02 22:58:40 activity context I think Dec 02 22:59:08 i believe it is an activity context, yes Dec 02 22:59:29 it would make sense that it would refer to the context of the activity which is controllign the view rather than the application contect who could be controllign many views Dec 02 22:59:38 you might have a r.id.text1 in many places Dec 02 22:59:40 only my guess Dec 02 22:59:50 in this case, the context is being used to load up resources. animation resources Dec 02 23:00:03 in that case there is no reason Dec 02 23:00:16 then that animation wil be done on the UI thread of the activity Dec 02 23:00:23 only if for whatever reason you need an actual application context would it be important Dec 02 23:01:00 ok. there appear to be some crashes related to a fragment trying to pass getActivity() to the view as a context, and that’s null. Dec 02 23:01:23 I usually pass Activity parent = this; through Dec 02 23:01:26 and use parent in the fragment Dec 02 23:01:36 I’ll work on why it’s trying to animate a view while detached from an activity, but also remove that parameter from the methods Dec 02 23:02:52 anyoen knwo about “java.lang.UnsatisfiedLinkError: Couldn't load gnustl_shared from loader dalvik.system.PathClassLoader[DexPathList[[zip file .. “ ? Dec 02 23:03:01 I have some funky jar dependencies I’m tryign tp pull off Dec 02 23:03:21 Jar B depends on A, A nd B are included in project P Dec 02 23:03:33 B needs to access objects in jar A Dec 02 23:03:37 inside project P Dec 02 23:05:32 s73v3r: try passing getContext() instead Dec 02 23:05:54 s73v3r: oh, yea, or eliminate the parameter Dec 02 23:06:08 that’s what I’m gonna do Dec 02 23:06:25 "android.test.InstrumentationTestRunner completing with 0 tests" <- my problem, but the solution here does not work: http://stackoverflow.com/a/9193641 Dec 02 23:10:52 Has anyone here used AdWords app campaigns? I just made a new app and want to give it an initial boost, it's not in a very crowded market but appears about 15 down when searching for its title even below completely unrelated apps. How much can I expect to spend per install (CPA)? Dec 02 23:11:08 or are there any other ways to give an app an initial boost? Dec 02 23:29:46 God the NDK sucks... why is it sooo hard to get thread_local storage working :/ Dec 02 23:31:16 What is the difference between using an Intent object with startActivity() or sendBroadcast()? Dec 02 23:31:33 Exaeta also what i hear is bionic sucks Dec 02 23:46:55 oh ok so apparently the android linker doesn't support thread local storage. :/ Dec 02 23:51:26 do you guys use intel xdk to develop apps? Dec 02 23:51:57 Android Studio run (with the latest gradle) fails on ":app:transformClassesWithDexForProductionDebug" with no stack trace. Running the root command "./gradlew :app:assembleProductionDebug" from the terminal works just fine - Any tips? Dec 02 23:52:45 Or, is there an easy way to enable stack traces on that green Run button? Dec 02 23:54:14 All google results mention multiDex which I'm not using anywhere Dec 02 23:54:52 (Also, Android Studio 2 gradle autocomplete! Finally!) Dec 03 00:08:15 how does a view know if it’s currently on screen or not? Dec 03 00:10:10 Where is a good sub on reddit to post an apk to get feedback? Dec 03 00:10:58 Maybe /r/androidapps. Not sure. Dec 03 00:11:34 Hmm Dec 03 00:12:11 What about a good free file host service where I can host the APK and link to? Dec 03 00:12:25 So that the redditors wont be sketched out by some shady file host service that I link to Dec 03 00:12:43 could post in play store ;) Dec 03 00:13:00 Hey slow down man, thats next Dec 03 00:13:13 there is a product thing u can give people access via email Dec 03 00:13:16 in google play store Dec 03 00:13:21 beta testing Dec 03 00:13:24 Right Dec 03 00:13:25 Hmm Dec 03 00:13:29 Maybe Dec 03 00:14:25 Check it out drpibb https://www.reddit.com/r/androidapps/comments/3v7qr8/dev_pet_adoption_application_android_looking_for/ Dec 03 00:14:59 lol Dec 03 00:15:01 drose379: Check the rules. :s Dec 03 00:15:07 "Do not post apk's or link directly to apk's" Dec 03 00:15:10 Shit Dec 03 00:15:17 Deleting Dec 03 00:15:25 My "Not sure"s are always strategic. Dec 03 00:15:58 Well I deleted it, people shouldnt be able to see it anymore right? Dec 03 00:16:30 I'll just write a short description and thatll be fine Dec 03 00:17:10 Yeah. Dec 03 00:23:54 In my native library I call RegisterNatives( jniEnv, class, methods, numMethods ) so that I can refer to C functions from my java class without making specially-named functions on the C side (i.e., my C functions aren’t called things like com_my_domain_myclass_myfunction(), but instaed just myfunction() ) Dec 03 00:24:52 Now I want to call the same C library from two different java classes. Previously I’ve been hardcoding the name of my java class in a C header so I know what string to pass to RegisterNatives for the class name during JNI_OnLoad(). Dec 03 00:25:40 Is there a good strategy for writing a C library that can be used from an arbitrary Java class and register natives from, e.g., whatever class called LoadLibrary? Dec 03 00:26:06 Or do I just need to tie the native library to a single class and use that everywhere? Dec 03 00:26:37 does anyone here know if its possible to intermix plain views and fragments in a pageradpater? Dec 03 00:31:09 Pyuruku, if I understand what you want to do, "yes, but now how you think". Dec 03 00:31:42 Pyuruku, you'd make one view, probably a relative layout, which is your pageradapter view and expanded for all entries Dec 03 00:32:43 Pyuruku, it holds a fragment and a standard view, and then when you expand it / assign it to a new entry, you set visibility to view.gone on the one you don't want Dec 03 00:33:44 or, tldr, you should only be using one view in a pager/recycler, but that view can hold multiple child views and you can hide/show them Dec 03 00:55:00 Kotlin has new forums: https://discuss.kotlinlang.org/ Dec 03 00:55:24 Was wondering when they'd get rid of their dinosaur implementation. Dec 03 01:07:01 Hi can anybody help me with this over teamviewer maybe? Dec 03 01:07:09 https://www.eclipse.org/forums/index.php/m/1716322/#msg_1716322 Dec 03 01:13:03 Pietia: Just use Android Studio. Dec 03 01:13:44 I will someday I just need to get it compiled under eclipse. Dec 03 01:14:37 no time like the present Dec 03 01:15:21 Is importing much projects and libraries to android studio is easy ? Dec 03 01:15:40 yes Dec 03 01:15:49 Pietia: the gradle build system was adopted partially to solve that exact issue :) Dec 03 01:16:22 If you want to make a multiplayer game, can you handle the connections yourself and is there a better way to do it? Dec 03 01:16:32 Like connecting, refreshing, etc.. to your own server Dec 03 01:16:33 ? Dec 03 01:18:30 as opposed to what? Dec 03 01:18:45 i dont know Dec 03 01:20:05 Node.js Dec 03 01:20:13 totally depends on the game...if it were turn-based you could probably get away with doing one-off calls, and there are libraries that facilitate that Dec 03 01:20:20 as for real-time games I'm not really sure Dec 03 01:20:22 i think you have to do it all yourself Dec 03 01:20:48 one off calls? Dec 03 01:21:05 how is the data transmitted without your own server Dec 03 01:21:45 does google provide servers for basic communication between devices? Dec 03 01:21:47 so you handle your own connections and stuff, alright Dec 03 01:22:01 as far as i know Dec 03 01:22:09 Bubo look at GMS Nearby Connections Dec 03 01:22:16 alright Dec 03 01:23:04 What about GCM? Dec 03 01:23:06 gms or gsm Dec 03 01:23:25 https://developers.google.com/nearby/?hl=en Dec 03 01:23:35 GPS? Dec 03 01:23:38 :D Dec 03 01:23:46 oh looks interesting goo Dec 03 01:23:49 i wouldn’t use GCM for real-time multiplayer games Dec 03 01:24:00 but only works if in proximity Dec 03 01:24:02 no guarantee of delivery, or order of delivery Dec 03 01:27:11 the best way would be to have your own server and handle everything yourself Dec 03 01:27:23 Do you guys hire designers to design your apps? Dec 03 01:27:31 Or do you do both Dec 03 01:32:50 always depends on your budget Dec 03 01:32:57 if you have money for a designer, then hire one Dec 03 01:33:49 OK Dec 03 01:41:37 depends if you are good at design Dec 03 01:52:42 njcomsec, are you good at design? Dec 03 01:54:39 i am decent at coding, and graphics, equally, but not amazing at either Dec 03 02:37:53 Is there a way to add elevation in a custom drawable Dec 03 02:38:04 Like the cat background here: https://i.imgur.com/yU9T7Nh.png Dec 03 02:38:10 By custom drawable, I mean XML Dec 03 03:00:19 The SDK takes up 20-freaking-GB!? Dec 03 03:00:40 Ok why would changing the background to a new drawable adjust the padding of my ImageView, im confused **** ENDING LOGGING AT Thu Dec 03 03:01:11 2015